summaryrefslogtreecommitdiff
path: root/media-gfx
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-01-05 08:03:20 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-01-05 08:03:20 +0000
commit1ddcee0bd115d2f843f82061cb0d1741bf90151d (patch)
tree20e516fd0fd41ce7f9f04e7ea8e7d8d3139af3f4 /media-gfx
parentc1c9e565a5696c10e991d8b5372f781ba5f13d5c (diff)
gentoo auto-resync : 05:01:2024 - 08:03:20
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/Manifest.gzbin37688 -> 37688 bytes
-rw-r--r--media-gfx/imagemagick/Manifest8
-rw-r--r--media-gfx/imagemagick/imagemagick-6.9.13.2.ebuild4
-rw-r--r--media-gfx/imagemagick/imagemagick-6.9.13.3.ebuild242
-rw-r--r--media-gfx/imagemagick/imagemagick-7.1.1.24.ebuild4
-rw-r--r--media-gfx/imagemagick/imagemagick-7.1.1.25.ebuild252
6 files changed, 504 insertions, 6 deletions
diff --git a/media-gfx/Manifest.gz b/media-gfx/Manifest.gz
index 23b88ad210b6..982a795d7e92 100644
--- a/media-gfx/Manifest.gz
+++ b/media-gfx/Manifest.gz
Binary files differ
diff --git a/media-gfx/imagemagick/Manifest b/media-gfx/imagemagick/Manifest
index b9701eb49ec8..d64191f1789e 100644
--- a/media-gfx/imagemagick/Manifest
+++ b/media-gfx/imagemagick/Manifest
@@ -4,11 +4,15 @@ AUX policy-hardening.snippet 442 BLAKE2B d79fdbddab418fc9d8391e78992e3dda844e096
AUX policy.test.xml 746 BLAKE2B 6bfa073606469b81cf517d9b069e48794cbda9272d12c3abb8ae3456aaf30cd1923510baddb7d813aa8ccde84e161de0b29314cef7b1a37730c7ad5236d1f5dc SHA512 22f66004324e3777393446a3df738ecd2aa405df088d39137008514cd86b436765b48ccd4355d670a42061ce4e5a7b2fd8e4be5852cd914f62ff0250a4a7ae57
DIST ImageMagick-6.9.12-89.tar.xz 9262956 BLAKE2B 5f4eb74e6a57cc16503e1bc803472f1bbfaf1b737a4bb9f1257e8100c791bb12fdf8904c8eea4d27d9a26da70839894eb157133a1ad1de7a0a9d700f62747147 SHA512 d109cce5dbe239f0e20e871575e5093938cc0c45053e99f675a40a4d5a24f0e67814abc9aac72c2fc0b3216249ff46ff82fa299877d4488bdbf3f28766b50cde
DIST ImageMagick-6.9.13-2.tar.xz 9611768 BLAKE2B 0b0bb7dec536b12f0f5dc83b03b33a122158a946ea38a44b48442124c5e11a7af33100e213c8332baa23bc45329cb66611bf2347631155bb16c3ceb6ccc185f6 SHA512 d693983eda6fba6b5e1d5d5bb4dc814dffd6a064c0464dded86c5f780ce52bef737d1bc870fae4c5bd039c419585fb374a0c4fbd19d94153d319eb8e3d5595b3
+DIST ImageMagick-6.9.13-3.tar.xz 9616088 BLAKE2B 9682bc15c42199c266cc8d9152099a96a4e66154b9c74cd7c72993c3d9edd8aa6123d64ae6852d520c9a346a27ee27120a4d2b4f7973c279006d7570666c4080 SHA512 3e061c8a7bec0c49db9e990858257ff092500430d382bcad0c76aaa8d531bd2c13b727a52f060fc6051a0217f41f254570d23a4301c15a7af547e13f148a4ca9
DIST ImageMagick-7.1.1-11.tar.xz 10196156 BLAKE2B 328ffe6dbf30b597ec56f94ab5e74cca553cb47eca244c76b91273c278c097990fb8ed7eeaa22311d4408022808e752cbb4c8775c56b3d64d3a4216487093e9e SHA512 b3c839457b62a6b83d3ab9cf12bda2f41030eed75ae5ff898331ffdfe202a93ea8284c8f8608f4ecd013c7eb0c4cbef6527caff62bcf382d62e8531389628fc3
DIST ImageMagick-7.1.1-24.tar.xz 10561928 BLAKE2B 992d1425a2e306f9bf85dfafb09f2869fae09b57a32c3b1992d4f478932ef6ec58368d70574f134e7226b09a6275cd1f4343064b36ca3fb8556a60d59138df2e SHA512 78dbd763f70b36e95a728cff7a1e02ec1c5d3b9a8371161e306e77450f1a3c33a987f19dda3eca94dfa2435b4a29a97c5df5155915a73441f74174a98b36a7d9
+DIST ImageMagick-7.1.1-25.tar.xz 10557080 BLAKE2B 833c450c87e4a1650b6d71e2d8abeea74ad6f0afa7ec6f0cba9c5bb39044cf17c6b94959d65f121a18faa8ae6ad8b8921b48700f5b6269df9d9b0e7049b22e04 SHA512 0c4a34f6ada5310af248c2e569900604c50295ecdcbc1dd7e5c4375cc68277ec9cac6786db8fa42d3783c2c68468cf88e0413fa60e4ac40d06818bfd34dcf09e
EBUILD imagemagick-6.9.12.89-r1.ebuild 7398 BLAKE2B 8d008c24c598beeb0310fc20fb15191e46ae6f9201fc1377ef42aed6c982f38a498faac5dffcad016d924c352bdba1113aaccb65a16e7f636e1b1a8bc58bdaf3 SHA512 44437431485556b35d046dde691d723aac9d79ea023e4f4dae2eb59c94c382f619f4d3c086bb4e3dae41ab9cf217c9a6ab289e6e3ebcc7b7c983176f384f5b93
-EBUILD imagemagick-6.9.13.2.ebuild 6843 BLAKE2B b63530fdf7fd8f948991925d066ea016f75502fa616542bbf2d746006fe974afbc48d10f48b19bbacaa432532cee9afff4d769a4ffa5f0a831f666065b1ce234 SHA512 72835201f2ac9a00e466124b78bf404cb21eb571806ec2fd37d72d8c2ad843d939367f5d0deec28cb555cc8a2e52b2b5543195e804dda5bb12a2a42531729134
+EBUILD imagemagick-6.9.13.2.ebuild 6835 BLAKE2B 9535a4be4ce046b4c6d8fd365d2089ef5b09f13cc93594fba787406711f06b81ce5fbf06034d575dd9021e330ae21a44a0077dd498d1187e5dc3acb5662604c9 SHA512 40d8c6792c511ae10c27ad0b91761ecf64289a1970ffa3ae595f1ea3c92bc129787dc13dbe4608f13a5d7882790c24851495a613df1b3e6d713ee24152a0f13a
+EBUILD imagemagick-6.9.13.3.ebuild 6790 BLAKE2B 1dbe960e8a098b25a1d9639774c70ecf5c6ea5167f8517316a21063002318292fc006399d49e7df227ade3b2bab39e3abb1a9d746f68cb7aff422f9232dedba6 SHA512 700b93161b05dea379b18789e93bee5366e11e29413c6fbdf051e79d87af71e1d78c7de88a63004a200d7a613e082d37f8c2426d02328fd97a18d4088cc3069f
EBUILD imagemagick-7.1.1.11.ebuild 7759 BLAKE2B d0df3470502dc32e4858e22dc61de6821917fd32750b5746345e1d60c6dd6295c8dc5ea9aa93e3a879793d4f8df29496def03d25fc127956a24a55f94953ba54 SHA512 a24b15116f62b5bf9fb3543fe0a1b93101e65d4d6be3a15c2c7bce8f334a5c599f807e389f01424bbbdf6557a08030a6e1897c653ecc1eb9838c5f1c3990e139
-EBUILD imagemagick-7.1.1.24.ebuild 7193 BLAKE2B bb5d68bd8f7459b681e0a3e3c511f7d915918325a5f1e3d13fb086895d386e1c7e7cfc5b2a5ffe5fc39c2de1a5526c15fefe7fc4aad800ab0c917cd1de991e7e SHA512 c2529da0b1994935e0aa39abe62cc052a1ebd9d15170900a4237178c9daefc7bff94b0a597bb3525c69070c5d6fd8f29a34bf5d9d0e8d514171acd320b96aa0c
+EBUILD imagemagick-7.1.1.24.ebuild 7185 BLAKE2B ba1221f3c3e37ae107094d1fcef498a30a02e4246f4675ab9c52949f98457430b2f459a320fb0d062a59393c60afcd505ab263efd0db595139eb9e35f5b1ecf0 SHA512 04343bea323f7b9aa6dbfadefa84d2cd3907d7c9a615f80d4028dfb133d9d70af51134a128e1fe061f139d45bb4970538d09f725fa2bc7c6f659fff92c06131b
+EBUILD imagemagick-7.1.1.25.ebuild 7153 BLAKE2B 57828fb5a6c9d1eaedcdb5b6a9d0f01414818effa3b023c70c13964c19d92de152482427c0f34c26de61396074506d2a75c867694b88d6633022c483da37a2fa SHA512 7e8dd1c5285d14ede65e0d358991ac2b4ae6ca69b7cfb2beaebec00c8f64806411a9655fe1b3f70980373d1eefa5ce26d4b4ba6071f04d7c3dd1a560674a3cd4
EBUILD imagemagick-9999.ebuild 7153 BLAKE2B 33dcb5df561f77ce774e26547c2ec308cd69c497fb3f65316a0fdd7394f0b0188da2de883b6e5a2f5d7346aa20d4aa8ccfd904fc5c015102e2e96a82ae614e23 SHA512 2ea6c09e935b5a6840cff5c29e86d034e46b19f6c1ebb7055db6314f7366bace3768155e36ef6f675c4b301d425ff9c66c6c7ab9cc4009c4dd943ee110c5b3fc
MISC metadata.xml 1140 BLAKE2B c1eee3f7686c72c0603f94e19953e81f3467bdc6192d06c61c9c7da67a39e64d81603efa0dce5fe647a47a9c8bd1568609944b7fa1c6c2547ca3badcdde7a0d4 SHA512 d89de96e346c6d46921b5b39a785ce7e584a043f7e8bc73dd8a727c5cc102b717b4226cef04a0cd8c41a97bdbe43d0eda3cacbf5e0db65b741b0c6dd577eb235
diff --git a/media-gfx/imagemagick/imagemagick-6.9.13.2.ebuild b/media-gfx/imagemagick/imagemagick-6.9.13.2.ebuild
index 102d35e4f68c..b99a78982242 100644
--- a/media-gfx/imagemagick/imagemagick-6.9.13.2.ebuild
+++ b/media-gfx/imagemagick/imagemagick-6.9.13.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -14,7 +14,7 @@ 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 ~x64-solaris"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
fi
S="${WORKDIR}/${MY_P}"
diff --git a/media-gfx/imagemagick/imagemagick-6.9.13.3.ebuild b/media-gfx/imagemagick/imagemagick-6.9.13.3.ebuild
new file mode 100644
index 000000000000..1954fe32d565
--- /dev/null
+++ b/media-gfx/imagemagick/imagemagick-6.9.13.3.ebuild
@@ -0,0 +1,242 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+QA_PKGCONFIG_VERSION=$(ver_cut 1-3)
+inherit flag-o-matic libtool perl-functions toolchain-funcs
+
+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 ~x64-solaris"
+fi
+
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="A collection of tools and libraries for many image formats"
+HOMEPAGE="https://www.imagemagick.org/"
+
+LICENSE="imagemagick"
+# Please check this on bumps, SONAME is often not updated! Use abidiff on old/new.
+# If ABI is broken, change the bit after the '-'.
+SLOT="0/$(ver_cut 1-3)-0"
+IUSE="bzip2 corefonts +cxx djvu fftw fontconfig fpx graphviz hardened 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 )"
+
+RDEPEND="
+ !media-gfx/graphicsmagick[imagemagick]
+ dev-libs/libltdl
+ 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:=[x265] )
+ jbig? ( >=media-libs/jbigkit-2:= )
+ jpeg? ( media-libs/libjpeg-turbo:= )
+ 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:= )
+ png? ( media-libs/libpng:= )
+ postscript? ( app-text/ghostscript-gpl:= )
+ raw? ( media-libs/libraw:= )
+ svg? (
+ gnome-base/librsvg
+ media-gfx/potrace
+ )
+ tiff? ( media-libs/tiff:= )
+ truetype? (
+ media-fonts/urw-fonts
+ >=media-libs/freetype-2
+ )
+ webp? ( media-libs/libwebp:= )
+ 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}
+ X? ( x11-base/xorg-proto )
+"
+BDEPEND="virtual/pkgconfig"
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_prepare() {
+ default
+
+ # for Darwin modules
+ elibtoolize
+
+ # For testsuite, see bug #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
+
+ use perl && perl_check_env
+
+ [[ ${CHOST} == *-solaris* ]] && append-ldflags -lnsl -lsocket
+
+ local myeconfargs=(
+ $(use_enable static-libs static)
+ $(use_enable hdri)
+ $(use_enable opencl)
+ $(use_enable openmp)
+ --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)
+ --with-gcc-arch=no-automagic
+
+ # Default upstream (as of 6.9.12.96/7.1.1.18 anyway) is open
+ # For now, let's make USE=hardened do 'limited', and have USE=-hardened
+ # reflect the upstream default of 'open'.
+ #
+ # We might change it to 'secure' and 'limited' at some point.
+ # See also bug #716674.
+ --with-security-policy=$(usex hardened limited open)
+ )
+
+ CONFIG_SHELL="${BROOT}"/bin/bash econf "${myeconfargs[@]}"
+}
+
+src_test() {
+ # Install default (unrestricted) policy in ${HOME} for test suite, bug #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
+
+ 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
+ # bug #472766
+ doins "${T}"/99${PN}
+ fi
+
+ insinto /usr/share/${PN}
+ doins config/*icm
+}
diff --git a/media-gfx/imagemagick/imagemagick-7.1.1.24.ebuild b/media-gfx/imagemagick/imagemagick-7.1.1.24.ebuild
index 099cddd93344..2a467e80834a 100644
--- a/media-gfx/imagemagick/imagemagick-7.1.1.24.ebuild
+++ b/media-gfx/imagemagick/imagemagick-7.1.1.24.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -14,7 +14,7 @@ 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 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
S="${WORKDIR}/${MY_P}"
diff --git a/media-gfx/imagemagick/imagemagick-7.1.1.25.ebuild b/media-gfx/imagemagick/imagemagick-7.1.1.25.ebuild
new file mode 100644
index 000000000000..eb7f89a09b68
--- /dev/null
+++ b/media-gfx/imagemagick/imagemagick-7.1.1.25.ebuild
@@ -0,0 +1,252 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+QA_PKGCONFIG_VERSION=$(ver_cut 1-3)
+inherit autotools flag-o-matic perl-functions toolchain-funcs
+
+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 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+fi
+
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="A collection of tools and libraries for many image formats"
+HOMEPAGE="https://www.imagemagick.org/"
+
+LICENSE="imagemagick"
+# Please check this on bumps, SONAME is often not updated! Use abidiff on old/new.
+# If ABI is broken, change the bit after the '-'.
+SLOT="0/$(ver_cut 1-3)-18"
+IUSE="bzip2 corefonts +cxx djvu fftw fontconfig fpx graphviz hardened hdri heif jbig jpeg jpeg2k jpegxl 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 )"
+
+RDEPEND="
+ !media-gfx/graphicsmagick[imagemagick]
+ dev-libs/libltdl
+ 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:=[x265] )
+ jbig? ( >=media-libs/jbigkit-2:= )
+ jpeg? ( media-libs/libjpeg-turbo:= )
+ jpeg2k? ( >=media-libs/openjpeg-2.1.0:2 )
+ jpegxl? ( >=media-libs/libjxl-0.6:= )
+ 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:= )
+ png? ( media-libs/libpng:= )
+ postscript? ( app-text/ghostscript-gpl:= )
+ raw? ( media-libs/libraw:= )
+ svg? (
+ gnome-base/librsvg
+ media-gfx/potrace
+ )
+ tiff? ( media-libs/tiff:= )
+ truetype? (
+ media-fonts/urw-fonts
+ >=media-libs/freetype-2
+ )
+ webp? ( media-libs/libwebp:= )
+ 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}
+ X? ( x11-base/xorg-proto )
+"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-9999-nocputuning.patch"
+)
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_prepare() {
+ default
+
+ #elibtoolize # for Darwin modules
+ eautoreconf
+
+ # 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
+
+ use perl && perl_check_env
+
+ [[ ${CHOST} == *-solaris* ]] && append-ldflags -lnsl -lsocket
+
+ local myeconfargs=(
+ $(use_enable static-libs static)
+ $(use_enable hdri)
+ $(use_enable opencl)
+ $(use_enable openmp)
+ --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)
+ $(use_with jpegxl 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)
+
+ # Default upstream (as of 6.9.12.96/7.1.1.18 anyway) is open
+ # For now, let's make USE=hardened do 'limited', and have USE=-hardened
+ # reflect the upstream default of 'open'.
+ #
+ # We might change it to 'secure' and 'limited' at some point.
+ # See also bug #716674.
+ --with-security-policy=$(usex hardened limited open)
+ )
+
+ CONFIG_SHELL="${BROOT}"/bin/bash econf "${myeconfargs[@]}"
+}
+
+src_test() {
+ # Install default (unrestricted) policy in $HOME for test suite, bug #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
+
+ 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
+}