summaryrefslogtreecommitdiff
path: root/media-gfx/imagemagick
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-06-16 21:23:20 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-06-16 21:23:20 +0100
commitfab849d1daed0ba7f2ac497d07985c3dbb692543 (patch)
tree10baa743a5340b42ad538dd19d48669ccac209b1 /media-gfx/imagemagick
parent73c318acdaf6f8309d68bd266051e6dd1f1bd787 (diff)
gentoo resync : 16.06.2019
Diffstat (limited to 'media-gfx/imagemagick')
-rw-r--r--media-gfx/imagemagick/Manifest4
-rw-r--r--media-gfx/imagemagick/imagemagick-6.9.10.49.ebuild248
-rw-r--r--media-gfx/imagemagick/imagemagick-7.0.8.49.ebuild256
3 files changed, 508 insertions, 0 deletions
diff --git a/media-gfx/imagemagick/Manifest b/media-gfx/imagemagick/Manifest
index 3e099acd1082..e30c86988f51 100644
--- a/media-gfx/imagemagick/Manifest
+++ b/media-gfx/imagemagick/Manifest
@@ -1,8 +1,12 @@
AUX policy-hardening.snippet 442 BLAKE2B d79fdbddab418fc9d8391e78992e3dda844e096052115113ff6f759c1a54541bcd7d7793547bc7140776659c98379a9e9f004aa46f757300a33f445d396fbf14 SHA512 e9e723c40d5b8c52bbc2f2b9a3ad7c7e2aee493bc37b6c3940e8486b92a1c6659e47b1e12ee2fb11c8a8b6ee48a7fc10354617ae12c36181a58e9e73b239368d
AUX policy.test.xml 746 BLAKE2B 6bfa073606469b81cf517d9b069e48794cbda9272d12c3abb8ae3456aaf30cd1923510baddb7d813aa8ccde84e161de0b29314cef7b1a37730c7ad5236d1f5dc SHA512 22f66004324e3777393446a3df738ecd2aa405df088d39137008514cd86b436765b48ccd4355d670a42061ce4e5a7b2fd8e4be5852cd914f62ff0250a4a7ae57
DIST ImageMagick-6.9.10-46.tar.xz 8942956 BLAKE2B b62673ce3a8b889bfa7dfb5243c2e594df53915f2253f102b14c3cd9b2d57b2324ecf285be97e6b84e5b7a8b951ff4b76eddbd0c75dede409057ba386bcf9abc SHA512 cd2843a98c2bf121aea4cf2e5c101e879256a8f9e187e3e1042852c41097b1c89312f8b829b13604fbc4f0917e096e25ba09c6b76b462bf4eed8fa77ccd0e478
+DIST ImageMagick-6.9.10-49.tar.xz 8940128 BLAKE2B e8653b10e251354b8a48f1e1b613d6dba8d077e38f71ac04b68062ce86da3e078a6dbcfd47fbda9a90301d3d231606f75eb1f714516788c65055304aaf90d1e9 SHA512 c25f4814e02d9d11fae863683a676b995f59967ed556bca766ec107dfee3ee573999acd291fbac13d5cc828f782a223e7389939d786678b23859f39db2eaba9a
DIST ImageMagick-7.0.8-46.tar.xz 9452404 BLAKE2B d235547f04205939370360c99e32ac63641a3fc2e0c9d6266befa02bbd102ed2b66e79e63afafe2a45ed5670882d61e73b93baa8b543d9ba78ffa53bcb114324 SHA512 32177f8a899c6a6b64740c3afbcea584da2573823324ca0bdd5a6d70692ca7a689944eac0b3a07bcc827c5c426fdb9e4b8714448fff7e50e26c7bd4587f2f43b
+DIST ImageMagick-7.0.8-49.tar.xz 9452340 BLAKE2B 1e1b662e16287cc505ce40b1031836406159e9574efaaead3e8789300798469075d35bff01fb6a994efc42764ef3e509a9c0fec0c5cd7e3abeb09a201f689ca8 SHA512 8dd4a45f4d95d949bcd797f44d1602a3767386ee7d73888fb8a1ee6d4d8be7c4881a88262e7261a253da6f4b3c8ac9442d5eacb44e267e2d25e11bda10b12526
EBUILD imagemagick-6.9.10.46.ebuild 6883 BLAKE2B 1f0a8acce9f7c79171822ba87d131aa0457f1d9afa6621a29972b77958f9abc6150b8ce756065e9e51b2c399c78115393ab04c56b35074c2ff42cddb00f95c15 SHA512 b96f189b6b59ce49628ddc311fef7a7c21c8e81aa268b4958a71b832ecc329c6ce0ffd858f9b0d036c3f5d3de43926d2d2486c0313177362278b999b2ea91fa8
+EBUILD imagemagick-6.9.10.49.ebuild 6892 BLAKE2B 9a7579489c9e2ccd38b3ae9f91393680f13ebe29745ee90fef5e8a72059a731da47a8d8f0394621baf2261d9e848166783738c3fd881372630ce8bb82fd67de8 SHA512 83f54f846c25d858c8a093f5058b764690c1b15d69c09519ee492f0ec4d13555c191991f241fe75a5438fd421d6bc036b655d8d0febfba575897db979cd157bf
EBUILD imagemagick-7.0.8.46.ebuild 7150 BLAKE2B 52a9342ec82c516f5bc3339c4f41f016448950bc7dd486babdc57d1a62ecc005dd0937073ebad7a4e170f050c11ed7ca4dca9ce39cd18d6498807259eeea643b SHA512 e9f3ab662260bc535d27a6d7166a52d8e29bd999923fa6995b2ffd3b5161de41e62d9e3774bfbdded2bc447b8c0087ed597a0c6a0a79954e06478d3113418a1f
+EBUILD imagemagick-7.0.8.49.ebuild 7160 BLAKE2B 276ed8dc19455db44ec6a14244f07070e5b9a8a6158e0d06ef2ab0ab4541e607244c216a7ffbaefcf166439edf4a00aab2a5f826a4fc917dade1f710f47b66cb SHA512 5c6f6ce5a3801c56b550c78f8ca5a1a2f812ea39db7fcd9eb65fa6e9130d3035102eef379e9fe5617ec62910ebff039fde9ce9f02eac96a62431d18b5b954245
EBUILD imagemagick-9999.ebuild 7160 BLAKE2B 2435e94755e6e1a9d6ee4cab669b8564daaa06e7c75024463cf5df4f851f695afd2afdfb84930ff8886ceef6bed578365d7489d7febd877064621c4dd541f74b SHA512 c65b9cb286317eafefb96c63984f25850c835a81eb04fe452d8bd22bacded153c460716c06a2f924b7595925ecbb417ea809d737aa291bc174c125d97dc7cbba
MISC metadata.xml 1015 BLAKE2B 3fbe479f30575b11fa9e78de7bb00c231370aa4b2ca3b0e16924710189013ab91199db8c8cb7cff4611a2924c7fa01e4a43bfd9f7f61cfe45a4de3a254d4c8e2 SHA512 bf1479f91de5f8248c4a86d98017a332ab3d5eb153bb896ca1a39fce2fbff4e8248df92025987f6bfaf7e0d36677c167177c9c21969f1f0b8c2e0a53197efece
diff --git a/media-gfx/imagemagick/imagemagick-6.9.10.49.ebuild b/media-gfx/imagemagick/imagemagick-6.9.10.49.ebuild
new file mode 100644
index 000000000000..b09291336ccb
--- /dev/null
+++ b/media-gfx/imagemagick/imagemagick-6.9.10.49.ebuild
@@ -0,0 +1,248 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit eapi7-ver eutils flag-o-matic libtool perl-functions toolchain-funcs multilib
+
+MY_PV="$(ver_rs 3 '-')"
+MY_P="ImageMagick-${MY_PV}"
+
+DESCRIPTION="A collection of tools and libraries for many image formats"
+HOMEPAGE="https://www.imagemagick.org/"
+SRC_URI="mirror://${PN}/${MY_P}.tar.xz"
+
+LICENSE="imagemagick"
+SLOT="0/${PV}"
+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"
+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"
+
+RESTRICT="perl? ( userpriv )"
+
+RDEPEND="
+ dev-libs/libltdl:0
+ bzip2? ( app-arch/bzip2 )
+ corefonts? ( media-fonts/corefonts )
+ djvu? ( app-text/djvu )
+ fftw? ( sci-libs/fftw:3.0 )
+ fontconfig? ( media-libs/fontconfig )
+ fpx? ( >=media-libs/libfpx-1.3.0-r1 )
+ graphviz? ( media-gfx/graphviz )
+ heif? ( media-libs/libheif:= )
+ jbig? ( >=media-libs/jbigkit-2:= )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( >=media-libs/openjpeg-2.1.0:2 )
+ lcms? ( media-libs/lcms:2= )
+ lqr? ( media-libs/liblqr )
+ opencl? ( virtual/opencl )
+ openexr? ( media-libs/openexr:0= )
+ pango? ( x11-libs/pango )
+ perl? ( >=dev-lang/perl-5.8.8:0= )
+ png? ( media-libs/libpng:0= )
+ postscript? ( app-text/ghostscript-gpl )
+ raw? ( media-libs/libraw:= )
+ svg? ( gnome-base/librsvg )
+ tiff? ( media-libs/tiff:0= )
+ truetype? (
+ media-fonts/urw-fonts
+ >=media-libs/freetype-2
+ )
+ webp? ( media-libs/libwebp:0= )
+ wmf? ( media-libs/libwmf )
+ X? (
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXext
+ x11-libs/libXt
+ )
+ xml? ( dev-libs/libxml2:= )
+ lzma? ( app-arch/xz-utils )
+ zlib? ( sys-libs/zlib:= )"
+DEPEND="${RDEPEND}
+ !media-gfx/graphicsmagick[imagemagick]
+ virtual/pkgconfig
+ X? ( x11-base/xorg-proto )"
+
+REQUIRED_USE="corefonts? ( truetype )
+ test? ( corefonts )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ default
+
+ # Apply hardening #664236
+ cp "${FILESDIR}"/policy-hardening.snippet "${S}" || die
+ sed -i -e '/^<policymap>$/ {
+ r policy-hardening.snippet
+ d
+ }' \
+ config/policy.xml || \
+ die "Failed to apply hardening of policy.xml"
+ einfo "policy.xml hardened"
+
+ elibtoolize # for Darwin modules
+
+ # For testsuite, see https://bugs.gentoo.org/show_bug.cgi?id=500580#c3
+ local mesa_cards ati_cards nvidia_cards render_cards
+ shopt -s nullglob
+ ati_cards=$(echo -n /dev/ati/card* | sed 's/ /:/g')
+ if test -n "${ati_cards}"; then
+ addpredict "${ati_cards}"
+ fi
+ mesa_cards=$(echo -n /dev/dri/card* | sed 's/ /:/g')
+ if test -n "${mesa_cards}"; then
+ addpredict "${mesa_cards}"
+ fi
+ nvidia_cards=$(echo -n /dev/nvidia** | sed 's/ /:/g')
+ if test -n "${nvidia_cards}"; then
+ addpredict "${nvidia_cards}"
+ fi
+ render_cards=$(echo -n /dev/dri/renderD128* | sed 's/ /:/g')
+ if test -n "${render_cards}"; then
+ addpredict "${render_cards}"
+ fi
+ shopt -u nullglob
+ addpredict /dev/nvidiactl
+}
+
+src_configure() {
+ local depth=16
+ use q8 && depth=8
+ use q32 && depth=32
+
+ local openmp=disable
+ use openmp && { tc-has-openmp && openmp=enable; }
+
+ use perl && perl_check_env
+
+ [[ ${CHOST} == *-solaris* ]] && append-ldflags -lnsl -lsocket
+
+ local myeconfargs=(
+ $(use_enable static-libs static)
+ $(use_enable hdri)
+ $(use_enable opencl)
+ --with-threads
+ --with-modules
+ --with-quantum-depth=${depth}
+ $(use_with cxx magick-plus-plus)
+ $(use_with perl)
+ --with-perl-options='INSTALLDIRS=vendor'
+ --with-gs-font-dir="${EPREFIX}"/usr/share/fonts/urw-fonts
+ $(use_with bzip2 bzlib)
+ $(use_with X x)
+ $(use_with zlib)
+ --without-autotrace
+ $(use_with postscript dps)
+ $(use_with djvu)
+ --with-dejavu-font-dir="${EPREFIX}"/usr/share/fonts/dejavu
+ $(use_with fftw)
+ $(use_with fpx)
+ $(use_with fontconfig)
+ $(use_with truetype freetype)
+ $(use_with postscript gslib)
+ $(use_with graphviz gvc)
+ $(use_with heif heic)
+ $(use_with jbig)
+ $(use_with jpeg)
+ $(use_with jpeg2k openjp2)
+ $(use_with lcms)
+ $(use_with lqr)
+ $(use_with lzma)
+ $(use_with openexr)
+ $(use_with pango)
+ $(use_with png)
+ $(use_with raw)
+ $(use_with svg rsvg)
+ $(use_with tiff)
+ $(use_with webp)
+ $(use_with corefonts windows-font-dir "${EPREFIX}"/usr/share/fonts/corefonts)
+ $(use_with wmf)
+ $(use_with xml)
+ --${openmp}-openmp
+ --with-gcc-arch=no-automagic
+ )
+ CONFIG_SHELL=$(type -P bash) econf "${myeconfargs[@]}"
+}
+
+src_test() {
+ # Install default (unrestricted) policy in $HOME for test suite #664238
+ local _im_local_config_home="${HOME}/.config/ImageMagick"
+ mkdir -p "${_im_local_config_home}" || \
+ die "Failed to create IM config dir in '${_im_local_config_home}'"
+ cp "${FILESDIR}"/policy.test.xml "${_im_local_config_home}/policy.xml" || \
+ die "Failed to install default blank policy.xml in '${_im_local_config_home}'"
+
+ local im_command= IM_COMMANDS=()
+ IM_COMMANDS+=( "identify -version | grep -q -- \"${MY_PV}\"" ) # Verify that we are using version we just built
+ IM_COMMANDS+=( "identify -list policy" ) # Verify that policy.xml is used
+ IM_COMMANDS+=( "emake check" ) # Run tests
+
+ for im_command in "${IM_COMMANDS[@]}"; do
+ eval "${S}"/magick.sh \
+ ${im_command} || \
+ die "Failed to run \"${im_command}\""
+ done
+}
+
+src_install() {
+ # Ensure documentation installation files and paths with each release!
+ emake \
+ DESTDIR="${D}" \
+ DOCUMENTATION_PATH="${EPREFIX}"/usr/share/doc/${PF}/html \
+ install
+
+ rm -f "${ED%/}"/usr/share/doc/${PF}/html/{ChangeLog,LICENSE,NEWS.txt}
+ dodoc {AUTHORS,README}.txt ChangeLog
+
+ if use perl; then
+ find "${ED}" -type f -name perllocal.pod -exec rm -f {} +
+ find "${ED}" -depth -mindepth 1 -type d -empty -exec rm -rf {} +
+ fi
+
+ find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} +
+
+ if use opencl; then
+ cat <<-EOF > "${T}"/99${PN}
+ SANDBOX_PREDICT="/dev/nvidiactl:/dev/nvidia-uvm:/dev/ati/card:/dev/dri/card:/dev/dri/renderD128"
+ EOF
+
+ insinto /etc/sandbox.d
+ doins "${T}"/99${PN} #472766
+ fi
+
+ insinto /usr/share/${PN}
+ doins config/*icm
+}
+
+pkg_postinst() {
+ local _show_policy_xml_notice=
+
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ # This is a new installation
+ _show_policy_xml_notice=yes
+ else
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if ! ver_test "${v}" -gt "6.9.10.10-r2"; then
+ # This is an upgrade
+ _show_policy_xml_notice=yes
+
+ # Show this elog only once
+ break
+ fi
+ done
+ fi
+
+ if [[ -n "${_show_policy_xml_notice}" ]]; then
+ elog "For security reasons, a policy.xml file was installed in /etc/ImageMagick-6"
+ elog "which will prevent the usage of the following coders by default:"
+ elog ""
+ elog " - PS"
+ elog " - PS2"
+ elog " - PS3"
+ elog " - EPS"
+ elog " - PDF"
+ elog " - XPS"
+ fi
+}
diff --git a/media-gfx/imagemagick/imagemagick-7.0.8.49.ebuild b/media-gfx/imagemagick/imagemagick-7.0.8.49.ebuild
new file mode 100644
index 000000000000..69c412db11b7
--- /dev/null
+++ b/media-gfx/imagemagick/imagemagick-7.0.8.49.ebuild
@@ -0,0 +1,256 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit eapi7-ver eutils flag-o-matic libtool perl-functions toolchain-funcs multilib
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/ImageMagick/ImageMagick.git"
+ inherit git-r3
+ MY_P="imagemagick-9999"
+else
+ MY_PV="$(ver_rs 3 '-')"
+ MY_P="ImageMagick-${MY_PV}"
+ SRC_URI="mirror://${PN}/${MY_P}.tar.xz"
+ 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"
+fi
+
+DESCRIPTION="A collection of tools and libraries for many image formats"
+HOMEPAGE="https://www.imagemagick.org/"
+
+LICENSE="imagemagick"
+SLOT="0/${PV}"
+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"
+
+RDEPEND="
+ dev-libs/libltdl:0
+ bzip2? ( app-arch/bzip2 )
+ corefonts? ( media-fonts/corefonts )
+ djvu? ( app-text/djvu )
+ fftw? ( sci-libs/fftw:3.0 )
+ fontconfig? ( media-libs/fontconfig )
+ fpx? ( >=media-libs/libfpx-1.3.0-r1 )
+ graphviz? ( media-gfx/graphviz )
+ heif? ( media-libs/libheif:= )
+ jbig? ( >=media-libs/jbigkit-2:= )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( >=media-libs/openjpeg-2.1.0:2 )
+ lcms? ( media-libs/lcms:2= )
+ lqr? ( media-libs/liblqr )
+ opencl? ( virtual/opencl )
+ openexr? ( media-libs/openexr:0= )
+ pango? ( x11-libs/pango )
+ perl? ( >=dev-lang/perl-5.8.8:0= )
+ png? ( media-libs/libpng:0= )
+ postscript? ( app-text/ghostscript-gpl )
+ raw? ( media-libs/libraw:= )
+ svg? ( gnome-base/librsvg )
+ tiff? ( media-libs/tiff:0= )
+ truetype? (
+ media-fonts/urw-fonts
+ >=media-libs/freetype-2
+ )
+ webp? ( media-libs/libwebp:0= )
+ wmf? ( media-libs/libwmf )
+ X? (
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXext
+ x11-libs/libXt
+ )
+ xml? ( dev-libs/libxml2:= )
+ lzma? ( app-arch/xz-utils )
+ zlib? ( sys-libs/zlib:= )"
+DEPEND="${RDEPEND}
+ !media-gfx/graphicsmagick[imagemagick]
+ virtual/pkgconfig
+ X? ( x11-base/xorg-proto )"
+
+REQUIRED_USE="corefonts? ( truetype )
+ test? ( corefonts )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ default
+
+ # Apply hardening #664236
+ cp "${FILESDIR}"/policy-hardening.snippet "${S}" || die
+ sed -i -e '/^<policymap>$/ {
+ r policy-hardening.snippet
+ d
+ }' \
+ config/policy.xml || \
+ die "Failed to apply hardening of policy.xml"
+ einfo "policy.xml hardened"
+
+ elibtoolize # for Darwin modules
+
+ # For testsuite, see https://bugs.gentoo.org/show_bug.cgi?id=500580#c3
+ local ati_cards mesa_cards nvidia_cards render_cards
+ shopt -s nullglob
+ ati_cards=$(echo -n /dev/ati/card* | sed 's/ /:/g')
+ if test -n "${ati_cards}"; then
+ addpredict "${ati_cards}"
+ fi
+ mesa_cards=$(echo -n /dev/dri/card* | sed 's/ /:/g')
+ if test -n "${mesa_cards}"; then
+ addpredict "${mesa_cards}"
+ fi
+ nvidia_cards=$(echo -n /dev/nvidia* | sed 's/ /:/g')
+ if test -n "${nvidia_cards}"; then
+ addpredict "${nvidia_cards}"
+ fi
+ render_cards=$(echo -n /dev/dri/renderD128* | sed 's/ /:/g')
+ if test -n "${render_cards}"; then
+ addpredict "${render_cards}"
+ fi
+ shopt -u nullglob
+ addpredict /dev/nvidiactl
+}
+
+src_configure() {
+ local depth=16
+ use q8 && depth=8
+ use q32 && depth=32
+
+ local openmp=disable
+ use openmp && { tc-has-openmp && openmp=enable; }
+
+ use perl && perl_check_env
+
+ [[ ${CHOST} == *-solaris* ]] && append-ldflags -lnsl -lsocket
+
+ local myeconfargs=(
+ $(use_enable static-libs static)
+ $(use_enable hdri)
+ $(use_enable opencl)
+ --with-threads
+ --with-modules
+ --with-quantum-depth=${depth}
+ $(use_with cxx magick-plus-plus)
+ $(use_with perl)
+ --with-perl-options='INSTALLDIRS=vendor'
+ --with-gs-font-dir="${EPREFIX}"/usr/share/fonts/urw-fonts
+ $(use_with bzip2 bzlib)
+ $(use_with X x)
+ $(use_with zlib)
+ --without-autotrace
+ $(use_with postscript dps)
+ $(use_with djvu)
+ --with-dejavu-font-dir="${EPREFIX}"/usr/share/fonts/dejavu
+ $(use_with fftw)
+ $(use_with fpx)
+ $(use_with fontconfig)
+ $(use_with truetype freetype)
+ $(use_with postscript gslib)
+ $(use_with graphviz gvc)
+ $(use_with heif heic)
+ $(use_with jbig)
+ $(use_with jpeg)
+ $(use_with jpeg2k openjp2)
+ $(use_with lcms)
+ $(use_with lqr)
+ $(use_with lzma)
+ $(use_with openexr)
+ $(use_with pango)
+ $(use_with png)
+ $(use_with raw)
+ $(use_with svg rsvg)
+ $(use_with tiff)
+ $(use_with webp)
+ $(use_with corefonts windows-font-dir "${EPREFIX}"/usr/share/fonts/corefonts)
+ $(use_with wmf)
+ $(use_with xml)
+ --${openmp}-openmp
+ --with-gcc-arch=no-automagic
+ )
+ CONFIG_SHELL=$(type -P bash) econf "${myeconfargs[@]}"
+}
+
+src_test() {
+ # Install default (unrestricted) policy in $HOME for test suite #664238
+ local _im_local_config_home="${HOME}/.config/ImageMagick"
+ mkdir -p "${_im_local_config_home}" || \
+ die "Failed to create IM config dir in '${_im_local_config_home}'"
+ cp "${FILESDIR}"/policy.test.xml "${_im_local_config_home}/policy.xml" || \
+ die "Failed to install default blank policy.xml in '${_im_local_config_home}'"
+
+ local im_command= IM_COMMANDS=()
+ if [[ ${PV} == "9999" ]] ; then
+ IM_COMMANDS+=( "magick -version" ) # Show version we are using -- cannot verify because of live ebuild
+ else
+ IM_COMMANDS+=( "magick -version | grep -q -- \"${MY_PV}\"" ) # Verify that we are using version we just built
+ fi
+ IM_COMMANDS+=( "magick -list policy" ) # Verify that policy.xml is used
+ IM_COMMANDS+=( "emake check" ) # Run tests
+
+ for im_command in "${IM_COMMANDS[@]}"; do
+ eval "${S}"/magick.sh \
+ ${im_command} || \
+ die "Failed to run \"${im_command}\""
+ done
+}
+
+src_install() {
+ # Ensure documentation installation files and paths with each release!
+ emake \
+ DESTDIR="${D}" \
+ DOCUMENTATION_PATH="${EPREFIX}"/usr/share/doc/${PF}/html \
+ install
+
+ rm -f "${ED%/}"/usr/share/doc/${PF}/html/{ChangeLog,LICENSE,NEWS.txt}
+ dodoc {AUTHORS,README}.txt ChangeLog
+
+ if use perl; then
+ find "${ED}" -type f -name perllocal.pod -exec rm -f {} +
+ find "${ED}" -depth -mindepth 1 -type d -empty -exec rm -rf {} +
+ fi
+
+ find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} +
+
+ if use opencl; then
+ cat <<-EOF > "${T}"/99${PN}
+ SANDBOX_PREDICT="/dev/nvidiactl:/dev/nvidia-uvm:/dev/ati/card:/dev/dri/card:/dev/dri/renderD128"
+ EOF
+
+ insinto /etc/sandbox.d
+ doins "${T}"/99${PN} #472766
+ fi
+
+ insinto /usr/share/${PN}
+ doins config/*icm
+}
+
+pkg_postinst() {
+ local _show_policy_xml_notice=
+
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ # This is a new installation
+ _show_policy_xml_notice=yes
+ else
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if ! ver_test "${v}" -gt "7.0.8.10-r2"; then
+ # This is an upgrade
+ _show_policy_xml_notice=yes
+
+ # Show this elog only once
+ break
+ fi
+ done
+ fi
+
+ if [[ -n "${_show_policy_xml_notice}" ]]; then
+ elog "For security reasons, a policy.xml file was installed in /etc/ImageMagick-7"
+ elog "which will prevent the usage of the following coders by default:"
+ elog ""
+ elog " - PS"
+ elog " - PS2"
+ elog " - PS3"
+ elog " - EPS"
+ elog " - PDF"
+ elog " - XPS"
+ fi
+}