# $Id$ PortSystem 1.0 PortGroup cmake 1.0 PortGroup active_variants 1.0 name ompl version 0.12.0 revision 1 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 checksums md5 c93885bf48ea1d6f134077a10480283f \ sha1 68b21caa9acb8d4116ca426265652445e29bc3f7 \ rmd160 366ec0324ac007589b99059eb2f0e7728a573923 distname ${name}-${version}-Source depends_lib-append port:boost port:ode # no universal of gccxml-devel universal_variant no configure.args-append -DOMPL_BUILD_DEMOS=OFF # generate the extra C++ code needed for Python bindings. This code seems # somewhat dependent on compiler and/or boost version, so we can't # pre-generate them and make them available as an extra download. post-configure { system "cd ${worksrcpath}; ${build.cmd} update_bindings" } # 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} { distname omplapp-${version}-Source 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 checksums md5 12a258bbe40621229418fb8573b0ba1c \ sha1 baaad8f45f7cba9024441cee13ed114a7b1158ea \ rmd160 c50f2614ac885c2dcdb218c938203694319cc565 } set pythons_suffixes {26 27 31 32 33} 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}] # python 3k conflicts with app, because py-opengl doesn't exist for python 3k if { ${s} > 30 } { set a "app" } else { set a "" } eval [subst { variant ${p} description "Use Python ${v} for python bindings" conflicts ${c} ${a} debug { depends_build-append port:py${s}-pyplusplus-devel 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. pre-configure { require_active_variants boost ${p} } if { [variant_isset app] } { depends_lib-append port: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 # not needed 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 } } else { post-destroot { # not needed 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} +app livecheck.type regex livecheck.url http://ompl.kavrakilab.org/download.html livecheck.regex (\[0-9.\]+), released