jobextra/imagemagick/PKGBUILD

123 lines
3.6 KiB
Bash

#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=imagemagick
pkgver=7.1.1.29
pkgrel=02
_relname=ImageMagick-${pkgver%%.*}
_tarname=ImageMagick-${pkgver%.*}-${pkgver##*.}
pkgdesc='An image viewing/manipulation program'
url='https://www.imagemagick.org/'
depends=(bzip2 cairo fftw fontconfig freetype2 gcc-libs glib2
glibc lcms2 liblqr libltdl libpng libraqm libxext
libxml2 xz zlib)
optdepends=('ghostscript: PS/PDF support'
'jbigkit: JBIG support'
'libheif: HEIF support'
'libjpeg-turbo: JPEG support'
'libjxl: JPEG XL support'
'libraw: DNG support'
'librsvg: SVG support'
'libtiff: TIFF support'
'libwebp: WEBP support'
'libwmf: WMF support'
'libzip: OpenRaster support'
'ocl-icd: OpenCL support'
'openexr: OpenEXR support'
'openjpeg2: JPEG2000 support'
'djvulibre: DJVU support'
'pango: Text rendering')
options+=(!emptydirs libtool)
backup=(etc/$_relname/{colors,delegates,log,mime,policy,quantization-table,thresholds,type,type-{dejavu,ghostscript}}.xml)
provides=(libmagick)
makedepends=(chrpath djvulibre ghostpcl ghostscript ghostxps glu jbigkit libheif libjpeg-turbo
libjxl libraw librsvg libwebp libwmf libzip ocl-icd opencl-headers openexr openjpeg2)
checkdepends=(gsfonts ttf-dejavu)
replaces=(imagemagick-doc)
source=(https://imagemagick.org/archive/$_tarname.tar.xz{,.asc}
arch-fonts.diff)
shopt -s extglob
prepare() {
mkdir -p docpkg/usr/share
cd $_tarname
# Fix up typemaps to match our packages, where possible
patch -p1 -i ../arch-fonts.diff
}
build() {
cd $_tarname
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--enable-shared \
--disable-static \
--with-dejavu-font-dir=/usr/share/fonts/TTF \
--with-gs-font-dir=/usr/share/fonts/gsfonts \
PSDelegate=/usr/bin/gs \
XPSDelegate=/usr/bin/gxps \
PCLDelegate=/usr/bin/gpcl6 \
--enable-hdri \
--enable-opencl \
--without-gslib \
--with-djvu \
--with-fftw \
--with-jxl \
--with-lqr \
--with-modules \
--with-openexr \
--with-openjp2 \
--with-perl \
--with-perl-options=INSTALLDIRS=vendor \
--with-rsvg \
--with-webp \
--with-wmf \
--with-xml \
--without-autotrace \
--without-dps \
--without-fpx \
--without-gcc-arch \
--without-gvc
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
}
check() (
cd $_tarname
ulimit -n 4096
make check
)
package() {
cd $_tarname
make DESTDIR="$pkgdir" install
find "$pkgdir/usr/lib/perl5" -name '*.so' -exec chrpath -d {} +
rm "$pkgdir"/etc/$_relname/type-{apple,urw-base35,windows}.xml
rm "$pkgdir"/usr/lib/*.la
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 LICENSE NOTICE
}
#---- arch license gpg-key & sha256sums ----
arch=(x86_64)
license=(custom)
validpgpkeys=(D8272EF51DA223E4D05B466989AB63D48277377A) # Lexie Parsimoniae
sha256sums=(f140465fbeb0b4724cba4394bc6f6fb32715731c1c62572d586f4f1c8b9b0685 # ImageMagick-7.1.1-29.tar.xz
798ba7e7ab5b33f2dad9856d39b33b6dd24e8550b5078948c26ab3011ad39ecd # ImageMagick-7.1.1-29.tar.xz.asc
a85b744c61b1b563743ecb7c7adad999d7ed9a8af816650e3ab9321b2b102e73) # arch-fonts.diff
## 46284a029497b6a25d224e301c0d356f5c68d995e4db45abad79850f83d0769f imagemagick-7.1.1.29-02-x86_64.pkg.tar.lz