1 |
commit: acd4cfe8e97a26fa5534a5468bfbdc4da4593362 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Aug 31 02:51:32 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 31 02:51:32 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=acd4cfe8 |
7 |
|
8 |
media-gfx/imagemagick: drop 6.9.12.28, 6.9.12.58, 7.1.0.13, 7.1.0.43 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/852947 |
11 |
Bug: https://bugs.gentoo.org/843833 |
12 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
13 |
|
14 |
media-gfx/imagemagick/Manifest | 4 - |
15 |
media-gfx/imagemagick/imagemagick-6.9.12.28.ebuild | 267 -------------------- |
16 |
media-gfx/imagemagick/imagemagick-6.9.12.58.ebuild | 269 -------------------- |
17 |
media-gfx/imagemagick/imagemagick-7.1.0.13.ebuild | 274 -------------------- |
18 |
media-gfx/imagemagick/imagemagick-7.1.0.43.ebuild | 278 --------------------- |
19 |
5 files changed, 1092 deletions(-) |
20 |
|
21 |
diff --git a/media-gfx/imagemagick/Manifest b/media-gfx/imagemagick/Manifest |
22 |
index 6d40c1c1ae8b..d37ffbca8f01 100644 |
23 |
--- a/media-gfx/imagemagick/Manifest |
24 |
+++ b/media-gfx/imagemagick/Manifest |
25 |
@@ -1,6 +1,2 @@ |
26 |
-DIST ImageMagick-6.9.12-28.tar.xz 9181044 BLAKE2B 2efc03da9e4c53b82479badfcc9a25f05e2d9766031807500a6bb39cba2a800c39a93a16864ca9af3a0b33d0c1c95cb2f33264c7e00149204ca742673c3d07ff SHA512 ec96fca6b385379873ead007b011d87fb3939ed4e3631d2a9401f1467db59d1d1ced072fd4fefe1577d04302a1060dbc324631b420f41a99bf32465b540ec979 |
27 |
-DIST ImageMagick-6.9.12-58.tar.xz 9164316 BLAKE2B 0ef0b4fa289f945a2b787b6a3c04d9b96093c2e9ed07d5828d53b6e1518d5197473998081b22daf41e65d21bc65927b12dc66802430a68e0001116c4a446d03e SHA512 c73cd363bb7ac05b488d2960f61a9f0d87ab859da049038b21e0ed396b3a681361b0bcd4ad128c0397be26fac06e83b3f36868fba40a72645c42b3398ad6c930 |
28 |
DIST ImageMagick-6.9.12-59.tar.xz 9178096 BLAKE2B 3ee13cf1bc0af33b720cce1d310bbdc1d6c08e17510b4d1d166228f6d84d15be0d1388b19153b1e21dee971d65f3a061ef19bc577c02218a49d2814538ec60c8 SHA512 c9ba09852543c6a00c041c7f7e27a24eae0f34bf8f9db1077fd34ccd9eb6d5a94787301d38b1e34636474cbc50830cdc812dbcd01b613f36063107346ec60213 |
29 |
-DIST ImageMagick-7.1.0-13.tar.xz 10311564 BLAKE2B 7cb3e58f548cbe0b9e1239df47ff4f42af2cd0b6ff4c417a62515ff9bd434ecabed2cc7f7cb7cf8880f20af3f6d7de33d7368f146b9ac7668149959966a463d8 SHA512 dac1fc229599a63703fc3aa1378de313dc94dfbfa71913dc408ef65c88ef33820b5ddab4c9a064a86cc35c0abb0136f0adb626bff9e227b52ed0d90993688044 |
30 |
-DIST ImageMagick-7.1.0-43.tar.xz 10355700 BLAKE2B 2fe6472b864b0ca25ce5e0d7b045a6b3457fbdfa67e232b125183927b20e56ea2cc0a6225d51f0a2e09b36cc2500e7ee3c3ff99f3924aa3ca56e3e08f776ea3f SHA512 4f9c9625165eabcabc2edd745ad1755309d412591e5a8d383445d05b2bfe2d41df3e711c38be3ae5c8f504c0510452b1aff51e50edc24aa279bb742fb8ddd305 |
31 |
DIST ImageMagick-7.1.0-44.tar.xz 10363636 BLAKE2B 547ec39391588bf609ab11e7353ec6b55773e40162ada486619c769b97989f728e7fa235fe23e6e8b0d0f8db500bcd273d6851fcb7f99a68a7177f1b67fc68a9 SHA512 e8467963b7243560901fcdd8a28b6dcca8052565f87848390852cf6deafad918d612d59e349a46ab90b159c0af8578b16cc982fae195dc8ef8ed95568e0cf05e |
32 |
|
33 |
diff --git a/media-gfx/imagemagick/imagemagick-6.9.12.28.ebuild b/media-gfx/imagemagick/imagemagick-6.9.12.28.ebuild |
34 |
deleted file mode 100644 |
35 |
index 170a23afd362..000000000000 |
36 |
--- a/media-gfx/imagemagick/imagemagick-6.9.12.28.ebuild |
37 |
+++ /dev/null |
38 |
@@ -1,267 +0,0 @@ |
39 |
-# Copyright 1999-2022 Gentoo Authors |
40 |
-# Distributed under the terms of the GNU General Public License v2 |
41 |
- |
42 |
-EAPI="8" |
43 |
- |
44 |
-inherit flag-o-matic libtool perl-functions toolchain-funcs |
45 |
- |
46 |
-if [[ ${PV} == "9999" ]] ; then |
47 |
- EGIT_REPO_URI="https://github.com/ImageMagick/ImageMagick6.git" |
48 |
- inherit git-r3 |
49 |
- MY_P="imagemagick-9999" |
50 |
-else |
51 |
- MY_PV="$(ver_rs 3 '-')" |
52 |
- MY_P="ImageMagick-${MY_PV}" |
53 |
- SRC_URI="mirror://imagemagick/${MY_P}.tar.xz" |
54 |
- 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" |
55 |
-fi |
56 |
- |
57 |
-DESCRIPTION="A collection of tools and libraries for many image formats" |
58 |
-HOMEPAGE="https://www.imagemagick.org/" |
59 |
- |
60 |
-LICENSE="imagemagick" |
61 |
-SLOT="0/6.9.11-60" |
62 |
-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" |
63 |
- |
64 |
-REQUIRED_USE="corefonts? ( truetype ) |
65 |
- svg? ( xml ) |
66 |
- test? ( corefonts )" |
67 |
- |
68 |
-RESTRICT="!test? ( test )" |
69 |
- |
70 |
-BDEPEND="virtual/pkgconfig" |
71 |
- |
72 |
-RDEPEND=" |
73 |
- dev-libs/libltdl:0 |
74 |
- bzip2? ( app-arch/bzip2 ) |
75 |
- corefonts? ( media-fonts/corefonts ) |
76 |
- djvu? ( app-text/djvu ) |
77 |
- fftw? ( sci-libs/fftw:3.0 ) |
78 |
- fontconfig? ( media-libs/fontconfig ) |
79 |
- fpx? ( >=media-libs/libfpx-1.3.0-r1 ) |
80 |
- graphviz? ( media-gfx/graphviz ) |
81 |
- heif? ( media-libs/libheif:=[x265] ) |
82 |
- jbig? ( >=media-libs/jbigkit-2:= ) |
83 |
- jpeg? ( virtual/jpeg:0 ) |
84 |
- jpeg2k? ( >=media-libs/openjpeg-2.1.0:2 ) |
85 |
- lcms? ( media-libs/lcms:2= ) |
86 |
- lqr? ( media-libs/liblqr ) |
87 |
- opencl? ( virtual/opencl ) |
88 |
- openexr? ( media-libs/openexr:0= ) |
89 |
- pango? ( x11-libs/pango ) |
90 |
- perl? ( >=dev-lang/perl-5.8.8:0= ) |
91 |
- png? ( media-libs/libpng:0= ) |
92 |
- postscript? ( app-text/ghostscript-gpl ) |
93 |
- raw? ( media-libs/libraw:= ) |
94 |
- svg? ( |
95 |
- gnome-base/librsvg |
96 |
- media-gfx/potrace |
97 |
- ) |
98 |
- tiff? ( media-libs/tiff:0= ) |
99 |
- truetype? ( |
100 |
- media-fonts/urw-fonts |
101 |
- >=media-libs/freetype-2 |
102 |
- ) |
103 |
- webp? ( media-libs/libwebp:0= ) |
104 |
- wmf? ( media-libs/libwmf ) |
105 |
- X? ( |
106 |
- x11-libs/libICE |
107 |
- x11-libs/libSM |
108 |
- x11-libs/libXext |
109 |
- x11-libs/libXt |
110 |
- ) |
111 |
- xml? ( dev-libs/libxml2:= ) |
112 |
- lzma? ( app-arch/xz-utils ) |
113 |
- zlib? ( sys-libs/zlib:= )" |
114 |
- |
115 |
-DEPEND="${RDEPEND} |
116 |
- !media-gfx/graphicsmagick[imagemagick] |
117 |
- X? ( x11-base/xorg-proto )" |
118 |
- |
119 |
-S="${WORKDIR}/${MY_P}" |
120 |
- |
121 |
-pkg_pretend() { |
122 |
- [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp |
123 |
-} |
124 |
- |
125 |
-pkg_setup() { |
126 |
- [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp |
127 |
-} |
128 |
- |
129 |
-src_prepare() { |
130 |
- default |
131 |
- |
132 |
- # Apply hardening #664236 |
133 |
- cp "${FILESDIR}"/policy-hardening.snippet "${S}" || die |
134 |
- sed -i -e '/^<policymap>$/ { |
135 |
- r policy-hardening.snippet |
136 |
- d |
137 |
- }' \ |
138 |
- config/policy.xml || \ |
139 |
- die "Failed to apply hardening of policy.xml" |
140 |
- einfo "policy.xml hardened" |
141 |
- |
142 |
- elibtoolize # for Darwin modules |
143 |
- |
144 |
- # For testsuite, see https://bugs.gentoo.org/show_bug.cgi?id=500580#c3 |
145 |
- local ati_cards mesa_cards nvidia_cards render_cards |
146 |
- shopt -s nullglob |
147 |
- ati_cards=$(echo -n /dev/ati/card* | sed 's/ /:/g') |
148 |
- if test -n "${ati_cards}"; then |
149 |
- addpredict "${ati_cards}" |
150 |
- fi |
151 |
- mesa_cards=$(echo -n /dev/dri/card* | sed 's/ /:/g') |
152 |
- if test -n "${mesa_cards}"; then |
153 |
- addpredict "${mesa_cards}" |
154 |
- fi |
155 |
- nvidia_cards=$(echo -n /dev/nvidia* | sed 's/ /:/g') |
156 |
- if test -n "${nvidia_cards}"; then |
157 |
- addpredict "${nvidia_cards}" |
158 |
- fi |
159 |
- render_cards=$(echo -n /dev/dri/renderD128* | sed 's/ /:/g') |
160 |
- if test -n "${render_cards}"; then |
161 |
- addpredict "${render_cards}" |
162 |
- fi |
163 |
- shopt -u nullglob |
164 |
- addpredict /dev/nvidiactl |
165 |
-} |
166 |
- |
167 |
-src_configure() { |
168 |
- local depth=16 |
169 |
- use q8 && depth=8 |
170 |
- use q32 && depth=32 |
171 |
- |
172 |
- use perl && perl_check_env |
173 |
- |
174 |
- [[ ${CHOST} == *-solaris* ]] && append-ldflags -lnsl -lsocket |
175 |
- |
176 |
- local myeconfargs=( |
177 |
- $(use_enable static-libs static) |
178 |
- $(use_enable hdri) |
179 |
- $(use_enable opencl) |
180 |
- $(use_enable openmp) |
181 |
- --with-threads |
182 |
- --with-modules |
183 |
- --with-quantum-depth=${depth} |
184 |
- $(use_with cxx magick-plus-plus) |
185 |
- $(use_with perl) |
186 |
- --with-perl-options='INSTALLDIRS=vendor' |
187 |
- --with-gs-font-dir="${EPREFIX}"/usr/share/fonts/urw-fonts |
188 |
- $(use_with bzip2 bzlib) |
189 |
- $(use_with X x) |
190 |
- $(use_with zlib) |
191 |
- --without-autotrace |
192 |
- $(use_with postscript dps) |
193 |
- $(use_with djvu) |
194 |
- --with-dejavu-font-dir="${EPREFIX}"/usr/share/fonts/dejavu |
195 |
- $(use_with fftw) |
196 |
- $(use_with fpx) |
197 |
- $(use_with fontconfig) |
198 |
- $(use_with truetype freetype) |
199 |
- $(use_with postscript gslib) |
200 |
- $(use_with graphviz gvc) |
201 |
- $(use_with heif heic) |
202 |
- $(use_with jbig) |
203 |
- $(use_with jpeg) |
204 |
- $(use_with jpeg2k openjp2) |
205 |
- $(use_with lcms) |
206 |
- $(use_with lqr) |
207 |
- $(use_with lzma) |
208 |
- $(use_with openexr) |
209 |
- $(use_with pango) |
210 |
- $(use_with png) |
211 |
- $(use_with raw) |
212 |
- $(use_with svg rsvg) |
213 |
- $(use_with tiff) |
214 |
- $(use_with webp) |
215 |
- $(use_with corefonts windows-font-dir "${EPREFIX}"/usr/share/fonts/corefonts) |
216 |
- $(use_with wmf) |
217 |
- $(use_with xml) |
218 |
- --with-gcc-arch=no-automagic |
219 |
- ) |
220 |
- CONFIG_SHELL=$(type -P bash) econf "${myeconfargs[@]}" |
221 |
-} |
222 |
- |
223 |
-src_test() { |
224 |
- # Install default (unrestricted) policy in $HOME for test suite #664238 |
225 |
- local _im_local_config_home="${HOME}/.config/ImageMagick" |
226 |
- mkdir -p "${_im_local_config_home}" || \ |
227 |
- die "Failed to create IM config dir in '${_im_local_config_home}'" |
228 |
- cp "${FILESDIR}"/policy.test.xml "${_im_local_config_home}/policy.xml" || \ |
229 |
- die "Failed to install default blank policy.xml in '${_im_local_config_home}'" |
230 |
- |
231 |
- local im_command= IM_COMMANDS=() |
232 |
- IM_COMMANDS+=( "identify -version | grep -q -- \"${MY_PV}\"" ) # Verify that we are using version we just built |
233 |
- IM_COMMANDS+=( "identify -list policy" ) # Verify that policy.xml is used |
234 |
- IM_COMMANDS+=( "emake check" ) # Run tests |
235 |
- |
236 |
- for im_command in "${IM_COMMANDS[@]}"; do |
237 |
- eval "${S}"/magick.sh \ |
238 |
- ${im_command} || \ |
239 |
- die "Failed to run \"${im_command}\"" |
240 |
- done |
241 |
-} |
242 |
- |
243 |
-src_install() { |
244 |
- # Ensure documentation installation files and paths with each release! |
245 |
- emake \ |
246 |
- DESTDIR="${D}" \ |
247 |
- DOCUMENTATION_PATH="${EPREFIX}"/usr/share/doc/${PF}/html \ |
248 |
- install |
249 |
- |
250 |
- rm -f "${ED}"/usr/share/doc/${PF}/html/{ChangeLog,LICENSE,NEWS.txt} |
251 |
- dodoc {AUTHORS,README}.txt ChangeLog |
252 |
- |
253 |
- if use perl; then |
254 |
- find "${ED}" -type f -name perllocal.pod -exec rm -f {} + |
255 |
- find "${ED}" -depth -mindepth 1 -type d -empty -exec rm -rf {} + |
256 |
- fi |
257 |
- |
258 |
- find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} + |
259 |
- # .la files in parent are not needed, keep plugin .la files |
260 |
- find "${ED}"/usr/$(get_libdir)/ -maxdepth 1 -name "*.la" -delete || die |
261 |
- |
262 |
- if use opencl; then |
263 |
- cat <<-EOF > "${T}"/99${PN} |
264 |
- SANDBOX_PREDICT="/dev/nvidiactl:/dev/nvidia-uvm:/dev/ati/card:/dev/dri/card:/dev/dri/card0:/dev/dri/renderD128" |
265 |
- EOF |
266 |
- |
267 |
- insinto /etc/sandbox.d |
268 |
- doins "${T}"/99${PN} #472766 |
269 |
- fi |
270 |
- |
271 |
- insinto /usr/share/${PN} |
272 |
- doins config/*icm |
273 |
-} |
274 |
- |
275 |
-pkg_postinst() { |
276 |
- local _show_policy_xml_notice= |
277 |
- |
278 |
- if [[ -z "${REPLACING_VERSIONS}" ]]; then |
279 |
- # This is a new installation |
280 |
- _show_policy_xml_notice=yes |
281 |
- else |
282 |
- local v |
283 |
- for v in ${REPLACING_VERSIONS}; do |
284 |
- if ! ver_test "${v}" -gt "6.9.10.10-r2"; then |
285 |
- # This is an upgrade |
286 |
- _show_policy_xml_notice=yes |
287 |
- |
288 |
- # Show this elog only once |
289 |
- break |
290 |
- fi |
291 |
- done |
292 |
- fi |
293 |
- |
294 |
- if [[ -n "${_show_policy_xml_notice}" ]]; then |
295 |
- elog "For security reasons, a policy.xml file was installed in /etc/ImageMagick-6" |
296 |
- elog "which will prevent the usage of the following coders by default:" |
297 |
- elog "" |
298 |
- elog " - PS" |
299 |
- elog " - PS2" |
300 |
- elog " - PS3" |
301 |
- elog " - EPS" |
302 |
- elog " - PDF" |
303 |
- elog " - XPS" |
304 |
- fi |
305 |
-} |
306 |
|
307 |
diff --git a/media-gfx/imagemagick/imagemagick-6.9.12.58.ebuild b/media-gfx/imagemagick/imagemagick-6.9.12.58.ebuild |
308 |
deleted file mode 100644 |
309 |
index 20654ea8d565..000000000000 |
310 |
--- a/media-gfx/imagemagick/imagemagick-6.9.12.58.ebuild |
311 |
+++ /dev/null |
312 |
@@ -1,269 +0,0 @@ |
313 |
-# Copyright 1999-2022 Gentoo Authors |
314 |
-# Distributed under the terms of the GNU General Public License v2 |
315 |
- |
316 |
-EAPI=8 |
317 |
- |
318 |
-QA_PKGCONFIG_VERSION=$(ver_cut 1-3) |
319 |
-inherit flag-o-matic libtool perl-functions toolchain-funcs |
320 |
- |
321 |
-if [[ ${PV} == 9999 ]] ; then |
322 |
- EGIT_REPO_URI="https://github.com/ImageMagick/ImageMagick6.git" |
323 |
- inherit git-r3 |
324 |
- MY_P="imagemagick-9999" |
325 |
-else |
326 |
- MY_PV="$(ver_rs 3 '-')" |
327 |
- MY_P="ImageMagick-${MY_PV}" |
328 |
- SRC_URI="mirror://imagemagick/${MY_P}.tar.xz" |
329 |
- 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" |
330 |
-fi |
331 |
- |
332 |
-S="${WORKDIR}/${MY_P}" |
333 |
- |
334 |
-DESCRIPTION="A collection of tools and libraries for many image formats" |
335 |
-HOMEPAGE="https://www.imagemagick.org/" |
336 |
- |
337 |
-LICENSE="imagemagick" |
338 |
-SLOT="0/6.9.12-58" |
339 |
-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" |
340 |
- |
341 |
-REQUIRED_USE="corefonts? ( truetype ) |
342 |
- svg? ( xml ) |
343 |
- test? ( corefonts )" |
344 |
- |
345 |
-RESTRICT="!test? ( test )" |
346 |
- |
347 |
-RDEPEND=" |
348 |
- !media-gfx/graphicsmagick[imagemagick] |
349 |
- dev-libs/libltdl |
350 |
- bzip2? ( app-arch/bzip2 ) |
351 |
- corefonts? ( media-fonts/corefonts ) |
352 |
- djvu? ( app-text/djvu ) |
353 |
- fftw? ( sci-libs/fftw:3.0 ) |
354 |
- fontconfig? ( media-libs/fontconfig ) |
355 |
- fpx? ( >=media-libs/libfpx-1.3.0-r1 ) |
356 |
- graphviz? ( media-gfx/graphviz ) |
357 |
- heif? ( media-libs/libheif:=[x265] ) |
358 |
- jbig? ( >=media-libs/jbigkit-2:= ) |
359 |
- jpeg? ( media-libs/libjpeg-turbo:= ) |
360 |
- jpeg2k? ( >=media-libs/openjpeg-2.1.0:2 ) |
361 |
- lcms? ( media-libs/lcms:2= ) |
362 |
- lqr? ( media-libs/liblqr ) |
363 |
- opencl? ( virtual/opencl ) |
364 |
- openexr? ( media-libs/openexr:0= ) |
365 |
- pango? ( x11-libs/pango ) |
366 |
- perl? ( >=dev-lang/perl-5.8.8:= ) |
367 |
- png? ( media-libs/libpng:= ) |
368 |
- postscript? ( app-text/ghostscript-gpl ) |
369 |
- raw? ( media-libs/libraw:= ) |
370 |
- svg? ( |
371 |
- gnome-base/librsvg |
372 |
- media-gfx/potrace |
373 |
- ) |
374 |
- tiff? ( media-libs/tiff:= ) |
375 |
- truetype? ( |
376 |
- media-fonts/urw-fonts |
377 |
- >=media-libs/freetype-2 |
378 |
- ) |
379 |
- webp? ( media-libs/libwebp:= ) |
380 |
- wmf? ( media-libs/libwmf ) |
381 |
- X? ( |
382 |
- x11-libs/libICE |
383 |
- x11-libs/libSM |
384 |
- x11-libs/libXext |
385 |
- x11-libs/libXt |
386 |
- ) |
387 |
- xml? ( dev-libs/libxml2 ) |
388 |
- lzma? ( app-arch/xz-utils ) |
389 |
- zlib? ( sys-libs/zlib:= )" |
390 |
-DEPEND="${RDEPEND} |
391 |
- X? ( x11-base/xorg-proto )" |
392 |
-BDEPEND="virtual/pkgconfig" |
393 |
- |
394 |
-pkg_pretend() { |
395 |
- [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp |
396 |
-} |
397 |
- |
398 |
-pkg_setup() { |
399 |
- [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp |
400 |
-} |
401 |
- |
402 |
-src_prepare() { |
403 |
- default |
404 |
- |
405 |
- # Apply hardening, bug #664236 |
406 |
- cp "${FILESDIR}"/policy-hardening.snippet "${S}" || die |
407 |
- sed -i -e '/^<policymap>$/ { |
408 |
- r policy-hardening.snippet |
409 |
- d |
410 |
- }' \ |
411 |
- config/policy.xml || \ |
412 |
- die "Failed to apply hardening of policy.xml" |
413 |
- einfo "policy.xml hardened" |
414 |
- |
415 |
- # for Darwin modules |
416 |
- elibtoolize |
417 |
- |
418 |
- # For testsuite, see bug #500580#c3 |
419 |
- local ati_cards mesa_cards nvidia_cards render_cards |
420 |
- shopt -s nullglob |
421 |
- ati_cards=$(echo -n /dev/ati/card* | sed 's/ /:/g') |
422 |
- if test -n "${ati_cards}"; then |
423 |
- addpredict "${ati_cards}" |
424 |
- fi |
425 |
- mesa_cards=$(echo -n /dev/dri/card* | sed 's/ /:/g') |
426 |
- if test -n "${mesa_cards}"; then |
427 |
- addpredict "${mesa_cards}" |
428 |
- fi |
429 |
- nvidia_cards=$(echo -n /dev/nvidia* | sed 's/ /:/g') |
430 |
- if test -n "${nvidia_cards}"; then |
431 |
- addpredict "${nvidia_cards}" |
432 |
- fi |
433 |
- render_cards=$(echo -n /dev/dri/renderD128* | sed 's/ /:/g') |
434 |
- if test -n "${render_cards}"; then |
435 |
- addpredict "${render_cards}" |
436 |
- fi |
437 |
- shopt -u nullglob |
438 |
- addpredict /dev/nvidiactl |
439 |
-} |
440 |
- |
441 |
-src_configure() { |
442 |
- local depth=16 |
443 |
- use q8 && depth=8 |
444 |
- use q32 && depth=32 |
445 |
- |
446 |
- use perl && perl_check_env |
447 |
- |
448 |
- [[ ${CHOST} == *-solaris* ]] && append-ldflags -lnsl -lsocket |
449 |
- |
450 |
- local myeconfargs=( |
451 |
- $(use_enable static-libs static) |
452 |
- $(use_enable hdri) |
453 |
- $(use_enable opencl) |
454 |
- $(use_enable openmp) |
455 |
- --with-threads |
456 |
- --with-modules |
457 |
- --with-quantum-depth=${depth} |
458 |
- $(use_with cxx magick-plus-plus) |
459 |
- $(use_with perl) |
460 |
- --with-perl-options='INSTALLDIRS=vendor' |
461 |
- --with-gs-font-dir="${EPREFIX}"/usr/share/fonts/urw-fonts |
462 |
- $(use_with bzip2 bzlib) |
463 |
- $(use_with X x) |
464 |
- $(use_with zlib) |
465 |
- --without-autotrace |
466 |
- $(use_with postscript dps) |
467 |
- $(use_with djvu) |
468 |
- --with-dejavu-font-dir="${EPREFIX}"/usr/share/fonts/dejavu |
469 |
- $(use_with fftw) |
470 |
- $(use_with fpx) |
471 |
- $(use_with fontconfig) |
472 |
- $(use_with truetype freetype) |
473 |
- $(use_with postscript gslib) |
474 |
- $(use_with graphviz gvc) |
475 |
- $(use_with heif heic) |
476 |
- $(use_with jbig) |
477 |
- $(use_with jpeg) |
478 |
- $(use_with jpeg2k openjp2) |
479 |
- $(use_with lcms) |
480 |
- $(use_with lqr) |
481 |
- $(use_with lzma) |
482 |
- $(use_with openexr) |
483 |
- $(use_with pango) |
484 |
- $(use_with png) |
485 |
- $(use_with raw) |
486 |
- $(use_with svg rsvg) |
487 |
- $(use_with tiff) |
488 |
- $(use_with webp) |
489 |
- $(use_with corefonts windows-font-dir "${EPREFIX}"/usr/share/fonts/corefonts) |
490 |
- $(use_with wmf) |
491 |
- $(use_with xml) |
492 |
- --with-gcc-arch=no-automagic |
493 |
- ) |
494 |
- |
495 |
- CONFIG_SHELL="${BROOT}"/bin/bash econf "${myeconfargs[@]}" |
496 |
-} |
497 |
- |
498 |
-src_test() { |
499 |
- # Install default (unrestricted) policy in ${HOME} for test suite, bug #664238 |
500 |
- local _im_local_config_home="${HOME}/.config/ImageMagick" |
501 |
- mkdir -p "${_im_local_config_home}" || \ |
502 |
- die "Failed to create IM config dir in '${_im_local_config_home}'" |
503 |
- cp "${FILESDIR}"/policy.test.xml "${_im_local_config_home}/policy.xml" || \ |
504 |
- die "Failed to install default blank policy.xml in '${_im_local_config_home}'" |
505 |
- |
506 |
- local im_command= IM_COMMANDS=() |
507 |
- IM_COMMANDS+=( "identify -version | grep -q -- \"${MY_PV}\"" ) # Verify that we are using version we just built |
508 |
- IM_COMMANDS+=( "identify -list policy" ) # Verify that policy.xml is used |
509 |
- IM_COMMANDS+=( "emake check" ) # Run tests |
510 |
- |
511 |
- for im_command in "${IM_COMMANDS[@]}"; do |
512 |
- eval "${S}"/magick.sh \ |
513 |
- ${im_command} || \ |
514 |
- die "Failed to run \"${im_command}\"" |
515 |
- done |
516 |
-} |
517 |
- |
518 |
-src_install() { |
519 |
- # Ensure documentation installation files and paths with each release! |
520 |
- emake \ |
521 |
- DESTDIR="${D}" \ |
522 |
- DOCUMENTATION_PATH="${EPREFIX}"/usr/share/doc/${PF}/html \ |
523 |
- install |
524 |
- |
525 |
- rm -f "${ED}"/usr/share/doc/${PF}/html/{ChangeLog,LICENSE,NEWS.txt} |
526 |
- dodoc {AUTHORS,README}.txt |
527 |
- |
528 |
- if use perl; then |
529 |
- find "${ED}" -type f -name perllocal.pod -exec rm -f {} + |
530 |
- find "${ED}" -depth -mindepth 1 -type d -empty -exec rm -rf {} + |
531 |
- fi |
532 |
- |
533 |
- find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} + |
534 |
- # .la files in parent are not needed, keep plugin .la files |
535 |
- find "${ED}"/usr/$(get_libdir)/ -maxdepth 1 -name "*.la" -delete || die |
536 |
- |
537 |
- if use opencl; then |
538 |
- cat <<-EOF > "${T}"/99${PN} |
539 |
- SANDBOX_PREDICT="/dev/nvidiactl:/dev/nvidia-uvm:/dev/ati/card:/dev/dri/card:/dev/dri/card0:/dev/dri/renderD128" |
540 |
- EOF |
541 |
- |
542 |
- insinto /etc/sandbox.d |
543 |
- # bug #472766 |
544 |
- doins "${T}"/99${PN} |
545 |
- fi |
546 |
- |
547 |
- insinto /usr/share/${PN} |
548 |
- doins config/*icm |
549 |
-} |
550 |
- |
551 |
-pkg_postinst() { |
552 |
- local _show_policy_xml_notice= |
553 |
- |
554 |
- if [[ -z "${REPLACING_VERSIONS}" ]]; then |
555 |
- # This is a new installation |
556 |
- _show_policy_xml_notice=yes |
557 |
- else |
558 |
- local v |
559 |
- for v in ${REPLACING_VERSIONS}; do |
560 |
- if ! ver_test "${v}" -gt "6.9.10.10-r2"; then |
561 |
- # This is an upgrade |
562 |
- _show_policy_xml_notice=yes |
563 |
- |
564 |
- # Show this elog only once |
565 |
- break |
566 |
- fi |
567 |
- done |
568 |
- fi |
569 |
- |
570 |
- if [[ -n "${_show_policy_xml_notice}" ]]; then |
571 |
- elog "For security reasons, a policy.xml file was installed in /etc/ImageMagick-6" |
572 |
- elog "which will prevent the usage of the following coders by default:" |
573 |
- elog "" |
574 |
- elog " - PS" |
575 |
- elog " - PS2" |
576 |
- elog " - PS3" |
577 |
- elog " - EPS" |
578 |
- elog " - PDF" |
579 |
- elog " - XPS" |
580 |
- fi |
581 |
-} |
582 |
|
583 |
diff --git a/media-gfx/imagemagick/imagemagick-7.1.0.13.ebuild b/media-gfx/imagemagick/imagemagick-7.1.0.13.ebuild |
584 |
deleted file mode 100644 |
585 |
index ac18f6d0a928..000000000000 |
586 |
--- a/media-gfx/imagemagick/imagemagick-7.1.0.13.ebuild |
587 |
+++ /dev/null |
588 |
@@ -1,274 +0,0 @@ |
589 |
-# Copyright 1999-2022 Gentoo Authors |
590 |
-# Distributed under the terms of the GNU General Public License v2 |
591 |
- |
592 |
-EAPI="8" |
593 |
- |
594 |
-inherit flag-o-matic libtool perl-functions toolchain-funcs |
595 |
- |
596 |
-if [[ ${PV} == "9999" ]] ; then |
597 |
- EGIT_REPO_URI="https://github.com/ImageMagick/ImageMagick.git" |
598 |
- inherit git-r3 |
599 |
- MY_P="imagemagick-9999" |
600 |
-else |
601 |
- MY_PV="$(ver_rs 3 '-')" |
602 |
- MY_P="ImageMagick-${MY_PV}" |
603 |
- SRC_URI="mirror://imagemagick/${MY_P}.tar.xz" |
604 |
- 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" |
605 |
-fi |
606 |
- |
607 |
-DESCRIPTION="A collection of tools and libraries for many image formats" |
608 |
-HOMEPAGE="https://www.imagemagick.org/" |
609 |
- |
610 |
-LICENSE="imagemagick" |
611 |
-SLOT="0/7.1.0-0" |
612 |
-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" |
613 |
- |
614 |
-REQUIRED_USE="corefonts? ( truetype ) |
615 |
- svg? ( xml ) |
616 |
- test? ( corefonts )" |
617 |
- |
618 |
-RESTRICT="!test? ( test )" |
619 |
- |
620 |
-BDEPEND="virtual/pkgconfig" |
621 |
- |
622 |
-RDEPEND=" |
623 |
- dev-libs/libltdl:0 |
624 |
- bzip2? ( app-arch/bzip2 ) |
625 |
- corefonts? ( media-fonts/corefonts ) |
626 |
- djvu? ( app-text/djvu ) |
627 |
- fftw? ( sci-libs/fftw:3.0 ) |
628 |
- fontconfig? ( media-libs/fontconfig ) |
629 |
- fpx? ( >=media-libs/libfpx-1.3.0-r1 ) |
630 |
- graphviz? ( media-gfx/graphviz ) |
631 |
- heif? ( media-libs/libheif:=[x265] ) |
632 |
- jbig? ( >=media-libs/jbigkit-2:= ) |
633 |
- jpeg? ( virtual/jpeg:0 ) |
634 |
- jpeg2k? ( >=media-libs/openjpeg-2.1.0:2 ) |
635 |
- lcms? ( media-libs/lcms:2= ) |
636 |
- lqr? ( media-libs/liblqr ) |
637 |
- opencl? ( virtual/opencl ) |
638 |
- openexr? ( media-libs/openexr:0= ) |
639 |
- pango? ( x11-libs/pango ) |
640 |
- perl? ( >=dev-lang/perl-5.8.8:0= ) |
641 |
- png? ( media-libs/libpng:0= ) |
642 |
- postscript? ( app-text/ghostscript-gpl ) |
643 |
- raw? ( media-libs/libraw:= ) |
644 |
- svg? ( |
645 |
- gnome-base/librsvg |
646 |
- media-gfx/potrace |
647 |
- ) |
648 |
- tiff? ( media-libs/tiff:0= ) |
649 |
- truetype? ( |
650 |
- media-fonts/urw-fonts |
651 |
- >=media-libs/freetype-2 |
652 |
- ) |
653 |
- webp? ( media-libs/libwebp:0= ) |
654 |
- wmf? ( media-libs/libwmf ) |
655 |
- X? ( |
656 |
- x11-libs/libICE |
657 |
- x11-libs/libSM |
658 |
- x11-libs/libXext |
659 |
- x11-libs/libXt |
660 |
- ) |
661 |
- xml? ( dev-libs/libxml2:= ) |
662 |
- lzma? ( app-arch/xz-utils ) |
663 |
- zip? ( dev-libs/libzip:= ) |
664 |
- zlib? ( sys-libs/zlib:= )" |
665 |
- |
666 |
-DEPEND="${RDEPEND} |
667 |
- !media-gfx/graphicsmagick[imagemagick] |
668 |
- X? ( x11-base/xorg-proto )" |
669 |
- |
670 |
-S="${WORKDIR}/${MY_P}" |
671 |
- |
672 |
-pkg_pretend() { |
673 |
- [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp |
674 |
-} |
675 |
- |
676 |
-pkg_setup() { |
677 |
- [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp |
678 |
-} |
679 |
- |
680 |
-src_prepare() { |
681 |
- default |
682 |
- |
683 |
- # Apply hardening #664236 |
684 |
- cp "${FILESDIR}"/policy-hardening.snippet "${S}" || die |
685 |
- sed -i -e '/^<policymap>$/ { |
686 |
- r policy-hardening.snippet |
687 |
- d |
688 |
- }' \ |
689 |
- config/policy.xml || \ |
690 |
- die "Failed to apply hardening of policy.xml" |
691 |
- einfo "policy.xml hardened" |
692 |
- |
693 |
- elibtoolize # for Darwin modules |
694 |
- |
695 |
- # For testsuite, see https://bugs.gentoo.org/show_bug.cgi?id=500580#c3 |
696 |
- local ati_cards mesa_cards nvidia_cards render_cards |
697 |
- shopt -s nullglob |
698 |
- ati_cards=$(echo -n /dev/ati/card* | sed 's/ /:/g') |
699 |
- if test -n "${ati_cards}"; then |
700 |
- addpredict "${ati_cards}" |
701 |
- fi |
702 |
- mesa_cards=$(echo -n /dev/dri/card* | sed 's/ /:/g') |
703 |
- if test -n "${mesa_cards}"; then |
704 |
- addpredict "${mesa_cards}" |
705 |
- fi |
706 |
- nvidia_cards=$(echo -n /dev/nvidia* | sed 's/ /:/g') |
707 |
- if test -n "${nvidia_cards}"; then |
708 |
- addpredict "${nvidia_cards}" |
709 |
- fi |
710 |
- render_cards=$(echo -n /dev/dri/renderD128* | sed 's/ /:/g') |
711 |
- if test -n "${render_cards}"; then |
712 |
- addpredict "${render_cards}" |
713 |
- fi |
714 |
- shopt -u nullglob |
715 |
- addpredict /dev/nvidiactl |
716 |
-} |
717 |
- |
718 |
-src_configure() { |
719 |
- local depth=16 |
720 |
- use q8 && depth=8 |
721 |
- use q32 && depth=32 |
722 |
- |
723 |
- use perl && perl_check_env |
724 |
- |
725 |
- [[ ${CHOST} == *-solaris* ]] && append-ldflags -lnsl -lsocket |
726 |
- |
727 |
- local myeconfargs=( |
728 |
- $(use_enable static-libs static) |
729 |
- $(use_enable hdri) |
730 |
- $(use_enable opencl) |
731 |
- $(use_enable openmp) |
732 |
- --with-threads |
733 |
- --with-modules |
734 |
- --with-quantum-depth=${depth} |
735 |
- $(use_with cxx magick-plus-plus) |
736 |
- $(use_with perl) |
737 |
- --with-perl-options='INSTALLDIRS=vendor' |
738 |
- --with-gs-font-dir="${EPREFIX}"/usr/share/fonts/urw-fonts |
739 |
- $(use_with bzip2 bzlib) |
740 |
- $(use_with X x) |
741 |
- $(use_with zip) |
742 |
- $(use_with zlib) |
743 |
- --without-autotrace |
744 |
- $(use_with postscript dps) |
745 |
- $(use_with djvu) |
746 |
- --with-dejavu-font-dir="${EPREFIX}"/usr/share/fonts/dejavu |
747 |
- $(use_with fftw) |
748 |
- $(use_with fpx) |
749 |
- $(use_with fontconfig) |
750 |
- $(use_with truetype freetype) |
751 |
- $(use_with postscript gslib) |
752 |
- $(use_with graphviz gvc) |
753 |
- $(use_with heif heic) |
754 |
- $(use_with jbig) |
755 |
- $(use_with jpeg) |
756 |
- $(use_with jpeg2k openjp2) |
757 |
- --without-jxl |
758 |
- $(use_with lcms) |
759 |
- $(use_with lqr) |
760 |
- $(use_with lzma) |
761 |
- $(use_with openexr) |
762 |
- $(use_with pango) |
763 |
- $(use_with png) |
764 |
- $(use_with raw) |
765 |
- $(use_with svg rsvg) |
766 |
- $(use_with tiff) |
767 |
- $(use_with webp) |
768 |
- $(use_with corefonts windows-font-dir "${EPREFIX}"/usr/share/fonts/corefonts) |
769 |
- $(use_with wmf) |
770 |
- $(use_with xml) |
771 |
- --with-gcc-arch=no-automagic |
772 |
- ) |
773 |
- CONFIG_SHELL=$(type -P bash) econf "${myeconfargs[@]}" |
774 |
-} |
775 |
- |
776 |
-src_test() { |
777 |
- # Install default (unrestricted) policy in $HOME for test suite #664238 |
778 |
- local _im_local_config_home="${HOME}/.config/ImageMagick" |
779 |
- mkdir -p "${_im_local_config_home}" || \ |
780 |
- die "Failed to create IM config dir in '${_im_local_config_home}'" |
781 |
- cp "${FILESDIR}"/policy.test.xml "${_im_local_config_home}/policy.xml" || \ |
782 |
- die "Failed to install default blank policy.xml in '${_im_local_config_home}'" |
783 |
- |
784 |
- local im_command= IM_COMMANDS=() |
785 |
- if [[ ${PV} == "9999" ]] ; then |
786 |
- IM_COMMANDS+=( "magick -version" ) # Show version we are using -- cannot verify because of live ebuild |
787 |
- else |
788 |
- IM_COMMANDS+=( "magick -version | grep -q -- \"${MY_PV}\"" ) # Verify that we are using version we just built |
789 |
- fi |
790 |
- IM_COMMANDS+=( "magick -list policy" ) # Verify that policy.xml is used |
791 |
- IM_COMMANDS+=( "emake check" ) # Run tests |
792 |
- |
793 |
- for im_command in "${IM_COMMANDS[@]}"; do |
794 |
- eval "${S}"/magick.sh \ |
795 |
- ${im_command} || \ |
796 |
- die "Failed to run \"${im_command}\"" |
797 |
- done |
798 |
-} |
799 |
- |
800 |
-src_install() { |
801 |
- # Ensure documentation installation files and paths with each release! |
802 |
- emake \ |
803 |
- DESTDIR="${D}" \ |
804 |
- DOCUMENTATION_PATH="${EPREFIX}"/usr/share/doc/${PF}/html \ |
805 |
- install |
806 |
- |
807 |
- rm -f "${ED}"/usr/share/doc/${PF}/html/{ChangeLog,LICENSE,NEWS.txt} |
808 |
- dodoc {AUTHORS,README}.txt ChangeLog |
809 |
- |
810 |
- if use perl; then |
811 |
- find "${ED}" -type f -name perllocal.pod -exec rm -f {} + |
812 |
- find "${ED}" -depth -mindepth 1 -type d -empty -exec rm -rf {} + |
813 |
- fi |
814 |
- |
815 |
- find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} + |
816 |
- # .la files in parent are not needed, keep plugin .la files |
817 |
- find "${ED}"/usr/$(get_libdir)/ -maxdepth 1 -name "*.la" -delete || die |
818 |
- |
819 |
- if use opencl; then |
820 |
- cat <<-EOF > "${T}"/99${PN} |
821 |
- SANDBOX_PREDICT="/dev/nvidiactl:/dev/nvidia-uvm:/dev/ati/card:/dev/dri/card:/dev/dri/card0:/dev/dri/renderD128" |
822 |
- EOF |
823 |
- |
824 |
- insinto /etc/sandbox.d |
825 |
- doins "${T}"/99${PN} #472766 |
826 |
- fi |
827 |
- |
828 |
- insinto /usr/share/${PN} |
829 |
- doins config/*icm |
830 |
-} |
831 |
- |
832 |
-pkg_postinst() { |
833 |
- local _show_policy_xml_notice= |
834 |
- |
835 |
- if [[ -z "${REPLACING_VERSIONS}" ]]; then |
836 |
- # This is a new installation |
837 |
- _show_policy_xml_notice=yes |
838 |
- else |
839 |
- local v |
840 |
- for v in ${REPLACING_VERSIONS}; do |
841 |
- if ! ver_test "${v}" -gt "7.0.8.10-r2"; then |
842 |
- # This is an upgrade |
843 |
- _show_policy_xml_notice=yes |
844 |
- |
845 |
- # Show this elog only once |
846 |
- break |
847 |
- fi |
848 |
- done |
849 |
- fi |
850 |
- |
851 |
- if [[ -n "${_show_policy_xml_notice}" ]]; then |
852 |
- elog "For security reasons, a policy.xml file was installed in /etc/ImageMagick-7" |
853 |
- elog "which will prevent the usage of the following coders by default:" |
854 |
- elog "" |
855 |
- elog " - PS" |
856 |
- elog " - PS2" |
857 |
- elog " - PS3" |
858 |
- elog " - EPS" |
859 |
- elog " - PDF" |
860 |
- elog " - XPS" |
861 |
- fi |
862 |
-} |
863 |
|
864 |
diff --git a/media-gfx/imagemagick/imagemagick-7.1.0.43.ebuild b/media-gfx/imagemagick/imagemagick-7.1.0.43.ebuild |
865 |
deleted file mode 100644 |
866 |
index 45768f836f09..000000000000 |
867 |
--- a/media-gfx/imagemagick/imagemagick-7.1.0.43.ebuild |
868 |
+++ /dev/null |
869 |
@@ -1,278 +0,0 @@ |
870 |
-# Copyright 1999-2022 Gentoo Authors |
871 |
-# Distributed under the terms of the GNU General Public License v2 |
872 |
- |
873 |
-EAPI=8 |
874 |
- |
875 |
-QA_PKGCONFIG_VERSION=$(ver_cut 1-3) |
876 |
-inherit autotools flag-o-matic perl-functions toolchain-funcs |
877 |
- |
878 |
-if [[ ${PV} == 9999 ]] ; then |
879 |
- EGIT_REPO_URI="https://github.com/ImageMagick/ImageMagick.git" |
880 |
- inherit git-r3 |
881 |
- MY_P="imagemagick-9999" |
882 |
-else |
883 |
- MY_PV="$(ver_rs 3 '-')" |
884 |
- MY_P="ImageMagick-${MY_PV}" |
885 |
- SRC_URI="mirror://imagemagick/${MY_P}.tar.xz" |
886 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris" |
887 |
-fi |
888 |
- |
889 |
-S="${WORKDIR}/${MY_P}" |
890 |
- |
891 |
-DESCRIPTION="A collection of tools and libraries for many image formats" |
892 |
-HOMEPAGE="https://www.imagemagick.org/" |
893 |
- |
894 |
-LICENSE="imagemagick" |
895 |
-SLOT="0/7.1.0-43" |
896 |
-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" |
897 |
- |
898 |
-REQUIRED_USE="corefonts? ( truetype ) |
899 |
- svg? ( xml ) |
900 |
- test? ( corefonts )" |
901 |
- |
902 |
-RESTRICT="!test? ( test )" |
903 |
- |
904 |
-RDEPEND=" |
905 |
- !media-gfx/graphicsmagick[imagemagick] |
906 |
- dev-libs/libltdl |
907 |
- bzip2? ( app-arch/bzip2 ) |
908 |
- corefonts? ( media-fonts/corefonts ) |
909 |
- djvu? ( app-text/djvu ) |
910 |
- fftw? ( sci-libs/fftw:3.0 ) |
911 |
- fontconfig? ( media-libs/fontconfig ) |
912 |
- fpx? ( >=media-libs/libfpx-1.3.0-r1 ) |
913 |
- graphviz? ( media-gfx/graphviz ) |
914 |
- heif? ( media-libs/libheif:=[x265] ) |
915 |
- jbig? ( >=media-libs/jbigkit-2:= ) |
916 |
- jpeg? ( media-libs/libjpeg-turbo:= ) |
917 |
- jpeg2k? ( >=media-libs/openjpeg-2.1.0:2 ) |
918 |
- lcms? ( media-libs/lcms:2= ) |
919 |
- lqr? ( media-libs/liblqr ) |
920 |
- opencl? ( virtual/opencl ) |
921 |
- openexr? ( media-libs/openexr:0= ) |
922 |
- pango? ( x11-libs/pango ) |
923 |
- perl? ( >=dev-lang/perl-5.8.8:= ) |
924 |
- png? ( media-libs/libpng:= ) |
925 |
- postscript? ( app-text/ghostscript-gpl ) |
926 |
- raw? ( media-libs/libraw:= ) |
927 |
- svg? ( |
928 |
- gnome-base/librsvg |
929 |
- media-gfx/potrace |
930 |
- ) |
931 |
- tiff? ( media-libs/tiff:= ) |
932 |
- truetype? ( |
933 |
- media-fonts/urw-fonts |
934 |
- >=media-libs/freetype-2 |
935 |
- ) |
936 |
- webp? ( media-libs/libwebp:= ) |
937 |
- wmf? ( media-libs/libwmf ) |
938 |
- X? ( |
939 |
- x11-libs/libICE |
940 |
- x11-libs/libSM |
941 |
- x11-libs/libXext |
942 |
- x11-libs/libXt |
943 |
- ) |
944 |
- xml? ( dev-libs/libxml2 ) |
945 |
- lzma? ( app-arch/xz-utils ) |
946 |
- zip? ( dev-libs/libzip:= ) |
947 |
- zlib? ( sys-libs/zlib:= )" |
948 |
-DEPEND="${RDEPEND} |
949 |
- X? ( x11-base/xorg-proto )" |
950 |
-BDEPEND="virtual/pkgconfig" |
951 |
- |
952 |
-PATCHES=( |
953 |
- "${FILESDIR}/${PN}-9999-nocputuning.patch" |
954 |
-) |
955 |
- |
956 |
-pkg_pretend() { |
957 |
- [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp |
958 |
-} |
959 |
- |
960 |
-pkg_setup() { |
961 |
- [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp |
962 |
-} |
963 |
- |
964 |
-src_prepare() { |
965 |
- default |
966 |
- |
967 |
- #elibtoolize # for Darwin modules |
968 |
- eautoreconf |
969 |
- |
970 |
- # Apply hardening, bug #664236 |
971 |
- cp "${FILESDIR}"/policy-hardening.snippet "${S}" || die |
972 |
- sed -i -e '/^<policymap>$/ { |
973 |
- r policy-hardening.snippet |
974 |
- d |
975 |
- }' \ |
976 |
- config/policy.xml || \ |
977 |
- die "Failed to apply hardening of policy.xml" |
978 |
- einfo "policy.xml hardened" |
979 |
- |
980 |
- # For testsuite, see https://bugs.gentoo.org/show_bug.cgi?id=500580#c3 |
981 |
- local ati_cards mesa_cards nvidia_cards render_cards |
982 |
- shopt -s nullglob |
983 |
- ati_cards=$(echo -n /dev/ati/card* | sed 's/ /:/g') |
984 |
- if test -n "${ati_cards}"; then |
985 |
- addpredict "${ati_cards}" |
986 |
- fi |
987 |
- mesa_cards=$(echo -n /dev/dri/card* | sed 's/ /:/g') |
988 |
- if test -n "${mesa_cards}"; then |
989 |
- addpredict "${mesa_cards}" |
990 |
- fi |
991 |
- nvidia_cards=$(echo -n /dev/nvidia* | sed 's/ /:/g') |
992 |
- if test -n "${nvidia_cards}"; then |
993 |
- addpredict "${nvidia_cards}" |
994 |
- fi |
995 |
- render_cards=$(echo -n /dev/dri/renderD128* | sed 's/ /:/g') |
996 |
- if test -n "${render_cards}"; then |
997 |
- addpredict "${render_cards}" |
998 |
- fi |
999 |
- shopt -u nullglob |
1000 |
- addpredict /dev/nvidiactl |
1001 |
-} |
1002 |
- |
1003 |
-src_configure() { |
1004 |
- local depth=16 |
1005 |
- use q8 && depth=8 |
1006 |
- use q32 && depth=32 |
1007 |
- |
1008 |
- use perl && perl_check_env |
1009 |
- |
1010 |
- [[ ${CHOST} == *-solaris* ]] && append-ldflags -lnsl -lsocket |
1011 |
- |
1012 |
- local myeconfargs=( |
1013 |
- $(use_enable static-libs static) |
1014 |
- $(use_enable hdri) |
1015 |
- $(use_enable opencl) |
1016 |
- $(use_enable openmp) |
1017 |
- --with-threads |
1018 |
- --with-modules |
1019 |
- --with-quantum-depth=${depth} |
1020 |
- $(use_with cxx magick-plus-plus) |
1021 |
- $(use_with perl) |
1022 |
- --with-perl-options='INSTALLDIRS=vendor' |
1023 |
- --with-gs-font-dir="${EPREFIX}"/usr/share/fonts/urw-fonts |
1024 |
- $(use_with bzip2 bzlib) |
1025 |
- $(use_with X x) |
1026 |
- $(use_with zip) |
1027 |
- $(use_with zlib) |
1028 |
- --without-autotrace |
1029 |
- $(use_with postscript dps) |
1030 |
- $(use_with djvu) |
1031 |
- --with-dejavu-font-dir="${EPREFIX}"/usr/share/fonts/dejavu |
1032 |
- $(use_with fftw) |
1033 |
- $(use_with fpx) |
1034 |
- $(use_with fontconfig) |
1035 |
- $(use_with truetype freetype) |
1036 |
- $(use_with postscript gslib) |
1037 |
- $(use_with graphviz gvc) |
1038 |
- $(use_with heif heic) |
1039 |
- $(use_with jbig) |
1040 |
- $(use_with jpeg) |
1041 |
- $(use_with jpeg2k openjp2) |
1042 |
- --without-jxl |
1043 |
- $(use_with lcms) |
1044 |
- $(use_with lqr) |
1045 |
- $(use_with lzma) |
1046 |
- $(use_with openexr) |
1047 |
- $(use_with pango) |
1048 |
- $(use_with png) |
1049 |
- $(use_with raw) |
1050 |
- $(use_with svg rsvg) |
1051 |
- $(use_with tiff) |
1052 |
- $(use_with webp) |
1053 |
- $(use_with corefonts windows-font-dir "${EPREFIX}"/usr/share/fonts/corefonts) |
1054 |
- $(use_with wmf) |
1055 |
- $(use_with xml) |
1056 |
- ) |
1057 |
- |
1058 |
- CONFIG_SHELL="${BROOT}"/bin/bash econf "${myeconfargs[@]}" |
1059 |
-} |
1060 |
- |
1061 |
-src_test() { |
1062 |
- # Install default (unrestricted) policy in $HOME for test suite, bug #664238 |
1063 |
- local _im_local_config_home="${HOME}/.config/ImageMagick" |
1064 |
- mkdir -p "${_im_local_config_home}" || \ |
1065 |
- die "Failed to create IM config dir in '${_im_local_config_home}'" |
1066 |
- cp "${FILESDIR}"/policy.test.xml "${_im_local_config_home}/policy.xml" || \ |
1067 |
- die "Failed to install default blank policy.xml in '${_im_local_config_home}'" |
1068 |
- |
1069 |
- local im_command= IM_COMMANDS=() |
1070 |
- if [[ ${PV} == 9999 ]] ; then |
1071 |
- IM_COMMANDS+=( "magick -version" ) # Show version we are using -- cannot verify because of live ebuild |
1072 |
- else |
1073 |
- IM_COMMANDS+=( "magick -version | grep -q -- \"${MY_PV}\"" ) # Verify that we are using version we just built |
1074 |
- fi |
1075 |
- IM_COMMANDS+=( "magick -list policy" ) # Verify that policy.xml is used |
1076 |
- IM_COMMANDS+=( "emake check" ) # Run tests |
1077 |
- |
1078 |
- for im_command in "${IM_COMMANDS[@]}"; do |
1079 |
- eval "${S}"/magick.sh \ |
1080 |
- ${im_command} || \ |
1081 |
- die "Failed to run \"${im_command}\"" |
1082 |
- done |
1083 |
-} |
1084 |
- |
1085 |
-src_install() { |
1086 |
- # Ensure documentation installation files and paths with each release! |
1087 |
- emake \ |
1088 |
- DESTDIR="${D}" \ |
1089 |
- DOCUMENTATION_PATH="${EPREFIX}"/usr/share/doc/${PF}/html \ |
1090 |
- install |
1091 |
- |
1092 |
- rm -f "${ED}"/usr/share/doc/${PF}/html/{ChangeLog,LICENSE,NEWS.txt} |
1093 |
- dodoc {AUTHORS,README}.txt |
1094 |
- |
1095 |
- if use perl; then |
1096 |
- find "${ED}" -type f -name perllocal.pod -exec rm -f {} + |
1097 |
- find "${ED}" -depth -mindepth 1 -type d -empty -exec rm -rf {} + |
1098 |
- fi |
1099 |
- |
1100 |
- find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} + |
1101 |
- # .la files in parent are not needed, keep plugin .la files |
1102 |
- find "${ED}"/usr/$(get_libdir)/ -maxdepth 1 -name "*.la" -delete || die |
1103 |
- |
1104 |
- if use opencl; then |
1105 |
- cat <<-EOF > "${T}"/99${PN} |
1106 |
- SANDBOX_PREDICT="/dev/nvidiactl:/dev/nvidia-uvm:/dev/ati/card:/dev/dri/card:/dev/dri/card0:/dev/dri/renderD128" |
1107 |
- EOF |
1108 |
- |
1109 |
- insinto /etc/sandbox.d |
1110 |
- doins "${T}"/99${PN} #472766 |
1111 |
- fi |
1112 |
- |
1113 |
- insinto /usr/share/${PN} |
1114 |
- doins config/*icm |
1115 |
-} |
1116 |
- |
1117 |
-pkg_postinst() { |
1118 |
- local _show_policy_xml_notice= |
1119 |
- |
1120 |
- if [[ -z "${REPLACING_VERSIONS}" ]]; then |
1121 |
- # This is a new installation |
1122 |
- _show_policy_xml_notice=yes |
1123 |
- else |
1124 |
- local v |
1125 |
- for v in ${REPLACING_VERSIONS}; do |
1126 |
- if ! ver_test "${v}" -gt "7.0.8.10-r2"; then |
1127 |
- # This is an upgrade |
1128 |
- _show_policy_xml_notice=yes |
1129 |
- |
1130 |
- # Show this elog only once |
1131 |
- break |
1132 |
- fi |
1133 |
- done |
1134 |
- fi |
1135 |
- |
1136 |
- if [[ -n "${_show_policy_xml_notice}" ]]; then |
1137 |
- elog "For security reasons, a policy.xml file was installed in /etc/ImageMagick-7" |
1138 |
- elog "which will prevent the usage of the following coders by default:" |
1139 |
- elog "" |
1140 |
- elog " - PS" |
1141 |
- elog " - PS2" |
1142 |
- elog " - PS3" |
1143 |
- elog " - EPS" |
1144 |
- elog " - PDF" |
1145 |
- elog " - XPS" |
1146 |
- fi |
1147 |
-} |