Created
March 30, 2023 18:46
-
-
Save alanorth/6a31b80026c6c7c1fd473e14fecc22ca to your computer and use it in GitHub Desktop.
Updated PKGBUILD for imagemagick-git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Chris Severance aur.severach aATt spamgourmet dott com | |
# Contributor: Limao Luo <[email protected]> | |
# Contributor: Stefan Husmann <[email protected]> | |
# From core package | |
# Maintainer: Antonio Rojas <[email protected]> | |
# Contributor: Eric Bélanger <[email protected]> | |
_pkgname='imagemagick' | |
pkgbase="${_pkgname}-git" | |
_srcdir='ImageMagick' | |
pkgname="${pkgbase}" | |
pkgver=7.1.1.5.r10.g71d27ee | |
pkgrel=1 | |
pkgdesc='An image viewing/manipulation program' | |
arch=('x86_64') | |
url="https://www.imagemagick.org/" | |
license=(custom) | |
makedepends=(ghostscript openexr libwmf librsvg openjpeg2 libraw opencl-headers libwebp libzip libjxl | |
chrpath ocl-icd glu ghostpcl ghostxps libheif jbigkit djvulibre) | |
makedepends+=('patch' 'git') | |
checkdepends=(gsfonts ttf-dejavu) | |
_relname=ImageMagick-${pkgver%%.*} | |
_verwatch=("${url/script/download/}" 'ImageMagick-\([-0-9\.]\+\)\.tar\.bz2' 'l') | |
_archlink='https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/imagemagick/trunk/@@@' | |
source=( | |
#"${_srcdir}::git+http://git.imagemagick.org/repos/ImageMagick.git" | |
"git+https://github.com/ImageMagick/ImageMagick.git" | |
"${_archlink//@@@/arch-fonts.diff}" | |
) | |
sha256sums=('SKIP' | |
'a85b744c61b1b563743ecb7c7adad999d7ed9a8af816650e3ab9321b2b102e73') | |
pkgver() { | |
cd "${_srcdir}/" | |
git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g' | |
} | |
prepare() { | |
mkdir -p docpkg/usr/share | |
cd "${_srcdir}" | |
# Fix up typemaps to match our packages, where possible | |
patch -p1 -i ../arch-fonts.diff | |
} | |
_configure() { | |
cd "${_srcdir}" | |
if [ ! -s 'Makefile' ]; then | |
autoreconf --force --install | |
./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-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-fftw \ | |
--without-fpx \ | |
--without-gcc-arch \ | |
--without-gvc | |
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool | |
fi | |
cd "${srcdir}" | |
} | |
build() { | |
_configure | |
cd "${_srcdir}" | |
make | |
} | |
check() ( | |
cd "${_srcdir}" | |
ulimit -n 4096 | |
make check | |
) | |
package_imagemagick-git() { | |
depends=(libltdl lcms2 fontconfig libxext liblqr libraqm libpng libxml2) | |
optdepends=('ghostscript: PS/PDF support' | |
'libheif: HEIF support' | |
'libjxl: JPEG XL support' | |
'libraw: DNG support' | |
'librsvg: SVG support' | |
'libwebp: WEBP support' | |
'libwmf: WMF support' | |
'libxml2: Magick Scripting Language' | |
'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) | |
conflicts=(imagemagick) | |
cd "${_srcdir}" | |
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 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment