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