summaryrefslogtreecommitdiff
path: root/media-gfx/imagemagick
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-12-24 14:11:38 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-12-24 14:11:38 +0000
commitde49812990871e1705b64051c35161d5e6400269 (patch)
tree5e1e8fcb0ff4579dbd22a1bfee28a6b97dc8aaeb /media-gfx/imagemagick
parent536c3711867ec947c1738f2c4b96f22e4863322d (diff)
gentoo resync : 24.12.2018
Diffstat (limited to 'media-gfx/imagemagick')
-rw-r--r--media-gfx/imagemagick/Manifest15
-rw-r--r--media-gfx/imagemagick/files/imagemagick-6.9.10.16-fix-MagickCore-config.patch23
-rw-r--r--media-gfx/imagemagick/imagemagick-6.9.10.16-r1.ebuild (renamed from media-gfx/imagemagick/imagemagick-6.9.10.14.ebuild)13
-rw-r--r--media-gfx/imagemagick/imagemagick-6.9.10.19.ebuild248
-rw-r--r--media-gfx/imagemagick/imagemagick-7.0.8.16.ebuild (renamed from media-gfx/imagemagick/imagemagick-7.0.8.14.ebuild)14
-rw-r--r--media-gfx/imagemagick/imagemagick-7.0.8.19.ebuild256
-rw-r--r--media-gfx/imagemagick/imagemagick-9999.ebuild14
7 files changed, 565 insertions, 18 deletions
diff --git a/media-gfx/imagemagick/Manifest b/media-gfx/imagemagick/Manifest
index 95e1ed39f2e5..ab17767ad4b1 100644
--- a/media-gfx/imagemagick/Manifest
+++ b/media-gfx/imagemagick/Manifest
@@ -1,8 +1,13 @@
+AUX imagemagick-6.9.10.16-fix-MagickCore-config.patch 831 BLAKE2B 87421ba8c9d9bd2e45955c4650bbb14552eea2676d87217603618f4a82fb49b884da16a89f0f084440dff9c16dfa64198db2c6f5d6722d7f2daad173932d20fa SHA512 3d6644019414ce9a14ea9794a1a3608dc7be12e9bccb920ffa804c2209fee06705ba8c8342592f313e54d074b79a6364387f2d5945c4fbe56b80a13ee323eb01
AUX policy-hardening.snippet 442 BLAKE2B d79fdbddab418fc9d8391e78992e3dda844e096052115113ff6f759c1a54541bcd7d7793547bc7140776659c98379a9e9f004aa46f757300a33f445d396fbf14 SHA512 e9e723c40d5b8c52bbc2f2b9a3ad7c7e2aee493bc37b6c3940e8486b92a1c6659e47b1e12ee2fb11c8a8b6ee48a7fc10354617ae12c36181a58e9e73b239368d
AUX policy.test.xml 746 BLAKE2B 6bfa073606469b81cf517d9b069e48794cbda9272d12c3abb8ae3456aaf30cd1923510baddb7d813aa8ccde84e161de0b29314cef7b1a37730c7ad5236d1f5dc SHA512 22f66004324e3777393446a3df738ecd2aa405df088d39137008514cd86b436765b48ccd4355d670a42061ce4e5a7b2fd8e4be5852cd914f62ff0250a4a7ae57
-DIST ImageMagick-6.9.10-14.tar.xz 8931552 BLAKE2B e064648947f661c41fe86dea6484c0b9e01e54fcd3428b8d6dd39b2b7f93735200af9e4b49f0bdc92b574afbaa53ed044aab2b4b751e087ba126e58cdda1f497 SHA512 1a2c9fb717b0441a18c638991cf5365c42d00c19c0f67bc7cce4bd2cba42bac602e4dba8bd4abc1dbc6609a08b1292403acc3657b61c58ed0609e2bf740d0725
-DIST ImageMagick-7.0.8-14.tar.xz 8634400 BLAKE2B 1d5ad294ce29f275790c3b6ba76445ffb4aeaa2ff94d91af4d52a00b407dca0e5a4f589ec1a860bf6695952f8e7943d507baee58b885dc5fca3510de1d84c8eb SHA512 0a5f3357f4ce5b245d60b178d81b58c3483effb45b669791d4686514a8c3b0ad04244e31caf0a4a614e73e3e071c17d851992670917ebcf2761c977d77c58dd6
-EBUILD imagemagick-6.9.10.14.ebuild 6789 BLAKE2B 55c818f40bca0a41d46c28e5adcbf4bcb6f5cb96496de91d2651624f1d2edc768b2915a8d1c6aaaaf2058e747991282c513fb366a15f775a4bc95c7ce1f20748 SHA512 cac9776476b2d7d05bff3163a109a7514b51d7b362f6696791c1e0ff7ed18ccc5cdd3ebe3a90e2d94bad18b09c0eedfcc95fc629663ef211fc7e194ff9ddf815
-EBUILD imagemagick-7.0.8.14.ebuild 6911 BLAKE2B 83a934d821a8a5b8a2d1c0f15038792c9fc09f1b4c2f2b306041d23a6fb0dc586e87c08dc4b0d79edd6d6943fae9c4ccd21ca04ca2bb7f01b1632a0dd6abf8fc SHA512 1f4732f65f6725013a4d88dc01183ffed52d20687234b50a45130f6e999f1a22986c625ea57d070985429053e908d91e53d63c09ae0201c5051a0fc1eec16d83
-EBUILD imagemagick-9999.ebuild 6920 BLAKE2B c48c6fcf967b904616a5bdc0ec0f06451956776f308cfd9064ef15bf2b75d55496d85eebaaef50961ea980bbd5a30eda33ffde2b774ff160af468341e92270d4 SHA512 2949766ec9289e1003cde57c1487d34989becea06ccbf8b2c4a980afe03cae06b91f04164421d2420b6432f7c60f4751a4dd217b27966d265f485e5df43d6e78
+DIST ImageMagick-6.9.10-16.tar.xz 8929036 BLAKE2B 1eb3150c5725d96bb2a9f9f7c07b5037e3da7e8f3871a9ae448352a967e5d8f5ccffdb7c27b608e4d6d9c8c13f7e8a219760292b6b191d37378c17ff182a2d09 SHA512 0adc57158260797df6db68256e87848135b52eba91dc65978e255061e3b22bfe7b3fbee3626ee8fb0183d37649143f0a46cbcbd6e090604cc4bb8e0752255fbd
+DIST ImageMagick-6.9.10-19.tar.xz 8934480 BLAKE2B d456acd5c40e7149839f7fea93826ce67c8a34b45b2435e2e6e35cdf3487163e47eddc9e81d251ba75d7c7125b5cb67ca58a945f380cc2bda90d9e6b4a6271eb SHA512 17cad58549b7e195693ce8f7c4dc936136792be10a15f47af66b60c3db2c4580b56d413d3034dd597d6e9c36f01d6b9b277bfd7c3b0828792e03ff5e8803dd40
+DIST ImageMagick-7.0.8-16.tar.xz 8646148 BLAKE2B 5a9c287164f99886c411cbb1416aaa72bdf527ba3be097a0ea6638cc6b0ae383057acab09974c7d3954a2985ec39e0ce4f6d6a2423ff4bb020d011bd1988c337 SHA512 fbc0b0410702c15352989652c055e4e1a099878e30b859c75322e162eccd384cabb98e14cac14e3fb2c902f25f80a5b62f94380ef78f891731980de9a40b6867
+DIST ImageMagick-7.0.8-19.tar.xz 8652452 BLAKE2B 0b6507ce98a7a609b834b00fc709fc6d25266716b74eea0ff1f0208daa9966aced70294c92e181fc21e43426cfd40a4614e12e7bd1c89ff74dbd65739d3bdbeb SHA512 f00ee21a8367202ea4bb25c99894679bbc3c2dd0c0e644292b8565bfda41cd8b0a8aa45bde85066347dc182bf8396de39166556a357d91383cc0fab8f9182276
+EBUILD imagemagick-6.9.10.16-r1.ebuild 6938 BLAKE2B 64aa7128cd3b932654f1d0e355cb8447f02f997cda9c177ad2e3b0905ccde30e3e4b3e4a6297b4f03ef68f161f999f78359470500943f886e994f9519f9a3d3b SHA512 ceb36ea8997802ea03082329f074f0e123c410750446cd248fce01425ea45f5e990b1c47d7506007aefa81ee7f4ffd412f2fb0977b24bda952e4df44955b8c7a
+EBUILD imagemagick-6.9.10.19.ebuild 6892 BLAKE2B d925550c450fabe11f11cf817c25e4aa3c1b25b0ca1dcae4910b8112fa8a38ed625260743046736ce23cd27b299974b22239607e9c68496262e43e5cd19da0c2 SHA512 6005a9964507d87fd0c0c1e1d1daa10e5503740ba9474f1659f7bd4255f5cc22ef8137baf3e1e61c6f9d0c93eef403637cf91833397a6a2ab16f15a7bbd48e58
+EBUILD imagemagick-7.0.8.16.ebuild 7151 BLAKE2B 100dad30713a78c3aa72a939874e295bf3c55c3015ddf833d6c5bf696448af666a5088451e3ce83d2549216041675df5d3034517172fa5bb4d7005674b37394d SHA512 7fa1d1eb8715f8cb8d674fb7c619743970dfe8ca8e7e744448fb569442242aa703e7f8d1c568e73147dcece484db1031311529b7b0482b9c2ae9c83282d02d1e
+EBUILD imagemagick-7.0.8.19.ebuild 7160 BLAKE2B 2435e94755e6e1a9d6ee4cab669b8564daaa06e7c75024463cf5df4f851f695afd2afdfb84930ff8886ceef6bed578365d7489d7febd877064621c4dd541f74b SHA512 c65b9cb286317eafefb96c63984f25850c835a81eb04fe452d8bd22bacded153c460716c06a2f924b7595925ecbb417ea809d737aa291bc174c125d97dc7cbba
+EBUILD imagemagick-9999.ebuild 7160 BLAKE2B 2435e94755e6e1a9d6ee4cab669b8564daaa06e7c75024463cf5df4f851f695afd2afdfb84930ff8886ceef6bed578365d7489d7febd877064621c4dd541f74b SHA512 c65b9cb286317eafefb96c63984f25850c835a81eb04fe452d8bd22bacded153c460716c06a2f924b7595925ecbb417ea809d737aa291bc174c125d97dc7cbba
MISC metadata.xml 1015 BLAKE2B 3fbe479f30575b11fa9e78de7bb00c231370aa4b2ca3b0e16924710189013ab91199db8c8cb7cff4611a2924c7fa01e4a43bfd9f7f61cfe45a4de3a254d4c8e2 SHA512 bf1479f91de5f8248c4a86d98017a332ab3d5eb153bb896ca1a39fce2fbff4e8248df92025987f6bfaf7e0d36677c167177c9c21969f1f0b8c2e0a53197efece
diff --git a/media-gfx/imagemagick/files/imagemagick-6.9.10.16-fix-MagickCore-config.patch b/media-gfx/imagemagick/files/imagemagick-6.9.10.16-fix-MagickCore-config.patch
new file mode 100644
index 000000000000..1fce48d48660
--- /dev/null
+++ b/media-gfx/imagemagick/files/imagemagick-6.9.10.16-fix-MagickCore-config.patch
@@ -0,0 +1,23 @@
+From 02701e96029c4e2a9902685a9aca84ae21ab1c4c Mon Sep 17 00:00:00 2001
+From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
+Date: Fri, 14 Dec 2018 02:03:07 +0300
+Subject: [PATCH] Remove non-existing "-config" option from pkg-config
+
+This bug produces "Unknown option -config" error.
+---
+ magick/MagickCore-config.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/magick/MagickCore-config.in b/magick/MagickCore-config.in
+index 94bc87b95..e56f34a76 100644
+--- a/magick/MagickCore-config.in
++++ b/magick/MagickCore-config.in
+@@ -38,7 +38,7 @@ while test $# -gt 0; do
+ echo '@PACKAGE_VERSION@ Q@QUANTUM_DEPTH@ @MAGICK_HDRI@'
+ ;;
+ --cflags)
+- @PKG_CONFIG@ -config --cflags MagickCore
++ @PKG_CONFIG@ --cflags MagickCore
+ ;;
+ --cxxflags)
+ @PKG_CONFIG@ --cflags MagickCore
diff --git a/media-gfx/imagemagick/imagemagick-6.9.10.14.ebuild b/media-gfx/imagemagick/imagemagick-6.9.10.16-r1.ebuild
index ba0ba14a935f..a658d37a58de 100644
--- a/media-gfx/imagemagick/imagemagick-6.9.10.14.ebuild
+++ b/media-gfx/imagemagick/imagemagick-6.9.10.16-r1.ebuild
@@ -5,7 +5,8 @@ EAPI="6"
inherit eapi7-ver eutils flag-o-matic libtool perl-functions toolchain-funcs multilib
-MY_P=ImageMagick-$(ver_rs 3 '-')
+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/"
@@ -68,6 +69,7 @@ REQUIRED_USE="corefonts? ( truetype )
S="${WORKDIR}/${MY_P}"
src_prepare() {
+ eapply "${FILESDIR}"/${P}-fix-MagickCore-config.patch
default
# Apply hardening #664236
@@ -173,13 +175,14 @@ src_test() {
die "Failed to install default blank policy.xml in '${_im_local_config_home}'"
local im_command= IM_COMMANDS=()
- IM_COMMANDS+=( "magick -version" ) # Verify that we are using version we just built
- IM_COMMANDS+=( "magick -list policy" ) # Verify that policy.xml is used
+ 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
- "${S}"/magick.sh \
- ${im_command} || die
+ eval "${S}"/magick.sh \
+ ${im_command} || \
+ die "Failed to run \"${im_command}\""
done
}
diff --git a/media-gfx/imagemagick/imagemagick-6.9.10.19.ebuild b/media-gfx/imagemagick/imagemagick-6.9.10.19.ebuild
new file mode 100644
index 000000000000..51d1439ebc56
--- /dev/null
+++ b/media-gfx/imagemagick/imagemagick-6.9.10.19.ebuild
@@ -0,0 +1,248 @@
+# Copyright 1999-2018 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.14.ebuild b/media-gfx/imagemagick/imagemagick-7.0.8.16.ebuild
index f7b720973aae..c8f205eafd0f 100644
--- a/media-gfx/imagemagick/imagemagick-7.0.8.14.ebuild
+++ b/media-gfx/imagemagick/imagemagick-7.0.8.16.ebuild
@@ -10,7 +10,8 @@ if [[ ${PV} == "9999" ]] ; then
inherit git-r3
MY_P="imagemagick-9999"
else
- MY_P=ImageMagick-$(ver_rs 3 '-')
+ 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
@@ -177,13 +178,18 @@ src_test() {
die "Failed to install default blank policy.xml in '${_im_local_config_home}'"
local im_command= IM_COMMANDS=()
- IM_COMMANDS+=( "magick -version" ) # Verify that we are using version we just built
+ 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
- "${S}"/magick.sh \
- ${im_command} || die
+ eval "${S}"/magick.sh \
+ ${im_command} || \
+ die "Failed to run \"${im_command}\""
done
}
diff --git a/media-gfx/imagemagick/imagemagick-7.0.8.19.ebuild b/media-gfx/imagemagick/imagemagick-7.0.8.19.ebuild
new file mode 100644
index 000000000000..91e101eeefc0
--- /dev/null
+++ b/media-gfx/imagemagick/imagemagick-7.0.8.19.ebuild
@@ -0,0 +1,256 @@
+# Copyright 1999-2018 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
+}
diff --git a/media-gfx/imagemagick/imagemagick-9999.ebuild b/media-gfx/imagemagick/imagemagick-9999.ebuild
index adf47c49a562..91e101eeefc0 100644
--- a/media-gfx/imagemagick/imagemagick-9999.ebuild
+++ b/media-gfx/imagemagick/imagemagick-9999.ebuild
@@ -10,7 +10,8 @@ if [[ ${PV} == "9999" ]] ; then
inherit git-r3
MY_P="imagemagick-9999"
else
- MY_P=ImageMagick-$(ver_rs 3 '-')
+ 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
@@ -177,13 +178,18 @@ src_test() {
die "Failed to install default blank policy.xml in '${_im_local_config_home}'"
local im_command= IM_COMMANDS=()
- IM_COMMANDS+=( "magick -version" ) # Verify that we are using version we just built
+ 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
- "${S}"/magick.sh \
- ${im_command} || die
+ eval "${S}"/magick.sh \
+ ${im_command} || \
+ die "Failed to run \"${im_command}\""
done
}