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