# $Id$ PortSystem 1.0 PortGroup cmake 1.0 PortGroup active_variants 1.1 PortGroup compiler_blacklist_versions 1.0 cmake.out_of_source yes name ompl version 1.0.0 categories science maintainers mmoll description The Open Motion Planning Library (OMPL) long_description The Open Motion Planning Library (OMPL) consists of a set \ of sampling-based motion planning algorithms. homepage http://ompl.kavrakilab.org platforms darwin license BSD master_sites https://bitbucket.org/ompl/ompl/downloads distfiles ${name}-${version}-Source${extract.suffix} ${name}-bindings-${version}${extract.suffix} checksums ${name}-${version}-Source${extract.suffix} \ sha1 9d89dd0e9c358ddfc5c0b3c0aa92b4d101c72756 \ rmd160 f85e4f1b501306c08f72f110d61c805ae2668b73 \ ${name}-bindings-${version}${extract.suffix} \ sha1 822c6967958e979f98afda47cd2abba5cd4ddbcc \ rmd160 ab62f7c73f0689a718d9961b081f8168540c8e6d worksrcdir ${name}-${version}-Source depends_lib-append port:boost port:ode port:flann port:triangle # We "inherit" the compiler blacklist from the Boost port, since OMPL depends heavily on Boost. compiler.blacklist {clang < 421} macports-clang-2.9 macports-clang-3.0 *llvm-gcc-4.2 *gcc-4.0 gcc-3.3 configure.args-append -DOMPL_BUILD_DEMOS=OFF # The +app variant includes all the content of the regular OMPL version, but # adds a simple GUI and an extra library with bindings to the assimp and fcl # libraries. The cascade of dependencies due to pyqt4 is rather large, so by # default the +app variant is not enabled. Also, the additions to OMPL in # this variant are distributed under a slightly different license than the # regular OMPL version. variant app description {Include GUI and extra demo code} { license noncommercial pre-extract { ui_warn "The +app variant causes some extra code to be compiled that is distributed under the Rice University Software Distribution License. For details, please read: http://ompl.kavrakilab.org/license.html#ricelicense" } depends_build-append port:pkgconfig depends_lib-append port:assimp port:fcl configure.args-append -DOMPLAPP_PQP=OFF -DOMPLAPP_RESOURCE_DIR=${prefix}/share/ompl/resources distfiles omplapp-${version}-Source${extract.suffix} omplapp-bindings-${version}${extract.suffix} checksums omplapp-${version}-Source${extract.suffix} \ sha1 4d7d77ed9cdc58718ab664e11e5c9127ba4287cf \ rmd160 a5b07eac786560faeeee0ff72162cc363035bf28 \ omplapp-bindings-${version}${extract.suffix} \ sha1 d322137cb6940075cdd4cb12676fda7a2df99ca5 \ rmd160 73bdb2379e278ef5c98b162cd65a6b1605e661ca worksrcdir omplapp-${version}-Source } set pythons_suffixes {27 34} set pythons_ports {} foreach s ${pythons_suffixes} { lappend pythons_ports python${s} } 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}/site-packages] } } error "Python support not enabled." } 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} debug { depends_lib-append port:${p} configure.args-append -DPYTHON_EXEC=${prefix}/bin/python${v} # the python bindings rely on Boost.Python, so make sure it is installed. require_active_variants boost ${p} if { [variant_isset app] } { # Can use either py*-pyqt4 or py*-pyqt4-devel. depends_lib-append \ path:share/py${s}-sip/PyQt4:py${s}-pyqt4 \ port:py${s}-opengl post-destroot { reinplace "s|#!/usr/bin/env python|#!${prefix}/bin/python${v}|g" \ ${destroot}${prefix}/bin/ompl_app # extra copy of libs not needed in site_packages and causes problems with rpaths set site_packages \[python_dir\] delete ${destroot}\${site_packages}/ompl/util/libompl.dylib \ ${destroot}\${site_packages}/ompl/app/libompl_app.dylib \ ${destroot}\${site_packages}/ompl/app/libompl_app_base.dylib } } else { post-destroot { # extra copy of libs not needed in site_packages and causes problems with rpaths set site_packages \[python_dir\] delete ${destroot}\${site_packages}/ompl/util/libompl.dylib } } } }] } # enable one python variant so that the python bindings can be compiled set selected_python python27 foreach s ${pythons_suffixes} { if {[variant_isset python${s}]} { set selected_python python${s} } } default_variants +${selected_python} livecheck.type regex livecheck.url http://ompl.kavrakilab.org/download.html livecheck.regex (\[0-9.\]+), released