[51988] trunk/dports/graphics/InsightToolkit/Portfile

dweber at macports.org dweber at macports.org
Sun Jun 7 20:08:46 PDT 2009


Revision: 51988
          http://trac.macports.org/changeset/51988
Author:   dweber at macports.org
Date:     2009-06-07 20:08:42 -0700 (Sun, 07 Jun 2009)
Log Message:
-----------
Updating to new release 3.14.0; prior release 3.12.0 will become available in new port called InsightToolkit312, which should be able to coexist (co-install and activate) with 3.14.0, if all the version specific file renaming is valid

Modified Paths:
--------------
    trunk/dports/graphics/InsightToolkit/Portfile

Modified: trunk/dports/graphics/InsightToolkit/Portfile
===================================================================
--- trunk/dports/graphics/InsightToolkit/Portfile	2009-06-08 01:53:39 UTC (rev 51987)
+++ trunk/dports/graphics/InsightToolkit/Portfile	2009-06-08 03:08:42 UTC (rev 51988)
@@ -4,10 +4,14 @@
 PortSystem      1.0
 
 name            InsightToolkit
-version         3.12.0
-revision        3
+version         3.14.0
+revision        0
 set branch      [join [lrange [split ${version} .] 0 1] .]
 
+# Online documentation on the 3.14 release:
+# http://www.kitware.com/news/home/browse/ITK?2009_05_28&ITK+3.14+Released
+# http://www.itk.org/Wiki/ITK_Release_3.14
+
 categories      graphics math science devel
 
 maintainers     dweber openmaintainer
@@ -25,13 +29,13 @@
                 CableSwig-ITK-${version}.tar.gz
 
 checksums       InsightToolkit-${version}.tar.gz \
-                    md5  0bdf73a88f0d6936496addf036b07215 \
-                    sha1 7db0e20c8cbfe1c12a3ad86428cb6eefd8169f58 \
-                    rmd160 0adcab3705b96db08dbf5110d9a09cc265821a9d \
+                    md5  7edcef07ff67684e1b93e51da5a2ca55 \
+                    sha1 f6e3c6655c207f09fe6f2a4a3bf3cbd6999c0b89 \
+                    ripemd160 b3d630b682695bb58b8401def4872d89c427812d \
                 CableSwig-ITK-${version}.tar.gz \
-                    md5  04a8610e3724e7fef9207a90fd4bfde3 \
-                    sha1 04ab4f03a8e08267b9e78aafea055ef2a5058798 \
-                    rmd160 5758c7ee205a53a205a8a72a721aafeff7c8b194
+                    md5  2e92685c3a9f88639f1c0620382792c4 \
+                    sha1 b7bfc1a3adf8e5849ac19a71a6ad6ef01ee5eb47 \
+                    ripemd160 806b3fe31901b23e2350d9a8590c0bad97927939
 
 extract.only    InsightToolkit-${version}.tar.gz \
                 CableSwig-ITK-${version}.tar.gz
@@ -118,7 +122,8 @@
     # For some reason, cmake does not install into the CMAKE_INSTALL_NAME_DIR
     move ${destroot}${prefix}/lib/${itkName}       ${destroot}${itkLibPath}
     move ${destroot}${prefix}/include/${itkName}   ${destroot}${itkIncPath}
-    # Create a symlink from the generic lib and include for InsightToolkit to this version
+    # Create a symlink from the generic lib and include for InsightToolkit to
+    # this version; this should be done by InsightToolkitSelect
     ln -sf ${distname} ${destroot}${prefix}/lib/${itkName}
     ln -sf ${distname} ${destroot}${prefix}/include/${itkName}
     # copy FindITK.cmake to a version specific file, which might persist even
@@ -138,6 +143,14 @@
     # Change the content of ITKConfig.cmake
     reinplace "s|${itkName}|${distname}|g" ${destroot}${itkLibPath}/ITKConfig.cmake
     copy ${destroot}${itkLibPath}/ITKConfig.cmake ${destroot}${itkLibPath}/itk-${branch}-config.cmake
