[100596] trunk/dports/science/flann

mmoll at macports.org mmoll at macports.org
Sun Dec 16 15:01:22 PST 2012


Revision: 100596
          https://trac.macports.org/changeset/100596
Author:   mmoll at macports.org
Date:     2012-12-16 15:01:22 -0800 (Sun, 16 Dec 2012)
Log Message:
-----------
science/flann: update to 1.8.1, clean up python variants, disable default cuda variant since build bot doesn't have cuda sdk, remove unnecessary patch, tbb is no longer needed as a dependency

Modified Paths:
--------------
    trunk/dports/science/flann/Portfile

Removed Paths:
-------------
    trunk/dports/science/flann/files/patch-src-cpp-CMakeLists.txt.diff

Modified: trunk/dports/science/flann/Portfile
===================================================================
--- trunk/dports/science/flann/Portfile	2012-12-16 20:06:00 UTC (rev 100595)
+++ trunk/dports/science/flann/Portfile	2012-12-16 23:01:22 UTC (rev 100596)
@@ -2,9 +2,9 @@
 
 PortSystem 1.0
 PortGroup cmake 1.0
+
 name                flann
-version             1.7.1
-revision            4
+version             1.8.1
 categories          science devel
 maintainers         mmoll
 description         Fast Library for Approximate Nearest Neighbors
@@ -19,14 +19,13 @@
 license             BSD
 master_sites        http://people.cs.ubc.ca/~mariusm/uploads/FLANN/
 distname            ${name}-${version}-src
-dist_subdir         ${name}/${version}_1
 use_zip             yes
 extract.mkdir       yes
-checksums           md5     d780795f523eabda7c7ea09c6f5cf235 \
-                    sha1    61b9858620528919ea60a2a4b085ccc2b3c2d138 \
-                    rmd160  cec1ce99d2c91ddf8f20d5aa8009a08c5347b904
-depends_lib         port:hdf5-18 port:tbb
-patchfiles          patch-src-cpp-CMakeLists.txt.diff patch-src-python-CMakeLists.txt.diff
+checksums           md5     7028de304eca4141646df2de54e73a44 \
+                    sha1    0f6d4dd2b84d069bd6d804c8e967955b54655972 \
+                    rmd160  e31d91df939dd3a8efc8096ca70b41b1005e9deb
+depends_lib         port:hdf5-18
+patchfiles          patch-src-python-CMakeLists.txt.diff
 patch.dir           ${worksrcpath}/${worksrcdir}
 
 # MPI support is automatically disabled if hdf5-18 is installed without the +openmpi variant
@@ -34,46 +33,46 @@
                     -DMPIEXEC=${prefix}/lib/openmpi/bin/mpiexec \
                     -DMPI_COMPILER=${prefix}/lib/openmpi/bin/mpic++
 
