summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernd Waibel <waebbl-gentoo@posteo.net>2021-10-28 12:14:27 +0200
committerSam James <sam@gentoo.org>2021-10-31 02:18:26 +0000
commitb44368f21076a1620b2bf87d0d358a41552fff05 (patch)
treece6c0850f13c07fabb2c66246b0a3de045090863 /media-gfx/openvdb
parentmedia-gfx/openvdb: add 9.0.0 (diff)
downloadgentoo-b44368f21076a1620b2bf87d0d358a41552fff05.tar.gz
gentoo-b44368f21076a1620b2bf87d0d358a41552fff05.tar.bz2
gentoo-b44368f21076a1620b2bf87d0d358a41552fff05.zip
media-gfx/openvdb: patch to find numpy
- adds consistency in the find_package call for NumPy by adding the same components like in the find_package call for Python - additionally pass -DPython_INCLUDE_DIR to cmake - add an option for python unittests when USE=test is set - remove flag-o-matic inherit, which isn't needed according to pkgcheck - change the negation on the utils USE flag to build the utilities if the USE flag is set. Bug: https://bugs.gentoo.org/788886 Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-gfx/openvdb')
-rw-r--r--media-gfx/openvdb/files/openvdb-8.0.1-add-consistency-for-NumPy-find_package-call.patch21
-rw-r--r--media-gfx/openvdb/openvdb-8.0.1-r2.ebuild11
2 files changed, 28 insertions, 4 deletions
diff --git a/media-gfx/openvdb/files/openvdb-8.0.1-add-consistency-for-NumPy-find_package-call.patch b/media-gfx/openvdb/files/openvdb-8.0.1-add-consistency-for-NumPy-find_package-call.patch
new file mode 100644
index 000000000000..87d1d24755b4
--- /dev/null
+++ b/media-gfx/openvdb/files/openvdb-8.0.1-add-consistency-for-NumPy-find_package-call.patch
@@ -0,0 +1,21 @@
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Thu, 28 Oct 2021 11:34:16 +0200
+Subject: [PATCH] add consistency for NumPy find_package call
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+
+diff --git a/openvdb/openvdb/python/CMakeLists.txt b/openvdb/openvdb/python/CMakeLists.txt
+index b473beb..b468d4f 100644
+--- a/openvdb/openvdb/python/CMakeLists.txt
++++ b/openvdb/openvdb/python/CMakeLists.txt
+@@ -94,7 +94,7 @@ else()
+ OPENVDB_CHECK_PYTHON_VERSION(${Python_VERSION} ${Python_INCLUDE_DIRS})
+
+ if(USE_NUMPY)
+- find_package(Python QUIET COMPONENTS NumPy)
++ find_package(Python QUIET COMPONENTS ${OPENVDB_PYTHON_REQUIRED_COMPONENTS} NumPy)
+ if(NOT TARGET Python::NumPy)
+ message(FATAL_ERROR "Could NOT find NumPy (Required is at least version "
+ "\"${MINIMUM_NUMPY_VERSION}\")"
+--
+2.33.1
diff --git a/media-gfx/openvdb/openvdb-8.0.1-r2.ebuild b/media-gfx/openvdb/openvdb-8.0.1-r2.ebuild
index fc19c87ea4c8..0afc20a97e03 100644
--- a/media-gfx/openvdb/openvdb-8.0.1-r2.ebuild
+++ b/media-gfx/openvdb/openvdb-8.0.1-r2.ebuild
@@ -5,7 +5,7 @@ EAPI=7
PYTHON_COMPAT=( python3_{7,8,9} )
-inherit cmake flag-o-matic python-single-r1
+inherit cmake python-single-r1
DESCRIPTION="Library for the efficient manipulation of volumetric data"
HOMEPAGE="https://www.openvdb.org"
@@ -66,6 +66,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}/${PN}-7.1.0-0001-Fix-multilib-header-source.patch"
"${FILESDIR}/${P}-glfw-libdir.patch"
+ "${FILESDIR}/${P}-add-consistency-for-NumPy-find_package-call.patch"
)
pkg_setup() {
@@ -92,9 +93,9 @@ src_configure() {
-DOPENVDB_ABI_VERSION_NUMBER="${version}"
-DOPENVDB_BUILD_DOCS=$(usex doc)
-DOPENVDB_BUILD_UNITTESTS=$(usex test)
- -DOPENVDB_BUILD_VDB_LOD=$(usex !utils)
- -DOPENVDB_BUILD_VDB_RENDER=$(usex !utils)
- -DOPENVDB_BUILD_VDB_VIEW=$(usex !utils)
+ -DOPENVDB_BUILD_VDB_LOD=$(usex utils)
+ -DOPENVDB_BUILD_VDB_RENDER=$(usex utils)
+ -DOPENVDB_BUILD_VDB_VIEW=$(usex utils)
-DOPENVDB_CORE_SHARED=ON
-DOPENVDB_CORE_STATIC=$(usex static-libs)
-DOPENVDB_ENABLE_RPATH=OFF
@@ -108,8 +109,10 @@ src_configure() {
mycmakeargs+=(
-DOPENVDB_BUILD_PYTHON_MODULE=ON
-DUSE_NUMPY=$(usex numpy)
+ -DOPENVDB_BUILD_PYTHON_UNITTESTS=$(usex test)
-DPYOPENVDB_INSTALL_DIRECTORY="$(python_get_sitedir)"
-DPython_EXECUTABLE="${PYTHON}"
+ -DPython_INCLUDE_DIR="$(python_get_includedir)"
)
fi