[53310] users/dweber/graphics/vtk-devel/Portfile

dweber at macports.org dweber at macports.org
Thu Jul 2 17:41:57 PDT 2009


Revision: 53310
          http://trac.macports.org/changeset/53310
Author:   dweber at macports.org
Date:     2009-07-02 17:41:56 -0700 (Thu, 02 Jul 2009)
Log Message:
-----------
depends on gnutar; abstract post-destroot phases for python and tcl variants; move binaries into version specific files and make symlinks; consolidate all the convenience variants into one section; borrowed some python config procedure from InsightToolkit; still under development and testing for revision 4.

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

Modified Paths:
--------------
    users/dweber/graphics/vtk-devel/Portfile

Modified: users/dweber/graphics/vtk-devel/Portfile
===================================================================
--- users/dweber/graphics/vtk-devel/Portfile	2009-07-03 00:33:32 UTC (rev 53309)
+++ users/dweber/graphics/vtk-devel/Portfile	2009-07-03 00:41:56 UTC (rev 53310)
@@ -31,28 +31,30 @@
 
 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  \
-                port:readline
+                port:readline \
+                port:gnutar
 
+
 # Use gmake and build in a separate directory from the source
 build.type      gnu
 build.dir       ${workpath}/${distname}-build
 
 use_parallel_build  no
 
+# Global variables (used in 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}
+set vtkBuildBinPath ${build.dir}/bin
+
 # Using this dummy stage to inspect MacPorts variables (using 'port -d fetch vtk-devel')
 #fetch { system "echo ${configure.args} " }
 
@@ -120,6 +122,21 @@
         -DCMAKE_OSX_SYSROOT=${universal_sysroot}
 }
 
+
+# General post-destroot, see also variant specific sections below
+post-destroot {
+    # create version specific binaries and symlinks
+    if [file exists ${destroot}${prefix}/bin/vtkEncodeString] {
+        move ${destroot}${prefix}/bin/vtkEncodeString ${destroot}${prefix}/bin/vtk-${branch}-EncodeString
+        ln -f -s vtk-${branch}-EncodeString ${destroot}${prefix}/bin/vtkEncodeString 
+    }
+    if [file exists ${destroot}${prefix}/bin/lproj] {
+        move ${destroot}${prefix}/bin/lproj ${destroot}${prefix}/bin/vtk-${branch}-lproj
+        ln -f -s vtk-${branch}-lproj ${destroot}${prefix}/bin/lproj 
+    }
+}
+
+
 # -----------------------------------------------------------------------------
 # PLATFORMS: platform darwin <version>
 # Can be used to handle different tasks depending
@@ -157,21 +174,36 @@
     default_variants-append +cocoa
 }
 
+
+# --- Convenience variants
+
 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" {}
+    requires core cocoa shared wrap database mpi boost \
+    description "provide core cocoa shared wrap database mpi boost" {}
 
+variant core \
+    requires data doc examples testing \
+    description "provide data doc examples testing" {}
 
+variant wrap \
+    requires java py26 tcl \
+    description "provide java, py26, & tcl" {}
+
+variant database \
+    requires mysql5 pgsql83 odbc \
+    description "provide all database variants" {}
+
+
 # --- Build variants
 