-variant python26 description {Use python2.6 for python bindings} conflicts python27 python31 python32 {
-    depends_lib-append      port:python26
-    configure.args-append   -DPYTHON_EXECUTABLE=${prefix}/bin/python2.6
-    post-patch {
-        reinplace "s|@@PREFIX@@|${destroot}${prefix}|g" ${patch.dir}/src/python/CMakeLists.txt
-        reinplace "s|@@PYTHON_LIB@@|${destroot}${prefix}/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6|g" ${patch.dir}/src/python/CMakeLists.txt
-    }
+set pythons_suffixes {26 27 31 32 33}
+
+set pythons_ports {}
+foreach s ${pythons_suffixes} {
+    lappend pythons_ports python${s}
 }
-variant python27 description {Use python2.7 for python bindings} conflicts python26 python31 python32 {
-    depends_lib-append      port:python27
-    configure.args-append   -DPYTHON_EXECUTABLE=${prefix}/bin/python2.7
-    post-patch {
-        reinplace "s|@@PREFIX@@|${destroot}${prefix}|g" ${patch.dir}/src/python/CMakeLists.txt
-        reinplace "s|@@PYTHON_LIB@@|${destroot}${prefix}/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7|g" ${patch.dir}/src/python/CMakeLists.txt
+
+proc python_dir {} {
+    global pythons_suffixes
+    foreach s ${pythons_suffixes} {
+        if {[variant_isset python${s}]} {
+            set p python[string index ${s} 0].[string index ${s} 1]
+            return [file normalize [exec ${p} -c "import sys; print(sys.prefix)"]/lib/${p}]
+        }
     }
+    error "Python support not enabled."
 }
-variant python31 description {Use python3.1 for python bindings} conflicts python26 python27 python32 {
-    depends_lib-append      port:python31
-    configure.args-append   -DPYTHON_EXECUTABLE=${prefix}/bin/python3.1
-    post-patch {
-        reinplace "s|@@PREFIX@@|${destroot}${prefix}|g" ${patch.dir}/src/python/CMakeLists.txt
-        reinplace "s|@@PYTHON_LIB@@|${destroot}${prefix}/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1|g" ${patch.dir}/src/python/CMakeLists.txt
-    }
+
+foreach s ${pythons_suffixes} {
+    set p python${s}
+    set v [string index ${s} 0].[string index ${s} 1]
+    set i [lsearch -exact ${pythons_ports} ${p}]
+    set c [lreplace ${pythons_ports} ${i} ${i}]
+    eval [subst {
+        variant ${p} description "Use Python ${v} for python bindings" conflicts ${c} {
+            depends_lib-append      port:${p}
+            configure.args-append   -DPYTHON_EXECUTABLE=${prefix}/bin/python${v}
+            post-patch {
+                reinplace "s|@@PREFIX@@|${destroot}${prefix}|g" ${patch.dir}/src/python/CMakeLists.txt
+                set pylibdir \[python_dir\]
+                reinplace "s|@@PYTHON_LIB@@|${destroot}\${pylibdir}|g" ${patch.dir}/src/python/CMakeLists.txt
+            }
+        }
+    }]
 }
-variant python32 description {Use python3.2 for python bindings} conflicts python26 python27 python31 {
-    depends_lib-append      port:python32
-    configure.args-append   -DPYTHON_EXECUTABLE=${prefix}/bin/python3.2
-    post-patch {
-        reinplace "s|@@PREFIX@@|${destroot}${prefix}|g" ${patch.dir}/src/python/CMakeLists.txt
-        reinplace "s|@@PYTHON_LIB@@|${destroot}${prefix}/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2|g" ${patch.dir}/src/python/CMakeLists.txt
-    }
-}
 
 variant cuda description {Enable CUDA support} {
     configure.args-delete -DBUILD_CUDA_LIB=OFF
     configure.args-append -DBUILD_CUDA_LIB=ON
 }
-# CUDA is enabled by default (compilation won't fail if CUDA is not installed),
-# but people with broken CUDA installs can disable the CUDA bindings.
-default_variants +cuda
 
 livecheck.type      regex
 livecheck.url       ${homepage}

Deleted: trunk/dports/science/flann/files/patch-src-cpp-CMakeLists.txt.diff
===================================================================
--- trunk/dports/science/flann/files/patch-src-cpp-CMakeLists.txt.diff	2012-12-16 20:06:00 UTC (rev 100595)
+++ trunk/dports/science/flann/files/patch-src-cpp-CMakeLists.txt.diff	2012-12-16 23:01:22 UTC (rev 100596)
@@ -1,14 +0,0 @@
---- src/cpp/CMakeLists.txt.orig	2012-06-05 22:10:49.000000000 -0500
-+++ src/cpp/CMakeLists.txt	2012-06-05 22:13:11.000000000 -0500
-@@ -159,8 +159,10 @@
-     )
- endif()
- 
-+# work around cmake bug http://public.kitware.com/Bug/view.php?id=10366
- install (
-     DIRECTORY flann
-     DESTINATION include
--    FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp"
-+    PATTERN "*.cpp" EXCLUDE
-+    PATTERN "*.cu" EXCLUDE
- )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121216/4d7b11be/attachment.html>


More information about the macports-changes mailing list