aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--community/imagemagick/APKBUILD24
1 files changed, 16 insertions, 8 deletions
diff --git a/community/imagemagick/APKBUILD b/community/imagemagick/APKBUILD
index 4486df8487..88433fb0a8 100644
--- a/community/imagemagick/APKBUILD
+++ b/community/imagemagick/APKBUILD
@@ -13,9 +13,15 @@ arch="all"
license="ImageMagick"
options="libtool !checkroot"
makedepends="zlib-dev libpng-dev libjpeg-turbo-dev freetype-dev fontconfig-dev
- perl-dev ghostscript-dev libwebp-dev libtool tiff-dev lcms2-dev
- libwebp-dev libxml2-dev librsvg-dev libx11-dev libxext-dev chrpath
+ perl-dev ghostscript-dev libtool tiff-dev lcms2-dev
+ libwebp-dev libxml2-dev libx11-dev libxext-dev chrpath
libheif-dev"
+
+case "$CARCH" in
+ s390x) ;;
+ *) makedepends="$makedepends librsvg-dev" ;;
+esac
+
checkdepends="freetype fontconfig ghostscript ghostscript-fonts lcms2 graphviz"
subpackages="$pkgname-doc $pkgname-dev $pkgname-c++:_cxx $pkgname-libs $pkgname-perlmagick:_perlmagick $pkgname-perlmagick-doc:_perlmagick_doc"
source="$_pkgname-$_pkgver.tar.gz::https://github.com/ImageMagick/ImageMagick/archive/$_pkgver.tar.gz
@@ -59,10 +65,14 @@ builddir="$srcdir/$_pkgname-$_pkgver"
# - CVE-2019-10650
build() {
- cd "$builddir"
+ case "$CARCH" in
+ s390x) ;;
+ *) _conf_args="--with-rsvg" ;;
+ esac
+
# fix doc dir, Gentoo bug 91911
sed -i -e \
- 's:DOCUMENTATION_PATH="${DATA_DIR}/doc/${DOCUMENTATION_RELATIVE_PATH}":DOCUMENTATION_PATH="/usr/share/doc/imagemagick":g' \
+ 's:DOCUMENTATION_PATH="$DATA_DIR/doc/$DOCUMENTATION_RELATIVE_PATH":DOCUMENTATION_PATH="/usr/share/doc/imagemagick":g' \
configure
./configure \
--build=$CBUILD \
@@ -78,7 +88,6 @@ build() {
--with-tiff \
--with-png \
--with-webp \
- --with-rsvg \
--with-gslib \
--with-gs-font-dir=/usr/share/fonts/Type1 \
--with-heic \
@@ -86,17 +95,16 @@ build() {
--with-xml \
--with-perl \
--with-perl-options="PREFIX=/usr INSTALLDIRS=vendor" \
+ $_conf_args \
$_pic
make
}
check() {
- cd "$builddir"
make check
}
package() {
- cd "$builddir"
make -j1 DESTDIR="$pkgdir" install
if ! [ -e "$pkgdir"/usr/lib/libMagickCore-$_abiver.Q16HDRI.so ]; then
error "Has ABI verision changed? (current is $_abiver)"
@@ -121,7 +129,7 @@ _perlmagick() {
pkgdesc="PerlMagick Perl Modules for ImageMagick"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/perl5 "$subpkgdir"/usr/lib/
- # Strip all the rpath that include /home
+ # Strip all the rpath that include /home
scanelf --recursive --rpath "$subpkgdir" | awk '/home/{print $3;}' | xargs chrpath -d
# chrpath -d "$subpkgdir"/usr/lib/perl5/vendor_perl/auto/Image/Magick/Q16HDRI/Q16HDRI.so
# chrpath -d "$subpkgdir"/usr/lib/perl5/vendor_perl/auto/Image/Magick/Magick.so