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