1 |
commit: a783d1dd04383f2d7633b49133e1c0456029b611 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Aug 19 19:32:19 2020 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 19 19:35:02 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a783d1dd |
7 |
|
8 |
media-gfx/imagemagick: bump to v6.9.11-28 & v7.0.10-28 |
9 |
|
10 |
Package-Manager: Portage-3.0.3, Repoman-3.0.0 |
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.28.ebuild | 255 ++++++++++++++++++++ |
15 |
media-gfx/imagemagick/imagemagick-7.0.10.28.ebuild | 268 +++++++++++++++++++++ |
16 |
3 files changed, 525 insertions(+) |
17 |
|
18 |
diff --git a/media-gfx/imagemagick/Manifest b/media-gfx/imagemagick/Manifest |
19 |
index e7ea33443b2..97e6e2e3d5c 100644 |
20 |
--- a/media-gfx/imagemagick/Manifest |
21 |
+++ b/media-gfx/imagemagick/Manifest |
22 |
@@ -1,4 +1,6 @@ |
23 |
DIST ImageMagick-6.9.11-23.tar.xz 9077168 BLAKE2B f5b331265d821edd51d22131d466023e20df28ffd5a322cb2fc14de77cc978314d76efe7205e343d91dfdb99cd972c3d7c71691f8f3c5c6bb5e7bf4fb783a704 SHA512 1ef09a542397b35065e160e830a8fcf52f8cf64e23aa7fe14a4a298850c2a0e58ef8e68658a920005f1ef5739a47f801cd6d89af393bd0f3f02f0599dccb70b0 |
24 |
DIST ImageMagick-6.9.11-26.tar.xz 9311964 BLAKE2B 495a481f61817837d323c1652289ebf0fe62fd3d3645f1f4de4c29e1729ba4581f1fe6bb9129c4c289d03cb1ba517f08d56cc23106a421cc77e91fcf045f8176 SHA512 77b0a33c50623efa43a046d177567f0c09a8914cfa19e6a85398929b286cd28faf2cc579028a056b913f42df45362ec8abd715e9f68045038c73afa3c77ed9cc |
25 |
+DIST ImageMagick-6.9.11-28.tar.xz 9315628 BLAKE2B 8ece7dae4d8c7de695e85b832e5c15c1474e00c9027aeb251a279dc9b51a02f5fd1e96f48987377cd6d937a126e5750e9aef9a11caf64603267b81e6a874f205 SHA512 e2954d1a55a37fa339dd0cbc0ca753e4f783cd77858277e287c033a53ac5f2e96bc5329d069016fc3841d07dc9e8f5b1bb08ecf9ed0224bbc675843132749fdd |
26 |
DIST ImageMagick-7.0.10-23.tar.xz 9710480 BLAKE2B 9e28cfb497c00c5e20855f7addc9ac053058c2ebfc801b0075b503b667e25eef6a38c203f573dc91d80829439fe627cb09dced31f86ae0c3deb5b93124b7ba6e SHA512 cb20476507f40807fac26f302f4d779f521916bb4e666b6db750deb21c49e8ee6733da4913a3edb4db1c5f8c93f794bea17ded2dd42147b2e9f0f30b951ac180 |
27 |
DIST ImageMagick-7.0.10-27.tar.xz 9708728 BLAKE2B 17a0097cd025c73832d4dc7ddb0d5d06a59f0f8bc9f6dbed23f44cef096c6c596a348db7e136081012f50788aa5c18738df3ec5c975acc2616a1dc245116d4bc SHA512 d7a694ad8cf88d862c071f62b5f779dd82f5a55edac22d6a8ef9c7fef0d61c28a1bbc08d7a52d66b657e19835f06454a2a9ab0c70796e22951d24a461d328849 |
28 |
+DIST ImageMagick-7.0.10-28.tar.xz 9705324 BLAKE2B 0fe890a23b9fc97ceb5253e24ab8236135f4a4f48c1480ad5577c6a2535bf350fcea062b8897fc5e7993ab86716b1e280fabcf664442e3fe9d209e8c2806ea2d SHA512 fcfdacec893bb0a39c4a3caae1ade5ea7d3f6b8909cc73f218260f9f9b354ebe77aecedb2be2e2a64011eceb895c1ecb2fa0f349361387d56fb0f3cde657e158 |
29 |
|
30 |
diff --git a/media-gfx/imagemagick/imagemagick-6.9.11.28.ebuild b/media-gfx/imagemagick/imagemagick-6.9.11.28.ebuild |
31 |
new file mode 100644 |
32 |
index 00000000000..02b0c9655fe |
33 |
--- /dev/null |
34 |
+++ b/media-gfx/imagemagick/imagemagick-6.9.11.28.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.28.ebuild b/media-gfx/imagemagick/imagemagick-7.0.10.28.ebuild |
293 |
new file mode 100644 |
294 |
index 00000000000..ac9609f64ef |
295 |
--- /dev/null |
296 |
+++ b/media-gfx/imagemagick/imagemagick-7.0.10.28.ebuild |
297 |
@@ -0,0 +1,268 @@ |
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 |
+ svg? ( xml ) |
326 |
+ test? ( corefonts )" |
327 |
+ |
328 |
+RESTRICT="!test? ( test )" |
329 |
+ |
330 |
+BDEPEND="virtual/pkgconfig" |
331 |
+ |
332 |
+RDEPEND=" |
333 |
+ dev-libs/libltdl:0 |
334 |
+ bzip2? ( app-arch/bzip2 ) |
335 |
+ corefonts? ( media-fonts/corefonts ) |
336 |
+ djvu? ( app-text/djvu ) |
337 |
+ fftw? ( sci-libs/fftw:3.0 ) |
338 |
+ fontconfig? ( media-libs/fontconfig ) |
339 |
+ fpx? ( >=media-libs/libfpx-1.3.0-r1 ) |
340 |
+ graphviz? ( media-gfx/graphviz ) |
341 |
+ heif? ( media-libs/libheif:= ) |
342 |
+ jbig? ( >=media-libs/jbigkit-2:= ) |
343 |
+ jpeg? ( virtual/jpeg:0 ) |
344 |
+ jpeg2k? ( >=media-libs/openjpeg-2.1.0:2 ) |
345 |
+ lcms? ( media-libs/lcms:2= ) |
346 |
+ lqr? ( media-libs/liblqr ) |
347 |
+ opencl? ( virtual/opencl ) |
348 |
+ openexr? ( media-libs/openexr:0= ) |
349 |
+ pango? ( x11-libs/pango ) |
350 |
+ perl? ( >=dev-lang/perl-5.8.8:0= ) |
351 |
+ png? ( media-libs/libpng:0= ) |
352 |
+ postscript? ( app-text/ghostscript-gpl ) |
353 |
+ raw? ( media-libs/libraw:= ) |
354 |
+ svg? ( |
355 |
+ gnome-base/librsvg |
356 |
+ media-gfx/potrace |
357 |
+ ) |
358 |
+ tiff? ( media-libs/tiff:0= ) |
359 |
+ truetype? ( |
360 |
+ media-fonts/urw-fonts |
361 |
+ >=media-libs/freetype-2 |
362 |
+ ) |
363 |
+ webp? ( media-libs/libwebp:0= ) |
364 |
+ wmf? ( media-libs/libwmf ) |
365 |
+ X? ( |
366 |
+ x11-libs/libICE |
367 |
+ x11-libs/libSM |
368 |
+ x11-libs/libXext |
369 |
+ x11-libs/libXt |
370 |
+ ) |
371 |
+ xml? ( dev-libs/libxml2:= ) |
372 |
+ lzma? ( app-arch/xz-utils ) |
373 |
+ zlib? ( sys-libs/zlib:= )" |
374 |
+ |
375 |
+DEPEND="${RDEPEND} |
376 |
+ !media-gfx/graphicsmagick[imagemagick] |
377 |
+ X? ( x11-base/xorg-proto )" |
378 |
+ |
379 |
+S="${WORKDIR}/${MY_P}" |
380 |
+ |
381 |
+src_prepare() { |
382 |
+ default |
383 |
+ |
384 |
+ # Apply hardening #664236 |
385 |
+ cp "${FILESDIR}"/policy-hardening.snippet "${S}" || die |
386 |
+ sed -i -e '/^<policymap>$/ { |
387 |
+ r policy-hardening.snippet |
388 |
+ d |
389 |
+ }' \ |
390 |
+ config/policy.xml || \ |
391 |
+ die "Failed to apply hardening of policy.xml" |
392 |
+ einfo "policy.xml hardened" |
393 |
+ |
394 |
+ elibtoolize # for Darwin modules |
395 |
+ |
396 |
+ # For testsuite, see https://bugs.gentoo.org/show_bug.cgi?id=500580#c3 |
397 |
+ local ati_cards mesa_cards nvidia_cards render_cards |
398 |
+ shopt -s nullglob |
399 |
+ ati_cards=$(echo -n /dev/ati/card* | sed 's/ /:/g') |
400 |
+ if test -n "${ati_cards}"; then |
401 |
+ addpredict "${ati_cards}" |
402 |
+ fi |
403 |
+ mesa_cards=$(echo -n /dev/dri/card* | sed 's/ /:/g') |
404 |
+ if test -n "${mesa_cards}"; then |
405 |
+ addpredict "${mesa_cards}" |
406 |
+ fi |
407 |
+ nvidia_cards=$(echo -n /dev/nvidia* | sed 's/ /:/g') |
408 |
+ if test -n "${nvidia_cards}"; then |
409 |
+ addpredict "${nvidia_cards}" |
410 |
+ fi |
411 |
+ render_cards=$(echo -n /dev/dri/renderD128* | sed 's/ /:/g') |
412 |
+ if test -n "${render_cards}"; then |
413 |
+ addpredict "${render_cards}" |
414 |
+ fi |
415 |
+ shopt -u nullglob |
416 |
+ addpredict /dev/nvidiactl |
417 |
+} |
418 |
+ |
419 |
+src_configure() { |
420 |
+ local depth=16 |
421 |
+ use q8 && depth=8 |
422 |
+ use q32 && depth=32 |
423 |
+ |
424 |
+ local openmp=disable |
425 |
+ use openmp && { tc-has-openmp && openmp=enable; } |
426 |
+ |
427 |
+ use perl && perl_check_env |
428 |
+ |
429 |
+ [[ ${CHOST} == *-solaris* ]] && append-ldflags -lnsl -lsocket |
430 |
+ |
431 |
+ local myeconfargs=( |
432 |
+ $(use_enable static-libs static) |
433 |
+ $(use_enable hdri) |
434 |
+ $(use_enable opencl) |
435 |
+ --with-threads |
436 |
+ --with-modules |
437 |
+ --with-quantum-depth=${depth} |
438 |
+ $(use_with cxx magick-plus-plus) |
439 |
+ $(use_with perl) |
440 |
+ --with-perl-options='INSTALLDIRS=vendor' |
441 |
+ --with-gs-font-dir="${EPREFIX}"/usr/share/fonts/urw-fonts |
442 |
+ $(use_with bzip2 bzlib) |
443 |
+ $(use_with X x) |
444 |
+ $(use_with zlib) |
445 |
+ --without-autotrace |
446 |
+ $(use_with postscript dps) |
447 |
+ $(use_with djvu) |
448 |
+ --with-dejavu-font-dir="${EPREFIX}"/usr/share/fonts/dejavu |
449 |
+ $(use_with fftw) |
450 |
+ $(use_with fpx) |
451 |
+ $(use_with fontconfig) |
452 |
+ $(use_with truetype freetype) |
453 |
+ $(use_with postscript gslib) |
454 |
+ $(use_with graphviz gvc) |
455 |
+ $(use_with heif heic) |
456 |
+ $(use_with jbig) |
457 |
+ $(use_with jpeg) |
458 |
+ $(use_with jpeg2k openjp2) |
459 |
+ --without-jxl |
460 |
+ $(use_with lcms) |
461 |
+ $(use_with lqr) |
462 |
+ $(use_with lzma) |
463 |
+ $(use_with openexr) |
464 |
+ $(use_with pango) |
465 |
+ $(use_with png) |
466 |
+ $(use_with raw) |
467 |
+ $(use_with svg rsvg) |
468 |
+ $(use_with tiff) |
469 |
+ $(use_with webp) |
470 |
+ $(use_with corefonts windows-font-dir "${EPREFIX}"/usr/share/fonts/corefonts) |
471 |
+ $(use_with wmf) |
472 |
+ $(use_with xml) |
473 |
+ --${openmp}-openmp |
474 |
+ --with-gcc-arch=no-automagic |
475 |
+ ) |
476 |
+ CONFIG_SHELL=$(type -P bash) econf "${myeconfargs[@]}" |
477 |
+} |
478 |
+ |
479 |
+src_test() { |
480 |
+ # Install default (unrestricted) policy in $HOME for test suite #664238 |
481 |
+ local _im_local_config_home="${HOME}/.config/ImageMagick" |
482 |
+ mkdir -p "${_im_local_config_home}" || \ |
483 |
+ die "Failed to create IM config dir in '${_im_local_config_home}'" |
484 |
+ cp "${FILESDIR}"/policy.test.xml "${_im_local_config_home}/policy.xml" || \ |
485 |
+ die "Failed to install default blank policy.xml in '${_im_local_config_home}'" |
486 |
+ |
487 |
+ local im_command= IM_COMMANDS=() |
488 |
+ if [[ ${PV} == "9999" ]] ; then |
489 |
+ IM_COMMANDS+=( "magick -version" ) # Show version we are using -- cannot verify because of live ebuild |
490 |
+ else |
491 |
+ IM_COMMANDS+=( "magick -version | grep -q -- \"${MY_PV}\"" ) # Verify that we are using version we just built |
492 |
+ fi |
493 |
+ IM_COMMANDS+=( "magick -list policy" ) # Verify that policy.xml is used |
494 |
+ IM_COMMANDS+=( "emake check" ) # Run tests |
495 |
+ |
496 |
+ for im_command in "${IM_COMMANDS[@]}"; do |
497 |
+ eval "${S}"/magick.sh \ |
498 |
+ ${im_command} || \ |
499 |
+ die "Failed to run \"${im_command}\"" |
500 |
+ done |
501 |
+} |
502 |
+ |
503 |
+src_install() { |
504 |
+ # Ensure documentation installation files and paths with each release! |
505 |
+ emake \ |
506 |
+ DESTDIR="${D}" \ |
507 |
+ DOCUMENTATION_PATH="${EPREFIX}"/usr/share/doc/${PF}/html \ |
508 |
+ install |
509 |
+ |
510 |
+ rm -f "${ED}"/usr/share/doc/${PF}/html/{ChangeLog,LICENSE,NEWS.txt} |
511 |
+ dodoc {AUTHORS,README}.txt ChangeLog |
512 |
+ |
513 |
+ if use perl; then |
514 |
+ find "${ED}" -type f -name perllocal.pod -exec rm -f {} + |
515 |
+ find "${ED}" -depth -mindepth 1 -type d -empty -exec rm -rf {} + |
516 |
+ fi |
517 |
+ |
518 |
+ find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} + |
519 |
+ # .la files in parent are not needed, keep plugin .la files |
520 |
+ rm "${ED}"/usr/$(get_libdir)/*.la || die |
521 |
+ |
522 |
+ if use opencl; then |
523 |
+ cat <<-EOF > "${T}"/99${PN} |
524 |
+ SANDBOX_PREDICT="/dev/nvidiactl:/dev/nvidia-uvm:/dev/ati/card:/dev/dri/card:/dev/dri/renderD128" |
525 |
+ EOF |
526 |
+ |
527 |
+ insinto /etc/sandbox.d |
528 |
+ doins "${T}"/99${PN} #472766 |
529 |
+ fi |
530 |
+ |
531 |
+ insinto /usr/share/${PN} |
532 |
+ doins config/*icm |
533 |
+} |
534 |
+ |
535 |
+pkg_postinst() { |
536 |
+ local _show_policy_xml_notice= |
537 |
+ |
538 |
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then |
539 |
+ # This is a new installation |
540 |
+ _show_policy_xml_notice=yes |
541 |
+ else |
542 |
+ local v |
543 |
+ for v in ${REPLACING_VERSIONS}; do |
544 |
+ if ! ver_test "${v}" -gt "7.0.8.10-r2"; then |
545 |
+ # This is an upgrade |
546 |
+ _show_policy_xml_notice=yes |
547 |
+ |
548 |
+ # Show this elog only once |
549 |
+ break |
550 |
+ fi |
551 |
+ done |
552 |
+ fi |
553 |
+ |
554 |
+ if [[ -n "${_show_policy_xml_notice}" ]]; then |
555 |
+ elog "For security reasons, a policy.xml file was installed in /etc/ImageMagick-7" |
556 |
+ elog "which will prevent the usage of the following coders by default:" |
557 |
+ elog "" |
558 |
+ elog " - PS" |
559 |
+ elog " - PS2" |
560 |
+ elog " - PS3" |
561 |
+ elog " - EPS" |
562 |
+ elog " - PDF" |
563 |
+ elog " - XPS" |
564 |
+ fi |
565 |
+} |