1 |
commit: 5980a0ccde6e30d7127262e6d7c98d852f8cb8c4 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Aug 16 20:28:51 2019 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Aug 16 20:41:24 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5980a0cc |
7 |
|
8 |
media-gfx/imagemagick: bump to v6.9.10-60 & v7.0.8-60 |
9 |
|
10 |
Package-Manager: Portage-2.3.71, Repoman-2.3.17 |
11 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
12 |
|
13 |
media-gfx/imagemagick/Manifest | 2 + |
14 |
media-gfx/imagemagick/imagemagick-6.9.10.60.ebuild | 248 ++++++++++++++++++++ |
15 |
media-gfx/imagemagick/imagemagick-7.0.8.60.ebuild | 256 +++++++++++++++++++++ |
16 |
3 files changed, 506 insertions(+) |
17 |
|
18 |
diff --git a/media-gfx/imagemagick/Manifest b/media-gfx/imagemagick/Manifest |
19 |
index 27020cf934e..8fe37700821 100644 |
20 |
--- a/media-gfx/imagemagick/Manifest |
21 |
+++ b/media-gfx/imagemagick/Manifest |
22 |
@@ -1,4 +1,6 @@ |
23 |
DIST ImageMagick-6.9.10-50.tar.xz 8941584 BLAKE2B dcbbe4b0c25c281168088dd5b62a9d882088b9b57fc4127c6d233b049011ae3ede43e2629734fbd1ae2b21cd13f64690e6f6a3ea81a1e08736fbc1a29a5bccf9 SHA512 f288eb8ce40aafb3d099ae5ec10403902934d02440256ed2012f0b13456b237c3a903f92764b02378c27005fd65ad1251ff1663fce825890721fa93b18ad515d |
24 |
DIST ImageMagick-6.9.10-56.tar.xz 8950748 BLAKE2B 5d1b4ad20ec3aa6f89aedf08ac91266be218464cd998ca950623c1a23954968f84b21bfc140c1a1dfdcd68c8420ddcd39f76cd31d3872d43bf631b5782980665 SHA512 e5d1dd4da8b361858ff2d7a4c7956280bd55053022c7b0ad27fac4a70e9d2cafb75299e7970e1b2091b83b3bedd2355d5752e9bff6999f9272619a92a8892c0f |
25 |
+DIST ImageMagick-6.9.10-60.tar.xz 8939576 BLAKE2B a4b493838da9bfa183f55d19d9643dcd83fe533884b28d579b9586357af7d3ffba16f88e73ed42658a3b41ac47de9ebf7a7ddbefc0339bd90338a1f32dbd96a7 SHA512 cd34014322bd48b02d3680564756db58292fabd5487a187bb3913ec9f5ffd0b990a112a145a9be544cfc334cb917232683cdafc815baee85638a95a9a89f4604 |
26 |
DIST ImageMagick-7.0.8-50.tar.xz 9453076 BLAKE2B a137fb353d32ce6914b5033ea4c02bc81cb1eb82c1dbb6d449f20e19b23ec1eeef628e27c497cb9eb5e7a23f9d4f9f2152e3c6e64dfb5c6f793358c174286e27 SHA512 78cee7463610b256b899cc9474924cefe2dc36ab238025c54688563c3e1aa4b86ebc739f22fb349ab8914b7ac0dc6c5073cca168b9cfc371fb4bbd7e3f51cfbc |
27 |
DIST ImageMagick-7.0.8-56.tar.xz 9465124 BLAKE2B c31c66ae84e9bb91fc744673c07d12300a5e5a07729eaee9654e988efc46cc9d5321e6906325fe9fcfbeb81785a74a52e6059d2983c280b86d0ad305c0818b9d SHA512 22651b0f5b0b0821b7ae74a10671590d8ecfddcc95b60bf056ef7a7cbeab37beedaf49d0bcf97cb0ac2f1ec564192c15c7820c9593db965b4b192338abdaf5dc |
28 |
+DIST ImageMagick-7.0.8-60.tar.xz 9464992 BLAKE2B 26a75c0df77459582b9025612c0f70b30bedf9fee7bdfe5b0083ca9f5a7184d19e849c8a18d3781ed39d1788a17d6b1de608424193c24ec5e11ab9b50bd64874 SHA512 4db1c24942b522cab1ff80c3eb3df7a81cfd2ec7f7f91dcd00b2d4867b2afe5026ffbeacbed83ddb9178448f1ded3dacb34002fc65892704e863794338ba6436 |
29 |
|
30 |
diff --git a/media-gfx/imagemagick/imagemagick-6.9.10.60.ebuild b/media-gfx/imagemagick/imagemagick-6.9.10.60.ebuild |
31 |
new file mode 100644 |
32 |
index 00000000000..b09291336cc |
33 |
--- /dev/null |
34 |
+++ b/media-gfx/imagemagick/imagemagick-6.9.10.60.ebuild |
35 |
@@ -0,0 +1,248 @@ |
36 |
+# Copyright 1999-2019 Gentoo Authors |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+ |
39 |
+EAPI="6" |
40 |
+ |
41 |
+inherit eapi7-ver eutils flag-o-matic libtool perl-functions toolchain-funcs multilib |
42 |
+ |
43 |
+MY_PV="$(ver_rs 3 '-')" |
44 |
+MY_P="ImageMagick-${MY_PV}" |
45 |
+ |
46 |
+DESCRIPTION="A collection of tools and libraries for many image formats" |
47 |
+HOMEPAGE="https://www.imagemagick.org/" |
48 |
+SRC_URI="mirror://${PN}/${MY_P}.tar.xz" |
49 |
+ |
50 |
+LICENSE="imagemagick" |
51 |
+SLOT="0/${PV}" |
52 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" |
53 |
+IUSE="bzip2 corefonts cxx djvu fftw fontconfig fpx graphviz hdri heif jbig jpeg jpeg2k lcms lqr lzma opencl openexr openmp pango perl png postscript q32 q8 raw static-libs svg test tiff truetype webp wmf X xml zlib" |
54 |
+ |
55 |
+RESTRICT="perl? ( userpriv )" |
56 |
+ |
57 |
+RDEPEND=" |
58 |
+ dev-libs/libltdl:0 |
59 |
+ bzip2? ( app-arch/bzip2 ) |
60 |
+ corefonts? ( media-fonts/corefonts ) |
61 |
+ djvu? ( app-text/djvu ) |
62 |
+ fftw? ( sci-libs/fftw:3.0 ) |
63 |
+ fontconfig? ( media-libs/fontconfig ) |
64 |
+ fpx? ( >=media-libs/libfpx-1.3.0-r1 ) |
65 |
+ graphviz? ( media-gfx/graphviz ) |
66 |
+ heif? ( media-libs/libheif:= ) |
67 |
+ jbig? ( >=media-libs/jbigkit-2:= ) |
68 |
+ jpeg? ( virtual/jpeg:0 ) |
69 |
+ jpeg2k? ( >=media-libs/openjpeg-2.1.0:2 ) |
70 |
+ lcms? ( media-libs/lcms:2= ) |
71 |
+ lqr? ( media-libs/liblqr ) |
72 |
+ opencl? ( virtual/opencl ) |
73 |
+ openexr? ( media-libs/openexr:0= ) |
74 |
+ pango? ( x11-libs/pango ) |
75 |
+ perl? ( >=dev-lang/perl-5.8.8:0= ) |
76 |
+ png? ( media-libs/libpng:0= ) |
77 |
+ postscript? ( app-text/ghostscript-gpl ) |
78 |
+ raw? ( media-libs/libraw:= ) |
79 |
+ svg? ( gnome-base/librsvg ) |
80 |
+ tiff? ( media-libs/tiff:0= ) |
81 |
+ truetype? ( |
82 |
+ media-fonts/urw-fonts |
83 |
+ >=media-libs/freetype-2 |
84 |
+ ) |
85 |
+ webp? ( media-libs/libwebp:0= ) |
86 |
+ wmf? ( media-libs/libwmf ) |
87 |
+ X? ( |
88 |
+ x11-libs/libICE |
89 |
+ x11-libs/libSM |
90 |
+ x11-libs/libXext |
91 |
+ x11-libs/libXt |
92 |
+ ) |
93 |
+ xml? ( dev-libs/libxml2:= ) |
94 |
+ lzma? ( app-arch/xz-utils ) |
95 |
+ zlib? ( sys-libs/zlib:= )" |
96 |
+DEPEND="${RDEPEND} |
97 |
+ !media-gfx/graphicsmagick[imagemagick] |
98 |
+ virtual/pkgconfig |
99 |
+ X? ( x11-base/xorg-proto )" |
100 |
+ |
101 |
+REQUIRED_USE="corefonts? ( truetype ) |
102 |
+ test? ( corefonts )" |
103 |
+ |
104 |
+S="${WORKDIR}/${MY_P}" |
105 |
+ |
106 |
+src_prepare() { |
107 |
+ default |
108 |
+ |
109 |
+ # Apply hardening #664236 |
110 |
+ cp "${FILESDIR}"/policy-hardening.snippet "${S}" || die |
111 |
+ sed -i -e '/^<policymap>$/ { |
112 |
+ r policy-hardening.snippet |
113 |
+ d |
114 |
+ }' \ |
115 |
+ config/policy.xml || \ |
116 |
+ die "Failed to apply hardening of policy.xml" |
117 |
+ einfo "policy.xml hardened" |
118 |
+ |
119 |
+ elibtoolize # for Darwin modules |
120 |
+ |
121 |
+ # For testsuite, see https://bugs.gentoo.org/show_bug.cgi?id=500580#c3 |
122 |
+ local mesa_cards ati_cards nvidia_cards render_cards |
123 |
+ shopt -s nullglob |
124 |
+ ati_cards=$(echo -n /dev/ati/card* | sed 's/ /:/g') |
125 |
+ if test -n "${ati_cards}"; then |
126 |
+ addpredict "${ati_cards}" |
127 |
+ fi |
128 |
+ mesa_cards=$(echo -n /dev/dri/card* | sed 's/ /:/g') |
129 |
+ if test -n "${mesa_cards}"; then |
130 |
+ addpredict "${mesa_cards}" |
131 |
+ fi |
132 |
+ nvidia_cards=$(echo -n /dev/nvidia** | sed 's/ /:/g') |
133 |
+ if test -n "${nvidia_cards}"; then |
134 |
+ addpredict "${nvidia_cards}" |
135 |
+ fi |
136 |
+ render_cards=$(echo -n /dev/dri/renderD128* | sed 's/ /:/g') |
137 |
+ if test -n "${render_cards}"; then |
138 |
+ addpredict "${render_cards}" |
139 |
+ fi |
140 |
+ shopt -u nullglob |
141 |
+ addpredict /dev/nvidiactl |
142 |
+} |
143 |
+ |
144 |
+src_configure() { |
145 |
+ local depth=16 |
146 |
+ use q8 && depth=8 |
147 |
+ use q32 && depth=32 |
148 |
+ |
149 |
+ local openmp=disable |
150 |
+ use openmp && { tc-has-openmp && openmp=enable; } |
151 |
+ |
152 |
+ use perl && perl_check_env |
153 |
+ |
154 |
+ [[ ${CHOST} == *-solaris* ]] && append-ldflags -lnsl -lsocket |
155 |
+ |
156 |
+ local myeconfargs=( |
157 |
+ $(use_enable static-libs static) |
158 |
+ $(use_enable hdri) |
159 |
+ $(use_enable opencl) |
160 |
+ --with-threads |
161 |
+ --with-modules |
162 |
+ --with-quantum-depth=${depth} |
163 |
+ $(use_with cxx magick-plus-plus) |
164 |
+ $(use_with perl) |
165 |
+ --with-perl-options='INSTALLDIRS=vendor' |
166 |
+ --with-gs-font-dir="${EPREFIX}"/usr/share/fonts/urw-fonts |
167 |
+ $(use_with bzip2 bzlib) |
168 |
+ $(use_with X x) |
169 |
+ $(use_with zlib) |
170 |
+ --without-autotrace |
171 |
+ $(use_with postscript dps) |
172 |
+ $(use_with djvu) |
173 |
+ --with-dejavu-font-dir="${EPREFIX}"/usr/share/fonts/dejavu |
174 |
+ $(use_with fftw) |
175 |
+ $(use_with fpx) |
176 |
+ $(use_with fontconfig) |
177 |
+ $(use_with truetype freetype) |
178 |
+ $(use_with postscript gslib) |
179 |
+ $(use_with graphviz gvc) |
180 |
+ $(use_with heif heic) |
181 |
+ $(use_with jbig) |
182 |
+ $(use_with jpeg) |
183 |
+ $(use_with jpeg2k openjp2) |
184 |
+ $(use_with lcms) |
185 |
+ $(use_with lqr) |
186 |
+ $(use_with lzma) |
187 |
+ $(use_with openexr) |
188 |
+ $(use_with pango) |
189 |
+ $(use_with png) |
190 |
+ $(use_with raw) |
191 |
+ $(use_with svg rsvg) |
192 |
+ $(use_with tiff) |
193 |
+ $(use_with webp) |
194 |
+ $(use_with corefonts windows-font-dir "${EPREFIX}"/usr/share/fonts/corefonts) |
195 |
+ $(use_with wmf) |
196 |
+ $(use_with xml) |
197 |
+ --${openmp}-openmp |
198 |
+ --with-gcc-arch=no-automagic |
199 |
+ ) |
200 |
+ CONFIG_SHELL=$(type -P bash) econf "${myeconfargs[@]}" |
201 |
+} |
202 |
+ |
203 |
+src_test() { |
204 |
+ # Install default (unrestricted) policy in $HOME for test suite #664238 |
205 |
+ local _im_local_config_home="${HOME}/.config/ImageMagick" |
206 |
+ mkdir -p "${_im_local_config_home}" || \ |
207 |
+ die "Failed to create IM config dir in '${_im_local_config_home}'" |
208 |
+ cp "${FILESDIR}"/policy.test.xml "${_im_local_config_home}/policy.xml" || \ |
209 |
+ die "Failed to install default blank policy.xml in '${_im_local_config_home}'" |
210 |
+ |
211 |
+ local im_command= IM_COMMANDS=() |
212 |
+ IM_COMMANDS+=( "identify -version | grep -q -- \"${MY_PV}\"" ) # Verify that we are using version we just built |
213 |
+ IM_COMMANDS+=( "identify -list policy" ) # Verify that policy.xml is used |
214 |
+ IM_COMMANDS+=( "emake check" ) # Run tests |
215 |
+ |
216 |
+ for im_command in "${IM_COMMANDS[@]}"; do |
217 |
+ eval "${S}"/magick.sh \ |
218 |
+ ${im_command} || \ |
219 |
+ die "Failed to run \"${im_command}\"" |
220 |
+ done |
221 |
+} |
222 |
+ |
223 |
+src_install() { |
224 |
+ # Ensure documentation installation files and paths with each release! |
225 |
+ emake \ |
226 |
+ DESTDIR="${D}" \ |
227 |
+ DOCUMENTATION_PATH="${EPREFIX}"/usr/share/doc/${PF}/html \ |
228 |
+ install |
229 |
+ |
230 |
+ rm -f "${ED%/}"/usr/share/doc/${PF}/html/{ChangeLog,LICENSE,NEWS.txt} |
231 |
+ dodoc {AUTHORS,README}.txt ChangeLog |
232 |
+ |
233 |
+ if use perl; then |
234 |
+ find "${ED}" -type f -name perllocal.pod -exec rm -f {} + |
235 |
+ find "${ED}" -depth -mindepth 1 -type d -empty -exec rm -rf {} + |
236 |
+ fi |
237 |
+ |
238 |
+ find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} + |
239 |
+ |
240 |
+ if use opencl; then |
241 |
+ cat <<-EOF > "${T}"/99${PN} |
242 |
+ SANDBOX_PREDICT="/dev/nvidiactl:/dev/nvidia-uvm:/dev/ati/card:/dev/dri/card:/dev/dri/renderD128" |
243 |
+ EOF |
244 |
+ |
245 |
+ insinto /etc/sandbox.d |
246 |
+ doins "${T}"/99${PN} #472766 |
247 |
+ fi |
248 |
+ |
249 |
+ insinto /usr/share/${PN} |
250 |
+ doins config/*icm |
251 |
+} |
252 |
+ |
253 |
+pkg_postinst() { |
254 |
+ local _show_policy_xml_notice= |
255 |
+ |
256 |
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then |
257 |
+ # This is a new installation |
258 |
+ _show_policy_xml_notice=yes |
259 |
+ else |
260 |
+ local v |
261 |
+ for v in ${REPLACING_VERSIONS}; do |
262 |
+ if ! ver_test "${v}" -gt "6.9.10.10-r2"; then |
263 |
+ # This is an upgrade |
264 |
+ _show_policy_xml_notice=yes |
265 |
+ |
266 |
+ # Show this elog only once |
267 |
+ break |
268 |
+ fi |
269 |
+ done |
270 |
+ fi |
271 |
+ |
272 |
+ if [[ -n "${_show_policy_xml_notice}" ]]; then |
273 |
+ elog "For security reasons, a policy.xml file was installed in /etc/ImageMagick-6" |
274 |
+ elog "which will prevent the usage of the following coders by default:" |
275 |
+ elog "" |
276 |
+ elog " - PS" |
277 |
+ elog " - PS2" |
278 |
+ elog " - PS3" |
279 |
+ elog " - EPS" |
280 |
+ elog " - PDF" |
281 |
+ elog " - XPS" |
282 |
+ fi |
283 |
+} |
284 |
|
285 |
diff --git a/media-gfx/imagemagick/imagemagick-7.0.8.60.ebuild b/media-gfx/imagemagick/imagemagick-7.0.8.60.ebuild |
286 |
new file mode 100644 |
287 |
index 00000000000..69c412db11b |
288 |
--- /dev/null |
289 |
+++ b/media-gfx/imagemagick/imagemagick-7.0.8.60.ebuild |
290 |
@@ -0,0 +1,256 @@ |
291 |
+# Copyright 1999-2019 Gentoo Authors |
292 |
+# Distributed under the terms of the GNU General Public License v2 |
293 |
+ |
294 |
+EAPI="6" |
295 |
+ |
296 |
+inherit eapi7-ver eutils flag-o-matic libtool perl-functions toolchain-funcs multilib |
297 |
+ |
298 |
+if [[ ${PV} == "9999" ]] ; then |
299 |
+ EGIT_REPO_URI="https://github.com/ImageMagick/ImageMagick.git" |
300 |
+ inherit git-r3 |
301 |
+ MY_P="imagemagick-9999" |
302 |
+else |
303 |
+ MY_PV="$(ver_rs 3 '-')" |
304 |
+ MY_P="ImageMagick-${MY_PV}" |
305 |
+ SRC_URI="mirror://${PN}/${MY_P}.tar.xz" |
306 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" |
307 |
+fi |
308 |
+ |
309 |
+DESCRIPTION="A collection of tools and libraries for many image formats" |
310 |
+HOMEPAGE="https://www.imagemagick.org/" |
311 |
+ |
312 |
+LICENSE="imagemagick" |
313 |
+SLOT="0/${PV}" |
314 |
+IUSE="bzip2 corefonts cxx djvu fftw fontconfig fpx graphviz hdri heif jbig jpeg jpeg2k lcms lqr lzma opencl openexr openmp pango perl png postscript q32 q8 raw static-libs svg test tiff truetype webp wmf X xml zlib" |
315 |
+ |
316 |
+RDEPEND=" |
317 |
+ dev-libs/libltdl:0 |
318 |
+ bzip2? ( app-arch/bzip2 ) |
319 |
+ corefonts? ( media-fonts/corefonts ) |
320 |
+ djvu? ( app-text/djvu ) |
321 |
+ fftw? ( sci-libs/fftw:3.0 ) |
322 |
+ fontconfig? ( media-libs/fontconfig ) |
323 |
+ fpx? ( >=media-libs/libfpx-1.3.0-r1 ) |
324 |
+ graphviz? ( media-gfx/graphviz ) |
325 |
+ heif? ( media-libs/libheif:= ) |
326 |
+ jbig? ( >=media-libs/jbigkit-2:= ) |
327 |
+ jpeg? ( virtual/jpeg:0 ) |
328 |
+ jpeg2k? ( >=media-libs/openjpeg-2.1.0:2 ) |
329 |
+ lcms? ( media-libs/lcms:2= ) |
330 |
+ lqr? ( media-libs/liblqr ) |
331 |
+ opencl? ( virtual/opencl ) |
332 |
+ openexr? ( media-libs/openexr:0= ) |
333 |
+ pango? ( x11-libs/pango ) |
334 |
+ perl? ( >=dev-lang/perl-5.8.8:0= ) |
335 |
+ png? ( media-libs/libpng:0= ) |
336 |
+ postscript? ( app-text/ghostscript-gpl ) |
337 |
+ raw? ( media-libs/libraw:= ) |
338 |
+ svg? ( gnome-base/librsvg ) |
339 |
+ tiff? ( media-libs/tiff:0= ) |
340 |
+ truetype? ( |
341 |
+ media-fonts/urw-fonts |
342 |
+ >=media-libs/freetype-2 |
343 |
+ ) |
344 |
+ webp? ( media-libs/libwebp:0= ) |
345 |
+ wmf? ( media-libs/libwmf ) |
346 |
+ X? ( |
347 |
+ x11-libs/libICE |
348 |
+ x11-libs/libSM |
349 |
+ x11-libs/libXext |
350 |
+ x11-libs/libXt |
351 |
+ ) |
352 |
+ xml? ( dev-libs/libxml2:= ) |
353 |
+ lzma? ( app-arch/xz-utils ) |
354 |
+ zlib? ( sys-libs/zlib:= )" |
355 |
+DEPEND="${RDEPEND} |
356 |
+ !media-gfx/graphicsmagick[imagemagick] |
357 |
+ virtual/pkgconfig |
358 |
+ X? ( x11-base/xorg-proto )" |
359 |
+ |
360 |
+REQUIRED_USE="corefonts? ( truetype ) |
361 |
+ test? ( corefonts )" |
362 |
+ |
363 |
+S="${WORKDIR}/${MY_P}" |
364 |
+ |
365 |
+src_prepare() { |
366 |
+ default |
367 |
+ |
368 |
+ # Apply hardening #664236 |
369 |
+ cp "${FILESDIR}"/policy-hardening.snippet "${S}" || die |
370 |
+ sed -i -e '/^<policymap>$/ { |
371 |
+ r policy-hardening.snippet |
372 |
+ d |
373 |
+ }' \ |
374 |
+ config/policy.xml || \ |
375 |
+ die "Failed to apply hardening of policy.xml" |
376 |
+ einfo "policy.xml hardened" |
377 |
+ |
378 |
+ elibtoolize # for Darwin modules |
379 |
+ |
380 |
+ # For testsuite, see https://bugs.gentoo.org/show_bug.cgi?id=500580#c3 |
381 |
+ local ati_cards mesa_cards nvidia_cards render_cards |
382 |
+ shopt -s nullglob |
383 |
+ ati_cards=$(echo -n /dev/ati/card* | sed 's/ /:/g') |
384 |
+ if test -n "${ati_cards}"; then |
385 |
+ addpredict "${ati_cards}" |
386 |
+ fi |
387 |
+ mesa_cards=$(echo -n /dev/dri/card* | sed 's/ /:/g') |
388 |
+ if test -n "${mesa_cards}"; then |
389 |
+ addpredict "${mesa_cards}" |
390 |
+ fi |
391 |
+ nvidia_cards=$(echo -n /dev/nvidia* | sed 's/ /:/g') |
392 |
+ if test -n "${nvidia_cards}"; then |
393 |
+ addpredict "${nvidia_cards}" |
394 |
+ fi |
395 |
+ render_cards=$(echo -n /dev/dri/renderD128* | sed 's/ /:/g') |
396 |
+ if test -n "${render_cards}"; then |
397 |
+ addpredict "${render_cards}" |
398 |
+ fi |
399 |
+ shopt -u nullglob |
400 |
+ addpredict /dev/nvidiactl |
401 |
+} |
402 |
+ |
403 |
+src_configure() { |
404 |
+ local depth=16 |
405 |
+ use q8 && depth=8 |
406 |
+ use q32 && depth=32 |
407 |
+ |
408 |
+ local openmp=disable |
409 |
+ use openmp && { tc-has-openmp && openmp=enable; } |
410 |
+ |
411 |
+ use perl && perl_check_env |
412 |
+ |
413 |
+ [[ ${CHOST} == *-solaris* ]] && append-ldflags -lnsl -lsocket |
414 |
+ |
415 |
+ local myeconfargs=( |
416 |
+ $(use_enable static-libs static) |
417 |
+ $(use_enable hdri) |
418 |
+ $(use_enable opencl) |
419 |
+ --with-threads |
420 |
+ --with-modules |
421 |
+ --with-quantum-depth=${depth} |
422 |
+ $(use_with cxx magick-plus-plus) |
423 |
+ $(use_with perl) |
424 |
+ --with-perl-options='INSTALLDIRS=vendor' |
425 |
+ --with-gs-font-dir="${EPREFIX}"/usr/share/fonts/urw-fonts |
426 |
+ $(use_with bzip2 bzlib) |
427 |
+ $(use_with X x) |
428 |
+ $(use_with zlib) |
429 |
+ --without-autotrace |
430 |
+ $(use_with postscript dps) |
431 |
+ $(use_with djvu) |
432 |
+ --with-dejavu-font-dir="${EPREFIX}"/usr/share/fonts/dejavu |
433 |
+ $(use_with fftw) |
434 |
+ $(use_with fpx) |
435 |
+ $(use_with fontconfig) |
436 |
+ $(use_with truetype freetype) |
437 |
+ $(use_with postscript gslib) |
438 |
+ $(use_with graphviz gvc) |
439 |
+ $(use_with heif heic) |
440 |
+ $(use_with jbig) |
441 |
+ $(use_with jpeg) |
442 |
+ $(use_with jpeg2k openjp2) |
443 |
+ $(use_with lcms) |
444 |
+ $(use_with lqr) |
445 |
+ $(use_with lzma) |
446 |
+ $(use_with openexr) |
447 |
+ $(use_with pango) |
448 |
+ $(use_with png) |
449 |
+ $(use_with raw) |
450 |
+ $(use_with svg rsvg) |
451 |
+ $(use_with tiff) |
452 |
+ $(use_with webp) |
453 |
+ $(use_with corefonts windows-font-dir "${EPREFIX}"/usr/share/fonts/corefonts) |
454 |
+ $(use_with wmf) |
455 |
+ $(use_with xml) |
456 |
+ --${openmp}-openmp |
457 |
+ --with-gcc-arch=no-automagic |
458 |
+ ) |
459 |
+ CONFIG_SHELL=$(type -P bash) econf "${myeconfargs[@]}" |
460 |
+} |
461 |
+ |
462 |
+src_test() { |
463 |
+ # Install default (unrestricted) policy in $HOME for test suite #664238 |
464 |
+ local _im_local_config_home="${HOME}/.config/ImageMagick" |
465 |
+ mkdir -p "${_im_local_config_home}" || \ |
466 |
+ die "Failed to create IM config dir in '${_im_local_config_home}'" |
467 |
+ cp "${FILESDIR}"/policy.test.xml "${_im_local_config_home}/policy.xml" || \ |
468 |
+ die "Failed to install default blank policy.xml in '${_im_local_config_home}'" |
469 |
+ |
470 |
+ local im_command= IM_COMMANDS=() |
471 |
+ if [[ ${PV} == "9999" ]] ; then |
472 |
+ IM_COMMANDS+=( "magick -version" ) # Show version we are using -- cannot verify because of live ebuild |
473 |
+ else |
474 |
+ IM_COMMANDS+=( "magick -version | grep -q -- \"${MY_PV}\"" ) # Verify that we are using version we just built |
475 |
+ fi |
476 |
+ IM_COMMANDS+=( "magick -list policy" ) # Verify that policy.xml is used |
477 |
+ IM_COMMANDS+=( "emake check" ) # Run tests |
478 |
+ |
479 |
+ for im_command in "${IM_COMMANDS[@]}"; do |
480 |
+ eval "${S}"/magick.sh \ |
481 |
+ ${im_command} || \ |
482 |
+ die "Failed to run \"${im_command}\"" |
483 |
+ done |
484 |
+} |
485 |
+ |
486 |
+src_install() { |
487 |
+ # Ensure documentation installation files and paths with each release! |
488 |
+ emake \ |
489 |
+ DESTDIR="${D}" \ |
490 |
+ DOCUMENTATION_PATH="${EPREFIX}"/usr/share/doc/${PF}/html \ |
491 |
+ install |
492 |
+ |
493 |
+ rm -f "${ED%/}"/usr/share/doc/${PF}/html/{ChangeLog,LICENSE,NEWS.txt} |
494 |
+ dodoc {AUTHORS,README}.txt ChangeLog |
495 |
+ |
496 |
+ if use perl; then |
497 |
+ find "${ED}" -type f -name perllocal.pod -exec rm -f {} + |
498 |
+ find "${ED}" -depth -mindepth 1 -type d -empty -exec rm -rf {} + |
499 |
+ fi |
500 |
+ |
501 |
+ find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} + |
502 |
+ |
503 |
+ if use opencl; then |
504 |
+ cat <<-EOF > "${T}"/99${PN} |
505 |
+ SANDBOX_PREDICT="/dev/nvidiactl:/dev/nvidia-uvm:/dev/ati/card:/dev/dri/card:/dev/dri/renderD128" |
506 |
+ EOF |
507 |
+ |
508 |
+ insinto /etc/sandbox.d |
509 |
+ doins "${T}"/99${PN} #472766 |
510 |
+ fi |
511 |
+ |
512 |
+ insinto /usr/share/${PN} |
513 |
+ doins config/*icm |
514 |
+} |
515 |
+ |
516 |
+pkg_postinst() { |
517 |
+ local _show_policy_xml_notice= |
518 |
+ |
519 |
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then |
520 |
+ # This is a new installation |
521 |
+ _show_policy_xml_notice=yes |
522 |
+ else |
523 |
+ local v |
524 |
+ for v in ${REPLACING_VERSIONS}; do |
525 |
+ if ! ver_test "${v}" -gt "7.0.8.10-r2"; then |
526 |
+ # This is an upgrade |
527 |
+ _show_policy_xml_notice=yes |
528 |
+ |
529 |
+ # Show this elog only once |
530 |
+ break |
531 |
+ fi |
532 |
+ done |
533 |
+ fi |
534 |
+ |
535 |
+ if [[ -n "${_show_policy_xml_notice}" ]]; then |
536 |
+ elog "For security reasons, a policy.xml file was installed in /etc/ImageMagick-7" |
537 |
+ elog "which will prevent the usage of the following coders by default:" |
538 |
+ elog "" |
539 |
+ elog " - PS" |
540 |
+ elog " - PS2" |
541 |
+ elog " - PS3" |
542 |
+ elog " - EPS" |
543 |
+ elog " - PDF" |
544 |
+ elog " - XPS" |
545 |
+ fi |
546 |
+} |