1 |
commit: 2a49061dbe04e9e4c2a58922675a5a5a1dac0db9 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Mar 29 19:37:30 2021 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 30 00:19:16 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a49061d |
7 |
|
8 |
media-gfx/imagemagick: bump to v6.9.12-5 & v7.0.11-5 |
9 |
|
10 |
Package-Manager: Portage-3.0.17, 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.12.5.ebuild | 254 ++++++++++++++++++++ |
15 |
media-gfx/imagemagick/imagemagick-7.0.11.5.ebuild | 268 ++++++++++++++++++++++ |
16 |
3 files changed, 524 insertions(+) |
17 |
|
18 |
diff --git a/media-gfx/imagemagick/Manifest b/media-gfx/imagemagick/Manifest |
19 |
index e295414046c..27e96287c29 100644 |
20 |
--- a/media-gfx/imagemagick/Manifest |
21 |
+++ b/media-gfx/imagemagick/Manifest |
22 |
@@ -1,4 +1,6 @@ |
23 |
DIST ImageMagick-6.9.12-3.tar.xz 9174208 BLAKE2B 5ee9ab5196cb2dcbb2d210dfb71fbb63956bdfc33e97fa03a51f6884736dffc1227ec94d44a46c19eeb216a1896c06b0927678410e0171d855b77e13ab10c51e SHA512 c117fd1fe57478f66fb2b3bab1d6d908a643519a0e4b8026f138ba77778f29bb83e15a78a3b58b461a16cf2dcf66db84d6cc9e77532aab14f776dabf2eb8f24a |
24 |
DIST ImageMagick-6.9.12-4.tar.xz 9169012 BLAKE2B 2c1229907d14f60315f9ca2baf8c54380855119df4b4d00f01736a0c8c5c880f85e911c02767957f009cd60da12d86025637e3dfcfe296c9874e284eee70c332 SHA512 301637b0fc2b4f4b1ba79e3f6ed7e24e55dc749b3adf3afd408c750220647df17f4f5e70869d503c53feb7ef15b94159e4e92b5ba09ec50f9e7902d7fa261b84 |
25 |
+DIST ImageMagick-6.9.12-5.tar.xz 9152332 BLAKE2B 9a5b50e6781303a772c0be24d3860580bc5e33ec11b43137da12ccb37c67b874910308b2f50585219c0d0b110cdb34bbb03deb138cf3bf5124f741722bfd57de SHA512 50da6b13ffec8ba2a5b91ae36009b0534ea6b12fbfd347ed935bffaf9b8df8aa3fc203eb10f7b8cc5d2042cb2051a6d167e93bedfdcb8633612ac9ba448790c7 |
26 |
DIST ImageMagick-7.0.11-3.tar.xz 10151644 BLAKE2B f32234fd1f89dfd4ead816f06984b6f673235f368cebbdc19704e677e2a1802ef2212d489346e7f48239a6aa14e7a089b45259645879b5010773d6565e5b0a1e SHA512 9a5cf4fc2c325d435a04c54bec3502bfa86d8bfa0b91efc53e34f364de039bcea5318ea3ebdb10e0bd49767f29ce44ca209bcefb51c2676a6a55a2e97c6ebf9b |
27 |
DIST ImageMagick-7.0.11-4.tar.xz 10155508 BLAKE2B 914da94cfa933e21d01d31f57273989674a42171404ad10ba731f0c054d23ebb7ff66585b590535b01600c212c0039761d5dff36ce23dd79b6747fbbfd08acb1 SHA512 fedd0b01cc3b7d13429b2765d2bc8b4800fb228bbaaff35a5206ee52edc71a3fcd12d0832213eb9218804b3ca898b5de4594b98f77d7de8302087f350b4f028b |
28 |
+DIST ImageMagick-7.0.11-5.tar.xz 10129356 BLAKE2B e9da916f2a71aa796e6b80c3746248c86b2cb78d7709435ea61cb5e1909cba03549d021dd6468c6c20c98eefd8e7310046b501bc551c0682bad9a270fceb4088 SHA512 ad631f25fa413668094d4ea546428b701404debb638804e27d9b4e769bc22eba98e7911b5dbb895dcadb0219eab09b887a0928e574e40425b2d0f90ddbd4c06e |
29 |
|
30 |
diff --git a/media-gfx/imagemagick/imagemagick-6.9.12.5.ebuild b/media-gfx/imagemagick/imagemagick-6.9.12.5.ebuild |
31 |
new file mode 100644 |
32 |
index 00000000000..7ff90f249df |
33 |
--- /dev/null |
34 |
+++ b/media-gfx/imagemagick/imagemagick-6.9.12.5.ebuild |
35 |
@@ -0,0 +1,254 @@ |
36 |
+# Copyright 1999-2021 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-60" |
52 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-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="!test? ( test )" |
59 |
+ |
60 |
+RDEPEND=" |
61 |
+ dev-libs/libltdl:0 |
62 |
+ bzip2? ( app-arch/bzip2 ) |
63 |
+ corefonts? ( media-fonts/corefonts ) |
64 |
+ djvu? ( app-text/djvu ) |
65 |
+ fftw? ( sci-libs/fftw:3.0 ) |
66 |
+ fontconfig? ( media-libs/fontconfig ) |
67 |
+ fpx? ( >=media-libs/libfpx-1.3.0-r1 ) |
68 |
+ graphviz? ( media-gfx/graphviz ) |
69 |
+ heif? ( media-libs/libheif:= ) |
70 |
+ jbig? ( >=media-libs/jbigkit-2:= ) |
71 |
+ jpeg? ( virtual/jpeg:0 ) |
72 |
+ jpeg2k? ( >=media-libs/openjpeg-2.1.0:2 ) |
73 |
+ lcms? ( media-libs/lcms:2= ) |
74 |
+ lqr? ( media-libs/liblqr ) |
75 |
+ opencl? ( virtual/opencl ) |
76 |
+ openexr? ( media-libs/openexr:0= ) |
77 |
+ pango? ( x11-libs/pango ) |
78 |
+ perl? ( >=dev-lang/perl-5.8.8:0= ) |
79 |
+ png? ( media-libs/libpng:0= ) |
80 |
+ postscript? ( app-text/ghostscript-gpl ) |
81 |
+ raw? ( media-libs/libraw:= ) |
82 |
+ svg? ( |
83 |
+ gnome-base/librsvg |
84 |
+ media-gfx/potrace |
85 |
+ ) |
86 |
+ tiff? ( media-libs/tiff:0= ) |
87 |
+ truetype? ( |
88 |
+ media-fonts/urw-fonts |
89 |
+ >=media-libs/freetype-2 |
90 |
+ ) |
91 |
+ webp? ( media-libs/libwebp:0= ) |
92 |
+ wmf? ( media-libs/libwmf ) |
93 |
+ X? ( |
94 |
+ x11-libs/libICE |
95 |
+ x11-libs/libSM |
96 |
+ x11-libs/libXext |
97 |
+ x11-libs/libXt |
98 |
+ ) |
99 |
+ xml? ( dev-libs/libxml2:= ) |
100 |
+ lzma? ( app-arch/xz-utils ) |
101 |
+ zlib? ( sys-libs/zlib:= )" |
102 |
+DEPEND="${RDEPEND} |
103 |
+ !media-gfx/graphicsmagick[imagemagick] |
104 |
+ virtual/pkgconfig |
105 |
+ X? ( x11-base/xorg-proto )" |
106 |
+ |
107 |
+S="${WORKDIR}/${MY_P}" |
108 |
+#S="${WORKDIR}/ImageMagick6-${MY_PV}" |
109 |
+ |
110 |
+src_prepare() { |
111 |
+ default |
112 |
+ |
113 |
+ # Apply hardening #664236 |
114 |
+ cp "${FILESDIR}"/policy-hardening.snippet "${S}" || die |
115 |
+ sed -i -e '/^<policymap>$/ { |
116 |
+ r policy-hardening.snippet |
117 |
+ d |
118 |
+ }' \ |
119 |
+ config/policy.xml || \ |
120 |
+ die "Failed to apply hardening of policy.xml" |
121 |
+ einfo "policy.xml hardened" |
122 |
+ |
123 |
+ elibtoolize # for Darwin modules |
124 |
+ |
125 |
+ # For testsuite, see https://bugs.gentoo.org/show_bug.cgi?id=500580#c3 |
126 |
+ local mesa_cards ati_cards nvidia_cards render_cards |
127 |
+ shopt -s nullglob |
128 |
+ ati_cards=$(echo -n /dev/ati/card* | sed 's/ /:/g') |
129 |
+ if test -n "${ati_cards}"; then |
130 |
+ addpredict "${ati_cards}" |
131 |
+ fi |
132 |
+ mesa_cards=$(echo -n /dev/dri/card* | sed 's/ /:/g') |
133 |
+ if test -n "${mesa_cards}"; then |
134 |
+ addpredict "${mesa_cards}" |
135 |
+ fi |
136 |
+ nvidia_cards=$(echo -n /dev/nvidia** | sed 's/ /:/g') |
137 |
+ if test -n "${nvidia_cards}"; then |
138 |
+ addpredict "${nvidia_cards}" |
139 |
+ fi |
140 |
+ render_cards=$(echo -n /dev/dri/renderD128* | sed 's/ /:/g') |
141 |
+ if test -n "${render_cards}"; then |
142 |
+ addpredict "${render_cards}" |
143 |
+ fi |
144 |
+ shopt -u nullglob |
145 |
+ addpredict /dev/nvidiactl |
146 |
+} |
147 |
+ |
148 |
+src_configure() { |
149 |
+ local depth=16 |
150 |
+ use q8 && depth=8 |
151 |
+ use q32 && depth=32 |
152 |
+ |
153 |
+ local openmp=disable |
154 |
+ use openmp && { tc-has-openmp && openmp=enable; } |
155 |
+ |
156 |
+ use perl && perl_check_env |
157 |
+ |
158 |
+ [[ ${CHOST} == *-solaris* ]] && append-ldflags -lnsl -lsocket |
159 |
+ |
160 |
+ local myeconfargs=( |
161 |
+ $(use_enable static-libs static) |
162 |
+ $(use_enable hdri) |
163 |
+ $(use_enable opencl) |
164 |
+ --with-threads |
165 |
+ --with-modules |
166 |
+ --with-quantum-depth=${depth} |
167 |
+ $(use_with cxx magick-plus-plus) |
168 |
+ $(use_with perl) |
169 |
+ --with-perl-options='INSTALLDIRS=vendor' |
170 |
+ --with-gs-font-dir="${EPREFIX}"/usr/share/fonts/urw-fonts |
171 |
+ $(use_with bzip2 bzlib) |
172 |
+ $(use_with X x) |
173 |
+ $(use_with zlib) |
174 |
+ --without-autotrace |
175 |
+ $(use_with postscript dps) |
176 |
+ $(use_with djvu) |
177 |
+ --with-dejavu-font-dir="${EPREFIX}"/usr/share/fonts/dejavu |
178 |
+ $(use_with fftw) |
179 |
+ $(use_with fpx) |
180 |
+ $(use_with fontconfig) |
181 |
+ $(use_with truetype freetype) |
182 |
+ $(use_with postscript gslib) |
183 |
+ $(use_with graphviz gvc) |
184 |
+ $(use_with heif heic) |
185 |
+ $(use_with jbig) |
186 |
+ $(use_with jpeg) |
187 |
+ $(use_with jpeg2k openjp2) |
188 |
+ $(use_with lcms) |
189 |
+ $(use_with lqr) |
190 |
+ $(use_with lzma) |
191 |
+ $(use_with openexr) |
192 |
+ $(use_with pango) |
193 |
+ $(use_with png) |
194 |
+ $(use_with raw) |
195 |
+ $(use_with svg rsvg) |
196 |
+ $(use_with tiff) |
197 |
+ $(use_with webp) |
198 |
+ $(use_with corefonts windows-font-dir "${EPREFIX}"/usr/share/fonts/corefonts) |
199 |
+ $(use_with wmf) |
200 |
+ $(use_with xml) |
201 |
+ --${openmp}-openmp |
202 |
+ --with-gcc-arch=no-automagic |
203 |
+ ) |
204 |
+ CONFIG_SHELL=$(type -P bash) econf "${myeconfargs[@]}" |
205 |
+} |
206 |
+ |
207 |
+src_test() { |
208 |
+ # Install default (unrestricted) policy in $HOME for test suite #664238 |
209 |
+ local _im_local_config_home="${HOME}/.config/ImageMagick" |
210 |
+ mkdir -p "${_im_local_config_home}" || \ |
211 |
+ die "Failed to create IM config dir in '${_im_local_config_home}'" |
212 |
+ cp "${FILESDIR}"/policy.test.xml "${_im_local_config_home}/policy.xml" || \ |
213 |
+ die "Failed to install default blank policy.xml in '${_im_local_config_home}'" |
214 |
+ |
215 |
+ local im_command= IM_COMMANDS=() |
216 |
+ IM_COMMANDS+=( "identify -version | grep -q -- \"${MY_PV}\"" ) # Verify that we are using version we just built |
217 |
+ IM_COMMANDS+=( "identify -list policy" ) # Verify that policy.xml is used |
218 |
+ IM_COMMANDS+=( "emake check" ) # Run tests |
219 |
+ |
220 |
+ for im_command in "${IM_COMMANDS[@]}"; do |
221 |
+ eval "${S}"/magick.sh \ |
222 |
+ ${im_command} || \ |
223 |
+ die "Failed to run \"${im_command}\"" |
224 |
+ done |
225 |
+} |
226 |
+ |
227 |
+src_install() { |
228 |
+ # Ensure documentation installation files and paths with each release! |
229 |
+ emake \ |
230 |
+ DESTDIR="${D}" \ |
231 |
+ DOCUMENTATION_PATH="${EPREFIX}"/usr/share/doc/${PF}/html \ |
232 |
+ install |
233 |
+ |
234 |
+ rm -f "${ED%/}"/usr/share/doc/${PF}/html/{ChangeLog,LICENSE,NEWS.txt} |
235 |
+ dodoc {AUTHORS,README}.txt ChangeLog |
236 |
+ |
237 |
+ if use perl; then |
238 |
+ find "${ED}" -type f -name perllocal.pod -exec rm -f {} + |
239 |
+ find "${ED}" -depth -mindepth 1 -type d -empty -exec rm -rf {} + |
240 |
+ fi |
241 |
+ |
242 |
+ find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} + |
243 |
+ # .la files in parent are not needed, keep plugin .la files |
244 |
+ find "${ED}"/usr/$(get_libdir)/ -maxdepth 1 -name "*.la" -delete || die |
245 |
+ |
246 |
+ if use opencl; then |
247 |
+ cat <<-EOF > "${T}"/99${PN} |
248 |
+ SANDBOX_PREDICT="/dev/nvidiactl:/dev/nvidia-uvm:/dev/ati/card:/dev/dri/card:/dev/dri/card0:/dev/dri/renderD128" |
249 |
+ EOF |
250 |
+ |
251 |
+ insinto /etc/sandbox.d |
252 |
+ doins "${T}"/99${PN} #472766 |
253 |
+ fi |
254 |
+ |
255 |
+ insinto /usr/share/${PN} |
256 |
+ doins config/*icm |
257 |
+} |
258 |
+ |
259 |
+pkg_postinst() { |
260 |
+ local _show_policy_xml_notice= |
261 |
+ |
262 |
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then |
263 |
+ # This is a new installation |
264 |
+ _show_policy_xml_notice=yes |
265 |
+ else |
266 |
+ local v |
267 |
+ for v in ${REPLACING_VERSIONS}; do |
268 |
+ if ! ver_test "${v}" -gt "6.9.10.10-r2"; then |
269 |
+ # This is an upgrade |
270 |
+ _show_policy_xml_notice=yes |
271 |
+ |
272 |
+ # Show this elog only once |
273 |
+ break |
274 |
+ fi |
275 |
+ done |
276 |
+ fi |
277 |
+ |
278 |
+ if [[ -n "${_show_policy_xml_notice}" ]]; then |
279 |
+ elog "For security reasons, a policy.xml file was installed in /etc/ImageMagick-6" |
280 |
+ elog "which will prevent the usage of the following coders by default:" |
281 |
+ elog "" |
282 |
+ elog " - PS" |
283 |
+ elog " - PS2" |
284 |
+ elog " - PS3" |
285 |
+ elog " - EPS" |
286 |
+ elog " - PDF" |
287 |
+ elog " - XPS" |
288 |
+ fi |
289 |
+} |
290 |
|
291 |
diff --git a/media-gfx/imagemagick/imagemagick-7.0.11.5.ebuild b/media-gfx/imagemagick/imagemagick-7.0.11.5.ebuild |
292 |
new file mode 100644 |
293 |
index 00000000000..5256a3f29d2 |
294 |
--- /dev/null |
295 |
+++ b/media-gfx/imagemagick/imagemagick-7.0.11.5.ebuild |
296 |
@@ -0,0 +1,268 @@ |
297 |
+# Copyright 1999-2021 Gentoo Authors |
298 |
+# Distributed under the terms of the GNU General Public License v2 |
299 |
+ |
300 |
+EAPI="7" |
301 |
+ |
302 |
+inherit flag-o-matic libtool perl-functions toolchain-funcs multilib |
303 |
+ |
304 |
+if [[ ${PV} == "9999" ]] ; then |
305 |
+ EGIT_REPO_URI="https://github.com/ImageMagick/ImageMagick.git" |
306 |
+ inherit git-r3 |
307 |
+ MY_P="imagemagick-9999" |
308 |
+else |
309 |
+ MY_PV="$(ver_rs 3 '-')" |
310 |
+ MY_P="ImageMagick-${MY_PV}" |
311 |
+ SRC_URI="mirror://imagemagick/${MY_P}.tar.xz" |
312 |
+ 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" |
313 |
+fi |
314 |
+ |
315 |
+DESCRIPTION="A collection of tools and libraries for many image formats" |
316 |
+HOMEPAGE="https://www.imagemagick.org/" |
317 |
+ |
318 |
+LICENSE="imagemagick" |
319 |
+SLOT="0/7.0.11-0" |
320 |
+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" |
321 |
+RESTRICT="!test? ( test )" |
322 |
+ |
323 |
+REQUIRED_USE="corefonts? ( truetype ) |
324 |
+ svg? ( xml ) |
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 |
+ find "${ED}"/usr/$(get_libdir)/ -maxdepth 1 -name "*.la" -delete || 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/card0:/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 |
+} |