Gentoo Archives: gentoo-commits

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