1 |
commit: e2caaa6f7abb46ec70732b82a5bdd7bb00f058dd |
2 |
Author: Craig Andrews <candrews <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Nov 9 21:27:39 2018 +0000 |
4 |
Commit: Craig Andrews <candrews <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 19 20:13:07 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2caaa6f |
7 |
|
8 |
media-libs/vigra: Fix compilation error and add -9999 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/664720 |
11 |
Package-Manager: Portage-2.3.51, Repoman-2.3.12 |
12 |
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org> |
13 |
|
14 |
...1.1-fix-incorrect-template-parameter-type.patch | 139 +++++++++++++++++++ |
15 |
media-libs/vigra/vigra-1.11.1-r1.ebuild | 149 +++++++++++++++++++++ |
16 |
media-libs/vigra/vigra-9999.ebuild | 144 ++++++++++++++++++++ |
17 |
3 files changed, 432 insertions(+) |
18 |
|
19 |
diff --git a/media-libs/vigra/files/vigra-1.11.1-fix-incorrect-template-parameter-type.patch b/media-libs/vigra/files/vigra-1.11.1-fix-incorrect-template-parameter-type.patch |
20 |
new file mode 100644 |
21 |
index 00000000000..88ed61ee374 |
22 |
--- /dev/null |
23 |
+++ b/media-libs/vigra/files/vigra-1.11.1-fix-incorrect-template-parameter-type.patch |
24 |
@@ -0,0 +1,139 @@ |
25 |
+From 81958d302494e137f98a8b1d7869841532f90388 Mon Sep 17 00:00:00 2001 |
26 |
+From: JaimeIvanCervantes <jimmycc80@×××××××.com> |
27 |
+Date: Fri, 16 Jun 2017 13:21:45 -0700 |
28 |
+Subject: [PATCH] multi_convolution: Fix for incorrect template parameter type |
29 |
+ when using unsigned int N for TinyVector SIZE. (Fixes #414) |
30 |
+ |
31 |
+--- |
32 |
+ include/vigra/multi_convolution.hxx | 28 ++++++++++++++-------------- |
33 |
+ 1 file changed, 14 insertions(+), 14 deletions(-) |
34 |
+ |
35 |
+diff --git a/include/vigra/multi_convolution.hxx b/include/vigra/multi_convolution.hxx |
36 |
+index 1b5efa740..ec89bcf58 100644 |
37 |
+--- a/include/vigra/multi_convolution.hxx |
38 |
++++ b/include/vigra/multi_convolution.hxx |
39 |
+@@ -1426,7 +1426,7 @@ gaussianSmoothMultiArray(MultiArrayView<N, T1, S1> const & source, |
40 |
+ class T2, class S2> |
41 |
+ void |
42 |
+ gaussianGradientMultiArray(MultiArrayView<N, T1, S1> const & source, |
43 |
+- MultiArrayView<N, TinyVector<T2, N>, S2> dest, |
44 |
++ MultiArrayView<N, TinyVector<T2, int(N)>, S2> dest, |
45 |
+ double sigma, |
46 |
+ ConvolutionOptions<N> opt = ConvolutionOptions<N>()); |
47 |
+ |
48 |
+@@ -1435,7 +1435,7 @@ gaussianSmoothMultiArray(MultiArrayView<N, T1, S1> const & source, |
49 |
+ class T2, class S2> |
50 |
+ void |
51 |
+ gaussianGradientMultiArray(MultiArrayView<N, T1, S1> const & source, |
52 |
+- MultiArrayView<N, TinyVector<T2, N>, S2> dest, |
53 |
++ MultiArrayView<N, TinyVector<T2, int(N)>, S2> dest, |
54 |
+ ConvolutionOptions<N> opt); |
55 |
+ |
56 |
+ // likewise, but execute algorithm in parallel |
57 |
+@@ -1443,7 +1443,7 @@ gaussianSmoothMultiArray(MultiArrayView<N, T1, S1> const & source, |
58 |
+ class T2, class S2> |
59 |
+ void |
60 |
+ gaussianGradientMultiArray(MultiArrayView<N, T1, S1> const & source, |
61 |
+- MultiArrayView<N, TinyVector<T2, N>, S2> dest, |
62 |
++ MultiArrayView<N, TinyVector<T2, int(N)>, S2> dest, |
63 |
+ BlockwiseConvolutionOptions<N> opt); |
64 |
+ } |
65 |
+ \endcode |
66 |
+@@ -1590,7 +1590,7 @@ template <unsigned int N, class T1, class S1, |
67 |
+ class T2, class S2> |
68 |
+ inline void |
69 |
+ gaussianGradientMultiArray(MultiArrayView<N, T1, S1> const & source, |
70 |
+- MultiArrayView<N, TinyVector<T2, N>, S2> dest, |
71 |
++ MultiArrayView<N, TinyVector<T2, int(N)>, S2> dest, |
72 |
+ ConvolutionOptions<N> opt ) |
73 |
+ { |
74 |
+ if(opt.to_point != typename MultiArrayShape<N>::type()) |
75 |
+@@ -1614,7 +1614,7 @@ template <unsigned int N, class T1, class S1, |
76 |
+ class T2, class S2> |
77 |
+ inline void |
78 |
+ gaussianGradientMultiArray(MultiArrayView<N, T1, S1> const & source, |
79 |
+- MultiArrayView<N, TinyVector<T2, N>, S2> dest, |
80 |
++ MultiArrayView<N, TinyVector<T2, int(N)>, S2> dest, |
81 |
+ double sigma, |
82 |
+ ConvolutionOptions<N> opt = ConvolutionOptions<N>()) |
83 |
+ { |
84 |
+@@ -1653,7 +1653,7 @@ gaussianGradientMagnitudeImpl(MultiArrayView<N+1, T1, S1> const & src, |
85 |
+ dest.init(0.0); |
86 |
+ |
87 |
+ typedef typename NumericTraits<T1>::RealPromote TmpType; |
88 |
+- MultiArray<N, TinyVector<TmpType, N> > grad(dest.shape()); |
89 |
++ MultiArray<N, TinyVector<TmpType, int(N)> > grad(dest.shape()); |
90 |
+ |
91 |
+ using namespace multi_math; |
92 |
+ |
93 |
+@@ -1771,7 +1771,7 @@ gaussianGradientMagnitude(MultiArrayView<N+1, Multiband<T1>, S1> const & src, |
94 |
+ class T2, class S2> |
95 |
+ void |
96 |
+ symmetricGradientMultiArray(MultiArrayView<N, T1, S1> const & source, |
97 |
+- MultiArrayView<N, TinyVector<T2, N>, S2> dest, |
98 |
++ MultiArrayView<N, TinyVector<T2, int(N)>, S2> dest, |
99 |
+ ConvolutionOptions<N> opt = ConvolutionOptions<N>()); |
100 |
+ |
101 |
+ // execute algorithm in parallel |
102 |
+@@ -1779,7 +1779,7 @@ gaussianGradientMagnitude(MultiArrayView<N+1, Multiband<T1>, S1> const & src, |
103 |
+ class T2, class S2> |
104 |
+ void |
105 |
+ symmetricGradientMultiArray(MultiArrayView<N, T1, S1> const & source, |
106 |
+- MultiArrayView<N, TinyVector<T2, N>, S2> dest, |
107 |
++ MultiArrayView<N, TinyVector<T2, int(N)>, S2> dest, |
108 |
+ BlockwiseConvolutionOptions<N> opt); |
109 |
+ } |
110 |
+ \endcode |
111 |
+@@ -1895,7 +1895,7 @@ template <unsigned int N, class T1, class S1, |
112 |
+ class T2, class S2> |
113 |
+ inline void |
114 |
+ symmetricGradientMultiArray(MultiArrayView<N, T1, S1> const & source, |
115 |
+- MultiArrayView<N, TinyVector<T2, N>, S2> dest, |
116 |
++ MultiArrayView<N, TinyVector<T2, int(N)>, S2> dest, |
117 |
+ ConvolutionOptions<N> opt = ConvolutionOptions<N>()) |
118 |
+ { |
119 |
+ if(opt.to_point != typename MultiArrayShape<N>::type()) |
120 |
+@@ -2214,14 +2214,14 @@ laplacianOfGaussianMultiArray(MultiArrayView<N, T1, S1> const & source, |
121 |
+ template <unsigned int N, class T1, class S1, |
122 |
+ class T2, class S2> |
123 |
+ void |
124 |
+- gaussianDivergenceMultiArray(MultiArrayView<N, TinyVector<T1, N>, S1> const & vectorField, |
125 |
++ gaussianDivergenceMultiArray(MultiArrayView<N, TinyVector<T1, int(N)>, S1> const & vectorField, |
126 |
+ MultiArrayView<N, T2, S2> divergence, |
127 |
+ ConvolutionOptions<N> const & opt); |
128 |
+ |
129 |
+ template <unsigned int N, class T1, class S1, |
130 |
+ class T2, class S2> |
131 |
+ void |
132 |
+- gaussianDivergenceMultiArray(MultiArrayView<N, TinyVector<T1, N>, S1> const & vectorField, |
133 |
++ gaussianDivergenceMultiArray(MultiArrayView<N, TinyVector<T1, int(N)>, S1> const & vectorField, |
134 |
+ MultiArrayView<N, T2, S2> divergence, |
135 |
+ double sigma, |
136 |
+ ConvolutionOptions<N> opt = ConvolutionOptions<N>()); |
137 |
+@@ -2231,7 +2231,7 @@ laplacianOfGaussianMultiArray(MultiArrayView<N, T1, S1> const & source, |
138 |
+ template <unsigned int N, class T1, class S1, |
139 |
+ class T2, class S2> |
140 |
+ void |
141 |
+- gaussianDivergenceMultiArray(MultiArrayView<N, TinyVector<T1, N>, S1> const & vectorField, |
142 |
++ gaussianDivergenceMultiArray(MultiArrayView<N, TinyVector<T1, int(N)>, S1> const & vectorField, |
143 |
+ MultiArrayView<N, T2, S2> divergence, |
144 |
+ BlockwiseConvolutionOptions<N> const & opt); |
145 |
+ } |
146 |
+@@ -2324,7 +2324,7 @@ gaussianDivergenceMultiArray(Iterator vectorField, Iterator vectorFieldEnd, |
147 |
+ template <unsigned int N, class T1, class S1, |
148 |
+ class T2, class S2> |
149 |
+ inline void |
150 |
+-gaussianDivergenceMultiArray(MultiArrayView<N, TinyVector<T1, N>, S1> const & vectorField, |
151 |
++gaussianDivergenceMultiArray(MultiArrayView<N, TinyVector<T1, int(N)>, S1> const & vectorField, |
152 |
+ MultiArrayView<N, T2, S2> divergence, |
153 |
+ ConvolutionOptions<N> const & opt) |
154 |
+ { |
155 |
+@@ -2338,7 +2338,7 @@ gaussianDivergenceMultiArray(MultiArrayView<N, TinyVector<T1, N>, S1> const & ve |
156 |
+ template <unsigned int N, class T1, class S1, |
157 |
+ class T2, class S2> |
158 |
+ inline void |
159 |
+-gaussianDivergenceMultiArray(MultiArrayView<N, TinyVector<T1, N>, S1> const & vectorField, |
160 |
++gaussianDivergenceMultiArray(MultiArrayView<N, TinyVector<T1, int(N)>, S1> const & vectorField, |
161 |
+ MultiArrayView<N, T2, S2> divergence, |
162 |
+ double sigma, |
163 |
+ ConvolutionOptions<N> opt = ConvolutionOptions<N>()) |
164 |
|
165 |
diff --git a/media-libs/vigra/vigra-1.11.1-r1.ebuild b/media-libs/vigra/vigra-1.11.1-r1.ebuild |
166 |
new file mode 100644 |
167 |
index 00000000000..c5e8c814dae |
168 |
--- /dev/null |
169 |
+++ b/media-libs/vigra/vigra-1.11.1-r1.ebuild |
170 |
@@ -0,0 +1,149 @@ |
171 |
+# Copyright 1999-2018 Gentoo Authors |
172 |
+# Distributed under the terms of the GNU General Public License v2 |
173 |
+ |
174 |
+EAPI=6 |
175 |
+MY_P="${P}-src" |
176 |
+MY_V="${PV//\./-}" |
177 |
+PYTHON_COMPAT=( python2_7 ) |
178 |
+PYTHON_REQ_USE="threads,xml" |
179 |
+ |
180 |
+inherit cmake-utils python-r1 |
181 |
+ |
182 |
+DESCRIPTION="C++ computer vision library emphasizing customizable algorithms and structures" |
183 |
+HOMEPAGE="https://ukoethe.github.io/vigra/" |
184 |
+ |
185 |
+if [[ ${PV} == *9999 ]] ; then |
186 |
+ EGIT_REPO_URI="https://github.com/ukoethe/${PN}.git" |
187 |
+ inherit git-r3 |
188 |
+else |
189 |
+ SRC_URI="https://github.com/ukoethe/${PN}/releases/download/Version-${MY_V}/${MY_P}.tar.gz" |
190 |
+ KEYWORDS="~amd64 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
191 |
+fi |
192 |
+ |
193 |
+LICENSE="MIT" |
194 |
+SLOT="0" |
195 |
+IUSE="doc +fftw +hdf5 +jpeg mpi openexr +png +python test +tiff valgrind" |
196 |
+ |
197 |
+# runtime dependency on python:2.7 is required by the vigra-config script |
198 |
+RDEPEND=" |
199 |
+ dev-lang/python:2.7 |
200 |
+ >=dev-libs/boost-1.52.0-r6:=[python?,${PYTHON_USEDEP}] |
201 |
+ fftw? ( sci-libs/fftw:3.0 ) |
202 |
+ hdf5? ( >=sci-libs/hdf5-1.8.0:=[mpi?] ) |
203 |
+ jpeg? ( virtual/jpeg:0 ) |
204 |
+ openexr? ( media-libs/openexr:= ) |
205 |
+ png? ( media-libs/libpng:0= ) |
206 |
+ python? ( ${PYTHON_DEPS} dev-python/numpy[${PYTHON_USEDEP}] ) |
207 |
+ tiff? ( media-libs/tiff:0= ) |
208 |
+ valgrind? ( dev-util/valgrind )" |
209 |
+ |
210 |
+DEPEND="${RDEPEND} |
211 |
+ doc? ( |
212 |
+ app-doc/doxygen |
213 |
+ python? ( >=dev-python/sphinx-1.1.3-r5[${PYTHON_USEDEP}] ) |
214 |
+ ) |
215 |
+ test? ( >=dev-python/nose-1.1.2-r1[${PYTHON_USEDEP}] )" |
216 |
+ |
217 |
+REQUIRED_USE=" |
218 |
+ doc? ( hdf5 fftw ) |
219 |
+ python? ( hdf5 ${PYTHON_REQUIRED_USE} ) |
220 |
+ test? ( hdf5 python fftw )" |
221 |
+ |
222 |
+# Severely broken, also disabled in Fedora, bugs #390447, #653442 |
223 |
+RESTRICT="test" |
224 |
+ |
225 |
+DOCS=( README.md ) |
226 |
+ |
227 |
+PATCHES=( |
228 |
+ "${FILESDIR}/${P}-fix-incorrect-template-parameter-type.patch" |
229 |
+) |
230 |
+ |
231 |
+pkg_setup() { |
232 |
+ use python && python_setup |
233 |
+} |
234 |
+ |
235 |
+src_prepare() { |
236 |
+ einfo "Removing shipped docs and VCS files" |
237 |
+ rm -rf doc || die |
238 |
+ rm .git* .travis.yml || die |
239 |
+ |
240 |
+ cmake-utils_src_prepare |
241 |
+ |
242 |
+ # Don't use python_fix_shebang because we can't put this behind USE="python" |
243 |
+ sed -i -e '/env/s:python:python2:' config/vigra-config.in || die |
244 |
+} |
245 |
+ |
246 |
+src_configure() { |
247 |
+ vigra_configure() { |
248 |
+ local libdir="$(get_libdir)" |
249 |
+ |
250 |
+ local mycmakeargs=( |
251 |
+ -DAUTOEXEC_TESTS=OFF |
252 |
+ -DDOCDIR="${BUILD_DIR}/doc" |
253 |
+ -DDOCINSTALL="share/doc/${P}" |
254 |
+ -DLIBDIR_SUFFIX="${libdir/lib}" |
255 |
+ -DUSE_DOC=$(usex doc ON OFF) # unused |
256 |
+ -DUSE_FFTW3=$(usex fftw ON OFF) # unused |
257 |
+ -DUSE_JPEG=$(usex jpeg ON OFF) # unused |
258 |
+ -DUSE_MPI=$(usex mpi ON OFF) # unused |
259 |
+ -DUSE_PNG=$(usex png ON OFF) # unused |
260 |
+ -DUSE_TIFF=$(usex tiff ON OFF) # unused |
261 |
+ -DWITH_HDF5=$(usex hdf5 ON OFF) |
262 |
+ -DWITH_OPENEXR=$(usex openexr ON OFF) |
263 |
+ -DWITH_VALGRIND=$(usex valgrind ON OFF) |
264 |
+ -DWITH_VIGRANUMPY=$(usex python ON OFF) |
265 |
+ -DBUILD_TESTING=$(usex test ON OFF) # unused |
266 |
+ -DUSE_AUTOBUILD_TESTS=$(usex test ON OFF) # unused |
267 |
+ -DUSE_CREATE_CTEST_TARGETS=$(usex test ON OFF) # unused |
268 |
+ ) |
269 |
+ cmake-utils_src_configure |
270 |
+ } |
271 |
+ |
272 |
+ if use python; then |
273 |
+ python_foreach_impl vigra_configure |
274 |
+ else |
275 |
+ # required for docdir |
276 |
+ _cmake_check_build_dir init |
277 |
+ vigra_configure |
278 |
+ fi |
279 |
+} |
280 |
+ |
281 |
+src_compile() { |
282 |
+ local VIGRA_BUILD_DIR |
283 |
+ vigra_compile() { |
284 |
+ cmake-utils_src_compile |
285 |
+ VIGRA_BUILD_DIR="${BUILD_DIR}" |
286 |
+ } |
287 |
+ if use python; then |
288 |
+ python_foreach_impl vigra_compile |
289 |
+ else |
290 |
+ vigra_compile |
291 |
+ fi |
292 |
+ |
293 |
+ if use doc; then |
294 |
+ einfo "Generating Documentation" |
295 |
+ # use build dir from last compile command |
296 |
+ VARTEXFONTS="${T}/fonts" BUILD_DIR="${VIGRA_BUILD_DIR}" cmake-utils_src_make doc |
297 |
+ fi |
298 |
+} |
299 |
+ |
300 |
+src_install() { |
301 |
+ if use python; then |
302 |
+ python_foreach_impl cmake-utils_src_install |
303 |
+ python_optimize |
304 |
+ else |
305 |
+ cmake-utils_src_install |
306 |
+ fi |
307 |
+} |
308 |
+ |
309 |
+src_test() { |
310 |
+ # perhaps disable tests (see #390447) |
311 |
+ vigra_test() { |
312 |
+ PYTHONPATH="${BUILD_DIR}/vigranumpy/vigra" cmake-utils_src_test |
313 |
+ } |
314 |
+ if use python; then |
315 |
+ python_foreach_impl vigra_test |
316 |
+ else |
317 |
+ vigra_test |
318 |
+ fi |
319 |
+} |
320 |
|
321 |
diff --git a/media-libs/vigra/vigra-9999.ebuild b/media-libs/vigra/vigra-9999.ebuild |
322 |
new file mode 100644 |
323 |
index 00000000000..4073587b713 |
324 |
--- /dev/null |
325 |
+++ b/media-libs/vigra/vigra-9999.ebuild |
326 |
@@ -0,0 +1,144 @@ |
327 |
+# Copyright 1999-2018 Gentoo Authors |
328 |
+# Distributed under the terms of the GNU General Public License v2 |
329 |
+ |
330 |
+EAPI=6 |
331 |
+MY_P="${P}-src" |
332 |
+MY_V="${PV//\./-}" |
333 |
+PYTHON_COMPAT=( python2_7 ) |
334 |
+PYTHON_REQ_USE="threads,xml" |
335 |
+ |
336 |
+inherit cmake-utils python-r1 |
337 |
+ |
338 |
+DESCRIPTION="C++ computer vision library emphasizing customizable algorithms and structures" |
339 |
+HOMEPAGE="https://ukoethe.github.io/vigra/" |
340 |
+ |
341 |
+if [[ ${PV} == *9999 ]] ; then |
342 |
+ EGIT_REPO_URI="https://github.com/ukoethe/${PN}.git" |
343 |
+ inherit git-r3 |
344 |
+else |
345 |
+ SRC_URI="https://github.com/ukoethe/${PN}/releases/download/Version-${MY_V}/${MY_P}.tar.gz" |
346 |
+ KEYWORDS="~amd64 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
347 |
+fi |
348 |
+ |
349 |
+LICENSE="MIT" |
350 |
+SLOT="0" |
351 |
+IUSE="doc +fftw +hdf5 +jpeg mpi openexr +png +python test +tiff valgrind" |
352 |
+ |
353 |
+# runtime dependency on python:2.7 is required by the vigra-config script |
354 |
+RDEPEND=" |
355 |
+ dev-lang/python:2.7 |
356 |
+ >=dev-libs/boost-1.52.0-r6:=[python?,${PYTHON_USEDEP}] |
357 |
+ fftw? ( sci-libs/fftw:3.0 ) |
358 |
+ hdf5? ( >=sci-libs/hdf5-1.8.0:=[mpi?] ) |
359 |
+ jpeg? ( virtual/jpeg:0 ) |
360 |
+ openexr? ( media-libs/openexr:= ) |
361 |
+ png? ( media-libs/libpng:0= ) |
362 |
+ python? ( ${PYTHON_DEPS} dev-python/numpy[${PYTHON_USEDEP}] ) |
363 |
+ tiff? ( media-libs/tiff:0= ) |
364 |
+ valgrind? ( dev-util/valgrind )" |
365 |
+ |
366 |
+DEPEND="${RDEPEND} |
367 |
+ doc? ( |
368 |
+ app-doc/doxygen |
369 |
+ python? ( >=dev-python/sphinx-1.1.3-r5[${PYTHON_USEDEP}] ) |
370 |
+ ) |
371 |
+ test? ( >=dev-python/nose-1.1.2-r1[${PYTHON_USEDEP}] )" |
372 |
+ |
373 |
+REQUIRED_USE=" |
374 |
+ doc? ( hdf5 fftw ) |
375 |
+ python? ( hdf5 ${PYTHON_REQUIRED_USE} ) |
376 |
+ test? ( hdf5 python fftw )" |
377 |
+ |
378 |
+# Severely broken, also disabled in Fedora, bugs #390447, #653442 |
379 |
+RESTRICT="test" |
380 |
+ |
381 |
+DOCS=( README.md ) |
382 |
+ |
383 |
+pkg_setup() { |
384 |
+ use python && python_setup |
385 |
+} |
386 |
+ |
387 |
+src_prepare() { |
388 |
+ einfo "Removing shipped docs and VCS files" |
389 |
+ rm -rf doc || die |
390 |
+ |
391 |
+ cmake-utils_src_prepare |
392 |
+ |
393 |
+ # Don't use python_fix_shebang because we can't put this behind USE="python" |
394 |
+ sed -i -e '/env/s:python:python2:' config/vigra-config.in || die |
395 |
+} |
396 |
+ |
397 |
+src_configure() { |
398 |
+ vigra_configure() { |
399 |
+ local libdir="$(get_libdir)" |
400 |
+ |
401 |
+ local mycmakeargs=( |
402 |
+ -DAUTOEXEC_TESTS=OFF |
403 |
+ -DDOCDIR="${BUILD_DIR}/doc" |
404 |
+ -DDOCINSTALL="share/doc/${P}" |
405 |
+ -DLIBDIR_SUFFIX="${libdir/lib}" |
406 |
+ -DUSE_DOC=$(usex doc ON OFF) # unused |
407 |
+ -DUSE_FFTW3=$(usex fftw ON OFF) # unused |
408 |
+ -DUSE_JPEG=$(usex jpeg ON OFF) # unused |
409 |
+ -DUSE_MPI=$(usex mpi ON OFF) # unused |
410 |
+ -DUSE_PNG=$(usex png ON OFF) # unused |
411 |
+ -DUSE_TIFF=$(usex tiff ON OFF) # unused |
412 |
+ -DWITH_HDF5=$(usex hdf5 ON OFF) |
413 |
+ -DWITH_OPENEXR=$(usex openexr ON OFF) |
414 |
+ -DWITH_VALGRIND=$(usex valgrind ON OFF) |
415 |
+ -DWITH_VIGRANUMPY=$(usex python ON OFF) |
416 |
+ -DBUILD_TESTING=$(usex test ON OFF) # unused |
417 |
+ -DUSE_AUTOBUILD_TESTS=$(usex test ON OFF) # unused |
418 |
+ -DUSE_CREATE_CTEST_TARGETS=$(usex test ON OFF) # unused |
419 |
+ ) |
420 |
+ cmake-utils_src_configure |
421 |
+ } |
422 |
+ |
423 |
+ if use python; then |
424 |
+ python_foreach_impl vigra_configure |
425 |
+ else |
426 |
+ # required for docdir |
427 |
+ _cmake_check_build_dir init |
428 |
+ vigra_configure |
429 |
+ fi |
430 |
+} |
431 |
+ |
432 |
+src_compile() { |
433 |
+ local VIGRA_BUILD_DIR |
434 |
+ vigra_compile() { |
435 |
+ cmake-utils_src_compile |
436 |
+ VIGRA_BUILD_DIR="${BUILD_DIR}" |
437 |
+ } |
438 |
+ if use python; then |
439 |
+ python_foreach_impl vigra_compile |
440 |
+ else |
441 |
+ vigra_compile |
442 |
+ fi |
443 |
+ |
444 |
+ if use doc; then |
445 |
+ einfo "Generating Documentation" |
446 |
+ # use build dir from last compile command |
447 |
+ VARTEXFONTS="${T}/fonts" BUILD_DIR="${VIGRA_BUILD_DIR}" cmake-utils_src_make doc |
448 |
+ fi |
449 |
+} |
450 |
+ |
451 |
+src_install() { |
452 |
+ if use python; then |
453 |
+ python_foreach_impl cmake-utils_src_install |
454 |
+ python_optimize |
455 |
+ else |
456 |
+ cmake-utils_src_install |
457 |
+ fi |
458 |
+} |
459 |
+ |
460 |
+src_test() { |
461 |
+ # perhaps disable tests (see #390447) |
462 |
+ vigra_test() { |
463 |
+ PYTHONPATH="${BUILD_DIR}/vigranumpy/vigra" cmake-utils_src_test |
464 |
+ } |
465 |
+ if use python; then |
466 |
+ python_foreach_impl vigra_test |
467 |
+ else |
468 |
+ vigra_test |
469 |
+ fi |
470 |
+} |