-variant debug conflicts release description "debug build setting" {
+variant debug conflicts release description "debug build" {
     configure.args-delete \
         -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
     configure.args-append \
         -DCMAKE_BUILD_TYPE:STRING=Debug
 }
 
-variant release conflicts debug description "release build setting" {
+variant release conflicts debug description "release build" {
     configure.args-delete \
         -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
     configure.args-append \
@@ -218,6 +250,54 @@
 }
 
 
+#variant system_libs description "build with various system libs" {
+#    configure.args-append \
+#        -DVTK_USE_SYSTEM_EXPAT:BOOL=ON \
+#        -DVTK_USE_SYSTEM_FREETYPE:BOOL=ON \
+#        -DVTK_USE_SYSTEM_JPEG:BOOL=ON \
+#        -DVTK_USE_SYSTEM_LIBPROJ4:BOOL=ON \
+#        -DVTK_USE_SYSTEM_LIBXML2:BOOL=ON \
+#        -DVTK_USE_SYSTEM_PNG:BOOL=ON \
+#        -DVTK_USE_SYSTEM_TIFF:BOOL=ON \
+#        -DVTK_USE_SYSTEM_ZLIB:BOOL=ON
+#}
+
+
+# --- Graphics build variants: carbon, cocoa, x11
+
+
+variant carbon conflicts cocoa x11 description "build with Carbon" {
+    configure.args-delete   \
+        -DVTK_USE_CARBON:BOOL=OFF
+    configure.args-append   \
+        -DVTK_USE_CARBON:BOOL=ON
+}
+
+
+variant cocoa conflicts carbon x11 description "build with Cocoa (default)" {
+    configure.args-delete   \
+        -DVTK_USE_COCOA:BOOL=OFF
+    configure.args-append   \
+        -DVTK_USE_COCOA:BOOL=ON
+}
+
+
+variant x11 conflicts cocoa carbon description "build with X11" {
+    depends_lib-append    port:mesa port:Xft2 port:xorg-libXScrnSaver port:xorg-libXt
+    configure.args-delete   \
+        -DVTK_USE_X:BOOL=OFF
+    configure.args-append   \
+        -DVTK_USE_X:BOOL=ON \
+        -DOPENGL_gl_LIBRARY:FILEPATH=${prefix}/lib/libGL.dylib \
+        -DOPENGL_glu_LIBRARY:FILEPATH=${prefix}/lib/libGLU.dylib \
+        -DOPENGL_INCLUDE_DIR:PATH=${prefix}/include \
+        -DVTK_GLEXT_FILE:FILEPATH=${prefix}/include/GL/glext.h \
+        -DVTK_GLXEXT_FILE:FILEPATH=${prefix}/include/GL/glxext.h \
+        -DVTK_OPENGL_HAS_OSMESA:BOOL=ON
+        #-DVTK_USE_MANGLED_MESA:BOOL=OFF
+}
+
+
 # --- "Core" variants for VTK: data, doc, examples, testing
 
 
@@ -231,16 +311,7 @@
         -DVTK_DATA_ROOT:PATH=${vtkDataPath}
     post-destroot {
         xinstall -d -o root -g admin -m 0755 ${destroot}/${vtkDataPath}
-        # tar-1.14 uses --strip-path, tar-1.14.90+ uses --strip-components
-        set tarArg "--strip-components"
-        set tarVersion [lrange [split [exec tar --version]] 3 3]
-        set tarMaj [lrange [split $tarVersion .] 0 0]
-        set tarMin [lrange [split $tarVersion .] 1 1]
-        set tarRev [lrange [split $tarVersion .] 2 2]
-        if (expr $tarMaj == 1 && $tarMin == 14 && $tarRev < 90) {
-            set tarArg "--strip-path"
-        }
-        system "tar $tarArg 1 -C ${destroot}/${vtkDataPath} -zxvf ${distpath}/${vtkDataFile}"
+        system "gnutar --strip-components 1 -C ${destroot}/${vtkDataPath} -zxvf ${distpath}/${vtkDataFile}"
     }
 }
 
@@ -255,7 +326,7 @@
         xinstall -d -o root -g admin -m 0755 ${destroot}/${vtkDocPath}
         xinstall -d -o root -g admin -m 0755 ${destroot}/${prefix}/share/doc
         # Add the doxygen documentation
-        system "tar -C ${destroot}/${vtkDocPath} -zxf ${distpath}/${vtkDocFile}"
+        system "gnutar -C ${destroot}/${vtkDocPath} -zxf ${distpath}/${vtkDocFile}"
         # Add basic documentation
         file copy ${worksrcpath}/README.html   ${destroot}/${vtkDocPath}
         file copy ${worksrcpath}/Copyright.txt ${destroot}/${vtkDocPath}
@@ -273,10 +344,11 @@
 
 
 proc resetLibLinks { inputPath } {
-    # The example and testing binaries are built, but they are not "installed".
-    # All their rpath settings point to the build.dir, so they must be
-    # reset using install_name_tool for the destroot install.
-    global buildBinPath vtkLibPath
+    # The example and testing binaries are built, but they are not
+    # "installed" with the correct rpath settings.  All their rpath settings
+    # point to the build.dir, so they must be reset using install_name_tool for
+    # the destroot install.
+    global vtkBuildBinPath vtkLibPath
     foreach f [glob ${inputPath}/*] {
         if [string equal [file extension ${f}] ".app"] {
             set exeName [file rootname [lindex [file split ${f}] end]]
@@ -285,7 +357,7 @@
         if [expr [file isfile ${f}] && [file executable ${f}]] {
             foreach dep [exec otool -L ${f}] {
                 if [string match "*/libvtk*.dylib" ${dep}] {
-                    set newdep [strsed ${dep} #${buildBinPath}#${vtkLibPath}#]
+                    set newdep [strsed ${dep} #${vtkBuildBinPath}#${vtkLibPath}#]
                     system "install_name_tool -change ${dep} ${newdep} ${f}"
                 }
             }
@@ -305,13 +377,12 @@
             file copy ${f} ${destroot}/${vtkExamplePath}/
         }
         # Installations for the example binaries are in ${build.dir}/bin/.
-        set buildBinPath ${build.dir}/bin
-        foreach f [glob ${buildBinPath}/*] {
+        foreach f [glob ${vtkBuildBinPath}/*] {
             if {![string match {*.dylib} ${f}]} {
               file copy ${f} ${destroot}/${vtkExamplePath}/bin/
             }
         }
-        if { [variant_isset shared] } {
+        if [variant_isset shared] {
             resetLibLinks ${destroot}/${vtkExamplePath}/bin
         }
     }
@@ -335,55 +406,18 @@
             }
         }
         # Installations for the test binaries are in ${build.dir}/bin/.
-        set buildBinPath ${build.dir}/bin
-        foreach f [glob ${buildBinPath}/*Test*] {
+        foreach f [glob ${vtkBuildBinPath}/*Test*] {
             if {![string match {*.dylib} ${f}]} {
               file copy ${f} ${destroot}/${vtkTestingPath}/bin/
             }
         }
-        if { [variant_isset shared] } {
+        if [variant_isset shared] {
             resetLibLinks ${destroot}/${vtkTestingPath}/bin
         }
     }
 }
 
 
-# --- Graphics subsystem variants: carbon, cocoa, x11
-
-
-variant carbon conflicts cocoa x11 description "build with Carbon" {
-    configure.args-delete   \
-        -DVTK_USE_CARBON:BOOL=OFF
-    configure.args-append   \
-        -DVTK_USE_CARBON:BOOL=ON
-}
-
-
-variant cocoa conflicts carbon x11 description "build with Cocoa (default)" {
-    configure.args-delete   \
-        -DVTK_USE_COCOA:BOOL=OFF
-    configure.args-append   \
-        -DVTK_USE_COCOA:BOOL=ON
-}
-
-
-variant x11 conflicts cocoa carbon description "build with X11" {
-    depends_lib-append    port:mesa port:Xft2 port:xorg-libXScrnSaver port:xorg-libXt
-    configure.args-delete   \
-        -DVTK_USE_X:BOOL=OFF
-    configure.args-append   \
-        -DVTK_USE_X:BOOL=ON \
-        -DOPENGL_gl_LIBRARY:FILEPATH=${prefix}/lib/libGL.dylib \
-        -DOPENGL_glu_LIBRARY:FILEPATH=${prefix}/lib/libGLU.dylib \
-        -DOPENGL_INCLUDE_DIR:PATH=${prefix}/include \
-        -DVTK_GLEXT_FILE:FILEPATH=${prefix}/include/GL/glext.h \
-        -DVTK_GLXEXT_FILE:FILEPATH=${prefix}/include/GL/glxext.h \
-        -DVTK_OPENGL_HAS_OSMESA:BOOL=ON
-        #-DVTK_USE_MANGLED_MESA:BOOL=OFF
-}
-
-
-
 # --- Language wrappers: java, python, tcl
 #
 # VTK has its own language parser, it doesn't depend on swig or cableswig (as
@@ -393,9 +427,6 @@
 # i.e.: depends_build-append port:byacc port:flex
 
 
-variant wrap requires java py26 tcl description "provide java, py26, & tcl" {}
-
-
 variant java description "java wrapper" {
     configure.args-delete \
         -DVTK_WRAP_JAVA:BOOL=OFF
@@ -414,6 +445,16 @@
     #JAVA_INCLUDE_PATH2:PATH=/System/Library/Frameworks/JavaVM.framework/Headers
     #JAVA_JVM_LIBRARY:FILEPATH=-framework JavaVM
     #JAVA_RUNTIME:FILEPATH=/usr/bin/java
+    post-destroot {
+        if [file exists ${destroot}${prefix}/bin/vtkWrapJava] {
+            move ${destroot}${prefix}/bin/vtkWrapJava ${destroot}${prefix}/bin/vtk-${branch}-WrapJava
+            ln -f -s vtk-${branch}-WrapJava ${destroot}${prefix}/bin/vtkWrapJava 
+        }
+        if [file exists ${destroot}${prefix}/bin/vtkParseJava] {
+            move ${destroot}${prefix}/bin/vtkParseJava ${destroot}${prefix}/bin/vtk-${branch}-ParseJava
+            ln -f -s vtk-${branch}-ParseJava ${destroot}${prefix}/bin/vtkParseJava 
+        }
+    }
 }
 
 
@@ -447,53 +488,86 @@
 # 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       python${major}${minor}
-    set pyframe      Library/Frameworks/Python.framework/Versions/${pyver}
+    global pyVer python pyPort pyBin pyLib pyInc pyFrame pySite
+    set pyVer       ${major}.${minor}
+    set python      python${pyVer}
+    set pyPort      python${major}${minor}
+    set pyFrame     Library/Frameworks/Python.framework/Versions/${pyVer}
+    set pyLib       ${pyFrame}/Python
+    #set pyLib       lib/${python}
+    set pyBin       bin/${python}
+    set pyInc       include/${python}
+    set pySite      lib/${python}/site-packages
+    if [string match "2.6" ${pyVer}] {
+        # python2.6 is a framework installation, whereas installs for 2.4
+        # and 2.5 contain symlinks in the framework path to the prefix path;
+        # those symlinks can break the file_map stage of port activation.
+        set pyBin   ${pyFrame}/bin/${python}
+        set pyInc   ${pyFrame}/include/${python}
+        set pySite  ${pyFrame}/lib/${python}/site-packages
+    }
 }
 # Initialize the global variables for python26
 setPython
 
+proc pyPostDestroot { {major 2} {minor 6} } {
+    global pyVer python pyPort pyBin pyLib pyInc pyFrame pySite
+    global branch destroot prefix
+    global vtkBuildBinPath vtkLibPath
+    setPython $major $minor
+    # Reset the name of the vtkpython binaries; create symlinks to the
+    # version specific binaries, in case other apps look for them.
+    if [file exists ${destroot}${prefix}/bin/vtkpython] {
+        move ${destroot}${prefix}/bin/vtkpython ${destroot}${prefix}/bin/vtk-${branch}-${pyPort}
+        ln -f -s vtk-${branch}-${pyPort} ${destroot}${prefix}/bin/vtkpython 
+    }
+    if [file exists ${destroot}${prefix}/bin/pvtkpython] {
+        move ${destroot}${prefix}/bin/pvtkpython ${destroot}${prefix}/bin/pvtk-${branch}-${pyPort}
+        ln -f -s pvtk-${branch}-${pyPort} ${destroot}${prefix}/bin/pvtkpython 
+    }
+    if [file exists ${destroot}${prefix}/bin/vtkWrapPython] {
+        move ${destroot}${prefix}/bin/vtkWrapPython ${destroot}${prefix}/bin/vtk-${branch}-WrapPython${pyVer}
+        ln -f -s vtk-${branch}-WrapPython${pyVer} ${destroot}${prefix}/bin/vtkWrapPython 
+    }
+    if [file exists ${destroot}${prefix}/bin/vtkWrapPythonInit] {
+        move ${destroot}${prefix}/bin/vtkWrapPythonInit ${destroot}${prefix}/bin/vtk-${branch}-WrapPython${pyVer}Init
+        ln -f -s vtk-${branch}-WrapPython${pyVer}Init ${destroot}${prefix}/bin/vtkWrapPythonInit 
+    }
+    ################################################################################
+    # Is it possible to change the python site-package name and have it all work OK?
+    # 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 vtkSitePackage ${destroot}${prefix}/${pySite}/vtk
+    foreach f [glob ${vtkSitePackage}/*.so] {
+        foreach dep [exec otool -L ${f}] {
+            if [string match "*libvtk*.dylib" ${dep}] {
+                set newdep [strsed ${dep} #${vtkBuildBinPath}#${vtkLibPath}#]
+                system "install_name_tool -change ${dep} ${newdep} ${f}"
+            }
+        }
+    }
+}
 
 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}
+        port:${pyPort}
     configure.args-delete \
         -DVTK_WRAP_PYTHON:BOOL=OFF
     configure.args-append \
         -DVTK_WRAP_PYTHON:BOOL=ON \
         -DVTK_NO_PYTHON_THREADS:BOOL=OFF \
-        -DPYTHON_INCLUDE_PATH:FILEPATH=${prefix}/include/${python} \
-        -DPYTHON_LIBRARY:FILEPATH=${prefix}/lib/lib${python}.dylib \
-        -DPYTHON_DEBUG_LIBRARY:FILEPATH=${prefix}/lib/lib${python}.dylib \
-        -DPYTHON_EXECUTABLE:FILEPATH=${prefix}/bin/${python} \
+        -DPYTHON_INCLUDE_PATH:FILEPATH=${prefix}/${pyInc} \
+        -DPYTHON_LIBRARY:FILEPATH=${prefix}/${pyLib} \
+        -DPYTHON_DEBUG_LIBRARY:FILEPATH=${prefix}/${pyLib} \
+        -DPYTHON_EXECUTABLE:FILEPATH=${prefix}/${pyBin} \
         -DVTK_PYTHON_SETUP_ARGS:STRING='--prefix=${prefix} --root=${destroot}'
         # The VTK_PYTHON_SETUP_ARGS *MUST* be in single quotes
     post-destroot {
-        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:  .../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 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}#]
-                    system "install_name_tool -change ${dep} ${newdep} ${f}"
-                }
-            }
-        }
+        pyPostDestroot 2 5
     }
 }
 
@@ -501,12 +575,18 @@
     # Note that python26 is installed as a framework (May 2009)
     setPython 2 6
     depends_lib-append \
-        port:${pyport}
+        port:${pyPort}
     configure.args-delete \
         -DVTK_WRAP_PYTHON:BOOL=OFF
     configure.args-append \
         -DVTK_WRAP_PYTHON:BOOL=ON \
         -DVTK_NO_PYTHON_THREADS:BOOL=OFF \
+        -DPYTHON_INCLUDE_PATH:FILEPATH=${prefix}/${pyInc} \
+        -DPYTHON_LIBRARY:FILEPATH=${prefix}/${pyLib} \
+        -DPYTHON_DEBUG_LIBRARY:FILEPATH=${prefix}/${pyLib} \
+        -DPYTHON_EXECUTABLE:FILEPATH=${prefix}/${pyBin} \
+        -DVTK_PYTHON_SETUP_ARGS:STRING='--prefix=${prefix}/${pyFrame} --root=${destroot}'
+    #configure.args-append \
         -DPYTHON_INCLUDE_PATH:FILEPATH=${prefix}/${pyframe}/Headers \
         -DPYTHON_LIBRARY:FILEPATH=${prefix}/lib/lib${python}.dylib \
         -DPYTHON_DEBUG_LIBRARY:FILEPATH=${prefix}/lib/lib${python}.dylib \
@@ -515,30 +595,36 @@
         # For 2.6, it needs to be installed into ${pyframe}/lib/${python}/site-packages
         # The VTK_PYTHON_SETUP_ARGS *MUST* be in single quotes
     post-destroot {
-        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:  .../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 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}#]
-                    system "install_name_tool -change ${dep} ${newdep} ${f}"
-                }
-            }
-        }
+        pyPostDestroot 2 6
     }
 }
 
 
+proc tclPostDestroot {} {
+    global branch destroot prefix
+    # Reset the name of the vtk tcl binaries; create symlinks to the
+    # version specific installation, in case other apps look for the binaries by
+    # a default name; these symlinks might conflict across vtk versions, may
+    # require a vtk-select port to set them if multiple vtk versions are
+    # installed.
+    if [file exists ${destroot}${prefix}/bin/vtk] {
+        move ${destroot}${prefix}/bin/vtk ${destroot}${prefix}/bin/vtk-${branch}-tcl
+        ln -f -s vtk-${branch}-tcl ${destroot}${prefix}/bin/vtk
+    }
+    if [file exists ${destroot}${prefix}/bin/pvtk] {
+        move ${destroot}${prefix}/bin/pvtk ${destroot}${prefix}/bin/pvtk-${branch}-tcl
+        ln -f -s pvtk-${branch}-tcl ${destroot}${prefix}/bin/pvtk
+    }
+    if [file exists ${destroot}${prefix}/bin/vtkWrapTcl] {
+        move ${destroot}${prefix}/bin/vtkWrapTcl ${destroot}${prefix}/bin/vtk-${branch}-WrapTcl
+        ln -f -s vtk-${branch}-WrapTcl ${destroot}${prefix}/bin/vtkWrapTcl 
+    }
+    if [file exists ${destroot}${prefix}/bin/vtkWrapTclInit] {
+        move ${destroot}${prefix}/bin/vtkWrapTclInit ${destroot}${prefix}/bin/vtk-${branch}-WrapTclInit
+        ln -f -s vtk-${branch}-WrapTclInit ${destroot}${prefix}/bin/vtkWrapTclInit 
+    }
+}
+
 variant tcl conflicts tcl_apple description "tcl wrapper (MacPorts tcl/tk)" {
     depends_lib-append \
         port:tcl \
@@ -554,14 +640,11 @@
         -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 (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
+        tclPostDestroot
     }
 }
 
-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 \
@@ -572,19 +655,14 @@
         -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 (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
+        tclPostDestroot
     }
 }
 
 
 # --- Database variants
 
-variant database requires mysql5 pgsql83 odbc description "provide all database variants" {}
 
-
 variant mysql5 description "build the MySQL driver for vtkSQLDatabase" {
     depends_lib-append \
         path:bin/mysql_config5:mysql5 \
@@ -694,15 +772,4 @@
 #        -DVTK_USE_CG_SHADERS:BOOL=ON
 #}
 
-#variant system_libs description "build with various system libs" {
-#    configure.args-append \
-#        -DVTK_USE_SYSTEM_EXPAT:BOOL=ON \
-#        -DVTK_USE_SYSTEM_FREETYPE:BOOL=ON \
-#        -DVTK_USE_SYSTEM_JPEG:BOOL=ON \
-#        -DVTK_USE_SYSTEM_LIBPROJ4:BOOL=ON \
-#        -DVTK_USE_SYSTEM_LIBXML2:BOOL=ON \
-#        -DVTK_USE_SYSTEM_PNG:BOOL=ON \
-#        -DVTK_USE_SYSTEM_TIFF:BOOL=ON \
-#        -DVTK_USE_SYSTEM_ZLIB:BOOL=ON
-#}
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090702/919eeb31/attachment-0001.html>


More information about the macports-changes mailing list