[50987] trunk/dports/graphics/vtk-devel/Portfile

dweber at macports.org dweber at macports.org
Thu May 14 14:35:16 PDT 2009


Revision: 50987
          http://trac.macports.org/changeset/50987
Author:   dweber at macports.org
Date:     2009-05-14 14:35:15 -0700 (Thu, 14 May 2009)
Log Message:
-----------
Refined extract phase to avoid data and doc extraction; added proc to define python variables; added more variants, including +huge for just about everything that seems to work; added MPI and Boost builds that appear to be working; the database variants appear to build OK; a few other typographic changes, including descriptions in quotes to get variable expansion; most of the data, doc, etc. variables are all defined globally and clustered near the top of the Portfile; now at revision 3

Revision Links:
--------------
    http://trac.macports.org/changeset/3

Modified Paths:
--------------
    trunk/dports/graphics/vtk-devel/Portfile

Modified: trunk/dports/graphics/vtk-devel/Portfile
===================================================================
--- trunk/dports/graphics/vtk-devel/Portfile	2009-05-14 21:23:55 UTC (rev 50986)
+++ trunk/dports/graphics/vtk-devel/Portfile	2009-05-14 21:35:15 UTC (rev 50987)
@@ -5,10 +5,10 @@
 
 name            vtk-devel
 version         5.4.0
-revision        1
+revision        3
 set branch      [join [lrange [split ${version} .] 0 1] .]
 
-categories      graphics math science devel
+categories      graphics math science devel 
 
 maintainers     dweber openmaintainer
 
@@ -29,6 +29,19 @@
                     sha1 a227caf932315d944cf72008d75df90dd4c554e7 \
                     rmd160 e2140fc35ed974f5fde6b418089554904e197c21
 
+eval extract.only   vtk-${version}.tar.gz
+
+# See variants for details on handling these files.
+# Update the checksums in the variants.
+set vtkDataFile     vtkdata-${version}.tar.gz
+set vtkDataPath     ${prefix}/share/${distname}/data
+set vtkDocFile      vtkDocHtml-${version}.tar.gz
+set vtkDocPath      ${prefix}/share/${distname}/doc
+set vtkExamplePath  ${prefix}/share/${distname}/examples
+set vtkTestingPath  ${prefix}/share/${distname}/testing
+set vtkLibPath      ${prefix}/lib/${distname}
+
+
 platforms       darwin
 
 depends_build   port:cmake  \
@@ -39,14 +52,14 @@
 build.dir       ${workpath}/${distname}-build
 
 # Using this dummy stage to inspect MacPorts variables (using 'port -d fetch vtk-devel')
-#fetch { system "echo ${distfiles} && echo ${checksums}" }
+#fetch { system "echo ${configure.args} " }
 
 post-extract {
-    move ${workpath}/VTK     ${workpath}/${distname}
+    move ${workpath}/VTK ${worksrcpath}
 }
 
 configure {
-    xinstall -d -o root -g admin -m 0755 ${build.dir}
+    xinstall -d -m 0755 ${build.dir}
     system "cd ${build.dir} && cmake ${configure.args} ${worksrcpath}"
 }
 
@@ -120,55 +133,49 @@
 }
 
 
+variant huge \
+    requires cocoa data doc examples shared testing wrap database mpi boost \
+    description "provide cocoa data doc examples shared testing wrap database mpi boost" {}
+
+
 # --- "Core" variants for VTK: data, doc, examples, shared libs, testing
 
 
