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