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