Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/openvdb/, media-gfx/openvdb/files/
Date: Mon, 24 Aug 2020 13:42:44
Message-Id: 1598276511.c91c00513d5e61359095c22d52072d726e5b7f49.sam@gentoo
1 commit: c91c00513d5e61359095c22d52072d726e5b7f49
2 Author: Adrian Grigo <agrigo2001 <AT> yahoo <DOT> com <DOT> au>
3 AuthorDate: Tue Aug 18 06:18:56 2020 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 24 13:41:51 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c91c0051
7
8 media-gfx/openvdb: Version bump to 6.2.1
9
10 Version bump to openvdb 6.2.1, requiring an additional use flag for
11 abi6-compat.
12
13 This version requires cmake 3.16 or higher.
14
15 Other changes:
16 * Compared to version 5, the gnuinstalldirs patch no longer needs
17 BLOSC_LOCATION, GLFW3_LOCATION or TBB_LOCATION so these have been
18 removed.
19
20 * The new multilib header patch needs to know the CHOST so it is set
21 in the arguments passed to cmake.
22
23 * USE_GLFW3 is no longer used by the build system so it has been
24 removed also.
25
26 * Update the github upstream source as dreamworksanimation now redirects to
27 AcademySoftwareFoundation.
28
29 Signed-off-by: Adrian Grigo <agrigo2001 <AT> yahoo.com.au>
30 Package-Manager: Portage-2.3.103, Repoman-2.3.23
31 Signed-off-by: Sam James <sam <AT> gentoo.org>
32
33 media-gfx/openvdb/Manifest | 1 +
34 .../openvdb-6.2.1-fix-multilib-header-source.patch | 29 ++++++
35 .../files/openvdb-6.2.1-use-gnuinstalldirs.patch | 54 +++++++++++
36 media-gfx/openvdb/metadata.xml | 5 +-
37 media-gfx/openvdb/openvdb-6.2.1.ebuild | 100 +++++++++++++++++++++
38 5 files changed, 188 insertions(+), 1 deletion(-)
39
40 diff --git a/media-gfx/openvdb/Manifest b/media-gfx/openvdb/Manifest
41 index fda421e16ae..f02f09bc37d 100644
42 --- a/media-gfx/openvdb/Manifest
43 +++ b/media-gfx/openvdb/Manifest
44 @@ -1,3 +1,4 @@
45 DIST openvdb-4.0.2-patchset-02.tar.xz 12428 BLAKE2B 2684ddf010df975912fcfc8c4f944d9a9ba447b48750140b6c46db31d49297f7495e5c77e9d5b85af0b2e1d0c4987184865642dc95f1fb3e463e85ee5987d203 SHA512 04377d552e218a8eb31c43381ba32263ba206a0870dccda1bcc031863dfdbcc953da7ea89fd420dc1a338fbd6123ac30bac2039c0a2a01c1fa9253a3fdd0b54d
46 DIST openvdb-4.0.2.tar.gz 1689119 BLAKE2B dbc8d4ab44990440e201327d76bbf9bfe3e8f597505b1d008dedb95dc540277513f465d455079c59820acc5056c9a2edf56235e1097b6c73a1f7dd8c59609c15 SHA512 8e3e12583b81f9b9303b309e839c8321c67b67ff8a0e61bb56c87276bf25c0deff22f5a73c7c5b661b8e5df345bfdabfa6b0aea9bf16fce57d9c53a76751c75d
47 DIST openvdb-5.2.0.tar.gz 1788969 BLAKE2B d146b78dd7db4936779ca214b1f7957d4868bf76aedb95c9a98e21d25983b750337a63bf4bc9ccb438b683988af7a3d708676dcf7b4662c84e4926e8000ceb68 SHA512 69e21190c27a055e476a319b0c2d961303fa2f3fec30bec93ed44072d01816ef89e5e8f0abfc3a22d1c73742aa31284c664596747b49cd985fea1a751776506e
48 +DIST openvdb-6.2.1.tar.gz 1935325 BLAKE2B 24ca340e513d2f22521994fbb2315a1c3f817bb35a7402ca481b12444e5ced58dfd773cc07b47a56d1ed9f6951e58cf1ef0b5c35917620b031383faed21c6557 SHA512 f5d830880316b5ca3921c77c75f3a254aba47d144ac6c0223fc2732d99cbd6b7ffb7f27049f8ab3760ad77b3658fc08a82728325ba753bc29932aa46336457de
49
50 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
51 new file mode 100644
52 index 00000000000..c6e2bae5dfa
53 --- /dev/null
54 +++ b/media-gfx/openvdb/files/openvdb-6.2.1-fix-multilib-header-source.patch
55 @@ -0,0 +1,29 @@
56 +diff -Naur a/cmake/FindIlmBase.cmake b/cmake/FindIlmBase.cmake
57 +--- a/cmake/FindIlmBase.cmake 2020-02-02 01:03:55.000000000 +0800
58 ++++ b/cmake/FindIlmBase.cmake 2020-02-02 01:09:05.000000000 +0800
59 +@@ -168,9 +168,15 @@
60 + PATH_SUFFIXES include/OpenEXR OpenEXR
61 + )
62 +
63 ++if(EXISTS "/usr/include/${CHOST}/OpenEXR/IlmBaseConfig.h")
64 ++ set(_ILMBASE_HEADERS "/usr/include/${CHOST}/OpenEXR")
65 ++else()
66 ++ set(_ILMBASE_HEADERS ${IlmBase_INCLUDE_DIR})
67 ++endif()
68 ++
69 + if(EXISTS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h")
70 + # Get the ILMBASE version information from the config header
71 +- file(STRINGS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h"
72 ++ file(STRINGS "${_ILMBASE_HEADERS}/IlmBaseConfig.h"
73 + _ilmbase_version_major_string REGEX "#define ILMBASE_VERSION_MAJOR "
74 + )
75 + string(REGEX REPLACE "#define ILMBASE_VERSION_MAJOR" ""
76 +@@ -178,7 +184,7 @@
77 + )
78 + string(STRIP "${_ilmbase_version_major_string}" IlmBase_VERSION_MAJOR)
79 +
80 +- file(STRINGS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h"
81 ++ file(STRINGS "${_ILMBASE_HEADERS}/IlmBaseConfig.h"
82 + _ilmbase_version_minor_string REGEX "#define ILMBASE_VERSION_MINOR "
83 + )
84 + string(REGEX REPLACE "#define ILMBASE_VERSION_MINOR" ""
85
86 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
87 new file mode 100644
88 index 00000000000..ac73d82f9c3
89 --- /dev/null
90 +++ b/media-gfx/openvdb/files/openvdb-6.2.1-use-gnuinstalldirs.patch
91 @@ -0,0 +1,54 @@
92 +diff -Naur a/CMakeLists.txt b/CMakeLists.txt
93 +--- a/CMakeLists.txt 2020-01-08 22:16:00.493079361 +0800
94 ++++ b/CMakeLists.txt 2020-01-08 22:16:44.790285583 +0800
95 +@@ -252,6 +252,8 @@
96 +
97 + enable_testing()
98 +
99 ++INCLUDE ( GNUInstallDirs )
100 ++
101 + # Add our cmake modules
102 +
103 + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
104 +diff -Naur a/openvdb/CMakeLists.txt b/openvdb/CMakeLists.txt
105 +--- a/openvdb/CMakeLists.txt 2020-01-08 22:16:07.362646127 +0800
106 ++++ b/openvdb/CMakeLists.txt 2020-01-08 22:19:54.638308684 +0800
107 +@@ -492,7 +492,7 @@
108 + install(TARGETS
109 + openvdb_static
110 + DESTINATION
111 +- lib
112 ++ ${CMAKE_INSTALL_LIBDIR}
113 + )
114 + endif()
115 +
116 +@@ -500,14 +500,14 @@
117 + if(WIN32)
118 + install(TARGETS
119 + openvdb_shared
120 +- RUNTIME DESTINATION bin COMPONENT Runtime
121 +- ARCHIVE DESTINATION lib COMPONENT Runtime
122 ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime
123 ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Runtime
124 + )
125 + else()
126 + install(TARGETS
127 + openvdb_shared
128 + DESTINATION
129 +- lib
130 ++ ${CMAKE_INSTALL_LIBDIR}
131 + )
132 + endif()
133 + endif()
134 +diff -Naur a/openvdb/python/CMakeLists.txt b/openvdb/python/CMakeLists.txt
135 +--- a/openvdb/python/CMakeLists.txt 2020-01-08 22:16:14.452199013 +0800
136 ++++ b/openvdb/python/CMakeLists.txt 2020-01-08 22:21:45.311324663 +0800
137 +@@ -232,7 +232,7 @@
138 + ${PYOPENVDB_INSTALL_DIRECTORY}
139 + )
140 +
141 +-install(FILES ${PYTHON_PUBLIC_INCLUDE_NAMES} DESTINATION include/openvdb/python)
142 ++install(FILES ${PYTHON_PUBLIC_INCLUDE_NAMES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb/python)
143 +
144 + # pytest
145 +
146
147 diff --git a/media-gfx/openvdb/metadata.xml b/media-gfx/openvdb/metadata.xml
148 index 43363d09c1a..58f434001fc 100644
149 --- a/media-gfx/openvdb/metadata.xml
150 +++ b/media-gfx/openvdb/metadata.xml
151 @@ -24,8 +24,11 @@
152 <flag restrict="&gt;=media-gfx/openvdb-5.0.0" name="abi5-compat">
153 Disables newer features to maintain compatibility with ABI5.
154 </flag>
155 + <flag restrict="&gt;=media-gfx/openvdb-6.0.0" name="abi6-compat">
156 + Disables newer features to maintain compatibility with ABI6.
157 + </flag>
158 </use>
159 <upstream>
160 - <remote-id type="github">dreamworksanimation/openvdb</remote-id>
161 + <remote-id type="github">AcademySoftwareFoundation/openvdb</remote-id>
162 </upstream>
163 </pkgmetadata>
164
165 diff --git a/media-gfx/openvdb/openvdb-6.2.1.ebuild b/media-gfx/openvdb/openvdb-6.2.1.ebuild
166 new file mode 100644
167 index 00000000000..ec7599df5b9
168 --- /dev/null
169 +++ b/media-gfx/openvdb/openvdb-6.2.1.ebuild
170 @@ -0,0 +1,100 @@
171 +# Copyright 1999-2020 Gentoo Authors
172 +# Distributed under the terms of the GNU General Public License v2
173 +
174 +EAPI=7
175 +
176 +PYTHON_COMPAT=( python3_{7,8} )
177 +CMAKE_MAKEFILE_GENERATOR="emake"
178 +
179 +inherit cmake flag-o-matic python-single-r1
180 +
181 +DESCRIPTION="Library for the efficient manipulation of volumetric data"
182 +HOMEPAGE="https://www.openvdb.org"
183 +SRC_URI="https://github.com/AcademySoftwareFoundation/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
184 +
185 +LICENSE="MPL-2.0"
186 +SLOT="0"
187 +KEYWORDS="~amd64 ~x86"
188 +IUSE="abi3-compat abi4-compat abi5-compat abi6-compat doc python test"
189 +RESTRICT="!test? ( test )"
190 +
191 +REQUIRED_USE="
192 + python? ( ${PYTHON_REQUIRED_USE} )
193 + ^^ ( abi3-compat abi4-compat abi5-compat abi6-compat )
194 +"
195 +
196 +RDEPEND="
197 + dev-libs/boost:=
198 + dev-libs/c-blosc
199 + dev-libs/jemalloc
200 + dev-libs/log4cplus
201 + media-libs/glfw:=
202 + media-libs/openexr:=
203 + sys-libs/zlib:=
204 + x11-libs/libXcursor
205 + x11-libs/libXi
206 + x11-libs/libXinerama
207 + x11-libs/libXrandr
208 + python? (
209 + ${PYTHON_DEPS}
210 + $(python_gen_cond_dep '
211 + dev-libs/boost:=[python?,${PYTHON_MULTI_USEDEP}]
212 + dev-python/numpy[${PYTHON_MULTI_USEDEP}]
213 + ')
214 + )"
215 +
216 +DEPEND="${RDEPEND}
217 + >=dev-util/cmake-3.16.2-r1
218 + dev-cpp/tbb
219 + virtual/pkgconfig
220 + doc? (
221 + app-doc/doxygen
222 + dev-texlive/texlive-bibtexextra
223 + dev-texlive/texlive-fontsextra
224 + dev-texlive/texlive-fontutils
225 + dev-texlive/texlive-latex
226 + dev-texlive/texlive-latexextra
227 + )
228 + test? ( dev-util/cppunit )"
229 +
230 +PATCHES=(
231 + "${FILESDIR}/${P}-fix-multilib-header-source.patch"
232 + "${FILESDIR}/${PN}-4.0.2-fix-const-correctness-for-unittest.patch"
233 + "${FILESDIR}/${P}-use-gnuinstalldirs.patch"
234 +)
235 +
236 +pkg_setup() {
237 + use python && python-single-r1_pkg_setup
238 +}
239 +
240 +src_configure() {
241 + local myprefix="${EPREFIX}/usr/"
242 +
243 + local version
244 + if use abi3-compat; then
245 + version=3
246 + elif use abi4-compat; then
247 + version=4
248 + elif use abi5-compat; then
249 + version=5
250 + elif use abi6-compat; then
251 + version=6
252 + else
253 + die "Openvdb ABI version not specified"
254 + fi
255 +
256 + local mycmakeargs=(
257 + -DCMAKE_INSTALL_DOCDIR="share/doc/${PF}"
258 + -DOPENVDB_ABI_VERSION_NUMBER="${version}"
259 + -DOPENVDB_BUILD_DOCS=$(usex doc)
260 + -DOPENVDB_BUILD_PYTHON_MODULE=$(usex python)
261 + -DOPENVDB_BUILD_UNITTESTS=$(usex test)
262 + -DOPENVDB_ENABLE_RPATH=OFF
263 + -DCHOST="${CHOST}"
264 + )
265 +
266 + use python && mycmakeargs+=( -DPYOPENVDB_INSTALL_DIRECTORY="$(python_get_sitedir)" )
267 + use test && mycmakeargs+=( -DCPPUNIT_LOCATION="${myprefix}" )
268 +
269 + cmake_src_configure
270 +}