[71338] trunk/dports/graphics/vtk5/Portfile
raphael at macports.org
raphael at macports.org
Thu Sep 9 08:30:21 PDT 2010
Revision: 71338
http://trac.macports.org/changeset/71338
Author: raphael at macports.org
Date: 2010-09-09 08:30:18 -0700 (Thu, 09 Sep 2010)
Log Message:
-----------
vtk5:
* use cmake portgroup
* collect post-destroot phases of all variants to allow combinations of these phases
* add qt4_mac variant; closes #26376
* add mysql variant; closes #26375
Modified Paths:
--------------
trunk/dports/graphics/vtk5/Portfile
Modified: trunk/dports/graphics/vtk5/Portfile
===================================================================
--- trunk/dports/graphics/vtk5/Portfile 2010-09-09 13:22:00 UTC (rev 71337)
+++ trunk/dports/graphics/vtk5/Portfile 2010-09-09 15:30:18 UTC (rev 71338)
@@ -2,6 +2,7 @@
# $Id$
PortSystem 1.0
+PortGroup cmake 1.0
name vtk5
version 5.6.0
@@ -25,8 +26,7 @@
sha1 355209c485304f1b0feefcda3585d45217ffd230 \
rmd160 b7abf3b9bb14a3db81608c7aa2721935ae653295
-depends_build bin:cmake:cmake \
- port:readline
+depends_build port:readline
distname VTK
use_parallel_build yes
@@ -35,17 +35,12 @@
delete ${worksrcpath}/Utilities/vtktiff/tif_fax3sm.c
}
-configure { system "cd ${worksrcpath} && ${configure.env} cmake ${configure.args} ${worksrcpath}" }
-configure.args \
+configure.args-append \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DVTK_USE_RPATH:BOOL=ON \
- -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \
-DCMAKE_INSTALL_RPATH:STRING=${prefix}/lib/vtk-${branch} \
-DCMAKE_INSTALL_NAME_DIR:STRING=${prefix}/lib/vtk-${branch} \
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON \
- -DCMAKE_LIBRARY_PATH:PATH=${prefix}/lib \
- -DCMAKE_INCLUDE_PATH:PATH=${prefix}/include \
- -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
-DVTK_INSTALL_PREFIX:PATH=${prefix} \
-DVTK_USE_HYBRID:BOOL=ON \
-DVTK_USE_TK:BOOL=OFF \
@@ -58,10 +53,6 @@
-DVTK_USE_GL2PS:BOOL=ON \
-DVTK_WRAP_PYTHON:BOOL=OFF
-configure.env \
- LDFLAGS="-L${prefix}/lib" \
- CPPFLAGS="-I${prefix}/include"
-
post-configure {
reinplace "s|c++|c++ -L${prefix}/lib |" \
${worksrcpath}/Infovis/Testing/Cxx/CMakeFiles/InfovisCxxTests.dir/link.txt \
@@ -76,14 +67,58 @@
build.env-append DYLD_LIBRARY_PATH=${worksrcpath}/bin
-if {![variant_isset carbon]} {
+if {![variant_isset carbon] && ![variant_isset qt4_mac]} {
default_variants +x11 +tcltk
}
if {![variant_isset python25]} {
default_variants +python26
}
-variant x11 conflicts carbon description {Use X11} {
+post-destroot {
+ if {[variant_isset python25]} {
+ file mkdir ${destroot}${prefix}/lib/python2.5/site-packages
+ system "cd ${worksrcpath}/Wrapping/Python && ${prefix}/bin/python2.5 setup.py install --prefix=${prefix} --root=${destroot}"
+ }
+
+ if {[variant_isset python26]} {
+ system "cd ${worksrcpath}/Wrapping/Python && ${prefix}/bin/python2.6 setup.py install --prefix=${frameworks_dir}/Python.framework/Versions/2.6/ --root=${destroot}"
+ }
+
+ if {[variant_isset qt4_mac]} {
+ xinstall -d ${destroot}${prefix}/libexec/qt4-mac/plugins/designer
+ move ${destroot}${prefix}/plugins/designer/libQVTKWidgetPlugin.dylib \
+ ${destroot}${prefix}/libexec/qt4-mac/plugins/designer/
+ }
+
+ set vtkdest ${destroot}${prefix}/share/doc/${name}
+ xinstall -d ${vtkdest}
+
+ if {[variant_isset data]} {
+ # Provide some examples
+ file copy ${worksrcpath}/Examples ${vtkdest}
+ xinstall -W ${worksrcpath}/bin \
+ CommonCxxTests \
+ FilteringCxxTests \
+ GenericFilteringCxxTests \
+ GraphicsCxxTests \
+ IOCxxTests \
+ ImagingCxxTests \
+ RenderingCxxTests \
+ TestCxxFeatures \
+ TestInstantiator \
+ VTKBenchMark \
+ VolumeRenderingCxxTests \
+ WidgetsCxxTests \
+ ${vtkdest}/Examples
+
+ # Provide data files
+ system "tar -C ${destroot}${prefix}/share -xzvf ${distpath}/[suffix vtkdata-${version}]"
+ }
+
+ xinstall -m 644 -W ${worksrcpath} Copyright.txt README.html Testing.txt ${vtkdest}
+}
+
+variant x11 conflicts carbon qt4_mac description {Use X11} {
depends_lib-append port:mesa port:Xft2 port:xorg-libXScrnSaver port:xorg-libXt
configure.args-delete -DVTK_USE_COCOA:BOOL=ON
configure.args-append \
@@ -125,10 +160,6 @@
-DPYTHON_LIBRARY:FILEPATH=${prefix}/lib/libpython2.5.dylib \
-DVTK_WRAP_PYTHON:BOOL=ON \
-DVTK_INSTALL_NO_PYTHON:BOOL=ON
- post-destroot {
- file mkdir ${destroot}${prefix}/lib/python2.5/site-packages
- system "cd ${worksrcpath}/Wrapping/Python && ${prefix}/bin/python2.5 setup.py install --prefix=${prefix} --root=${destroot}"
- }
}
variant python26 description {Build Python 2.6 wrappers} conflicts python25 {
@@ -142,43 +173,27 @@
-DPYTHON_LIBRARY:FILEPATH=${prefix}/lib/libpython2.6.dylib \
-DVTK_WRAP_PYTHON:BOOL=ON \
-DVTK_INSTALL_NO_PYTHON:BOOL=ON
- post-destroot {
- system "cd ${worksrcpath}/Wrapping/Python && ${prefix}/bin/python2.6 setup.py install --prefix=${frameworks_dir}/Python.framework/Versions/2.6/ --root=${destroot}"
- }
}
-set vtkdest ${destroot}${prefix}/share/doc/${name}
+variant qt4_mac conflicts x11 description {Build GUI support with Qt4 (Mac)} {
+ depends_build-append port:qt4-mac
+ configure.args-append -DVTK_USE_QT:BOOL=ON \
+ -DVTK_USE_GUISUPPORT:BOOL=ON
+}
+variant mysql description {Build the MySQL driver for vtkSQLDatabase} {
+ depends_build-append port:zlib \
+ port:mysql5
+ configure.args-append -DVTK_USE_MYSQL:BOOL=ON \
+ -DMYSQL_LIBRARY:FILEPATH=${prefix}/lib/mysql5/mysql/libmysqlclient.dylib \
+ -DMYSQL_INCLUDE_DIRECTORIES:FILEPATH=${prefix}/include/mysql5/mysql/ \
+ -DMYSQL_EXTRA_LIBRARIES:FILEPATH=${prefix}/lib/libz.dylib
+}
+
variant data description {Install data and examples} {
distfiles-append [suffix vtkdata-${version}]
checksums-append [suffix vtkdata-${version}] \
md5 97006362d7d67dc01289daf3e4ec4e38 \
sha1 e0aa26dafd653da1db21fc97ce15aa0599d9c5ad \
rmd160 8499816f6d714408c0f7f584fb4d781f4426e444
- post-destroot {
- # Provide some examples
- file copy ${worksrcpath}/Examples ${vtkdest}
- xinstall -W ${worksrcpath}/bin \
- CommonCxxTests \
- FilteringCxxTests \
- GenericFilteringCxxTests \
- GraphicsCxxTests \
- IOCxxTests \
- ImagingCxxTests \
- RenderingCxxTests \
- TestCxxFeatures \
- TestInstantiator \
- VTKBenchMark \
- VolumeRenderingCxxTests \
- WidgetsCxxTests \
- ${vtkdest}/Examples
-
- # Provide data files
- system "tar -C ${destroot}${prefix}/share -xzvf ${distpath}/[suffix vtkdata-${version}]"
- }
}
-
-post-destroot {
- xinstall -d ${vtkdest}
- xinstall -m 644 -W ${worksrcpath} Copyright.txt README.html Testing.txt ${vtkdest}
-}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100909/ade19add/attachment.html>
More information about the macports-changes
mailing list