summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2019-02-17 13:24:01 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2019-02-17 13:39:00 +0100
commit6026d536aa292b0589c2b29cdd2b6a93ba490eb2 (patch)
treeab8f2c1c8e1ecfcef12a09f35b5cc3e78dfb170f /sci-libs/flann
parentx11-misc/slop: EAPI-7 bump (diff)
downloadgentoo-6026d536aa292b0589c2b29cdd2b6a93ba490eb2.tar.gz
gentoo-6026d536aa292b0589c2b29cdd2b6a93ba490eb2.tar.bz2
gentoo-6026d536aa292b0589c2b29cdd2b6a93ba490eb2.zip
sci-libs/flann: EAPI-7 bump, fix unused cmake var
Closes: https://bugs.gentoo.org/659756 Package-Manager: Portage-2.3.60, Repoman-2.3.12 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'sci-libs/flann')
-rw-r--r--sci-libs/flann/flann-1.9.1-r2.ebuild92
-rw-r--r--sci-libs/flann/flann-9999.ebuild26
2 files changed, 106 insertions, 12 deletions
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..73e6a60c52bc
--- /dev/null
+++ b/sci-libs/flann/flann-1.9.1-r2.ebuild
@@ -0,0 +1,92 @@
+# 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}"/flann-1.9.1-cmake-3.11.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
}