summaryrefslogtreecommitdiff
path: root/media-gfx/imagemagick
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-08-26 00:09:36 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-08-26 00:09:36 +0100
commitb1c81de4fadbd00897700a7321f03b390d952b2e (patch)
treee6cc812351d4f105c110cfc363ebb497e996f47a /media-gfx/imagemagick
parent7c59acba5699c9c58090a7a738669669a7307023 (diff)
gentoo resync : 26.08.2021
Diffstat (limited to 'media-gfx/imagemagick')
-rw-r--r--media-gfx/imagemagick/Manifest4
-rw-r--r--media-gfx/imagemagick/imagemagick-6.9.12.20.ebuild262
-rw-r--r--media-gfx/imagemagick/imagemagick-7.1.0.5.ebuild269
3 files changed, 535 insertions, 0 deletions
diff --git a/media-gfx/imagemagick/Manifest b/media-gfx/imagemagick/Manifest
index 78320a762253..748f1070431c 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.12-19.tar.xz 9183520 BLAKE2B 144a31c9f5a0e3489d362bf42a0ba5b3835f3d3e6b85d8573a9ca5188f04e0c5e6c16bd59510621805b2941331df412d845a0650d19a05bc97dac1e0c06b8e1b SHA512 1175d6330cd9c4dc8f4b7c1dc178a4654a9fcb17e209c10dc8eb776cb64233a8fa1c512d72ded50f0588ec35a13979d30e37e966ddce27fbd175f48698946b88
+DIST ImageMagick-6.9.12-20.tar.xz 9174816 BLAKE2B ccdb4775867224d08871b7147fa20e6b09305f6501a07de85ad53b862c47921c5b6b39eaf62fa86258c1a6fea1abe417817b4a4887a981a6f5a786636fa57946 SHA512 2ba849ef7212b0255f1db6509b718f7dd3825d16e45ea115a77ecf6b8afc41cb823ba0ddddc124aa0afe5605f1aa5e2865daa00da88568bf5874225de6620fe3
DIST ImageMagick-7.1.0-4.tar.xz 10310828 BLAKE2B f7504d47e95be57b5b2f02f0ac8ea526c0b6f60cd0e3ace3445e6d52cc7cf9d4287e1cb24d4451587807809e671f459c107b1dfcb3a99436d112591a32fa5365 SHA512 21bd565227eef40bf967a23061e799dc0cb767c226717a66135ecc07a812495fe62c0d36c38b5c801356c63a9e4bf5a48b04fc56fcf6c0f5e37c2ccf52fce855
+DIST ImageMagick-7.1.0-5.tar.xz 10308228 BLAKE2B c65f0bb04133a6390770cb06ed4a102fef58647b6d03c09ad840a0b0abf18a5875c244c5d8fb10492f5ccc62d976c170659ead93ad7b8a8178c88fe3778dfa20 SHA512 1fc66c57e4dbe01c2730508c42cd8a8e94be087751b3ad460318e1d4a7aa2c1af95d22b2f432037590af5e7f4a8e3cdeb276278423ed30d485267a907c7006d6
EBUILD imagemagick-6.9.12.19.ebuild 7182 BLAKE2B d971cfc66508d794a3409e00c6165f9e78c7dfa40ca8e631499368be50efaa8d12ed08d2712c8bd0fc392245c22471bff5f2662c6abe89b301badeb9dc82de42 SHA512 8ebf8dd67a2efe586495f245bad587616a746bb8d161217d9680adbc714bb461403a171d3be4ff843c20e45f090de81fb5cb50ae5b128a5813d8199bee88fa12
+EBUILD imagemagick-6.9.12.20.ebuild 7190 BLAKE2B dd19343291540d9b16a9788d9f2f6b15066d4266bccd43007223c87aef52bb26d5525a54bba2e5d1db7dff888ab39aa8b9c254bf90933e272b648336ba1981d5 SHA512 9eafa9a51938be0e0b8ec28fb147cb71b9f0fc81f97ddc2b9d48bbeb45a21a39331ab22644fb8739feecf7d0b4130d1b2c9be006db9b5b623bbeadf8473a0c20
EBUILD imagemagick-7.1.0.4.ebuild 7396 BLAKE2B e824e8d1c9b1b1561bcfe59e6bfa2fd6770508453c1a4246b88cdd671470f35a5576d0c0a76803501d76bb31768d87c5066c92f1f9f786ed6d01e77e5792f96e SHA512 bdfeb146f22e581bcab707407229a31debf6623b7861141d8fec50cea8d134232fe83066a9898a2136553edf946bf727d7a8e5724a7f979c0bac39868356b191
+EBUILD imagemagick-7.1.0.5.ebuild 7404 BLAKE2B 2a92a400e6b41a28bd9ff356ad4a40656c61df367ec298c685b663a22463cbc090fb368f12aae33a75dda7ade766464822d0293bc302ad11db790b7b3c7a4a8d SHA512 758697ee60c9d674ea02c32d1e997466809f515bd7ea361aaa5ef77528b9705eccb16d906cc548c0df9a3d0054e8a7615be665797cb6d9cb3eab6d06510c5dcf
EBUILD imagemagick-9999.ebuild 7397 BLAKE2B 9845d38817e2dbcfbc3c970d6ed508588caf22adc844178de2c2fae9f12c12cee60e7c97db29b99393720675a9401d1175e2114b8f5c3bee664335bdd4703823 SHA512 8832088aa61e5c7f6293d970f4460dbc629c2a7a0a9b70a44b8e7de9473823b7ee156e0f40981eb327eb222a9b604e21f3bbffb41ffff580b036c67d7da996b8
MISC metadata.xml 1226 BLAKE2B 09876ac633363817b503a307e2cc0a500cfdcc1256cbb3b3e595600a0c913aa7ad252eb4dbe18b911bfcc9f06ec7b8046e0c2e3882eec305e471080bd76de906 SHA512 da1bb41d877614a237ea14379614a509fb58d58f4e93e56500e6aa0007c0515e6d90731c5df9e387f36632a210276a6983784cede64119453c965a9fc7e2ea4d
diff --git a/media-gfx/imagemagick/imagemagick-6.9.12.20.ebuild b/media-gfx/imagemagick/imagemagick-6.9.12.20.ebuild
new file mode 100644
index 000000000000..d17773f5081b
--- /dev/null
+++ b/media-gfx/imagemagick/imagemagick-6.9.12.20.ebuild
@@ -0,0 +1,262 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit flag-o-matic libtool perl-functions toolchain-funcs multilib
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/ImageMagick/ImageMagick6.git"
+ inherit git-r3
+ MY_P="imagemagick-9999"
+else
+ MY_PV="$(ver_rs 3 '-')"
+ MY_P="ImageMagick-${MY_PV}"
+ SRC_URI="mirror://imagemagick/${MY_P}.tar.xz"
+ 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"
+fi
+
+DESCRIPTION="A collection of tools and libraries for many image formats"
+HOMEPAGE="https://www.imagemagick.org/"
+
+LICENSE="imagemagick"
+SLOT="0/6.9.11-60"
+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"
+
+REQUIRED_USE="corefonts? ( truetype )
+ svg? ( xml )
+ test? ( corefonts )"
+
+RESTRICT="!test? ( test )"
+
+BDEPEND="virtual/pkgconfig"
+
+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
+ media-gfx/potrace
+ )
+ 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]
+ X? ( x11-base/xorg-proto )"
+
+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=()
+ 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:=.*:='':" {} +
+ # .la files in parent are not needed, keep plugin .la files
+ find "${ED}"/usr/$(get_libdir)/ -maxdepth 1 -name "*.la" -delete || die
+
+ if use opencl; then
+ cat <<-EOF > "${T}"/99${PN}
+ SANDBOX_PREDICT="/dev/nvidiactl:/dev/nvidia-uvm:/dev/ati/card:/dev/dri/card:/dev/dri/card0:/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.1.0.5.ebuild b/media-gfx/imagemagick/imagemagick-7.1.0.5.ebuild
new file mode 100644
index 000000000000..42e594451118
--- /dev/null
+++ b/media-gfx/imagemagick/imagemagick-7.1.0.5.ebuild
@@ -0,0 +1,269 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit 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://imagemagick/${MY_P}.tar.xz"
+ 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"
+fi
+
+DESCRIPTION="A collection of tools and libraries for many image formats"
+HOMEPAGE="https://www.imagemagick.org/"
+
+LICENSE="imagemagick"
+SLOT="0/7.1.0-0"
+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"
+
+REQUIRED_USE="corefonts? ( truetype )
+ svg? ( xml )
+ test? ( corefonts )"
+
+RESTRICT="!test? ( test )"
+
+BDEPEND="virtual/pkgconfig"
+
+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
+ media-gfx/potrace
+ )
+ 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 )
+ zip? ( dev-libs/libzip:= )
+ zlib? ( sys-libs/zlib:= )"
+
+DEPEND="${RDEPEND}
+ !media-gfx/graphicsmagick[imagemagick]
+ X? ( x11-base/xorg-proto )"
+
+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 zip)
+ $(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)
+ --without-jxl
+ $(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:=.*:='':" {} +
+ # .la files in parent are not needed, keep plugin .la files
+ find "${ED}"/usr/$(get_libdir)/ -maxdepth 1 -name "*.la" -delete || die
+
+ if use opencl; then
+ cat <<-EOF > "${T}"/99${PN}
+ SANDBOX_PREDICT="/dev/nvidiactl:/dev/nvidia-uvm:/dev/ati/card:/dev/dri/card:/dev/dri/card0:/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
+}