[90105] trunk/dports/science/flann

mmoll at macports.org mmoll at macports.org
Tue Feb 21 16:58:10 PST 2012


Revision: 90105
          http://trac.macports.org/changeset/90105
Author:   mmoll at macports.org
Date:     2012-02-21 16:58:08 -0800 (Tue, 21 Feb 2012)
Log Message:
-----------
science/flann: install python bindings in the right place

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

Added Paths:
-----------
    trunk/dports/science/flann/files/
    trunk/dports/science/flann/files/patch-src-python-CMakeLists.txt.diff

Modified: trunk/dports/science/flann/Portfile
===================================================================
--- trunk/dports/science/flann/Portfile	2012-02-21 22:12:30 UTC (rev 90104)
+++ trunk/dports/science/flann/Portfile	2012-02-22 00:58:08 UTC (rev 90105)
@@ -4,6 +4,7 @@
 PortGroup cmake 1.0
 name                flann
 version             1.7.1
+revision            1
 categories          science devel
 maintainers         mmoll
 description         Fast Library for Approximate Nearest Neighbors
@@ -24,6 +25,9 @@
                     sha1    4f3cef9b4f171b1ee4a98f4f684c350c3022e9b2 \
                     rmd160  c48f6de9d3c1c87a446a4f3f0353ff02f4fe6506
 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
 configure.args-append ${distname} -DBUILD_MATLAB_BINDINGS=OFF -DUSE_MPI=ON \
                     -DMPIEXEC=${prefix}/lib/openmpi/bin/mpiexec \
@@ -32,18 +36,34 @@
 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
+    }
 }
 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
+    }
 }
 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
+    }
 }
 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
+    }
 }
 
 livecheck.type      regex

Added: trunk/dports/science/flann/files/patch-src-python-CMakeLists.txt.diff
===================================================================
--- trunk/dports/science/flann/files/patch-src-python-CMakeLists.txt.diff	                        (rev 0)
+++ trunk/dports/science/flann/files/patch-src-python-CMakeLists.txt.diff	2012-02-22 00:58:08 UTC (rev 90105)
@@ -0,0 +1,10 @@
+--- src/python/CMakeLists.txt.orig	2012-02-21 18:35:22.000000000 -0600
++++ src/python/CMakeLists.txt	2012-02-21 18:37:32.000000000 -0600
+@@ -7,6 +7,6 @@
+ # python instalation
+ if (PYTHON_EXECUTABLE)
+     install(CODE "execute_process(
+-        COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/setup.py install
++        COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/setup.py install --prefix=@@PREFIX@@ --install-lib=@@PYTHON_LIB@@
+         WORKING_DIRECTORY \"${CMAKE_CURRENT_SOURCE_DIR}\")")
+ endif()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120221/0454f427/attachment.html>


More information about the macports-changes mailing list