# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 PortSystem 1.0 PortGroup cmake 1.1 PortGroup active_variants 1.1 PortGroup github 1.0 PortGroup boost 1.0 categories science maintainers {mmoll @mamoll} 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. github.setup ompl ompl 1.6.0 revision 0 homepage http://ompl.kavrakilab.org platforms darwin license BSD checksums rmd160 06eb0389277f0f34d1c304cca25b16563d12643b \ sha256 fe9dfa3f5d9912087f3fee522fb4333a9740ef82bc8da9580a5af6c12e2c92c6 \ size 23395140 depends_build-append port:pkgconfig depends_lib-append port:ode port:flann port:triangle path:share/pkgconfig/eigen3.pc:eigen3 compiler.cxx_standard 2017 configure.args-append -DOMPL_BUILD_DEMOS=OFF \ -DOMPL_BUILD_TESTS=OFF \ -DOMPL_REGISTRATION=OFF \ -DCMAKE_DISABLE_FIND_PACKAGE_spot=ON \ -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON # 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 { if {[variant_isset python38] || [variant_isset python39] || [variant_isset python310] || [variant_isset python311]} { # enable parallel build on at most 2 cores. Generating the bindings # uses large amounts of memory, so don't use more cores. if { ${use_parallel_build} } { set cj "-j 2" } else { set cj "" } system -W ${cmake.build_dir} "${build.cmd} ${cj} 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 pyqt5 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_lib-append port:assimp port:fcl port:redis # ompl needs some help finding assimp for some reason configure.args-append \ -DCMAKE_DISABLE_FIND_PACKAGE_PQP=ON \ -DOMPLAPP_RESOURCE_DIR=${prefix}/share/ompl/resources \ -DASSIMP_LIBRARIES=assimp -DASSIMP_INCLUDE_DIRS=${prefix}/include github.setup ompl omplapp 1.6.0 master_sites https://github.com/ompl/omplapp/releases/download/${version} distname omplapp-${version}-Source checksums rmd160 800a090a0dcb45544974cd1b87093e8b57325915 \ sha256 34ef2c99214f1d8edb8039fd19a45b7b460eb69e2845557a62d37b2de4b51880 \ size 38490533 notes " If you intend to use ompl_webapp, you need to first launch the redis server and set the following environment variables: sudo port load redis export OMPL_BROKER_URL='redis://localhost:6379' export OMPL_BACKEND_URL='redis://localhost:6379' " } variant spot description {Include support for automaton generation from LTL specifications using Spot} { configure.args-delete -DCMAKE_DISABLE_FIND_PACKAGE_spot=ON depends_lib-append port:spot } set pythons_versions {3.8 3.9 3.10 3.11} set pythons_ports {} foreach v ${pythons_versions} { lappend pythons_ports python[string map {. {}} ${v}] } proc python_dir {} { global pythons_versions foreach p ${pythons_versions} { set s [string map {. {}} ${p}] if {[variant_isset python${s}]} { return [file normalize [exec python${p} -c "import sys; print(sys.prefix)"]/lib/${p}/site-packages] } } error "Python support not enabled." } foreach v ${pythons_versions} { set s [string map {. {}} ${v}] set p python${s} set vnodots [string index ${s} 0][string index ${s} 1] set i [lsearch -exact ${pythons_ports} ${p}] set c [lreplace ${pythons_ports} ${i} ${i}] variant ${p} description "Use Python ${v} for python bindings" " depends_build-append port:py${s}-pyplusplus depends_lib-append port:${p} configure.args-append -DPYTHON_EXEC=${prefix}/bin/python${v} -DPYPY=${prefix}/bin/pypy38 boost.require_numpy yes # the python bindings rely on Boost.Python, so make sure it is installed. require_active_variants [boost::depends_portname]-numpy ${p} # use PyPy to generate Python bindings, which is *much* faster than CPython depends_build-append port:pypy38 if { [variant_isset app] } { depends_lib-append \ port:py${s}-pyqt5 \ port:py${s}-opengl \ port:py${s}-flask \ port:py${s}-celery \ port:py${s}-redis \ port:redis 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 \ ${destroot}\${site_packages}/ompl/app/libompl_app.dylib \ ${destroot}\${site_packages}/ompl/app/libompl_app_base.dylib \ ${destroot}${prefix}/share/ompl/webapp/static/problem_files/2D \ ${destroot}${prefix}/share/ompl/webapp/static/problem_files/3D file mkdir ${destroot}${prefix}/share/ompl/webapp/static/problem_files ln -sf ${prefix}/share/ompl/resources/2D ${destroot}${prefix}/share/ompl/webapp/static/problem_files/2D ln -sf ${prefix}/share/ompl/resources/3D ${destroot}${prefix}/share/ompl/webapp/static/problem_files/3D } } 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 python310 foreach v ${pythons_versions} { set s [string map {. {}} ${v}] 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