+    # Move binaries to version specific binaries
+    foreach f [list ImageCompare  ImageCompareCommand  ImageCopy  itkTestDriver] {
+        if [file isfile ${destroot}${prefix}/bin/$f] {
+            move ${destroot}${prefix}/bin/$f ${destroot}${prefix}/bin/${f}-${branch}
+            # This should be done by InsightToolkitSelect
+            ln -sf ${f}-${branch} ${destroot}${prefix}/bin/$f
+        }
+    }
 }
 
 
@@ -152,23 +165,23 @@
 variant doc description "provide doxygen documentation in ${itkDocPath}" {
     distfiles-append    ${itkDocFile}
     checksums-append    ${itkDocFile} \
-                        md5  99dcad9f8e7a3d0acb9da62efdf5fd13 \
-                        sha1 e6800094f493e6ef2b1484ce2da578a19a978c40 \
-                        rmd160 a20167892a6e91e6f530313c3c057e4d08999d62
+                        md5  04f2f98ddbaf847d5e0b890210992ec7 \
+                        sha1 fec6e64d6b8c7d1f4b64dbb729eb284f89a9f47f \
+                        ripemd160 9b91ff286a6dfd0f9674219641adde1eb3f3a19a
     post-destroot {
         set itkDocPathLink ${prefix}/share/doc/${distname}
-        xinstall -d -o root -g admin -m 0755 ${destroot}/${itkDocPath}
-        xinstall -d -o root -g admin -m 0755 ${destroot}/${itkDocPathLink}
+        xinstall -d -o root -g admin -m 0755 ${destroot}${itkDocPath}
+        xinstall -d -o root -g admin -m 0755 ${destroot}${itkDocPathLink}
         # Add the doxygen documentation 
-        system "tar --strip-components 1 -C ${destroot}/${itkDocPath} -zxf ${distpath}/${itkDocFile}"
+        system "tar --strip-components 1 -C ${destroot}${itkDocPath} -zxf ${distpath}/${itkDocFile}"
         # Add basic documentation
-        file copy ${worksrcpath}/Copyright     ${destroot}/${itkDocPath}/
-        file copy ${worksrcpath}/Copyright.txt ${destroot}/${itkDocPath}/
-        file copy ${worksrcpath}/README.html   ${destroot}/${itkDocPath}/
+        file copy ${worksrcpath}/Copyright     ${destroot}${itkDocPath}/
+        file copy ${worksrcpath}/Copyright.txt ${destroot}${itkDocPath}/
+        file copy ${worksrcpath}/README.html   ${destroot}${itkDocPath}/
         # 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 -Fns ${itkDocPath} ${destroot}/${itkDocPathLink}"
+        system "ln -Fns ${itkDocPath} ${destroot}${itkDocPathLink}"
     }
 }
 
@@ -232,9 +245,9 @@
     configure.args-append \
         -DITK_BRAINWEB_DATA_ROOT:PATH=${itkDataPath}
     post-destroot {
-        xinstall -d -o root -g admin -m 0755 ${destroot}/${itkDataPath}
+        xinstall -d -o root -g admin -m 0755 ${destroot}${itkDataPath}
         foreach tgz [exec find ${distpath} -name "BrainPart*.tgz"] {
-            system "tar -C ${destroot}/${itkDataPath} -zxf ${tgz}"
+            system "tar -C ${destroot}${itkDataPath} -zxf ${tgz}"
         }
     }
 }
