# $Id: Portfile 152074 2016-08-28 20:45:39Z mmoll@macports.org $ PortSystem 1.0 PortGroup cmake 1.0 PortGroup mpi 1.0 PortGroup github 1.0 cmake.out_of_source yes github.setup mariusmuja flann 1.9.1 revision 1 categories science devel maintainers mmoll description Fast Library for Approximate Nearest Neighbors long_description FLANN is a library for performing fast approximate \ nearest neighbor searches in high dimensional spaces. \ It contains a collection of algorithms we found to \ work best for nearest neighbor search and a system \ for automatically choosing the best algorithm and \ optimum parameters depending on the dataset. platforms darwin license BSD checksums md5 9583ae34a3fd05b730f312c416ebdda7 \ sha1 bb65830d02d6603137f55901aea561944086f5d5 \ rmd160 05758ce066371c6d9734fcfeec248f8c252585ff depends_lib port:hdf5 port:lz4 patchfiles patch-src-python-CMakeLists.txt.diff mpi.setup configure.args-append ${distname} -DBUILD_MATLAB_BINDINGS=OFF -DUSE_MPI=OFF -DBUILD_CUDA_LIB=OFF if {[ mpi_variant_isset ]} { configure.args-delete -DUSE_MPI=OFF configure.args-append -DUSE_MPI=ON } set pythons_suffixes {27 34 35} 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}] } } 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} { depends_lib-append port:${p} configure.args-append -DPYTHON_EXECUTABLE=${prefix}/bin/python${v} post-patch { reinplace "s|@@PREFIX@@|${destroot}${prefix}|g" ${patch.dir}/src/python/CMakeLists.txt set pylibdir \[python_dir\] reinplace "s|@@PYTHON_LIB@@|${destroot}\${pylibdir}|g" ${patch.dir}/src/python/CMakeLists.txt } } }] }