[63515] trunk/dports/devel/orocos-kdl/Portfile

nox at macports.org nox at macports.org
Sat Feb 6 14:49:01 PST 2010


Revision: 63515
          http://trac.macports.org/changeset/63515
Author:   nox at macports.org
Date:     2010-02-06 14:48:59 -0800 (Sat, 06 Feb 2010)
Log Message:
-----------
Fix Python bindings and enable RTT plugin in orocos-kdl

The latest py26-sip update broke Python bindings.

Modified Paths:
--------------
    trunk/dports/devel/orocos-kdl/Portfile

Modified: trunk/dports/devel/orocos-kdl/Portfile
===================================================================
--- trunk/dports/devel/orocos-kdl/Portfile	2010-02-06 22:25:45 UTC (rev 63514)
+++ trunk/dports/devel/orocos-kdl/Portfile	2010-02-06 22:48:59 UTC (rev 63515)
@@ -1,12 +1,14 @@
 # $Id$
 
 PortSystem      1.0
+PortGroup       archcheck 1.0
 PortGroup       cmake 1.0
 
 name            orocos-kdl
 version         1.0.1
+revision        1
 set branch      [join [lrange [split ${version} .] 0 1] .]
-categories      devel graphics
+categories      devel
 maintainers     nox openmaintainer
 description     Orocos Kinematics and Dynamics
 license         LGPLv2.1
@@ -33,20 +35,31 @@
 worksrcdir      kdl-${version}
 
 post-patch {
-    reinplace -E {s at src/orocos-kdl\.pc at orocos-kdl.pc@} \
+    reinplace {s/SIP_VERSION GREATER/SIP_VERSION STRGREATER/} \
+        ${worksrcpath}/config/FindSIPandPython.cmake
+    reinplace {s at src/orocos-kdl\.pc at orocos-kdl.pc@} \
         ${worksrcpath}/src/CMakeLists.txt
+    reinplace {s@\.in src/bindings/rtt/@.in @} \
+        ${worksrcpath}/src/bindings/rtt/CMakeLists.txt
 }
 
-depends_lib     port:eigen
+depends_lib \
+    port:eigen \
+    port:orocos-rtt \
+    port:boost
 
-configure.args  -DEIGEN2_INCLUDE_DIR=${prefix}/include/eigen2 \
-                -DCMAKE_CXX_FLAGS=-I${prefix}/include/eigen2 \
+archcheck.files \
+    lib/libEigen2.dylib \
+    lib/libboost_thread-mt.dylib \
+    lib/liborocos-rtt-macosx.dylib
 
-post-destroot {
-    # ugly code, we should find how to do that directly in CMake.
-    set lib ${prefix}/lib/liborocos-kdl.${branch}.dylib
-    system "install_name_tool -id ${lib} ${destroot}${lib}"
-}
+configure.args-append \
+    -DCMAKE_CXX_FLAGS=-I${prefix}/include/eigen2 \
+    -DCMAKE_INSTALL_NAME_DIR=${prefix}/lib \
+    -DEIGEN2_INCLUDE_DIR=${prefix}/include/eigen2 \
+    -DOROCOS_INSTALL=${prefix} \
+    -DOROCOS_PLUGIN=1 \
+    -DOROCOS_TARGET=macosx
 
 variant python26 description "Enable Python 2.6 bindings" {
     depends_lib-append \
@@ -56,14 +69,12 @@
     configure.args-append \
         -DPYTHON_BINDINGS=1
 
-    post-destroot {    
+    post-destroot {
         # ugly code, we should find how to do that directly in CMake.
         set libname liborocos-kdl.${branch}.dylib
         set fw ${prefix}/Library/Frameworks/Python.framework/Versions/2.6
         set pylib ${prefix}/lib/python2.6/site-packages/PyKDL.so
-        system "install_name_tool -change ${worksrcpath}/src/${libname} \
-            ${prefix}/lib/${libname} ${destroot}${pylib}"
-        file mkdir ${destroot}${fw}/lib/python2.6/site-packages
+        xinstall -d ${destroot}${fw}/lib/python2.6/site-packages
         move ${destroot}${pylib} \
             ${destroot}${fw}/lib/python2.6/site-packages
     }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100206/075433d4/attachment.html>


More information about the macports-changes mailing list