@@ -318,9 +331,9 @@
     configure.args-append \
         -DBUILD_EXAMPLES:BOOL=ON
     post-destroot {
-        xinstall -d -o root -g admin -m 0755 ${destroot}/${itkExampleBin}
+        xinstall -d -o root -g admin -m 0755 ${destroot}${itkExampleBin}
         foreach f [glob ${itkExampleSrc}/*] {
-            file copy ${f} ${destroot}/${itkExamplePath}/
+            file copy ${f} ${destroot}${itkExamplePath}/
         }
         # Find all the example executables by parsing all the
         # CMakeLists.txt files within the src Examples path
@@ -341,11 +354,11 @@
         foreach f $exe {
             set f ${itkBuildBin}/${f}
             if [expr [file isfile ${f}] && [file executable ${f}]] {
-                file copy ${f} ${destroot}/${itkExampleBin}
+                file copy ${f} ${destroot}${itkExampleBin}
             }
         }
         # Only do this if the shared variant is selected?
-        resetLibLinks ${destroot}/${itkExampleBin}
+        resetLibLinks ${destroot}${itkExampleBin}
     }
 }
 
@@ -356,9 +369,9 @@
     configure.args-append \
         -DBUILD_TESTING:BOOL=ON
     post-destroot {
-        xinstall -d -o root -g admin -m 0755 ${destroot}/${itkTestingBin}
+        xinstall -d -o root -g admin -m 0755 ${destroot}${itkTestingBin}
         foreach f [glob ${itkTestingSrc}/*] {
-            file copy ${f} ${destroot}/${itkTestingPath}/
+            file copy ${f} ${destroot}${itkTestingPath}/
         }
         # Find all the testing executables by parsing all the
         # CMakeLists.txt files within the itkTestingSrc path
@@ -379,11 +392,11 @@
         foreach f $exe {
             set f ${itkBuildBin}/${f}
             if [expr [file isfile ${f}] && [file executable ${f}]] {
-                file copy ${f} ${destroot}/${itkTestingBin}
+                file copy ${f} ${destroot}${itkTestingBin}
             }
         }
         # Only do this if the shared variant is selected?
-        resetLibLinks ${destroot}/${itkTestingBin}
+        resetLibLinks ${destroot}${itkTestingBin}
     }
 }
 
@@ -437,25 +450,26 @@
         # Could enable this if the example variant is selected:
         #-DSWIG_BUILD_EXAMPLES:BOOL=ON
     post-destroot {
-        # Fix executable permissions and move tclwish to version specific file
-        set itkwishSh ${destroot}/${prefix}/bin/itkwish-${branch}
-        move ${destroot}/${prefix}/bin/itkwish ${itkwishSh}
+        # Reset dynamic library dependency paths (see proc above)
+        resetWrapLibs ${destroot}${itkLibPath}/WrapITK/lib/*.dylib
+        resetWrapLibs ${destroot}${itkLibPath}/WrapITK/lib/*.jnilib
+        # Fix executable permissions and move itkwish to version specific file
+        set itkwishSh ${destroot}${prefix}/bin/itkwish-${branch}
+        move ${destroot}${prefix}/bin/itkwish ${itkwishSh}
         file attributes ${itkwishSh} -permissions 0755
-        ln -s itkwish-${branch} ${destroot}/${prefix}/bin/itkwish
+        # This should be done by InsightToolkitSelect
+        ln -s itkwish-${branch} ${destroot}${prefix}/bin/itkwish
         # Change the content of itkwish
         reinplace "s|${itkName}|${distname}|g" ${itkwishSh}
         reinplace "s|//|/|g" ${itkwishSh}
         # Reset dynamic library dependency paths for itkwish binary
-        set itkwishBin ${destroot}/${itkLibPath}/WrapITK/bin/itkwish
+        set itkwishBin ${destroot}${itkLibPath}/WrapITK/bin/itkwish
         foreach dep [exec otool -L ${itkwishBin}] {
             if [string match "*Tcl.dylib" ${dep}] {
                 set newdep [strsed ${dep} #${itkLibPath}#${itkWrapLibPath}#]
                 system "install_name_tool -change ${dep} ${newdep} ${itkwishBin}"
             }
         }
-        # Reset dynamic library dependency paths (see proc above)
-        resetWrapLibs ${destroot}/${itkLibPath}/WrapITK/lib/*.dylib
-        resetWrapLibs ${destroot}/${itkLibPath}/WrapITK/lib/*.jnilib
     }
 }
 
@@ -561,6 +575,29 @@
 }
 setPython
 
+proc pyPostDestroot {} {
+    # This procedure applies for py25 and py25 (maybe py26)
+    global  destroot prefix branch \
+            itkLibPath itkName distname pySite
+    # Reset dynamic library dependency paths (see proc above)
+    resetWrapLibs ${destroot}${itkLibPath}/WrapITK/lib/*.so
+    # Move WrapITK.pth to version specific file
+    set wrapITKpth ${destroot}${prefix}/${pySite}/WrapITK-${branch}.pth
+    move ${destroot}${prefix}/${pySite}/WrapITK.pth ${wrapITKpth}
+    # This symlink should be done with InsightToolkitSelect
+    ln -s WrapITK-${branch}.pth ${destroot}${prefix}/${pySite}/WrapITK.pth
+    # Change the content of WrapITK.pth (for any python version)
+    reinplace "s|${itkName}|${distname}|g" ${wrapITKpth}
+    reinplace "s|//|/|g" ${wrapITKpth}
+    # Change the content of FindWrapITK.cmake (for any python version)
+    set findWrapITK [glob ${destroot}${prefix}/share/cmake-*/Modules/FindWrapITK.cmake]
+    regsub FindWrapITK.cmake ${findWrapITK} FindWrapITK-${branch}.cmake findWrapITK-branch
+    move ${findWrapITK} ${findWrapITK-branch}
+    reinplace "s|${itkName}|${distname}|g" ${findWrapITK-branch}
+    reinplace "s|//|/|g" ${findWrapITK-branch}
+    # This symlink should be done with InsightToolkitSelect
+    ln -s FindWrapITK-${branch}.cmake ${findWrapITK}
+}
 
 variant py24 requires wrap conflicts py25 description "python 2.4 wrapper (includes wrap)" {
     setPython 2 4
@@ -577,15 +614,7 @@
         -DPYTHON_DEBUG_LIBRARY:FILEPATH=${prefix}/${pyLib} \
         -DPY_SITE_PACKAGES_PATH:PATH=${prefix}/${pySite}
     post-destroot {
-        # Change the content of WrapITK.pth (for any python version)
-        reinplace "s|${itkName}|${distname}|g" ${destroot}/${prefix}/${pySite}/WrapITK.pth
-        reinplace "s|//|/|g" ${destroot}/${prefix}/${pySite}/WrapITK.pth
-        # Change the content of FindWrapITK.cmake (for any python version)
-        set findWrapITK [glob ${destroot}/${prefix}/share/cmake-*/Modules/FindWrapITK.cmake]
-        reinplace "s|${itkName}|${distname}|g" ${findWrapITK}
-        reinplace "s|//|/|g" ${findWrapITK}
-        # Reset dynamic library dependency paths (see proc above)
-        resetWrapLibs ${destroot}/${itkLibPath}/WrapITK/lib/*.so
+        pyPostDestroot
     }
 }
 
@@ -601,19 +630,10 @@
         -DPYTHON_DEBUG_LIBRARY:FILEPATH=${prefix}/${pyLib} \
         -DPY_SITE_PACKAGES_PATH:PATH=${prefix}/${pySite}
     post-destroot {
-        # Change the content of WrapITK.pth (for any python version)
-        reinplace "s|${itkName}|${distname}|g" ${destroot}/${prefix}/${pySite}/WrapITK.pth
-        reinplace "s|//|/|g" ${destroot}/${prefix}/${pySite}/WrapITK.pth
-        # Change the content of FindWrapITK.cmake (for any python version)
-        set findWrapITK [glob ${destroot}/${prefix}/share/cmake-*/Modules/FindWrapITK.cmake]
-        reinplace "s|${itkName}|${distname}|g" ${findWrapITK}
-        reinplace "s|//|/|g" ${findWrapITK}
-        # Reset dynamic library dependency paths (see proc above)
-        resetWrapLibs ${destroot}/${itkLibPath}/WrapITK/lib/*.so
+        pyPostDestroot
     }
 }
 
-
 # Regardless of the pyLib setting for py26, cmake or the wrap config sets
 # the string "-framework Python", but this "-framework Python" setting actually
 # gets resolved by the link process into the Apple system /Framework path rather
@@ -632,10 +652,7 @@
 #        -DPYTHON_DEBUG_LIBRARY:FILEPATH=${prefix}/${pyLib} \
 #        -DPY_SITE_PACKAGES_PATH:PATH=${prefix}/${pySite}
 #    post-destroot {
-#        # Change the content of WrapITK.pth (for any python version)
-#        reinplace "s|${itkName}|${distname}|g" ${destroot}/${prefix}/${pySite}/WrapITK.pth
-#        # Reset dynamic library dependency paths (see proc above)
-#        resetWrapLibs ${destroot}/${itkLibPath}/WrapITK/lib/*.so
+#        pyPostDestroot
 #    }
 #}
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090607/f4ff2934/attachment.html>


More information about the macports-changes mailing list