diff options
author | Adrian Grigo <agrigo2001@yahoo.com.au> | 2020-08-18 16:18:56 +1000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2020-08-24 14:41:51 +0100 |
commit | c91c00513d5e61359095c22d52072d726e5b7f49 (patch) | |
tree | 4bdf24fb06ba4668e9941b8e996222c2944287be /media-gfx/openvdb | |
parent | media-gfx/openvdb: Fix optional boost python dependency (diff) | |
download | gentoo-c91c00513d5e61359095c22d52072d726e5b7f49.tar.gz gentoo-c91c00513d5e61359095c22d52072d726e5b7f49.tar.bz2 gentoo-c91c00513d5e61359095c22d52072d726e5b7f49.zip |
media-gfx/openvdb: Version bump to 6.2.1
Version bump to openvdb 6.2.1, requiring an additional use flag for
abi6-compat.
This version requires cmake 3.16 or higher.
Other changes:
* Compared to version 5, the gnuinstalldirs patch no longer needs
BLOSC_LOCATION, GLFW3_LOCATION or TBB_LOCATION so these have been
removed.
* The new multilib header patch needs to know the CHOST so it is set
in the arguments passed to cmake.
* USE_GLFW3 is no longer used by the build system so it has been
removed also.
* Update the github upstream source as dreamworksanimation now redirects to
AcademySoftwareFoundation.
Signed-off-by: Adrian Grigo <agrigo2001@yahoo.com.au>
Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-gfx/openvdb')
-rw-r--r-- | media-gfx/openvdb/Manifest | 1 | ||||
-rw-r--r-- | media-gfx/openvdb/files/openvdb-6.2.1-fix-multilib-header-source.patch | 29 | ||||
-rw-r--r-- | media-gfx/openvdb/files/openvdb-6.2.1-use-gnuinstalldirs.patch | 54 | ||||
-rw-r--r-- | media-gfx/openvdb/metadata.xml | 5 | ||||
-rw-r--r-- | media-gfx/openvdb/openvdb-6.2.1.ebuild | 100 |
5 files changed, 188 insertions, 1 deletions
diff --git a/media-gfx/openvdb/Manifest b/media-gfx/openvdb/Manifest index fda421e16aec..f02f09bc37dc 100644 --- a/media-gfx/openvdb/Manifest +++ b/media-gfx/openvdb/Manifest @@ -1,3 +1,4 @@ DIST openvdb-4.0.2-patchset-02.tar.xz 12428 BLAKE2B 2684ddf010df975912fcfc8c4f944d9a9ba447b48750140b6c46db31d49297f7495e5c77e9d5b85af0b2e1d0c4987184865642dc95f1fb3e463e85ee5987d203 SHA512 04377d552e218a8eb31c43381ba32263ba206a0870dccda1bcc031863dfdbcc953da7ea89fd420dc1a338fbd6123ac30bac2039c0a2a01c1fa9253a3fdd0b54d DIST openvdb-4.0.2.tar.gz 1689119 BLAKE2B dbc8d4ab44990440e201327d76bbf9bfe3e8f597505b1d008dedb95dc540277513f465d455079c59820acc5056c9a2edf56235e1097b6c73a1f7dd8c59609c15 SHA512 8e3e12583b81f9b9303b309e839c8321c67b67ff8a0e61bb56c87276bf25c0deff22f5a73c7c5b661b8e5df345bfdabfa6b0aea9bf16fce57d9c53a76751c75d DIST openvdb-5.2.0.tar.gz 1788969 BLAKE2B d146b78dd7db4936779ca214b1f7957d4868bf76aedb95c9a98e21d25983b750337a63bf4bc9ccb438b683988af7a3d708676dcf7b4662c84e4926e8000ceb68 SHA512 69e21190c27a055e476a319b0c2d961303fa2f3fec30bec93ed44072d01816ef89e5e8f0abfc3a22d1c73742aa31284c664596747b49cd985fea1a751776506e +DIST openvdb-6.2.1.tar.gz 1935325 BLAKE2B 24ca340e513d2f22521994fbb2315a1c3f817bb35a7402ca481b12444e5ced58dfd773cc07b47a56d1ed9f6951e58cf1ef0b5c35917620b031383faed21c6557 SHA512 f5d830880316b5ca3921c77c75f3a254aba47d144ac6c0223fc2732d99cbd6b7ffb7f27049f8ab3760ad77b3658fc08a82728325ba753bc29932aa46336457de diff --git a/media-gfx/openvdb/files/openvdb-6.2.1-fix-multilib-header-source.patch b/media-gfx/openvdb/files/openvdb-6.2.1-fix-multilib-header-source.patch new file mode 100644 index 000000000000..c6e2bae5dfae --- /dev/null +++ b/media-gfx/openvdb/files/openvdb-6.2.1-fix-multilib-header-source.patch @@ -0,0 +1,29 @@ +diff -Naur a/cmake/FindIlmBase.cmake b/cmake/FindIlmBase.cmake +--- a/cmake/FindIlmBase.cmake 2020-02-02 01:03:55.000000000 +0800 ++++ b/cmake/FindIlmBase.cmake 2020-02-02 01:09:05.000000000 +0800 +@@ -168,9 +168,15 @@ + PATH_SUFFIXES include/OpenEXR OpenEXR + ) + ++if(EXISTS "/usr/include/${CHOST}/OpenEXR/IlmBaseConfig.h") ++ set(_ILMBASE_HEADERS "/usr/include/${CHOST}/OpenEXR") ++else() ++ set(_ILMBASE_HEADERS ${IlmBase_INCLUDE_DIR}) ++endif() ++ + if(EXISTS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h") + # Get the ILMBASE version information from the config header +- file(STRINGS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h" ++ file(STRINGS "${_ILMBASE_HEADERS}/IlmBaseConfig.h" + _ilmbase_version_major_string REGEX "#define ILMBASE_VERSION_MAJOR " + ) + string(REGEX REPLACE "#define ILMBASE_VERSION_MAJOR" "" +@@ -178,7 +184,7 @@ + ) + string(STRIP "${_ilmbase_version_major_string}" IlmBase_VERSION_MAJOR) + +- file(STRINGS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h" ++ file(STRINGS "${_ILMBASE_HEADERS}/IlmBaseConfig.h" + _ilmbase_version_minor_string REGEX "#define ILMBASE_VERSION_MINOR " + ) + string(REGEX REPLACE "#define ILMBASE_VERSION_MINOR" "" diff --git a/media-gfx/openvdb/files/openvdb-6.2.1-use-gnuinstalldirs.patch b/media-gfx/openvdb/files/openvdb-6.2.1-use-gnuinstalldirs.patch new file mode 100644 index 000000000000..ac73d82f9c34 --- /dev/null +++ b/media-gfx/openvdb/files/openvdb-6.2.1-use-gnuinstalldirs.patch @@ -0,0 +1,54 @@ +diff -Naur a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2020-01-08 22:16:00.493079361 +0800 ++++ b/CMakeLists.txt 2020-01-08 22:16:44.790285583 +0800 +@@ -252,6 +252,8 @@ + + enable_testing() + ++INCLUDE ( GNUInstallDirs ) ++ + # Add our cmake modules + + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") +diff -Naur a/openvdb/CMakeLists.txt b/openvdb/CMakeLists.txt +--- a/openvdb/CMakeLists.txt 2020-01-08 22:16:07.362646127 +0800 ++++ b/openvdb/CMakeLists.txt 2020-01-08 22:19:54.638308684 +0800 +@@ -492,7 +492,7 @@ + install(TARGETS + openvdb_static + DESTINATION +- lib ++ ${CMAKE_INSTALL_LIBDIR} + ) + endif() + +@@ -500,14 +500,14 @@ + if(WIN32) + install(TARGETS + openvdb_shared +- RUNTIME DESTINATION bin COMPONENT Runtime +- ARCHIVE DESTINATION lib COMPONENT Runtime ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Runtime + ) + else() + install(TARGETS + openvdb_shared + DESTINATION +- lib ++ ${CMAKE_INSTALL_LIBDIR} + ) + endif() + endif() +diff -Naur a/openvdb/python/CMakeLists.txt b/openvdb/python/CMakeLists.txt +--- a/openvdb/python/CMakeLists.txt 2020-01-08 22:16:14.452199013 +0800 ++++ b/openvdb/python/CMakeLists.txt 2020-01-08 22:21:45.311324663 +0800 +@@ -232,7 +232,7 @@ + ${PYOPENVDB_INSTALL_DIRECTORY} + ) + +-install(FILES ${PYTHON_PUBLIC_INCLUDE_NAMES} DESTINATION include/openvdb/python) ++install(FILES ${PYTHON_PUBLIC_INCLUDE_NAMES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb/python) + + # pytest + diff --git a/media-gfx/openvdb/metadata.xml b/media-gfx/openvdb/metadata.xml index 43363d09c1a0..58f434001fc0 100644 --- a/media-gfx/openvdb/metadata.xml +++ b/media-gfx/openvdb/metadata.xml @@ -24,8 +24,11 @@ <flag restrict=">=media-gfx/openvdb-5.0.0" name="abi5-compat"> Disables newer features to maintain compatibility with ABI5. </flag> + <flag restrict=">=media-gfx/openvdb-6.0.0" name="abi6-compat"> + Disables newer features to maintain compatibility with ABI6. + </flag> </use> <upstream> - <remote-id type="github">dreamworksanimation/openvdb</remote-id> + <remote-id type="github">AcademySoftwareFoundation/openvdb</remote-id> </upstream> </pkgmetadata> diff --git a/media-gfx/openvdb/openvdb-6.2.1.ebuild b/media-gfx/openvdb/openvdb-6.2.1.ebuild new file mode 100644 index 000000000000..ec7599df5b98 --- /dev/null +++ b/media-gfx/openvdb/openvdb-6.2.1.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7,8} ) +CMAKE_MAKEFILE_GENERATOR="emake" + +inherit cmake flag-o-matic python-single-r1 + +DESCRIPTION="Library for the efficient manipulation of volumetric data" +HOMEPAGE="https://www.openvdb.org" +SRC_URI="https://github.com/AcademySoftwareFoundation/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MPL-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="abi3-compat abi4-compat abi5-compat abi6-compat doc python test" +RESTRICT="!test? ( test )" + +REQUIRED_USE=" + python? ( ${PYTHON_REQUIRED_USE} ) + ^^ ( abi3-compat abi4-compat abi5-compat abi6-compat ) +" + +RDEPEND=" + dev-libs/boost:= + dev-libs/c-blosc + dev-libs/jemalloc + dev-libs/log4cplus + media-libs/glfw:= + media-libs/openexr:= + sys-libs/zlib:= + x11-libs/libXcursor + x11-libs/libXi + x11-libs/libXinerama + x11-libs/libXrandr + python? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-libs/boost:=[python?,${PYTHON_MULTI_USEDEP}] + dev-python/numpy[${PYTHON_MULTI_USEDEP}] + ') + )" + +DEPEND="${RDEPEND} + >=dev-util/cmake-3.16.2-r1 + dev-cpp/tbb + virtual/pkgconfig + doc? ( + app-doc/doxygen + dev-texlive/texlive-bibtexextra + dev-texlive/texlive-fontsextra + dev-texlive/texlive-fontutils + dev-texlive/texlive-latex + dev-texlive/texlive-latexextra + ) + test? ( dev-util/cppunit )" + +PATCHES=( + "${FILESDIR}/${P}-fix-multilib-header-source.patch" + "${FILESDIR}/${PN}-4.0.2-fix-const-correctness-for-unittest.patch" + "${FILESDIR}/${P}-use-gnuinstalldirs.patch" +) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_configure() { + local myprefix="${EPREFIX}/usr/" + + local version + if use abi3-compat; then + version=3 + elif use abi4-compat; then + version=4 + elif use abi5-compat; then + version=5 + elif use abi6-compat; then + version=6 + else + die "Openvdb ABI version not specified" + fi + + local mycmakeargs=( + -DCMAKE_INSTALL_DOCDIR="share/doc/${PF}" + -DOPENVDB_ABI_VERSION_NUMBER="${version}" + -DOPENVDB_BUILD_DOCS=$(usex doc) + -DOPENVDB_BUILD_PYTHON_MODULE=$(usex python) + -DOPENVDB_BUILD_UNITTESTS=$(usex test) + -DOPENVDB_ENABLE_RPATH=OFF + -DCHOST="${CHOST}" + ) + + use python && mycmakeargs+=( -DPYOPENVDB_INSTALL_DIRECTORY="$(python_get_sitedir)" ) + use test && mycmakeargs+=( -DCPPUNIT_LOCATION="${myprefix}" ) + + cmake_src_configure +} |