diff options
Diffstat (limited to 'sci-libs/flann')
-rw-r--r-- | sci-libs/flann/Manifest | 4 | ||||
-rw-r--r-- | sci-libs/flann/files/flann-1.9.1-cuda-9.patch | 22 | ||||
-rw-r--r-- | sci-libs/flann/flann-1.9.1-r2.ebuild | 95 | ||||
-rw-r--r-- | sci-libs/flann/flann-9999.ebuild | 26 |
4 files changed, 134 insertions, 13 deletions
diff --git a/sci-libs/flann/Manifest b/sci-libs/flann/Manifest index 7dd51a2b51a2..663fad96d6a5 100644 --- a/sci-libs/flann/Manifest +++ b/sci-libs/flann/Manifest @@ -1,6 +1,8 @@ AUX flann-1.9.1-cmake-3.11.patch 2998 BLAKE2B 85c6b6feb800ab1a21af86a4001b0056fda416a6b61147f614670968cca13fa2b63d06673a11a2ef72b6f0d0876539ccb68134f4817975d4b796b66a716e606d SHA512 5cdffa2da3538965c0d20fb091a13124cdc301669b622ca35a131680db8abb58cf8e02f1366604a19a5cd10dd67f14861caa1c12da3154d82d576cb8052a4b87 +AUX flann-1.9.1-cuda-9.patch 850 BLAKE2B f193a6fd25a1d2cd45201d547fb444393cb82f344da6f5d1e2a012599170a412b261f6cf35d8943da7e96fd9f204991580d5ea045b43e2aa33ea5ad9fa9307d4 SHA512 0b5cad7b928319b922bdaa27d07fd38f1c359799ef9c217b6c1979f8ac9a86706e7ad1547f484aeb1db449a37693d18b2710b877483266915a869372c29ee1e4 DIST flann-1.9.1.tar.gz 485391 BLAKE2B bf1e1e7feb33e939e1d0586db593bea3fdf66726fbadec63df9ed9c7bdb678babb11001769f0d041a7a569186b3d700db8b96af5eb9740615f6dfd880460f68b SHA512 0da78bb14111013318160dd3dee1f93eb6ed077b18439fd6496017b62a8a6070cc859cfb3e08dad4c614e48d9dc1da5f7c4a21726ee45896d360506da074a6f7 EBUILD flann-1.9.1-r1.ebuild 2242 BLAKE2B c36832b645ca46e3aa622882cca34b644d8b667def8b900f1e5eea83fa0d55677f65c14c4a17134f080b4b7fe863023a71a7aeac72385bc25a9c2a4048fb33bb SHA512 08de8ba5d423999f8403104be8efbd678e6c4981790a314e717944d6f5ca714cf97219efa445894145acc47d896ce11a49867e19c654b6c403db3b55700b5ab0 +EBUILD flann-1.9.1-r2.ebuild 2306 BLAKE2B 2913821eb87a06cd7dd14bfe8562ab72496043977fd6a7a909f9c3899a65532539bce43a1298547cbefc766b4f27f00d4c27ade5dbfd1467928765ca2cc96d54 SHA512 9a94f340a95e5a2c68adba8a278211b7a655c0753cc52edc9b92ffd65629a4ac8cdb8197ddde31ec88ed6908abcb9019b77447a1e12983c0b63f1c6a47313315 EBUILD flann-1.9.1.ebuild 2183 BLAKE2B 8de25772b012bbbe70e13db8876688ee283d1dada1978bb9c982d1f1bc26f3daea9adaf7f12663d1a0590c03730e6da604f10bfa356a8728262681c7173af13a SHA512 7f5ff08c1fe83379577043d01b2c7cda91b4a44237cd65aa1e2cb36e10331238efdc40a9d1698b41d3ff493ac50cfa61cfc5ccae33d5cb9a03e47a94458dd05c -EBUILD flann-9999.ebuild 2178 BLAKE2B de6de98ab61428b3f19b8b229b5ad947a3e73478f21c45900b0752bcf6e382317d59020618d876e8a3908f2ae9ae770ef204959fff5f3f8bdd0d67825fb62256 SHA512 0ff48c8f14166bf2a4a77ec562618156b7ec7a40282ea0f61d233ff79a9fb3bb84195ac0465dd7b9dde7fc25889dae11a3f0088a0db3a51de00cb9627343d6bd +EBUILD flann-9999.ebuild 2215 BLAKE2B bb8f804a838a8c6b1702666a92cca7ce919523b7c8590a6f816ae3ec2d8b85c44ecc237f55bd498c8e6e296388c7b1cfcb6338b7a2361a5eaef869f2987b85f4 SHA512 9d2c22c2e45bc73cd982a7d75f77ec05b0533a60dc1125cd5127aec43d74f990b81690a1e47fd67cabc2ed5da500dded79c4dd8c79dc138db6c2a36d10bac0a0 MISC metadata.xml 971 BLAKE2B 5cffd393d18c3719d8b61069dbc84f4ce4e16e6746637b1203dcba3719fb672d8db082afa93add6be9ebc4203df85391d20eb824a7a9ea3550b37295186538ff SHA512 b8416b149e26ede6d3f207d7e48316a8b880436c40c4ed5610953ceda0fee4e5b97f1b99f778678514dd115c257fb419b365ed46fdd90a19d444bca8e3e0fe03 diff --git a/sci-libs/flann/files/flann-1.9.1-cuda-9.patch b/sci-libs/flann/files/flann-1.9.1-cuda-9.patch new file mode 100644 index 000000000000..561c379af9ae --- /dev/null +++ b/sci-libs/flann/files/flann-1.9.1-cuda-9.patch @@ -0,0 +1,22 @@ +From b9dd074526c18e7423085853518b58d602cb0b57 Mon Sep 17 00:00:00 2001 +From: "Petr A. Ermolaev" <petr.a.ermolaev@gmail.com> +Date: Fri, 4 May 2018 07:50:24 +0000 +Subject: [PATCH] fix compilation via gcc and cuda 9.1 add missing #include + <thrust/gather> to kdtree_cuda_3d_index.cu + +--- + src/cpp/flann/algorithms/kdtree_cuda_3d_index.cu | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/cpp/flann/algorithms/kdtree_cuda_3d_index.cu b/src/cpp/flann/algorithms/kdtree_cuda_3d_index.cu +index e9b05080..8465322e 100644 +--- a/src/cpp/flann/algorithms/kdtree_cuda_3d_index.cu ++++ b/src/cpp/flann/algorithms/kdtree_cuda_3d_index.cu +@@ -32,6 +32,7 @@ + #include <flann/util/cuda/result_set.h> + // #define THRUST_DEBUG 1 + #include <cuda.h> ++#include <thrust/gather.h> + #include <thrust/copy.h> + #include <thrust/device_vector.h> + #include <vector_types.h> diff --git a/sci-libs/flann/flann-1.9.1-r2.ebuild b/sci-libs/flann/flann-1.9.1-r2.ebuild new file mode 100644 index 000000000000..c240ca1dcf11 --- /dev/null +++ b/sci-libs/flann/flann-1.9.1-r2.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake-utils cuda flag-o-matic toolchain-funcs + +DESCRIPTION="Fast approximate nearest neighbor searches in high dimensional spaces" +HOMEPAGE="https://www.cs.ubc.ca/research/flann/" +SRC_URI="https://github.com/mariusmuja/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux" +IUSE="cuda doc examples mpi openmp octave static-libs" + +BDEPEND=" + app-arch/unzip + doc? ( dev-tex/latex2html ) +" +DEPEND=" + cuda? ( >=dev-util/nvidia-cuda-toolkit-5.5 ) + mpi? ( + sci-libs/hdf5[mpi] + dev-libs/boost:=[mpi] + ) + !mpi? ( !sci-libs/hdf5[mpi] ) + octave? ( >=sci-mathematics/octave-3.6.4-r1 ) +" +RDEPEND="${DEPEND}" +# TODO: +# readd dependencies for test suite, +# requires multiple ruby dependencies + +PATCHES=( + "${FILESDIR}"/${P}-cmake-3.11.patch + "${FILESDIR}"/${P}-cuda-9.patch +) + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +src_prepare() { + # bug #302621 + use mpi && export CXX=mpicxx + # produce pure octave files + # octave gentoo installation for .m files respected + sed -i \ + -e 's/--mex//' \ + -e 's/\.mex/\.oct/' \ + -e '/FILES/s/${MEX_FILE}//' \ + -e 's:share/flann/octave:share/octave/site/m:' \ + -e "/CUSTOM_TARGET/a\INSTALL(FILES \${MEX_FILE} DESTINATION libexec/octave/site/oct/${CHOST})" \ + src/matlab/CMakeLists.txt || die + use cuda && cuda_src_prepare + + cmake-utils_src_prepare +} + +src_configure() { + append-cxxflags -std=c++11 + + # python bindings are split + # off into dev-python/pyflann + local mycmakeargs=( + -DBUILD_C_BINDINGS=ON + -DBUILD_PYTHON_BINDINGS=OFF + -DPYTHON_EXECUTABLE= + -DBUILD_CUDA_LIB=$(usex cuda) + -DBUILD_EXAMPLES=$(usex examples) + -DBUILD_DOC=$(usex doc) + -DBUILD_TESTS=OFF + -DBUILD_MATLAB_BINDINGS=$(usex octave) + -DUSE_MPI=$(usex mpi) + -DUSE_OPENMP=$(usex openmp) + ) + use cuda && mycmakeargs+=( + -DCUDA_NVCC_FLAGS="${NVCCFLAGS} --linker-options \"-arsch\"" + ) + use doc && mycmakeargs+=( -DDOCDIR=share/doc/${PF} ) + + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + if ! use static-libs; then + find "${D}" -name 'lib*.a' -delete || die + fi +} diff --git a/sci-libs/flann/flann-9999.ebuild b/sci-libs/flann/flann-9999.ebuild index e8b80e9f855f..04b6a5770ac6 100644 --- a/sci-libs/flann/flann-9999.ebuild +++ b/sci-libs/flann/flann-9999.ebuild @@ -1,12 +1,12 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 inherit cmake-utils cuda flag-o-matic git-r3 toolchain-funcs DESCRIPTION="Fast approximate nearest neighbor searches in high dimensional spaces" -HOMEPAGE="http://www.cs.ubc.ca/research/flann/" +HOMEPAGE="https://www.cs.ubc.ca/research/flann/" EGIT_REPO_URI="https://github.com/mariusmuja/flann.git" LICENSE="BSD" @@ -14,24 +14,25 @@ SLOT="0" KEYWORDS="" IUSE="cuda doc examples mpi openmp octave static-libs" -RDEPEND=" +BDEPEND=" + doc? ( dev-tex/latex2html ) +" +DEPEND=" + app-arch/lz4:= cuda? ( >=dev-util/nvidia-cuda-toolkit-5.5 ) mpi? ( sci-libs/hdf5[mpi] dev-libs/boost:=[mpi] ) !mpi? ( !sci-libs/hdf5[mpi] ) - octave? ( >=sci-mathematics/octave-3.6.4-r1 )" -DEPEND="${RDEPEND} - app-arch/unzip - doc? ( dev-tex/latex2html )" + octave? ( >=sci-mathematics/octave-3.6.4-r1 ) +" +RDEPEND="${DEPEND}" # TODO: # readd dependencies for test suite, # requires multiple ruby dependencies -PATCHES=( - "${FILESDIR}"/flann-1.9.1-cmake-3.11.patch -) +PATCHES=( "${FILESDIR}"/flann-1.9.1-cmake-3.11.patch ) pkg_pretend() { [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp @@ -67,7 +68,6 @@ src_configure() { -DBUILD_C_BINDINGS=ON -DBUILD_PYTHON_BINDINGS=OFF -DPYTHON_EXECUTABLE= - -DDOCDIR=share/doc/${PF} -DBUILD_CUDA_LIB=$(usex cuda) -DBUILD_EXAMPLES=$(usex examples) -DBUILD_DOC=$(usex doc) @@ -79,6 +79,8 @@ src_configure() { use cuda && mycmakeargs+=( -DCUDA_NVCC_FLAGS="${NVCCFLAGS} --linker-options \"-arsch\"" ) + use doc && mycmakeargs+=( -DDOCDIR=share/doc/${PF} ) + cmake-utils_src_configure } |