1 |
commit: e7a8a9feea17d849367854534a25ce2f8c1f5d33 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Apr 1 20:37:19 2019 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Apr 1 20:37:39 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7a8a9fe |
7 |
|
8 |
media-gfx/imagemagick: security cleanup |
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 | 6 - |
14 |
media-gfx/imagemagick/imagemagick-6.9.10.28.ebuild | 248 -------------------- |
15 |
media-gfx/imagemagick/imagemagick-6.9.10.30.ebuild | 248 -------------------- |
16 |
media-gfx/imagemagick/imagemagick-6.9.10.33.ebuild | 248 -------------------- |
17 |
media-gfx/imagemagick/imagemagick-7.0.8.28.ebuild | 256 --------------------- |
18 |
media-gfx/imagemagick/imagemagick-7.0.8.30.ebuild | 256 --------------------- |
19 |
media-gfx/imagemagick/imagemagick-7.0.8.33.ebuild | 256 --------------------- |
20 |
7 files changed, 1518 deletions(-) |
21 |
|
22 |
diff --git a/media-gfx/imagemagick/Manifest b/media-gfx/imagemagick/Manifest |
23 |
index d1c0252096b..1fb9c90fa54 100644 |
24 |
--- a/media-gfx/imagemagick/Manifest |
25 |
+++ b/media-gfx/imagemagick/Manifest |
26 |
@@ -1,8 +1,2 @@ |
27 |
-DIST ImageMagick-6.9.10-28.tar.xz 8937428 BLAKE2B 240e39d6ffa702227abb645fdd2bfc7dab6fbe39727fdd77d84eb43e3788014a8df7369e024063b25000e7e0d0cd17ac2931f5eeeb3ac8049a3013ab5d10108d SHA512 300632f540ec533ec981d8173135b33422b9d53d4d5fa5d619463030749d3822a74dee14ab0e076187dff6b589857fa72cb5a28418b81348f9ed493a3c8d3a5e |
28 |
-DIST ImageMagick-6.9.10-30.tar.xz 8948384 BLAKE2B 6f372f1c29e8e3939d95a1d3dadefa2f1911cbf19a929e39ddffdb3d7caa31330ee8ad277a147a54012815b76e1e205141d6b329689d3adf7aa0690f84496d58 SHA512 00d5e11569f4ba59a9c4aa4fae44d87f1ca3e0efe3df5a870c1e5ffc000e75c55cdd2fc0ba760d1401e28903b6a809e678e90c900421893fcd06e5078dfdbfeb |
29 |
-DIST ImageMagick-6.9.10-33.tar.xz 8935040 BLAKE2B 042410c49229d218b1ae36db96317da12b578581dbe2689749fe6331d1dfa1683d6182dda502429365af8bb86407195cc5107c5a0b454391c38a387bde967de3 SHA512 bdcc23de644ccf8150969849b6cec36f2c987b46588cd8717ae73ffe14aba2d262e4449e9f3a3bd6a9444e7a724f89c7f9a13dcb5ca11459ef97e07f25f1c014 |
30 |
DIST ImageMagick-6.9.10-36.tar.xz 8938664 BLAKE2B 0791f4234eace5e338d0016c74cd69b7eab07cc2829b0e2ae69e53af6f02bd0ff17b9cf15b81af061fc5b7f1d23faa9f6c54bbd1829198ab64464d76838e9161 SHA512 0c85648d39b741d693acb4d98a28e67a271447c0406a064852806b693c777a2069c5b39120a39d1fc0a73533a8edc4a13f6be7643b3b9f6a287884ca3265d834 |
31 |
-DIST ImageMagick-7.0.8-28.tar.xz 9432232 BLAKE2B 0754f0d0a2327dbeb76da12f8686a7a3b19fe18b1ef07eb7ddb4367eb3b0d9b61c35b6ccf869b78b32a9bb77f1dbfc02ba33bbf6d2b266310a3ee9c6dc15d1ce SHA512 4014beb2f743e46d725b3f22985f87f42adffbe23152fb19bc0d55647260e4a15f560c2ba68c7db5ce9c931665220ba5ccd01abce8d38a5d57724f35de8904cd |
32 |
-DIST ImageMagick-7.0.8-30.tar.xz 9439136 BLAKE2B f8396d4301b002bf5409a27e5918e75422a0c4b0986f6fad80af0b490567c126ce3e80a2496fa247e6f5a8dc16fd9164e3e8c69be689bdbec0666dbc3ea860ef SHA512 eb0c8fe7c4b55409240f7df3f75d6fc803952184c6c511b7e57198073a5ab60b6c1e6ae399c8c3e636b7e2a41784de86aa47e0f3019c2d3bbc81edeb552dfebb |
33 |
-DIST ImageMagick-7.0.8-33.tar.xz 9447692 BLAKE2B 1773fd0e9d51bd296548a6fc8170d818d7950a37b56554a8d5159e3beaee2b412d29243827172f94d2c244e851a6683a3393c3b36212764c56f4ad0acb17e4d2 SHA512 7dab0e9c3c7e72944c7ccfefbe67249fd513b6c122c7061de3c12a9dbc5deb18531f3cfc79f5286494c6fb54b6cefcc6643d56a171406f6a70ab12e9d644170a |
34 |
DIST ImageMagick-7.0.8-36.tar.xz 9445340 BLAKE2B 146c2c19dd4b61f2bc7080063bfc04766ecb6fdc54028319a41d2ac4de0c6786d60f434f11cdcf8886b9d2c968ade5119f3ca68a8693273ab38d81c86052484d SHA512 d32ccdfac7d410c6d83009d9d97d1a4e0195d5618fc95530424f43c86f369541d36b3fa53eee7f8872a84bb8e5164387aa731d452c2d9e0c8f872406c4044fb8 |
35 |
|
36 |
diff --git a/media-gfx/imagemagick/imagemagick-6.9.10.28.ebuild b/media-gfx/imagemagick/imagemagick-6.9.10.28.ebuild |
37 |
deleted file mode 100644 |
38 |
index b6bca9ea8b2..00000000000 |
39 |
--- a/media-gfx/imagemagick/imagemagick-6.9.10.28.ebuild |
40 |
+++ /dev/null |
41 |
@@ -1,248 +0,0 @@ |
42 |
-# Copyright 1999-2019 Gentoo Authors |
43 |
-# Distributed under the terms of the GNU General Public License v2 |
44 |
- |
45 |
-EAPI="6" |
46 |
- |
47 |
-inherit eapi7-ver eutils flag-o-matic libtool perl-functions toolchain-funcs multilib |
48 |
- |
49 |
-MY_PV="$(ver_rs 3 '-')" |
50 |
-MY_P="ImageMagick-${MY_PV}" |
51 |
- |
52 |
-DESCRIPTION="A collection of tools and libraries for many image formats" |
53 |
-HOMEPAGE="https://www.imagemagick.org/" |
54 |
-SRC_URI="mirror://${PN}/${MY_P}.tar.xz" |
55 |
- |
56 |
-LICENSE="imagemagick" |
57 |
-SLOT="0/${PV}" |
58 |
-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" |
59 |
-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" |
60 |
- |
61 |
-RESTRICT="perl? ( userpriv )" |
62 |
- |
63 |
-RDEPEND=" |
64 |
- dev-libs/libltdl:0 |
65 |
- bzip2? ( app-arch/bzip2 ) |
66 |
- corefonts? ( media-fonts/corefonts ) |
67 |
- djvu? ( app-text/djvu ) |
68 |
- fftw? ( sci-libs/fftw:3.0 ) |
69 |
- fontconfig? ( media-libs/fontconfig ) |
70 |
- fpx? ( >=media-libs/libfpx-1.3.0-r1 ) |
71 |
- graphviz? ( media-gfx/graphviz ) |
72 |
- heif? ( media-libs/libheif:= ) |
73 |
- jbig? ( >=media-libs/jbigkit-2:= ) |
74 |
- jpeg? ( virtual/jpeg:0 ) |
75 |
- jpeg2k? ( >=media-libs/openjpeg-2.1.0:2 ) |
76 |
- lcms? ( media-libs/lcms:2= ) |
77 |
- lqr? ( media-libs/liblqr ) |
78 |
- opencl? ( virtual/opencl ) |
79 |
- openexr? ( media-libs/openexr:0= ) |
80 |
- pango? ( x11-libs/pango ) |
81 |
- perl? ( >=dev-lang/perl-5.8.8:0= ) |
82 |
- png? ( media-libs/libpng:0= ) |
83 |
- postscript? ( app-text/ghostscript-gpl ) |
84 |
- raw? ( media-libs/libraw:= ) |
85 |
- svg? ( gnome-base/librsvg ) |
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 |
-REQUIRED_USE="corefonts? ( truetype ) |
108 |
- test? ( corefonts )" |
109 |
- |
110 |
-S="${WORKDIR}/${MY_P}" |
111 |
- |
112 |
-src_prepare() { |
113 |
- default |
114 |
- |
115 |
- # Apply hardening #664236 |
116 |
- cp "${FILESDIR}"/policy-hardening.snippet "${S}" || die |
117 |
- sed -i -e '/^<policymap>$/ { |
118 |
- r policy-hardening.snippet |
119 |
- d |
120 |
- }' \ |
121 |
- config/policy.xml || \ |
122 |
- die "Failed to apply hardening of policy.xml" |
123 |
- einfo "policy.xml hardened" |
124 |
- |
125 |
- elibtoolize # for Darwin modules |
126 |
- |
127 |
- # For testsuite, see https://bugs.gentoo.org/show_bug.cgi?id=500580#c3 |
128 |
- local mesa_cards ati_cards nvidia_cards render_cards |
129 |
- shopt -s nullglob |
130 |
- ati_cards=$(echo -n /dev/ati/card* | sed 's/ /:/g') |
131 |
- if test -n "${ati_cards}"; then |
132 |
- addpredict "${ati_cards}" |
133 |
- fi |
134 |
- mesa_cards=$(echo -n /dev/dri/card* | sed 's/ /:/g') |
135 |
- if test -n "${mesa_cards}"; then |
136 |
- addpredict "${mesa_cards}" |
137 |
- fi |
138 |
- nvidia_cards=$(echo -n /dev/nvidia** | sed 's/ /:/g') |
139 |
- if test -n "${nvidia_cards}"; then |
140 |
- addpredict "${nvidia_cards}" |
141 |
- fi |
142 |
- render_cards=$(echo -n /dev/dri/renderD128* | sed 's/ /:/g') |
143 |
- if test -n "${render_cards}"; then |
144 |
- addpredict "${render_cards}" |
145 |
- fi |
146 |
- shopt -u nullglob |
147 |
- addpredict /dev/nvidiactl |
148 |
-} |
149 |
- |
150 |
-src_configure() { |
151 |
- local depth=16 |
152 |
- use q8 && depth=8 |
153 |
- use q32 && depth=32 |
154 |
- |
155 |
- local openmp=disable |
156 |
- use openmp && { tc-has-openmp && openmp=enable; } |
157 |
- |
158 |
- use perl && perl_check_env |
159 |
- |
160 |
- [[ ${CHOST} == *-solaris* ]] && append-ldflags -lnsl -lsocket |
161 |
- |
162 |
- local myeconfargs=( |
163 |
- $(use_enable static-libs static) |
164 |
- $(use_enable hdri) |
165 |
- $(use_enable opencl) |
166 |
- --with-threads |
167 |
- --with-modules |
168 |
- --with-quantum-depth=${depth} |
169 |
- $(use_with cxx magick-plus-plus) |
170 |
- $(use_with perl) |
171 |
- --with-perl-options='INSTALLDIRS=vendor' |
172 |
- --with-gs-font-dir="${EPREFIX}"/usr/share/fonts/urw-fonts |
173 |
- $(use_with bzip2 bzlib) |
174 |
- $(use_with X x) |
175 |
- $(use_with zlib) |
176 |
- --without-autotrace |
177 |
- $(use_with postscript dps) |
178 |
- $(use_with djvu) |
179 |
- --with-dejavu-font-dir="${EPREFIX}"/usr/share/fonts/dejavu |
180 |
- $(use_with fftw) |
181 |
- $(use_with fpx) |
182 |
- $(use_with fontconfig) |
183 |
- $(use_with truetype freetype) |
184 |
- $(use_with postscript gslib) |
185 |
- $(use_with graphviz gvc) |
186 |
- $(use_with heif heic) |
187 |
- $(use_with jbig) |
188 |
- $(use_with jpeg) |
189 |
- $(use_with jpeg2k openjp2) |
190 |
- $(use_with lcms) |
191 |
- $(use_with lqr) |
192 |
- $(use_with lzma) |
193 |
- $(use_with openexr) |
194 |
- $(use_with pango) |
195 |
- $(use_with png) |
196 |
- $(use_with raw) |
197 |
- $(use_with svg rsvg) |
198 |
- $(use_with tiff) |
199 |
- $(use_with webp) |
200 |
- $(use_with corefonts windows-font-dir "${EPREFIX}"/usr/share/fonts/corefonts) |
201 |
- $(use_with wmf) |
202 |
- $(use_with xml) |
203 |
- --${openmp}-openmp |
204 |
- --with-gcc-arch=no-automagic |
205 |
- ) |
206 |
- CONFIG_SHELL=$(type -P bash) econf "${myeconfargs[@]}" |
207 |
-} |
208 |
- |
209 |
-src_test() { |
210 |
- # Install default (unrestricted) policy in $HOME for test suite #664238 |
211 |
- local _im_local_config_home="${HOME}/.config/ImageMagick" |
212 |
- mkdir -p "${_im_local_config_home}" || \ |
213 |
- die "Failed to create IM config dir in '${_im_local_config_home}'" |
214 |
- cp "${FILESDIR}"/policy.test.xml "${_im_local_config_home}/policy.xml" || \ |
215 |
- die "Failed to install default blank policy.xml in '${_im_local_config_home}'" |
216 |
- |
217 |
- local im_command= IM_COMMANDS=() |
218 |
- IM_COMMANDS+=( "identify -version | grep -q -- \"${MY_PV}\"" ) # Verify that we are using version we just built |
219 |
- IM_COMMANDS+=( "identify -list policy" ) # Verify that policy.xml is used |
220 |
- IM_COMMANDS+=( "emake check" ) # Run tests |
221 |
- |
222 |
- for im_command in "${IM_COMMANDS[@]}"; do |
223 |
- eval "${S}"/magick.sh \ |
224 |
- ${im_command} || \ |
225 |
- die "Failed to run \"${im_command}\"" |
226 |
- done |
227 |
-} |
228 |
- |
229 |
-src_install() { |
230 |
- # Ensure documentation installation files and paths with each release! |
231 |
- emake \ |
232 |
- DESTDIR="${D}" \ |
233 |
- DOCUMENTATION_PATH="${EPREFIX}"/usr/share/doc/${PF}/html \ |
234 |
- install |
235 |
- |
236 |
- rm -f "${ED%/}"/usr/share/doc/${PF}/html/{ChangeLog,LICENSE,NEWS.txt} |
237 |
- dodoc {AUTHORS,README}.txt ChangeLog |
238 |
- |
239 |
- if use perl; then |
240 |
- find "${ED}" -type f -name perllocal.pod -exec rm -f {} + |
241 |
- find "${ED}" -depth -mindepth 1 -type d -empty -exec rm -rf {} + |
242 |
- fi |
243 |
- |
244 |
- find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} + |
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/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-6.9.10.30.ebuild b/media-gfx/imagemagick/imagemagick-6.9.10.30.ebuild |
292 |
deleted file mode 100644 |
293 |
index b09291336cc..00000000000 |
294 |
--- a/media-gfx/imagemagick/imagemagick-6.9.10.30.ebuild |
295 |
+++ /dev/null |
296 |
@@ -1,248 +0,0 @@ |
297 |
-# Copyright 1999-2019 Gentoo Authors |
298 |
-# Distributed under the terms of the GNU General Public License v2 |
299 |
- |
300 |
-EAPI="6" |
301 |
- |
302 |
-inherit eapi7-ver eutils flag-o-matic libtool perl-functions toolchain-funcs multilib |
303 |
- |
304 |
-MY_PV="$(ver_rs 3 '-')" |
305 |
-MY_P="ImageMagick-${MY_PV}" |
306 |
- |
307 |
-DESCRIPTION="A collection of tools and libraries for many image formats" |
308 |
-HOMEPAGE="https://www.imagemagick.org/" |
309 |
-SRC_URI="mirror://${PN}/${MY_P}.tar.xz" |
310 |
- |
311 |
-LICENSE="imagemagick" |
312 |
-SLOT="0/${PV}" |
313 |
-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" |
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 |
-RESTRICT="perl? ( userpriv )" |
317 |
- |
318 |
-RDEPEND=" |
319 |
- dev-libs/libltdl:0 |
320 |
- bzip2? ( app-arch/bzip2 ) |
321 |
- corefonts? ( media-fonts/corefonts ) |
322 |
- djvu? ( app-text/djvu ) |
323 |
- fftw? ( sci-libs/fftw:3.0 ) |
324 |
- fontconfig? ( media-libs/fontconfig ) |
325 |
- fpx? ( >=media-libs/libfpx-1.3.0-r1 ) |
326 |
- graphviz? ( media-gfx/graphviz ) |
327 |
- heif? ( media-libs/libheif:= ) |
328 |
- jbig? ( >=media-libs/jbigkit-2:= ) |
329 |
- jpeg? ( virtual/jpeg:0 ) |
330 |
- jpeg2k? ( >=media-libs/openjpeg-2.1.0:2 ) |
331 |
- lcms? ( media-libs/lcms:2= ) |
332 |
- lqr? ( media-libs/liblqr ) |
333 |
- opencl? ( virtual/opencl ) |
334 |
- openexr? ( media-libs/openexr:0= ) |
335 |
- pango? ( x11-libs/pango ) |
336 |
- perl? ( >=dev-lang/perl-5.8.8:0= ) |
337 |
- png? ( media-libs/libpng:0= ) |
338 |
- postscript? ( app-text/ghostscript-gpl ) |
339 |
- raw? ( media-libs/libraw:= ) |
340 |
- svg? ( gnome-base/librsvg ) |
341 |
- tiff? ( media-libs/tiff:0= ) |
342 |
- truetype? ( |
343 |
- media-fonts/urw-fonts |
344 |
- >=media-libs/freetype-2 |
345 |
- ) |
346 |
- webp? ( media-libs/libwebp:0= ) |
347 |
- wmf? ( media-libs/libwmf ) |
348 |
- X? ( |
349 |
- x11-libs/libICE |
350 |
- x11-libs/libSM |
351 |
- x11-libs/libXext |
352 |
- x11-libs/libXt |
353 |
- ) |
354 |
- xml? ( dev-libs/libxml2:= ) |
355 |
- lzma? ( app-arch/xz-utils ) |
356 |
- zlib? ( sys-libs/zlib:= )" |
357 |
-DEPEND="${RDEPEND} |
358 |
- !media-gfx/graphicsmagick[imagemagick] |
359 |
- virtual/pkgconfig |
360 |
- X? ( x11-base/xorg-proto )" |
361 |
- |
362 |
-REQUIRED_USE="corefonts? ( truetype ) |
363 |
- test? ( corefonts )" |
364 |
- |
365 |
-S="${WORKDIR}/${MY_P}" |
366 |
- |
367 |
-src_prepare() { |
368 |
- default |
369 |
- |
370 |
- # Apply hardening #664236 |
371 |
- cp "${FILESDIR}"/policy-hardening.snippet "${S}" || die |
372 |
- sed -i -e '/^<policymap>$/ { |
373 |
- r policy-hardening.snippet |
374 |
- d |
375 |
- }' \ |
376 |
- config/policy.xml || \ |
377 |
- die "Failed to apply hardening of policy.xml" |
378 |
- einfo "policy.xml hardened" |
379 |
- |
380 |
- elibtoolize # for Darwin modules |
381 |
- |
382 |
- # For testsuite, see https://bugs.gentoo.org/show_bug.cgi?id=500580#c3 |
383 |
- local mesa_cards ati_cards nvidia_cards render_cards |
384 |
- shopt -s nullglob |
385 |
- ati_cards=$(echo -n /dev/ati/card* | sed 's/ /:/g') |
386 |
- if test -n "${ati_cards}"; then |
387 |
- addpredict "${ati_cards}" |
388 |
- fi |
389 |
- mesa_cards=$(echo -n /dev/dri/card* | sed 's/ /:/g') |
390 |
- if test -n "${mesa_cards}"; then |
391 |
- addpredict "${mesa_cards}" |
392 |
- fi |
393 |
- nvidia_cards=$(echo -n /dev/nvidia** | sed 's/ /:/g') |
394 |
- if test -n "${nvidia_cards}"; then |
395 |
- addpredict "${nvidia_cards}" |
396 |
- fi |
397 |
- render_cards=$(echo -n /dev/dri/renderD128* | sed 's/ /:/g') |
398 |
- if test -n "${render_cards}"; then |
399 |
- addpredict "${render_cards}" |
400 |
- fi |
401 |
- shopt -u nullglob |
402 |
- addpredict /dev/nvidiactl |
403 |
-} |
404 |
- |
405 |
-src_configure() { |
406 |
- local depth=16 |
407 |
- use q8 && depth=8 |
408 |
- use q32 && depth=32 |
409 |
- |
410 |
- local openmp=disable |
411 |
- use openmp && { tc-has-openmp && openmp=enable; } |
412 |
- |
413 |
- use perl && perl_check_env |
414 |
- |
415 |
- [[ ${CHOST} == *-solaris* ]] && append-ldflags -lnsl -lsocket |
416 |
- |
417 |
- local myeconfargs=( |
418 |
- $(use_enable static-libs static) |
419 |
- $(use_enable hdri) |
420 |
- $(use_enable opencl) |
421 |
- --with-threads |
422 |
- --with-modules |
423 |
- --with-quantum-depth=${depth} |
424 |
- $(use_with cxx magick-plus-plus) |
425 |
- $(use_with perl) |
426 |
- --with-perl-options='INSTALLDIRS=vendor' |
427 |
- --with-gs-font-dir="${EPREFIX}"/usr/share/fonts/urw-fonts |
428 |
- $(use_with bzip2 bzlib) |
429 |
- $(use_with X x) |
430 |
- $(use_with zlib) |
431 |
- --without-autotrace |
432 |
- $(use_with postscript dps) |
433 |
- $(use_with djvu) |
434 |
- --with-dejavu-font-dir="${EPREFIX}"/usr/share/fonts/dejavu |
435 |
- $(use_with fftw) |
436 |
- $(use_with fpx) |
437 |
- $(use_with fontconfig) |
438 |
- $(use_with truetype freetype) |
439 |
- $(use_with postscript gslib) |
440 |
- $(use_with graphviz gvc) |
441 |
- $(use_with heif heic) |
442 |
- $(use_with jbig) |
443 |
- $(use_with jpeg) |
444 |
- $(use_with jpeg2k openjp2) |
445 |
- $(use_with lcms) |
446 |
- $(use_with lqr) |
447 |
- $(use_with lzma) |
448 |
- $(use_with openexr) |
449 |
- $(use_with pango) |
450 |
- $(use_with png) |
451 |
- $(use_with raw) |
452 |
- $(use_with svg rsvg) |
453 |
- $(use_with tiff) |
454 |
- $(use_with webp) |
455 |
- $(use_with corefonts windows-font-dir "${EPREFIX}"/usr/share/fonts/corefonts) |
456 |
- $(use_with wmf) |
457 |
- $(use_with xml) |
458 |
- --${openmp}-openmp |
459 |
- --with-gcc-arch=no-automagic |
460 |
- ) |
461 |
- CONFIG_SHELL=$(type -P bash) econf "${myeconfargs[@]}" |
462 |
-} |
463 |
- |
464 |
-src_test() { |
465 |
- # Install default (unrestricted) policy in $HOME for test suite #664238 |
466 |
- local _im_local_config_home="${HOME}/.config/ImageMagick" |
467 |
- mkdir -p "${_im_local_config_home}" || \ |
468 |
- die "Failed to create IM config dir in '${_im_local_config_home}'" |
469 |
- cp "${FILESDIR}"/policy.test.xml "${_im_local_config_home}/policy.xml" || \ |
470 |
- die "Failed to install default blank policy.xml in '${_im_local_config_home}'" |
471 |
- |
472 |
- local im_command= IM_COMMANDS=() |
473 |
- IM_COMMANDS+=( "identify -version | grep -q -- \"${MY_PV}\"" ) # Verify that we are using version we just built |
474 |
- IM_COMMANDS+=( "identify -list policy" ) # Verify that policy.xml is used |
475 |
- IM_COMMANDS+=( "emake check" ) # Run tests |
476 |
- |
477 |
- for im_command in "${IM_COMMANDS[@]}"; do |
478 |
- eval "${S}"/magick.sh \ |
479 |
- ${im_command} || \ |
480 |
- die "Failed to run \"${im_command}\"" |
481 |
- done |
482 |
-} |
483 |
- |
484 |
-src_install() { |
485 |
- # Ensure documentation installation files and paths with each release! |
486 |
- emake \ |
487 |
- DESTDIR="${D}" \ |
488 |
- DOCUMENTATION_PATH="${EPREFIX}"/usr/share/doc/${PF}/html \ |
489 |
- install |
490 |
- |
491 |
- rm -f "${ED%/}"/usr/share/doc/${PF}/html/{ChangeLog,LICENSE,NEWS.txt} |
492 |
- dodoc {AUTHORS,README}.txt ChangeLog |
493 |
- |
494 |
- if use perl; then |
495 |
- find "${ED}" -type f -name perllocal.pod -exec rm -f {} + |
496 |
- find "${ED}" -depth -mindepth 1 -type d -empty -exec rm -rf {} + |
497 |
- fi |
498 |
- |
499 |
- find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} + |
500 |
- |
501 |
- if use opencl; then |
502 |
- cat <<-EOF > "${T}"/99${PN} |
503 |
- SANDBOX_PREDICT="/dev/nvidiactl:/dev/nvidia-uvm:/dev/ati/card:/dev/dri/card:/dev/dri/renderD128" |
504 |
- EOF |
505 |
- |
506 |
- insinto /etc/sandbox.d |
507 |
- doins "${T}"/99${PN} #472766 |
508 |
- fi |
509 |
- |
510 |
- insinto /usr/share/${PN} |
511 |
- doins config/*icm |
512 |
-} |
513 |
- |
514 |
-pkg_postinst() { |
515 |
- local _show_policy_xml_notice= |
516 |
- |
517 |
- if [[ -z "${REPLACING_VERSIONS}" ]]; then |
518 |
- # This is a new installation |
519 |
- _show_policy_xml_notice=yes |
520 |
- else |
521 |
- local v |
522 |
- for v in ${REPLACING_VERSIONS}; do |
523 |
- if ! ver_test "${v}" -gt "6.9.10.10-r2"; then |
524 |
- # This is an upgrade |
525 |
- _show_policy_xml_notice=yes |
526 |
- |
527 |
- # Show this elog only once |
528 |
- break |
529 |
- fi |
530 |
- done |
531 |
- fi |
532 |
- |
533 |
- if [[ -n "${_show_policy_xml_notice}" ]]; then |
534 |
- elog "For security reasons, a policy.xml file was installed in /etc/ImageMagick-6" |
535 |
- elog "which will prevent the usage of the following coders by default:" |
536 |
- elog "" |
537 |
- elog " - PS" |
538 |
- elog " - PS2" |
539 |
- elog " - PS3" |
540 |
- elog " - EPS" |
541 |
- elog " - PDF" |
542 |
- elog " - XPS" |
543 |
- fi |
544 |
-} |
545 |
|
546 |
diff --git a/media-gfx/imagemagick/imagemagick-6.9.10.33.ebuild b/media-gfx/imagemagick/imagemagick-6.9.10.33.ebuild |
547 |
deleted file mode 100644 |
548 |
index b09291336cc..00000000000 |
549 |
--- a/media-gfx/imagemagick/imagemagick-6.9.10.33.ebuild |
550 |
+++ /dev/null |
551 |
@@ -1,248 +0,0 @@ |
552 |
-# Copyright 1999-2019 Gentoo Authors |
553 |
-# Distributed under the terms of the GNU General Public License v2 |
554 |
- |
555 |
-EAPI="6" |
556 |
- |
557 |
-inherit eapi7-ver eutils flag-o-matic libtool perl-functions toolchain-funcs multilib |
558 |
- |
559 |
-MY_PV="$(ver_rs 3 '-')" |
560 |
-MY_P="ImageMagick-${MY_PV}" |
561 |
- |
562 |
-DESCRIPTION="A collection of tools and libraries for many image formats" |
563 |
-HOMEPAGE="https://www.imagemagick.org/" |
564 |
-SRC_URI="mirror://${PN}/${MY_P}.tar.xz" |
565 |
- |
566 |
-LICENSE="imagemagick" |
567 |
-SLOT="0/${PV}" |
568 |
-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" |
569 |
-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" |
570 |
- |
571 |
-RESTRICT="perl? ( userpriv )" |
572 |
- |
573 |
-RDEPEND=" |
574 |
- dev-libs/libltdl:0 |
575 |
- bzip2? ( app-arch/bzip2 ) |
576 |
- corefonts? ( media-fonts/corefonts ) |
577 |
- djvu? ( app-text/djvu ) |
578 |
- fftw? ( sci-libs/fftw:3.0 ) |
579 |
- fontconfig? ( media-libs/fontconfig ) |
580 |
- fpx? ( >=media-libs/libfpx-1.3.0-r1 ) |
581 |
- graphviz? ( media-gfx/graphviz ) |
582 |
- heif? ( media-libs/libheif:= ) |
583 |
- jbig? ( >=media-libs/jbigkit-2:= ) |
584 |
- jpeg? ( virtual/jpeg:0 ) |
585 |
- jpeg2k? ( >=media-libs/openjpeg-2.1.0:2 ) |
586 |
- lcms? ( media-libs/lcms:2= ) |
587 |
- lqr? ( media-libs/liblqr ) |
588 |
- opencl? ( virtual/opencl ) |
589 |
- openexr? ( media-libs/openexr:0= ) |
590 |
- pango? ( x11-libs/pango ) |
591 |
- perl? ( >=dev-lang/perl-5.8.8:0= ) |
592 |
- png? ( media-libs/libpng:0= ) |
593 |
- postscript? ( app-text/ghostscript-gpl ) |
594 |
- raw? ( media-libs/libraw:= ) |
595 |
- svg? ( gnome-base/librsvg ) |
596 |
- tiff? ( media-libs/tiff:0= ) |
597 |
- truetype? ( |
598 |
- media-fonts/urw-fonts |
599 |
- >=media-libs/freetype-2 |
600 |
- ) |
601 |
- webp? ( media-libs/libwebp:0= ) |
602 |
- wmf? ( media-libs/libwmf ) |
603 |
- X? ( |
604 |
- x11-libs/libICE |
605 |
- x11-libs/libSM |
606 |
- x11-libs/libXext |
607 |
- x11-libs/libXt |
608 |
- ) |
609 |
- xml? ( dev-libs/libxml2:= ) |
610 |
- lzma? ( app-arch/xz-utils ) |
611 |
- zlib? ( sys-libs/zlib:= )" |
612 |
-DEPEND="${RDEPEND} |
613 |
- !media-gfx/graphicsmagick[imagemagick] |
614 |
- virtual/pkgconfig |
615 |
- X? ( x11-base/xorg-proto )" |
616 |
- |
617 |
-REQUIRED_USE="corefonts? ( truetype ) |
618 |
- test? ( corefonts )" |
619 |
- |
620 |
-S="${WORKDIR}/${MY_P}" |
621 |
- |
622 |
-src_prepare() { |
623 |
- default |
624 |
- |
625 |
- # Apply hardening #664236 |
626 |
- cp "${FILESDIR}"/policy-hardening.snippet "${S}" || die |
627 |
- sed -i -e '/^<policymap>$/ { |
628 |
- r policy-hardening.snippet |
629 |
- d |
630 |
- }' \ |
631 |
- config/policy.xml || \ |
632 |
- die "Failed to apply hardening of policy.xml" |
633 |
- einfo "policy.xml hardened" |
634 |
- |
635 |
- elibtoolize # for Darwin modules |
636 |
- |
637 |
- # For testsuite, see https://bugs.gentoo.org/show_bug.cgi?id=500580#c3 |
638 |
- local mesa_cards ati_cards nvidia_cards render_cards |
639 |
- shopt -s nullglob |
640 |
- ati_cards=$(echo -n /dev/ati/card* | sed 's/ /:/g') |
641 |
- if test -n "${ati_cards}"; then |
642 |
- addpredict "${ati_cards}" |
643 |
- fi |
644 |
- mesa_cards=$(echo -n /dev/dri/card* | sed 's/ /:/g') |
645 |
- if test -n "${mesa_cards}"; then |
646 |
- addpredict "${mesa_cards}" |
647 |
- fi |
648 |
- nvidia_cards=$(echo -n /dev/nvidia** | sed 's/ /:/g') |
649 |
- if test -n "${nvidia_cards}"; then |
650 |
- addpredict "${nvidia_cards}" |
651 |
- fi |
652 |
- render_cards=$(echo -n /dev/dri/renderD128* | sed 's/ /:/g') |
653 |
- if test -n "${render_cards}"; then |
654 |
- addpredict "${render_cards}" |
655 |
- fi |
656 |
- shopt -u nullglob |
657 |
- addpredict /dev/nvidiactl |
658 |
-} |
659 |
- |
660 |
-src_configure() { |
661 |
- local depth=16 |
662 |
- use q8 && depth=8 |
663 |
- use q32 && depth=32 |
664 |
- |
665 |
- local openmp=disable |
666 |
- use openmp && { tc-has-openmp && openmp=enable; } |
667 |
- |
668 |
- use perl && perl_check_env |
669 |
- |
670 |
- [[ ${CHOST} == *-solaris* ]] && append-ldflags -lnsl -lsocket |
671 |
- |
672 |
- local myeconfargs=( |
673 |
- $(use_enable static-libs static) |
674 |
- $(use_enable hdri) |
675 |
- $(use_enable opencl) |
676 |
- --with-threads |
677 |
- --with-modules |
678 |
- --with-quantum-depth=${depth} |
679 |
- $(use_with cxx magick-plus-plus) |
680 |
- $(use_with perl) |
681 |
- --with-perl-options='INSTALLDIRS=vendor' |
682 |
- --with-gs-font-dir="${EPREFIX}"/usr/share/fonts/urw-fonts |
683 |
- $(use_with bzip2 bzlib) |
684 |
- $(use_with X x) |
685 |
- $(use_with zlib) |
686 |
- --without-autotrace |
687 |
- $(use_with postscript dps) |
688 |
- $(use_with djvu) |
689 |
- --with-dejavu-font-dir="${EPREFIX}"/usr/share/fonts/dejavu |
690 |
- $(use_with fftw) |
691 |
- $(use_with fpx) |
692 |
- $(use_with fontconfig) |
693 |
- $(use_with truetype freetype) |
694 |
- $(use_with postscript gslib) |
695 |
- $(use_with graphviz gvc) |
696 |
- $(use_with heif heic) |
697 |
- $(use_with jbig) |
698 |
- $(use_with jpeg) |
699 |
- $(use_with jpeg2k openjp2) |
700 |
- $(use_with lcms) |
701 |
- $(use_with lqr) |
702 |
- $(use_with lzma) |
703 |
- $(use_with openexr) |
704 |
- $(use_with pango) |
705 |
- $(use_with png) |
706 |
- $(use_with raw) |
707 |
- $(use_with svg rsvg) |
708 |
- $(use_with tiff) |
709 |
- $(use_with webp) |
710 |
- $(use_with corefonts windows-font-dir "${EPREFIX}"/usr/share/fonts/corefonts) |
711 |
- $(use_with wmf) |
712 |
- $(use_with xml) |
713 |
- --${openmp}-openmp |
714 |
- --with-gcc-arch=no-automagic |
715 |
- ) |
716 |
- CONFIG_SHELL=$(type -P bash) econf "${myeconfargs[@]}" |
717 |
-} |
718 |
- |
719 |
-src_test() { |
720 |
- # Install default (unrestricted) policy in $HOME for test suite #664238 |
721 |
- local _im_local_config_home="${HOME}/.config/ImageMagick" |
722 |
- mkdir -p "${_im_local_config_home}" || \ |
723 |
- die "Failed to create IM config dir in '${_im_local_config_home}'" |
724 |
- cp "${FILESDIR}"/policy.test.xml "${_im_local_config_home}/policy.xml" || \ |
725 |
- die "Failed to install default blank policy.xml in '${_im_local_config_home}'" |
726 |
- |
727 |
- local im_command= IM_COMMANDS=() |
728 |
- IM_COMMANDS+=( "identify -version | grep -q -- \"${MY_PV}\"" ) # Verify that we are using version we just built |
729 |
- IM_COMMANDS+=( "identify -list policy" ) # Verify that policy.xml is used |
730 |
- IM_COMMANDS+=( "emake check" ) # Run tests |
731 |
- |
732 |
- for im_command in "${IM_COMMANDS[@]}"; do |
733 |
- eval "${S}"/magick.sh \ |
734 |
- ${im_command} || \ |
735 |
- die "Failed to run \"${im_command}\"" |
736 |
- done |
737 |
-} |
738 |
- |
739 |
-src_install() { |
740 |
- # Ensure documentation installation files and paths with each release! |
741 |
- emake \ |
742 |
- DESTDIR="${D}" \ |
743 |
- DOCUMENTATION_PATH="${EPREFIX}"/usr/share/doc/${PF}/html \ |
744 |
- install |
745 |
- |
746 |
- rm -f "${ED%/}"/usr/share/doc/${PF}/html/{ChangeLog,LICENSE,NEWS.txt} |
747 |
- dodoc {AUTHORS,README}.txt ChangeLog |
748 |
- |
749 |
- if use perl; then |
750 |
- find "${ED}" -type f -name perllocal.pod -exec rm -f {} + |
751 |
- find "${ED}" -depth -mindepth 1 -type d -empty -exec rm -rf {} + |
752 |
- fi |
753 |
- |
754 |
- find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} + |
755 |
- |
756 |
- if use opencl; then |
757 |
- cat <<-EOF > "${T}"/99${PN} |
758 |
- SANDBOX_PREDICT="/dev/nvidiactl:/dev/nvidia-uvm:/dev/ati/card:/dev/dri/card:/dev/dri/renderD128" |
759 |
- EOF |
760 |
- |
761 |
- insinto /etc/sandbox.d |
762 |
- doins "${T}"/99${PN} #472766 |
763 |
- fi |
764 |
- |
765 |
- insinto /usr/share/${PN} |
766 |
- doins config/*icm |
767 |
-} |
768 |
- |
769 |
-pkg_postinst() { |
770 |
- local _show_policy_xml_notice= |
771 |
- |
772 |
- if [[ -z "${REPLACING_VERSIONS}" ]]; then |
773 |
- # This is a new installation |
774 |
- _show_policy_xml_notice=yes |
775 |
- else |
776 |
- local v |
777 |
- for v in ${REPLACING_VERSIONS}; do |
778 |
- if ! ver_test "${v}" -gt "6.9.10.10-r2"; then |
779 |
- # This is an upgrade |
780 |
- _show_policy_xml_notice=yes |
781 |
- |
782 |
- # Show this elog only once |
783 |
- break |
784 |
- fi |
785 |
- done |
786 |
- fi |
787 |
- |
788 |
- if [[ -n "${_show_policy_xml_notice}" ]]; then |
789 |
- elog "For security reasons, a policy.xml file was installed in /etc/ImageMagick-6" |
790 |
- elog "which will prevent the usage of the following coders by default:" |
791 |
- elog "" |
792 |
- elog " - PS" |
793 |
- elog " - PS2" |
794 |
- elog " - PS3" |
795 |
- elog " - EPS" |
796 |
- elog " - PDF" |
797 |
- elog " - XPS" |
798 |
- fi |
799 |
-} |
800 |
|
801 |
diff --git a/media-gfx/imagemagick/imagemagick-7.0.8.28.ebuild b/media-gfx/imagemagick/imagemagick-7.0.8.28.ebuild |
802 |
deleted file mode 100644 |
803 |
index 3b3fc7c8d30..00000000000 |
804 |
--- a/media-gfx/imagemagick/imagemagick-7.0.8.28.ebuild |
805 |
+++ /dev/null |
806 |
@@ -1,256 +0,0 @@ |
807 |
-# Copyright 1999-2019 Gentoo Authors |
808 |
-# Distributed under the terms of the GNU General Public License v2 |
809 |
- |
810 |
-EAPI="6" |
811 |
- |
812 |
-inherit eapi7-ver eutils flag-o-matic libtool perl-functions toolchain-funcs multilib |
813 |
- |
814 |
-if [[ ${PV} == "9999" ]] ; then |
815 |
- EGIT_REPO_URI="https://github.com/ImageMagick/ImageMagick.git" |
816 |
- inherit git-r3 |
817 |
- MY_P="imagemagick-9999" |
818 |
-else |
819 |
- MY_PV="$(ver_rs 3 '-')" |
820 |
- MY_P="ImageMagick-${MY_PV}" |
821 |
- SRC_URI="mirror://${PN}/${MY_P}.tar.xz" |
822 |
- 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" |
823 |
-fi |
824 |
- |
825 |
-DESCRIPTION="A collection of tools and libraries for many image formats" |
826 |
-HOMEPAGE="https://www.imagemagick.org/" |
827 |
- |
828 |
-LICENSE="imagemagick" |
829 |
-SLOT="0/${PV}" |
830 |
-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" |
831 |
- |
832 |
-RDEPEND=" |
833 |
- dev-libs/libltdl:0 |
834 |
- bzip2? ( app-arch/bzip2 ) |
835 |
- corefonts? ( media-fonts/corefonts ) |
836 |
- djvu? ( app-text/djvu ) |
837 |
- fftw? ( sci-libs/fftw:3.0 ) |
838 |
- fontconfig? ( media-libs/fontconfig ) |
839 |
- fpx? ( >=media-libs/libfpx-1.3.0-r1 ) |
840 |
- graphviz? ( media-gfx/graphviz ) |
841 |
- heif? ( media-libs/libheif:= ) |
842 |
- jbig? ( >=media-libs/jbigkit-2:= ) |
843 |
- jpeg? ( virtual/jpeg:0 ) |
844 |
- jpeg2k? ( >=media-libs/openjpeg-2.1.0:2 ) |
845 |
- lcms? ( media-libs/lcms:2= ) |
846 |
- lqr? ( media-libs/liblqr ) |
847 |
- opencl? ( virtual/opencl ) |
848 |
- openexr? ( media-libs/openexr:0= ) |
849 |
- pango? ( x11-libs/pango ) |
850 |
- perl? ( >=dev-lang/perl-5.8.8:0= ) |
851 |
- png? ( media-libs/libpng:0= ) |
852 |
- postscript? ( app-text/ghostscript-gpl ) |
853 |
- raw? ( media-libs/libraw:= ) |
854 |
- svg? ( gnome-base/librsvg ) |
855 |
- tiff? ( media-libs/tiff:0= ) |
856 |
- truetype? ( |
857 |
- media-fonts/urw-fonts |
858 |
- >=media-libs/freetype-2 |
859 |
- ) |
860 |
- webp? ( media-libs/libwebp:0= ) |
861 |
- wmf? ( media-libs/libwmf ) |
862 |
- X? ( |
863 |
- x11-libs/libICE |
864 |
- x11-libs/libSM |
865 |
- x11-libs/libXext |
866 |
- x11-libs/libXt |
867 |
- ) |
868 |
- xml? ( dev-libs/libxml2:= ) |
869 |
- lzma? ( app-arch/xz-utils ) |
870 |
- zlib? ( sys-libs/zlib:= )" |
871 |
-DEPEND="${RDEPEND} |
872 |
- !media-gfx/graphicsmagick[imagemagick] |
873 |
- virtual/pkgconfig |
874 |
- X? ( x11-base/xorg-proto )" |
875 |
- |
876 |
-REQUIRED_USE="corefonts? ( truetype ) |
877 |
- test? ( corefonts )" |
878 |
- |
879 |
-S="${WORKDIR}/${MY_P}" |
880 |
- |
881 |
-src_prepare() { |
882 |
- default |
883 |
- |
884 |
- # Apply hardening #664236 |
885 |
- cp "${FILESDIR}"/policy-hardening.snippet "${S}" || die |
886 |
- sed -i -e '/^<policymap>$/ { |
887 |
- r policy-hardening.snippet |
888 |
- d |
889 |
- }' \ |
890 |
- config/policy.xml || \ |
891 |
- die "Failed to apply hardening of policy.xml" |
892 |
- einfo "policy.xml hardened" |
893 |
- |
894 |
- elibtoolize # for Darwin modules |
895 |
- |
896 |
- # For testsuite, see https://bugs.gentoo.org/show_bug.cgi?id=500580#c3 |
897 |
- local ati_cards mesa_cards nvidia_cards render_cards |
898 |
- shopt -s nullglob |
899 |
- ati_cards=$(echo -n /dev/ati/card* | sed 's/ /:/g') |
900 |
- if test -n "${ati_cards}"; then |
901 |
- addpredict "${ati_cards}" |
902 |
- fi |
903 |
- mesa_cards=$(echo -n /dev/dri/card* | sed 's/ /:/g') |
904 |
- if test -n "${mesa_cards}"; then |
905 |
- addpredict "${mesa_cards}" |
906 |
- fi |
907 |
- nvidia_cards=$(echo -n /dev/nvidia* | sed 's/ /:/g') |
908 |
- if test -n "${nvidia_cards}"; then |
909 |
- addpredict "${nvidia_cards}" |
910 |
- fi |
911 |
- render_cards=$(echo -n /dev/dri/renderD128* | sed 's/ /:/g') |
912 |
- if test -n "${render_cards}"; then |
913 |
- addpredict "${render_cards}" |
914 |
- fi |
915 |
- shopt -u nullglob |
916 |
- addpredict /dev/nvidiactl |
917 |
-} |
918 |
- |
919 |
-src_configure() { |
920 |
- local depth=16 |
921 |
- use q8 && depth=8 |
922 |
- use q32 && depth=32 |
923 |
- |
924 |
- local openmp=disable |
925 |
- use openmp && { tc-has-openmp && openmp=enable; } |
926 |
- |
927 |
- use perl && perl_check_env |
928 |
- |
929 |
- [[ ${CHOST} == *-solaris* ]] && append-ldflags -lnsl -lsocket |
930 |
- |
931 |
- local myeconfargs=( |
932 |
- $(use_enable static-libs static) |
933 |
- $(use_enable hdri) |
934 |
- $(use_enable opencl) |
935 |
- --with-threads |
936 |
- --with-modules |
937 |
- --with-quantum-depth=${depth} |
938 |
- $(use_with cxx magick-plus-plus) |
939 |
- $(use_with perl) |
940 |
- --with-perl-options='INSTALLDIRS=vendor' |
941 |
- --with-gs-font-dir="${EPREFIX}"/usr/share/fonts/urw-fonts |
942 |
- $(use_with bzip2 bzlib) |
943 |
- $(use_with X x) |
944 |
- $(use_with zlib) |
945 |
- --without-autotrace |
946 |
- $(use_with postscript dps) |
947 |
- $(use_with djvu) |
948 |
- --with-dejavu-font-dir="${EPREFIX}"/usr/share/fonts/dejavu |
949 |
- $(use_with fftw) |
950 |
- $(use_with fpx) |
951 |
- $(use_with fontconfig) |
952 |
- $(use_with truetype freetype) |
953 |
- $(use_with postscript gslib) |
954 |
- $(use_with graphviz gvc) |
955 |
- $(use_with heif heic) |
956 |
- $(use_with jbig) |
957 |
- $(use_with jpeg) |
958 |
- $(use_with jpeg2k openjp2) |
959 |
- $(use_with lcms) |
960 |
- $(use_with lqr) |
961 |
- $(use_with lzma) |
962 |
- $(use_with openexr) |
963 |
- $(use_with pango) |
964 |
- $(use_with png) |
965 |
- $(use_with raw) |
966 |
- $(use_with svg rsvg) |
967 |
- $(use_with tiff) |
968 |
- $(use_with webp) |
969 |
- $(use_with corefonts windows-font-dir "${EPREFIX}"/usr/share/fonts/corefonts) |
970 |
- $(use_with wmf) |
971 |
- $(use_with xml) |
972 |
- --${openmp}-openmp |
973 |
- --with-gcc-arch=no-automagic |
974 |
- ) |
975 |
- CONFIG_SHELL=$(type -P bash) econf "${myeconfargs[@]}" |
976 |
-} |
977 |
- |
978 |
-src_test() { |
979 |
- # Install default (unrestricted) policy in $HOME for test suite #664238 |
980 |
- local _im_local_config_home="${HOME}/.config/ImageMagick" |
981 |
- mkdir -p "${_im_local_config_home}" || \ |
982 |
- die "Failed to create IM config dir in '${_im_local_config_home}'" |
983 |
- cp "${FILESDIR}"/policy.test.xml "${_im_local_config_home}/policy.xml" || \ |
984 |
- die "Failed to install default blank policy.xml in '${_im_local_config_home}'" |
985 |
- |
986 |
- local im_command= IM_COMMANDS=() |
987 |
- if [[ ${PV} == "9999" ]] ; then |
988 |
- IM_COMMANDS+=( "magick -version" ) # Show version we are using -- cannot verify because of live ebuild |
989 |
- else |
990 |
- IM_COMMANDS+=( "magick -version | grep -q -- \"${MY_PV}\"" ) # Verify that we are using version we just built |
991 |
- fi |
992 |
- IM_COMMANDS+=( "magick -list policy" ) # Verify that policy.xml is used |
993 |
- IM_COMMANDS+=( "emake check" ) # Run tests |
994 |
- |
995 |
- for im_command in "${IM_COMMANDS[@]}"; do |
996 |
- eval "${S}"/magick.sh \ |
997 |
- ${im_command} || \ |
998 |
- die "Failed to run \"${im_command}\"" |
999 |
- done |
1000 |
-} |
1001 |
- |
1002 |
-src_install() { |
1003 |
- # Ensure documentation installation files and paths with each release! |
1004 |
- emake \ |
1005 |
- DESTDIR="${D}" \ |
1006 |
- DOCUMENTATION_PATH="${EPREFIX}"/usr/share/doc/${PF}/html \ |
1007 |
- install |
1008 |
- |
1009 |
- rm -f "${ED%/}"/usr/share/doc/${PF}/html/{ChangeLog,LICENSE,NEWS.txt} |
1010 |
- dodoc {AUTHORS,README}.txt ChangeLog |
1011 |
- |
1012 |
- if use perl; then |
1013 |
- find "${ED}" -type f -name perllocal.pod -exec rm -f {} + |
1014 |
- find "${ED}" -depth -mindepth 1 -type d -empty -exec rm -rf {} + |
1015 |
- fi |
1016 |
- |
1017 |
- find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} + |
1018 |
- |
1019 |
- if use opencl; then |
1020 |
- cat <<-EOF > "${T}"/99${PN} |
1021 |
- SANDBOX_PREDICT="/dev/nvidiactl:/dev/nvidia-uvm:/dev/ati/card:/dev/dri/card:/dev/dri/renderD128" |
1022 |
- EOF |
1023 |
- |
1024 |
- insinto /etc/sandbox.d |
1025 |
- doins "${T}"/99${PN} #472766 |
1026 |
- fi |
1027 |
- |
1028 |
- insinto /usr/share/${PN} |
1029 |
- doins config/*icm |
1030 |
-} |
1031 |
- |
1032 |
-pkg_postinst() { |
1033 |
- local _show_policy_xml_notice= |
1034 |
- |
1035 |
- if [[ -z "${REPLACING_VERSIONS}" ]]; then |
1036 |
- # This is a new installation |
1037 |
- _show_policy_xml_notice=yes |
1038 |
- else |
1039 |
- local v |
1040 |
- for v in ${REPLACING_VERSIONS}; do |
1041 |
- if ! ver_test "${v}" -gt "7.0.8.10-r2"; then |
1042 |
- # This is an upgrade |
1043 |
- _show_policy_xml_notice=yes |
1044 |
- |
1045 |
- # Show this elog only once |
1046 |
- break |
1047 |
- fi |
1048 |
- done |
1049 |
- fi |
1050 |
- |
1051 |
- if [[ -n "${_show_policy_xml_notice}" ]]; then |
1052 |
- elog "For security reasons, a policy.xml file was installed in /etc/ImageMagick-7" |
1053 |
- elog "which will prevent the usage of the following coders by default:" |
1054 |
- elog "" |
1055 |
- elog " - PS" |
1056 |
- elog " - PS2" |
1057 |
- elog " - PS3" |
1058 |
- elog " - EPS" |
1059 |
- elog " - PDF" |
1060 |
- elog " - XPS" |
1061 |
- fi |
1062 |
-} |
1063 |
|
1064 |
diff --git a/media-gfx/imagemagick/imagemagick-7.0.8.30.ebuild b/media-gfx/imagemagick/imagemagick-7.0.8.30.ebuild |
1065 |
deleted file mode 100644 |
1066 |
index 69c412db11b..00000000000 |
1067 |
--- a/media-gfx/imagemagick/imagemagick-7.0.8.30.ebuild |
1068 |
+++ /dev/null |
1069 |
@@ -1,256 +0,0 @@ |
1070 |
-# Copyright 1999-2019 Gentoo Authors |
1071 |
-# Distributed under the terms of the GNU General Public License v2 |
1072 |
- |
1073 |
-EAPI="6" |
1074 |
- |
1075 |
-inherit eapi7-ver eutils flag-o-matic libtool perl-functions toolchain-funcs multilib |
1076 |
- |
1077 |
-if [[ ${PV} == "9999" ]] ; then |
1078 |
- EGIT_REPO_URI="https://github.com/ImageMagick/ImageMagick.git" |
1079 |
- inherit git-r3 |
1080 |
- MY_P="imagemagick-9999" |
1081 |
-else |
1082 |
- MY_PV="$(ver_rs 3 '-')" |
1083 |
- MY_P="ImageMagick-${MY_PV}" |
1084 |
- SRC_URI="mirror://${PN}/${MY_P}.tar.xz" |
1085 |
- 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" |
1086 |
-fi |
1087 |
- |
1088 |
-DESCRIPTION="A collection of tools and libraries for many image formats" |
1089 |
-HOMEPAGE="https://www.imagemagick.org/" |
1090 |
- |
1091 |
-LICENSE="imagemagick" |
1092 |
-SLOT="0/${PV}" |
1093 |
-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" |
1094 |
- |
1095 |
-RDEPEND=" |
1096 |
- dev-libs/libltdl:0 |
1097 |
- bzip2? ( app-arch/bzip2 ) |
1098 |
- corefonts? ( media-fonts/corefonts ) |
1099 |
- djvu? ( app-text/djvu ) |
1100 |
- fftw? ( sci-libs/fftw:3.0 ) |
1101 |
- fontconfig? ( media-libs/fontconfig ) |
1102 |
- fpx? ( >=media-libs/libfpx-1.3.0-r1 ) |
1103 |
- graphviz? ( media-gfx/graphviz ) |
1104 |
- heif? ( media-libs/libheif:= ) |
1105 |
- jbig? ( >=media-libs/jbigkit-2:= ) |
1106 |
- jpeg? ( virtual/jpeg:0 ) |
1107 |
- jpeg2k? ( >=media-libs/openjpeg-2.1.0:2 ) |
1108 |
- lcms? ( media-libs/lcms:2= ) |
1109 |
- lqr? ( media-libs/liblqr ) |
1110 |
- opencl? ( virtual/opencl ) |
1111 |
- openexr? ( media-libs/openexr:0= ) |
1112 |
- pango? ( x11-libs/pango ) |
1113 |
- perl? ( >=dev-lang/perl-5.8.8:0= ) |
1114 |
- png? ( media-libs/libpng:0= ) |
1115 |
- postscript? ( app-text/ghostscript-gpl ) |
1116 |
- raw? ( media-libs/libraw:= ) |
1117 |
- svg? ( gnome-base/librsvg ) |
1118 |
- tiff? ( media-libs/tiff:0= ) |
1119 |
- truetype? ( |
1120 |
- media-fonts/urw-fonts |
1121 |
- >=media-libs/freetype-2 |
1122 |
- ) |
1123 |
- webp? ( media-libs/libwebp:0= ) |
1124 |
- wmf? ( media-libs/libwmf ) |
1125 |
- X? ( |
1126 |
- x11-libs/libICE |
1127 |
- x11-libs/libSM |
1128 |
- x11-libs/libXext |
1129 |
- x11-libs/libXt |
1130 |
- ) |
1131 |
- xml? ( dev-libs/libxml2:= ) |
1132 |
- lzma? ( app-arch/xz-utils ) |
1133 |
- zlib? ( sys-libs/zlib:= )" |
1134 |
-DEPEND="${RDEPEND} |
1135 |
- !media-gfx/graphicsmagick[imagemagick] |
1136 |
- virtual/pkgconfig |
1137 |
- X? ( x11-base/xorg-proto )" |
1138 |
- |
1139 |
-REQUIRED_USE="corefonts? ( truetype ) |
1140 |
- test? ( corefonts )" |
1141 |
- |
1142 |
-S="${WORKDIR}/${MY_P}" |
1143 |
- |
1144 |
-src_prepare() { |
1145 |
- default |
1146 |
- |
1147 |
- # Apply hardening #664236 |
1148 |
- cp "${FILESDIR}"/policy-hardening.snippet "${S}" || die |
1149 |
- sed -i -e '/^<policymap>$/ { |
1150 |
- r policy-hardening.snippet |
1151 |
- d |
1152 |
- }' \ |
1153 |
- config/policy.xml || \ |
1154 |
- die "Failed to apply hardening of policy.xml" |
1155 |
- einfo "policy.xml hardened" |
1156 |
- |
1157 |
- elibtoolize # for Darwin modules |
1158 |
- |
1159 |
- # For testsuite, see https://bugs.gentoo.org/show_bug.cgi?id=500580#c3 |
1160 |
- local ati_cards mesa_cards nvidia_cards render_cards |
1161 |
- shopt -s nullglob |
1162 |
- ati_cards=$(echo -n /dev/ati/card* | sed 's/ /:/g') |
1163 |
- if test -n "${ati_cards}"; then |
1164 |
- addpredict "${ati_cards}" |
1165 |
- fi |
1166 |
- mesa_cards=$(echo -n /dev/dri/card* | sed 's/ /:/g') |
1167 |
- if test -n "${mesa_cards}"; then |
1168 |
- addpredict "${mesa_cards}" |
1169 |
- fi |
1170 |
- nvidia_cards=$(echo -n /dev/nvidia* | sed 's/ /:/g') |
1171 |
- if test -n "${nvidia_cards}"; then |
1172 |
- addpredict "${nvidia_cards}" |
1173 |
- fi |
1174 |
- render_cards=$(echo -n /dev/dri/renderD128* | sed 's/ /:/g') |
1175 |
- if test -n "${render_cards}"; then |
1176 |
- addpredict "${render_cards}" |
1177 |
- fi |
1178 |
- shopt -u nullglob |
1179 |
- addpredict /dev/nvidiactl |
1180 |
-} |
1181 |
- |
1182 |
-src_configure() { |
1183 |
- local depth=16 |
1184 |
- use q8 && depth=8 |
1185 |
- use q32 && depth=32 |
1186 |
- |
1187 |
- local openmp=disable |
1188 |
- use openmp && { tc-has-openmp && openmp=enable; } |
1189 |
- |
1190 |
- use perl && perl_check_env |
1191 |
- |
1192 |
- [[ ${CHOST} == *-solaris* ]] && append-ldflags -lnsl -lsocket |
1193 |
- |
1194 |
- local myeconfargs=( |
1195 |
- $(use_enable static-libs static) |
1196 |
- $(use_enable hdri) |
1197 |
- $(use_enable opencl) |
1198 |
- --with-threads |
1199 |
- --with-modules |
1200 |
- --with-quantum-depth=${depth} |
1201 |
- $(use_with cxx magick-plus-plus) |
1202 |
- $(use_with perl) |
1203 |
- --with-perl-options='INSTALLDIRS=vendor' |
1204 |
- --with-gs-font-dir="${EPREFIX}"/usr/share/fonts/urw-fonts |
1205 |
- $(use_with bzip2 bzlib) |
1206 |
- $(use_with X x) |
1207 |
- $(use_with zlib) |
1208 |
- --without-autotrace |
1209 |
- $(use_with postscript dps) |
1210 |
- $(use_with djvu) |
1211 |
- --with-dejavu-font-dir="${EPREFIX}"/usr/share/fonts/dejavu |
1212 |
- $(use_with fftw) |
1213 |
- $(use_with fpx) |
1214 |
- $(use_with fontconfig) |
1215 |
- $(use_with truetype freetype) |
1216 |
- $(use_with postscript gslib) |
1217 |
- $(use_with graphviz gvc) |
1218 |
- $(use_with heif heic) |
1219 |
- $(use_with jbig) |
1220 |
- $(use_with jpeg) |
1221 |
- $(use_with jpeg2k openjp2) |
1222 |
- $(use_with lcms) |
1223 |
- $(use_with lqr) |
1224 |
- $(use_with lzma) |
1225 |
- $(use_with openexr) |
1226 |
- $(use_with pango) |
1227 |
- $(use_with png) |
1228 |
- $(use_with raw) |
1229 |
- $(use_with svg rsvg) |
1230 |
- $(use_with tiff) |
1231 |
- $(use_with webp) |
1232 |
- $(use_with corefonts windows-font-dir "${EPREFIX}"/usr/share/fonts/corefonts) |
1233 |
- $(use_with wmf) |
1234 |
- $(use_with xml) |
1235 |
- --${openmp}-openmp |
1236 |
- --with-gcc-arch=no-automagic |
1237 |
- ) |
1238 |
- CONFIG_SHELL=$(type -P bash) econf "${myeconfargs[@]}" |
1239 |
-} |
1240 |
- |
1241 |
-src_test() { |
1242 |
- # Install default (unrestricted) policy in $HOME for test suite #664238 |
1243 |
- local _im_local_config_home="${HOME}/.config/ImageMagick" |
1244 |
- mkdir -p "${_im_local_config_home}" || \ |
1245 |
- die "Failed to create IM config dir in '${_im_local_config_home}'" |
1246 |
- cp "${FILESDIR}"/policy.test.xml "${_im_local_config_home}/policy.xml" || \ |
1247 |
- die "Failed to install default blank policy.xml in '${_im_local_config_home}'" |
1248 |
- |
1249 |
- local im_command= IM_COMMANDS=() |
1250 |
- if [[ ${PV} == "9999" ]] ; then |
1251 |
- IM_COMMANDS+=( "magick -version" ) # Show version we are using -- cannot verify because of live ebuild |
1252 |
- else |
1253 |
- IM_COMMANDS+=( "magick -version | grep -q -- \"${MY_PV}\"" ) # Verify that we are using version we just built |
1254 |
- fi |
1255 |
- IM_COMMANDS+=( "magick -list policy" ) # Verify that policy.xml is used |
1256 |
- IM_COMMANDS+=( "emake check" ) # Run tests |
1257 |
- |
1258 |
- for im_command in "${IM_COMMANDS[@]}"; do |
1259 |
- eval "${S}"/magick.sh \ |
1260 |
- ${im_command} || \ |
1261 |
- die "Failed to run \"${im_command}\"" |
1262 |
- done |
1263 |
-} |
1264 |
- |
1265 |
-src_install() { |
1266 |
- # Ensure documentation installation files and paths with each release! |
1267 |
- emake \ |
1268 |
- DESTDIR="${D}" \ |
1269 |
- DOCUMENTATION_PATH="${EPREFIX}"/usr/share/doc/${PF}/html \ |
1270 |
- install |
1271 |
- |
1272 |
- rm -f "${ED%/}"/usr/share/doc/${PF}/html/{ChangeLog,LICENSE,NEWS.txt} |
1273 |
- dodoc {AUTHORS,README}.txt ChangeLog |
1274 |
- |
1275 |
- if use perl; then |
1276 |
- find "${ED}" -type f -name perllocal.pod -exec rm -f {} + |
1277 |
- find "${ED}" -depth -mindepth 1 -type d -empty -exec rm -rf {} + |
1278 |
- fi |
1279 |
- |
1280 |
- find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} + |
1281 |
- |
1282 |
- if use opencl; then |
1283 |
- cat <<-EOF > "${T}"/99${PN} |
1284 |
- SANDBOX_PREDICT="/dev/nvidiactl:/dev/nvidia-uvm:/dev/ati/card:/dev/dri/card:/dev/dri/renderD128" |
1285 |
- EOF |
1286 |
- |
1287 |
- insinto /etc/sandbox.d |
1288 |
- doins "${T}"/99${PN} #472766 |
1289 |
- fi |
1290 |
- |
1291 |
- insinto /usr/share/${PN} |
1292 |
- doins config/*icm |
1293 |
-} |
1294 |
- |
1295 |
-pkg_postinst() { |
1296 |
- local _show_policy_xml_notice= |
1297 |
- |
1298 |
- if [[ -z "${REPLACING_VERSIONS}" ]]; then |
1299 |
- # This is a new installation |
1300 |
- _show_policy_xml_notice=yes |
1301 |
- else |
1302 |
- local v |
1303 |
- for v in ${REPLACING_VERSIONS}; do |
1304 |
- if ! ver_test "${v}" -gt "7.0.8.10-r2"; then |
1305 |
- # This is an upgrade |
1306 |
- _show_policy_xml_notice=yes |
1307 |
- |
1308 |
- # Show this elog only once |
1309 |
- break |
1310 |
- fi |
1311 |
- done |
1312 |
- fi |
1313 |
- |
1314 |
- if [[ -n "${_show_policy_xml_notice}" ]]; then |
1315 |
- elog "For security reasons, a policy.xml file was installed in /etc/ImageMagick-7" |
1316 |
- elog "which will prevent the usage of the following coders by default:" |
1317 |
- elog "" |
1318 |
- elog " - PS" |
1319 |
- elog " - PS2" |
1320 |
- elog " - PS3" |
1321 |
- elog " - EPS" |
1322 |
- elog " - PDF" |
1323 |
- elog " - XPS" |
1324 |
- fi |
1325 |
-} |
1326 |
|
1327 |
diff --git a/media-gfx/imagemagick/imagemagick-7.0.8.33.ebuild b/media-gfx/imagemagick/imagemagick-7.0.8.33.ebuild |
1328 |
deleted file mode 100644 |
1329 |
index 69c412db11b..00000000000 |
1330 |
--- a/media-gfx/imagemagick/imagemagick-7.0.8.33.ebuild |
1331 |
+++ /dev/null |
1332 |
@@ -1,256 +0,0 @@ |
1333 |
-# Copyright 1999-2019 Gentoo Authors |
1334 |
-# Distributed under the terms of the GNU General Public License v2 |
1335 |
- |
1336 |
-EAPI="6" |
1337 |
- |
1338 |
-inherit eapi7-ver eutils flag-o-matic libtool perl-functions toolchain-funcs multilib |
1339 |
- |
1340 |
-if [[ ${PV} == "9999" ]] ; then |
1341 |
- EGIT_REPO_URI="https://github.com/ImageMagick/ImageMagick.git" |
1342 |
- inherit git-r3 |
1343 |
- MY_P="imagemagick-9999" |
1344 |
-else |
1345 |
- MY_PV="$(ver_rs 3 '-')" |
1346 |
- MY_P="ImageMagick-${MY_PV}" |
1347 |
- SRC_URI="mirror://${PN}/${MY_P}.tar.xz" |
1348 |
- 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" |
1349 |
-fi |
1350 |
- |
1351 |
-DESCRIPTION="A collection of tools and libraries for many image formats" |
1352 |
-HOMEPAGE="https://www.imagemagick.org/" |
1353 |
- |
1354 |
-LICENSE="imagemagick" |
1355 |
-SLOT="0/${PV}" |
1356 |
-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" |
1357 |
- |
1358 |
-RDEPEND=" |
1359 |
- dev-libs/libltdl:0 |
1360 |
- bzip2? ( app-arch/bzip2 ) |
1361 |
- corefonts? ( media-fonts/corefonts ) |
1362 |
- djvu? ( app-text/djvu ) |
1363 |
- fftw? ( sci-libs/fftw:3.0 ) |
1364 |
- fontconfig? ( media-libs/fontconfig ) |
1365 |
- fpx? ( >=media-libs/libfpx-1.3.0-r1 ) |
1366 |
- graphviz? ( media-gfx/graphviz ) |
1367 |
- heif? ( media-libs/libheif:= ) |
1368 |
- jbig? ( >=media-libs/jbigkit-2:= ) |
1369 |
- jpeg? ( virtual/jpeg:0 ) |
1370 |
- jpeg2k? ( >=media-libs/openjpeg-2.1.0:2 ) |
1371 |
- lcms? ( media-libs/lcms:2= ) |
1372 |
- lqr? ( media-libs/liblqr ) |
1373 |
- opencl? ( virtual/opencl ) |
1374 |
- openexr? ( media-libs/openexr:0= ) |
1375 |
- pango? ( x11-libs/pango ) |
1376 |
- perl? ( >=dev-lang/perl-5.8.8:0= ) |
1377 |
- png? ( media-libs/libpng:0= ) |
1378 |
- postscript? ( app-text/ghostscript-gpl ) |
1379 |
- raw? ( media-libs/libraw:= ) |
1380 |
- svg? ( gnome-base/librsvg ) |
1381 |
- tiff? ( media-libs/tiff:0= ) |
1382 |
- truetype? ( |
1383 |
- media-fonts/urw-fonts |
1384 |
- >=media-libs/freetype-2 |
1385 |
- ) |
1386 |
- webp? ( media-libs/libwebp:0= ) |
1387 |
- wmf? ( media-libs/libwmf ) |
1388 |
- X? ( |
1389 |
- x11-libs/libICE |
1390 |
- x11-libs/libSM |
1391 |
- x11-libs/libXext |
1392 |
- x11-libs/libXt |
1393 |
- ) |
1394 |
- xml? ( dev-libs/libxml2:= ) |
1395 |
- lzma? ( app-arch/xz-utils ) |
1396 |
- zlib? ( sys-libs/zlib:= )" |
1397 |
-DEPEND="${RDEPEND} |
1398 |
- !media-gfx/graphicsmagick[imagemagick] |
1399 |
- virtual/pkgconfig |
1400 |
- X? ( x11-base/xorg-proto )" |
1401 |
- |
1402 |
-REQUIRED_USE="corefonts? ( truetype ) |
1403 |
- test? ( corefonts )" |
1404 |
- |
1405 |
-S="${WORKDIR}/${MY_P}" |
1406 |
- |
1407 |
-src_prepare() { |
1408 |
- default |
1409 |
- |
1410 |
- # Apply hardening #664236 |
1411 |
- cp "${FILESDIR}"/policy-hardening.snippet "${S}" || die |
1412 |
- sed -i -e '/^<policymap>$/ { |
1413 |
- r policy-hardening.snippet |
1414 |
- d |
1415 |
- }' \ |
1416 |
- config/policy.xml || \ |
1417 |
- die "Failed to apply hardening of policy.xml" |
1418 |
- einfo "policy.xml hardened" |
1419 |
- |
1420 |
- elibtoolize # for Darwin modules |
1421 |
- |
1422 |
- # For testsuite, see https://bugs.gentoo.org/show_bug.cgi?id=500580#c3 |
1423 |
- local ati_cards mesa_cards nvidia_cards render_cards |
1424 |
- shopt -s nullglob |
1425 |
- ati_cards=$(echo -n /dev/ati/card* | sed 's/ /:/g') |
1426 |
- if test -n "${ati_cards}"; then |
1427 |
- addpredict "${ati_cards}" |
1428 |
- fi |
1429 |
- mesa_cards=$(echo -n /dev/dri/card* | sed 's/ /:/g') |
1430 |
- if test -n "${mesa_cards}"; then |
1431 |
- addpredict "${mesa_cards}" |
1432 |
- fi |
1433 |
- nvidia_cards=$(echo -n /dev/nvidia* | sed 's/ /:/g') |
1434 |
- if test -n "${nvidia_cards}"; then |
1435 |
- addpredict "${nvidia_cards}" |
1436 |
- fi |
1437 |
- render_cards=$(echo -n /dev/dri/renderD128* | sed 's/ /:/g') |
1438 |
- if test -n "${render_cards}"; then |
1439 |
- addpredict "${render_cards}" |
1440 |
- fi |
1441 |
- shopt -u nullglob |
1442 |
- addpredict /dev/nvidiactl |
1443 |
-} |
1444 |
- |
1445 |
-src_configure() { |
1446 |
- local depth=16 |
1447 |
- use q8 && depth=8 |
1448 |
- use q32 && depth=32 |
1449 |
- |
1450 |
- local openmp=disable |
1451 |
- use openmp && { tc-has-openmp && openmp=enable; } |
1452 |
- |
1453 |
- use perl && perl_check_env |
1454 |
- |
1455 |
- [[ ${CHOST} == *-solaris* ]] && append-ldflags -lnsl -lsocket |
1456 |
- |
1457 |
- local myeconfargs=( |
1458 |
- $(use_enable static-libs static) |
1459 |
- $(use_enable hdri) |
1460 |
- $(use_enable opencl) |
1461 |
- --with-threads |
1462 |
- --with-modules |
1463 |
- --with-quantum-depth=${depth} |
1464 |
- $(use_with cxx magick-plus-plus) |
1465 |
- $(use_with perl) |
1466 |
- --with-perl-options='INSTALLDIRS=vendor' |
1467 |
- --with-gs-font-dir="${EPREFIX}"/usr/share/fonts/urw-fonts |
1468 |
- $(use_with bzip2 bzlib) |
1469 |
- $(use_with X x) |
1470 |
- $(use_with zlib) |
1471 |
- --without-autotrace |
1472 |
- $(use_with postscript dps) |
1473 |
- $(use_with djvu) |
1474 |
- --with-dejavu-font-dir="${EPREFIX}"/usr/share/fonts/dejavu |
1475 |
- $(use_with fftw) |
1476 |
- $(use_with fpx) |
1477 |
- $(use_with fontconfig) |
1478 |
- $(use_with truetype freetype) |
1479 |
- $(use_with postscript gslib) |
1480 |
- $(use_with graphviz gvc) |
1481 |
- $(use_with heif heic) |
1482 |
- $(use_with jbig) |
1483 |
- $(use_with jpeg) |
1484 |
- $(use_with jpeg2k openjp2) |
1485 |
- $(use_with lcms) |
1486 |
- $(use_with lqr) |
1487 |
- $(use_with lzma) |
1488 |
- $(use_with openexr) |
1489 |
- $(use_with pango) |
1490 |
- $(use_with png) |
1491 |
- $(use_with raw) |
1492 |
- $(use_with svg rsvg) |
1493 |
- $(use_with tiff) |
1494 |
- $(use_with webp) |
1495 |
- $(use_with corefonts windows-font-dir "${EPREFIX}"/usr/share/fonts/corefonts) |
1496 |
- $(use_with wmf) |
1497 |
- $(use_with xml) |
1498 |
- --${openmp}-openmp |
1499 |
- --with-gcc-arch=no-automagic |
1500 |
- ) |
1501 |
- CONFIG_SHELL=$(type -P bash) econf "${myeconfargs[@]}" |
1502 |
-} |
1503 |
- |
1504 |
-src_test() { |
1505 |
- # Install default (unrestricted) policy in $HOME for test suite #664238 |
1506 |
- local _im_local_config_home="${HOME}/.config/ImageMagick" |
1507 |
- mkdir -p "${_im_local_config_home}" || \ |
1508 |
- die "Failed to create IM config dir in '${_im_local_config_home}'" |
1509 |
- cp "${FILESDIR}"/policy.test.xml "${_im_local_config_home}/policy.xml" || \ |
1510 |
- die "Failed to install default blank policy.xml in '${_im_local_config_home}'" |
1511 |
- |
1512 |
- local im_command= IM_COMMANDS=() |
1513 |
- if [[ ${PV} == "9999" ]] ; then |
1514 |
- IM_COMMANDS+=( "magick -version" ) # Show version we are using -- cannot verify because of live ebuild |
1515 |
- else |
1516 |
- IM_COMMANDS+=( "magick -version | grep -q -- \"${MY_PV}\"" ) # Verify that we are using version we just built |
1517 |
- fi |
1518 |
- IM_COMMANDS+=( "magick -list policy" ) # Verify that policy.xml is used |
1519 |
- IM_COMMANDS+=( "emake check" ) # Run tests |
1520 |
- |
1521 |
- for im_command in "${IM_COMMANDS[@]}"; do |
1522 |
- eval "${S}"/magick.sh \ |
1523 |
- ${im_command} || \ |
1524 |
- die "Failed to run \"${im_command}\"" |
1525 |
- done |
1526 |
-} |
1527 |
- |
1528 |
-src_install() { |
1529 |
- # Ensure documentation installation files and paths with each release! |
1530 |
- emake \ |
1531 |
- DESTDIR="${D}" \ |
1532 |
- DOCUMENTATION_PATH="${EPREFIX}"/usr/share/doc/${PF}/html \ |
1533 |
- install |
1534 |
- |
1535 |
- rm -f "${ED%/}"/usr/share/doc/${PF}/html/{ChangeLog,LICENSE,NEWS.txt} |
1536 |
- dodoc {AUTHORS,README}.txt ChangeLog |
1537 |
- |
1538 |
- if use perl; then |
1539 |
- find "${ED}" -type f -name perllocal.pod -exec rm -f {} + |
1540 |
- find "${ED}" -depth -mindepth 1 -type d -empty -exec rm -rf {} + |
1541 |
- fi |
1542 |
- |
1543 |
- find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} + |
1544 |
- |
1545 |
- if use opencl; then |
1546 |
- cat <<-EOF > "${T}"/99${PN} |
1547 |
- SANDBOX_PREDICT="/dev/nvidiactl:/dev/nvidia-uvm:/dev/ati/card:/dev/dri/card:/dev/dri/renderD128" |
1548 |
- EOF |
1549 |
- |
1550 |
- insinto /etc/sandbox.d |
1551 |
- doins "${T}"/99${PN} #472766 |
1552 |
- fi |
1553 |
- |
1554 |
- insinto /usr/share/${PN} |
1555 |
- doins config/*icm |
1556 |
-} |
1557 |
- |
1558 |
-pkg_postinst() { |
1559 |
- local _show_policy_xml_notice= |
1560 |
- |
1561 |
- if [[ -z "${REPLACING_VERSIONS}" ]]; then |
1562 |
- # This is a new installation |
1563 |
- _show_policy_xml_notice=yes |
1564 |
- else |
1565 |
- local v |
1566 |
- for v in ${REPLACING_VERSIONS}; do |
1567 |
- if ! ver_test "${v}" -gt "7.0.8.10-r2"; then |
1568 |
- # This is an upgrade |
1569 |
- _show_policy_xml_notice=yes |
1570 |
- |
1571 |
- # Show this elog only once |
1572 |
- break |
1573 |
- fi |
1574 |
- done |
1575 |
- fi |
1576 |
- |
1577 |
- if [[ -n "${_show_policy_xml_notice}" ]]; then |
1578 |
- elog "For security reasons, a policy.xml file was installed in /etc/ImageMagick-7" |
1579 |
- elog "which will prevent the usage of the following coders by default:" |
1580 |
- elog "" |
1581 |
- elog " - PS" |
1582 |
- elog " - PS2" |
1583 |
- elog " - PS3" |
1584 |
- elog " - EPS" |
1585 |
- elog " - PDF" |
1586 |
- elog " - XPS" |
1587 |
- fi |
1588 |
-} |