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