-variant data description {install example data [default: ${prefix}/share/${distname}/data]} {
-    distfiles-append vtkdata-${version}.tar.gz
-    checksums-append vtkdata-${version}.tar.gz \
-                        md5  283d40f3e499b3a6102d86855d2ca20b \
-                        sha1 a710227e7f7f25f481a36d2fa14bda49756bd39d \
-                        rmd160 160129a0580bd7b70b40d3f7fa61bbd78b586ad8
-    set vtkDataPath ${prefix}/share/${distname}/data
+variant data description "provide example data in: ${vtkDataPath}" {
+    distfiles-append    ${vtkDataFile}
+    checksums-append    ${vtkDataFile} \
+                            md5  283d40f3e499b3a6102d86855d2ca20b \
+                            sha1 a710227e7f7f25f481a36d2fa14bda49756bd39d \
+                            rmd160 160129a0580bd7b70b40d3f7fa61bbd78b586ad8
     configure.args-append \
         -DVTK_DATA_ROOT:PATH=${vtkDataPath}
-    post-extract {
-        move ${workpath}/VTKData ${workpath}/${distname}-data
-    }
     post-destroot {
-        set vtkDataFile ${distpath}/vtkdata-${version}.tar.gz
-        set vtkDataPath ${prefix}/share/${distname}/data
         xinstall -d -o root -g admin -m 0755 ${destroot}/${vtkDataPath}
-        system "tar --strip-components 1 -C ${destroot}/${vtkDataPath} -zxvf ${vtkDataFile}"
+        system "tar --strip-components 1 -C ${destroot}/${vtkDataPath} -zxvf ${distpath}/${vtkDataFile}"
     }
 }
 
 
-variant doc description {provide doxygen documentation [default: ${prefix}/share/${distname}/doc]} {
-    distfiles-append vtkDocHtml-${version}.tar.gz
-    checksums-append vtkDocHtml-${version}.tar.gz \
-                        md5 eb8fcaa5fa8bc8f463084f071b2b978b \
-                        sha1 1a8f8ff20b18bc7ac707846a8ba056b04c827392 \
-                        rmd160 c657f9ce0850eca1bb0a0d7537f0bcf631132f30
-    post-extract {
-        move ${workpath}/html    ${workpath}/${distname}-html
-    }
+variant doc description "provide doxygen documentation in: ${vtkDocPath}" {
+    distfiles-append    ${vtkDocFile}
+    checksums-append    ${vtkDocFile} \
+                            md5 eb8fcaa5fa8bc8f463084f071b2b978b \
+                            sha1 1a8f8ff20b18bc7ac707846a8ba056b04c827392 \
+                            rmd160 c657f9ce0850eca1bb0a0d7537f0bcf631132f30
     post-destroot {
-        set vtkDocDistFile ${distpath}/vtkDocHtml-${version}.tar.gz
-        set vtkDocPathMain ${prefix}/share/${distname}/doc
         set vtkDocPathLink ${prefix}/share/doc/${distname}
-        xinstall -d -o root -g admin -m 0755 ${destroot}/${vtkDocPathMain}
+        xinstall -d -o root -g admin -m 0755 ${destroot}/${vtkDocPath}
         xinstall -d -o root -g admin -m 0755 ${destroot}/${vtkDocPathLink}
-        # Add the doxygen documentation
-        system "tar -C ${destroot}/${vtkDocPathMain} -zxf ${vtkDocDistFile}"
+        # Add the doxygen documentation 
+        system "tar -C ${destroot}/${vtkDocPath} -zxf ${distpath}/${vtkDocFile}"
         # Add basic documentation
-        file copy ${worksrcpath}/README.html   ${destroot}/${vtkDocPathMain}
-        file copy ${worksrcpath}/Copyright.txt ${destroot}/${vtkDocPathMain}
-        file copy ${worksrcpath}/Testing.txt   ${destroot}/${vtkDocPathMain}
+        file copy ${worksrcpath}/README.html   ${destroot}/${vtkDocPath}
+        file copy ${worksrcpath}/Copyright.txt ${destroot}/${vtkDocPath}
+        file copy ${worksrcpath}/Testing.txt   ${destroot}/${vtkDocPath}
         # Create a symlink to the $prefix path (not the destroot path); use the
         # system to do this because the $prefix path doesn't exist yet and the
         # tcl ln command fails, whereas this system command will allow it.
-        system "ln -Fhs ${vtkDocPathMain} ${destroot}/${vtkDocPathLink}"
+        system "ln -Fhs ${vtkDocPath} ${destroot}/${vtkDocPathLink}"
     }
     # A doxygen dependency would add a lot of complexity to vtk, so
     # just use a download instead of building the docs. Otherwise:
@@ -179,13 +186,12 @@
 }
 
 
-variant examples description {provide VTK examples [default: ${prefix}/share/${distname}/examples]} {
+variant examples description "provide VTK examples in: ${vtkExamplePath}" {
     configure.args-delete \
         -DBUILD_EXAMPLES:BOOL=OFF
     configure.args-append \
         -DBUILD_EXAMPLES:BOOL=ON
     post-destroot {
-        set vtkExamplePath ${prefix}/share/${distname}/examples
         xinstall -d -o root -g admin -m 0755 ${destroot}/${vtkExamplePath}/bin
         foreach f [glob ${worksrcpath}/Examples/*] {
             file copy ${f} ${destroot}/${vtkExamplePath}/
@@ -199,7 +205,6 @@
         }
         # All the rpath settings for these binaries point to the build.dir, so
         # they are reset using install_name_tool.
-        set vtkLibPath ${prefix}/lib/${distname}
         foreach f [glob ${destroot}/${vtkExamplePath}/bin/*] {
             if [string equal [file extension ${f}] ".app"] {
                 set exeName [file rootname [lindex [file split ${f}] end]]
@@ -243,7 +248,7 @@
 # is required to ensure that rpath is set for all the installed executables and
 # dylibs.
 
-variant shared description {build shared libraries [default]} {
+variant shared description "build shared libraries (default)" {
     configure.args-delete \
         -DBUILD_SHARED_LIBS:BOOL=OFF
     configure.args-append \
@@ -254,17 +259,16 @@
         -DVTK_USE_RPATH:BOOL=ON
     # Additional options not required here:
     #-DCMAKE_EXE_LINKER_FLAGS:STRING=-rpath ${prefix}/lib \
-    #-DVTK_REQUIRED_EXE_LINKER_FLAGS:STRING=-rpath ${prefix}/lib \
+    #-DVTK_REQUIRED_EXE_LINKER_FLAGS:STRING=-rpath ${prefix}/lib
 }
 
 
-variant testing requires data description {provide VTK tests [default: ${prefix}/share/${distname}/testing]} {
+variant testing requires data description "provide VTK tests in: ${vtkTestingPath}" {
     configure.args-delete \
         -DBUILD_TESTING:BOOL=OFF
     configure.args-append \
         -DBUILD_TESTING:BOOL=ON
     post-destroot {
-        set vtkTestingPath ${prefix}/share/${distname}/testing
         xinstall -d -o root -g admin -m 0755 ${destroot}/${vtkTestingPath}/bin
         # Copy the testing source tree
         foreach d [exec find ${worksrcpath} -type d -name Testing] {
@@ -284,7 +288,6 @@
         }
         # All the rpath settings for these binaries point to the build.dir, so
         # they are reset using install_name_tool.
-        set vtkLibPath ${prefix}/lib/${distname}
         foreach f [glob ${destroot}/${vtkTestingPath}/bin/*] {
             if [string equal [file extension ${f}] ".app"] {
                 set exeName [file rootname [lindex [file split ${f}] end]]
@@ -306,7 +309,7 @@
 # --- Graphics subsystem variants: carbon, cocoa, x11
 
 
-variant carbon conflicts cocoa x11 description {build with Carbon} {
+variant carbon conflicts cocoa x11 description "build with Carbon" {
     configure.args-delete   \
         -DVTK_USE_CARBON:BOOL=OFF
     configure.args-append   \
@@ -314,7 +317,7 @@
 }
 
 
-variant cocoa conflicts carbon x11 description {build with Cocoa [default]} {
+variant cocoa conflicts carbon x11 description "build with Cocoa (default)" {
     configure.args-delete   \
         -DVTK_USE_COCOA:BOOL=OFF
     configure.args-append   \
@@ -322,7 +325,7 @@
 }
 
 
-variant x11 conflicts cocoa carbon description {build with X11} {
+variant x11 conflicts cocoa carbon description "build with X11" {
     depends_lib-append    \
         port:xorg-libs \
         port:xorg-proto \
@@ -351,7 +354,10 @@
 # i.e.: depends_build-append port:byacc port:flex
 
 
-variant java description {java wrapper} {
+variant wrap requires java py26 tcl description "provide java, py26, & tcl" {}
+
+
+variant java description "java wrapper" {
     configure.args-delete \
         -DVTK_WRAP_JAVA:BOOL=OFF
     configure.args-append \
@@ -375,13 +381,14 @@
 # It might be possible to install vtk for both python25 and python26 (etc.), but
 # that may require separate ports because the build and install process for vtk
 # can only work with one at a time.  The build is a lengthy process and there
-# may be no easy way to short-circuit it with a dependency on a prior binary
-# install of vtk.  If there are separate ports of vtk for different versions of
-# python, each port will incur a lengthy build process.  Moreover, it's not
-# clear that the install process can be specifically selected for python only,
-# without also installing all of vtk.  For that reason, it may be best to avoid
-# separate ports of vtk for each python version.  The preference should be to
-# install vtk for the latest compatible version of python.
+# may be, as yet, no easy way to run a post-build wrapper with a dependency on a
+# prior install of vtk.  At present, if there are separate ports of vtk for
+# different versions of python, each port will incur a lengthy build process.
+# Moreover, it's not clear that the install process can be specifically selected
+# for python only, without also installing all of vtk.  For that reason,
+# it may be best to avoid separate ports of vtk for each python version.  The
+# preference should be to install vtk for the latest compatible version of
+# python.
 #
 # Hence, these variants for py25 and py26 must conflict.  At some point, the
 # py25 variant could disappear.  Likewise py26 could disappear if vtk works in
@@ -393,15 +400,27 @@
 # I don't see a port for libutil.  If one arises, it should become a
 # dependency for any python variant.
 #
-#// Extra libraries to link when linking to python (such as "z" for zlib).  Separate multiple libraries with semicolons.
+#// Extra libraries to link when linking to python (such as "z" for zlib).
+#// Separate multiple libraries with semicolons.
 #PYTHON_EXTRA_LIBS:STRING=
 #
 
-variant py25 conflicts py26 requires shared description {python 2.5 wrapper} {
-    set pyver        2.5
+# A procedure to set or reset python variables (defaults to python26).
+# This is called from within pyXY variants like this: setPython X Y
+proc setPython { {major 2} {minor 6} } {
+    global pyver python pyport pyframe
+    set pyver        ${major}.${minor}
     set python       python${pyver}
-    set pyport       [join [lrange [split ${python} .] 0 1] ""]
-    set pyframe      ${prefix}/Library/Frameworks/Python.framework/Versions/${pyver}
+    set pyport       python${major}${minor}
+    set pyframe      Library/Frameworks/Python.framework/Versions/${pyver}
+}
+# Initialize the global variables for python26
+setPython
+
+
+variant py25 conflicts py26 requires shared description "python 2.5 wrapper" {
+    # Note that python25 is NOT installed as a framework (May 2009)
+    setPython 2 5
     depends_lib-append \
         port:${pyport}
     configure.args-delete \
@@ -414,24 +433,21 @@
         -DPYTHON_DEBUG_LIBRARY:FILEPATH=${prefix}/lib/lib${python}.dylib \
         -DPYTHON_EXECUTABLE:FILEPATH=${prefix}/bin/${python} \
         -DVTK_PYTHON_SETUP_ARGS:STRING='--prefix=${prefix} --root=${destroot}'
-        # The VTK_PYTHON_SETUP_ARGS *MUST* be in single quotes
+        # The VTK_PYTHON_SETUP_ARGS *MUST* be in single quotes 
     post-destroot {
-        # Redefine all the python variables in this clause (they are not carried
-        # through from the definitions above in the variant).
-        set pyver        2.5
-        set python       python${pyver}
-        set pyport       [join [lrange [split ${python} .] 0 1] ""]
-        set pyframe      ${prefix}/Library/Frameworks/Python.framework/Versions/${pyver}
-        # Reset the name of the vtkpython binary
+        setPython 2 5
+        # Reset the name of the vtkpython binary (create a symlink to the
+        # version specific installation, in case other apps look for vtkpython)
         move ${destroot}${prefix}/bin/vtkpython ${destroot}${prefix}/bin/vtk-${branch}-${pyport}
+        ln -f -s ${destroot}${prefix}/bin/vtk-${branch}-${pyport} ${destroot}${prefix}/bin/vtkpython 
         # Is it possible to change the python site-package name and have it all work OK?
-        # from:  /opt/local/lib/python2.6/site-packages/vtk
-        # to:    /opt/local/lib/python2.6/site-packages/vtk-5.4
+        # from:  .../lib/python2.5/site-packages/vtk
+        # to:    .../lib/python2.5/site-packages/vtk-5.4 
         # Reset the RPATH for all the python .so files
         set buildBinPath ${build.dir}/bin
         set vtkLibPath ${prefix}/lib/${distname}
-        set vtkPythonPackage ${destroot}${prefix}/lib/${python}/site-packages/vtk
-        foreach f [glob ${vtkPythonPackage}/*.so] {
+        set vtkSitePackage ${destroot}/${prefix}/lib/${python}/site-packages/vtk
+        foreach f [glob ${vtkSitePackage}/*.so] {
             foreach dep [exec otool -L ${f}] {
                 if [string match "*libvtk*.dylib" ${dep}] {
                     set newdep [strsed ${dep} #${buildBinPath}#${vtkLibPath}#]
@@ -442,42 +458,37 @@
     }
 }
 
-variant py26 conflicts py25 requires shared description {python 2.6 wrapper} {
-    set pyver        2.6
-    set python       python${pyver}
-    set pyport       [join [lrange [split ${python} .] 0 1] ""]
-    set pyframe      ${prefix}/Library/Frameworks/Python.framework/Versions/${pyver}
+variant py26 conflicts py25 requires shared description "python 2.6 wrapper" {
+    # Note that python26 is installed as a framework (May 2009)
+    setPython 2 6
     depends_lib-append \
         port:${pyport}
     configure.args-delete \
-        -DVTK_WRAP_PYTHON:BOOL=OFF
+        -DVTK_WRAP_PYTHON:BOOL=OFF 
     configure.args-append \
         -DVTK_WRAP_PYTHON:BOOL=ON \
         -DVTK_NO_PYTHON_THREADS:BOOL=OFF \
-        -DPYTHON_INCLUDE_PATH:FILEPATH=${prefix}/Library/Frameworks/Python.framework/Versions/${pyver}/Headers \
+        -DPYTHON_INCLUDE_PATH:FILEPATH=${prefix}/${pyframe}/Headers \
         -DPYTHON_LIBRARY:FILEPATH=${prefix}/lib/lib${python}.dylib \
         -DPYTHON_DEBUG_LIBRARY:FILEPATH=${prefix}/lib/lib${python}.dylib \
         -DPYTHON_EXECUTABLE:FILEPATH=${prefix}/bin/${python} \
-        -DVTK_PYTHON_SETUP_ARGS:STRING='--prefix=${pyframe} --root=${destroot}'
+        -DVTK_PYTHON_SETUP_ARGS:STRING='--prefix=${prefix}/${pyframe} --root=${destroot}'
         # For 2.6, it needs to be installed into ${pyframe}/lib/${python}/site-packages
-        # The VTK_PYTHON_SETUP_ARGS *MUST* be in single quotes
+        # The VTK_PYTHON_SETUP_ARGS *MUST* be in single quotes 
     post-destroot {
-        # Redefine all the python variables in this clause (they are not carried
-        # through from the definitions above in the variant).
-        set pyver        2.6
-        set python       python${pyver}
-        set pyport       [join [lrange [split ${python} .] 0 1] ""]
-        set pyframe      ${prefix}/Library/Frameworks/Python.framework/Versions/${pyver}
-        # Reset the name of the vtkpython binary
+        setPython 2 6
+        # Reset the name of the vtkpython binary (create a symlink to the
+        # version specific installation, in case other apps look for vtkpython)
         move ${destroot}${prefix}/bin/vtkpython ${destroot}${prefix}/bin/vtk-${branch}-${pyport}
+        ln -f -s ${destroot}${prefix}/bin/vtk-${branch}-${pyport} ${destroot}${prefix}/bin/vtkpython 
         # Is it possible to change the python site-package name and have it all work OK?
-        # from:  /opt/local/lib/python2.6/site-packages/vtk
-        # to:    /opt/local/lib/python2.6/site-packages/vtk-5.4
+        # from:  .../lib/python2.6/site-packages/vtk
+        # to:    .../lib/python2.6/site-packages/vtk-5.4 
         # Reset the RPATH for all the python .so files
         set buildBinPath ${build.dir}/bin
         set vtkLibPath ${prefix}/lib/${distname}
-        set vtkPythonPackage ${destroot}${pyframe}/lib/${python}/site-packages/vtk
-        foreach f [glob ${vtkPythonPackage}/*.so] {
+        set vtkSitePackage ${destroot}/${prefix}/${pyframe}/lib/${python}/site-packages/vtk
+        foreach f [glob ${vtkSitePackage}/*.so] {
             foreach dep [exec otool -L ${f}] {
                 if [string match "*libvtk*.dylib" ${dep}] {
                     set newdep [strsed ${dep} #${buildBinPath}#${vtkLibPath}#]
@@ -488,9 +499,8 @@
     }
 }
 
-# Note: VTK_TCL_TK_STATIC is not specified here, it's OFF by default
 
-variant tcl conflicts tcl_apple description {tcl wrapper (MacPorts tcl/tk)} {
+variant tcl conflicts tcl_apple description "tcl wrapper (MacPorts tcl/tk)" {
     depends_lib-append \
         port:tcl \
         port:tk
@@ -503,13 +513,16 @@
         -DTCL_LIBRARY:FILEPATH=${prefix}/lib/libtcl.dylib \
         -DTK_INCLUDE_PATH:PATH=${prefix}/include \
         -DTK_LIBRARY:FILEPATH=${prefix}/lib/libtk.dylib
+        # VTK_TCL_TK_STATIC is not specified here, it's OFF by default.
     post-destroot {
-        # Reset the name of the vtk tcl binary
+        # Reset the name of the vtk tcl binary (create a symlink to the
+        # version specific installation, in case other apps look for vtk)
         move ${destroot}${prefix}/bin/vtk ${destroot}${prefix}/bin/vtk-${branch}-tcl
+        ln -f -s ${destroot}${prefix}/bin/vtk-${branch}-tcl ${destroot}${prefix}/bin/vtk
     }
 }
 
-variant tcl_apple conflicts tcl description {tcl wrapper (apple tcl/tk framework)} {
+variant tcl_apple conflicts tcl description "tcl wrapper (apple tcl/tk framework)" {
     configure.args-delete \
         -DVTK_WRAP_TCL:BOOL=OFF
     configure.args-append \
@@ -520,23 +533,26 @@
         -DTK_INCLUDE_PATH:PATH=/System/Library/Frameworks/Tk.framework/Headers \
         -DTK_LIBRARY:FILEPATH=/System/Library/Frameworks/tk.framework
     post-destroot {
-        # Reset the name of the vtk tcl binary
+        # Reset the name of the vtk tcl binary (create a symlink to the
+        # version specific installation, in case other apps look for vtk)
         move ${destroot}${prefix}/bin/vtk ${destroot}${prefix}/bin/vtk-${branch}-tcl
+        ln -f -s ${destroot}${prefix}/bin/vtk-${branch}-tcl ${destroot}${prefix}/bin/vtk
     }
 }
 
 
 # --- Database variants
 
+variant database requires mysql5 pgsql83 odbc description "provide all database variants" {}
 
-variant mysql5 description {build the MySQL driver for vtkSQLDatabase} {
+
+variant mysql5 description "build the MySQL driver for vtkSQLDatabase" {
     depends_lib-append \
         path:bin/mysql_config5:mysql5 \
         port:zlib
     pre-configure {
         # Find the directory containing mysql.h
         set includePath [exec ${prefix}/bin/mysql_config5 --include]
-        set includePath [exec ${prefix}/bin/mysql_config5 --include]
         set includePath [string trim ${includePath} -I ]
         #if [ exec find $includePath -name "mysql.h" ]
         set libs [exec ${prefix}/bin/mysql_config5 --libs]
@@ -556,7 +572,7 @@
 }
 
 
-variant pgsql83 description {build the PostgreSQL 8.3 driver for vtkSQLDatabase} {
+variant pgsql83 description "build the PostgreSQL 8.3 driver for vtkSQLDatabase" {
     depends_lib-append \
         path:lib/postgresql83/bin/pg_config:postgresql83
     pre-configure {
@@ -577,7 +593,7 @@
 }
 
 
-variant odbc description {build the ODBC database interface} {
+variant odbc description "build the ODBC database interface" {
     depends_lib-append \
         port:unixODBC
     configure.args-append \
@@ -592,31 +608,45 @@
 # --- Miscellaneous variants
 
 
-variant mpi description {use message passing interface (MPI) for parallel support} {
+variant mpi description "use message passing interface (mpich2) for parallel support" {
+    set nCPU [expr [exec sysctl -n hw.logicalcpu_max]]
     depends_lib-append \
         port:mpich2
     configure.args-append \
-        -DVTK_USE_MPI:BOOL=ON
+        -DVTK_USE_MPI:BOOL=ON \
+        -DMPI_COMPILER:FILEPATH=${prefix}/bin/mpicxx \
+        -DMPIEXEC:FILEPATH=${prefix}/bin/mpiexec \
+        -DMPIEXEC_MAX_NUMPROCS:STRING=${nCPU}
+        # If the MPI_LIBRARY and-or MPI_INCLUDE_PATH are set, then the
+        # FindMPI module will not determine all the cmake variables
+        # automatically (don't set them). It should be sufficient to set the
+        # MPI_COMPILER and leave the rest to the FindMPI module, see:
+        # /opt/local/share/cmake-2.6/Modules/FindMPI.cmake
 }
 
 
-variant boost description {use Boost libraries for graph algorithms - www.boost.org} {
+variant boost description "use Boost libraries - www.boost.org" {
     depends_lib-append \
         port:boost
     configure.args-append \
-        VTK_USE_BOOST:BOOL=ON
-        #Boost_INCLUDE_DIR
+        -DVTK_USE_BOOST:BOOL=ON
+        # All determined automatically:
+        #Boost_INCLUDE_DIR:PATH=/opt/local/include
+        #Boost_LIBRARY_DIRS:FILEPATH=/opt/local/lib
+        #Boost_USE_MULTITHREADED:BOOL=ON
 }
 
 
-#variant qvtk {build QVTK widget and plugin for Qt} {
+
+
+#variant qvtk "build QVTK widget and plugin for Qt" {
 #    # Dependencies?
 #    configure.args-append \
 #        -DVTK_USE_QVTK:BOOL=ON
 #}
 
 
-#variant cg description {build pixel and vertex shader support for Cg} {
+#variant cg description "build pixel and vertex shader support for Cg" {
 #    # Require a new port for cg_toolkit, see downloads at
 #    # http://developer.download.nvidia.com/cg/Cg_2.2/Cg-2.2_April2009.dmg
 #    depends_build-append \
@@ -625,7 +655,7 @@
 #        -DVTK_USE_CG_SHADERS:BOOL=ON
 #}
 
-#variant system_libs description {build with various system libs} {
+#variant system_libs description "build with various system libs" {
 #    configure.args-append \
 #        -DVTK_USE_SYSTEM_EXPAT:BOOL=ON \
 #        -DVTK_USE_SYSTEM_FREETYPE:BOOL=ON \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090514/d158b30c/attachment-0001.html>


More information about the macports-changes mailing list