diff options
author | Hsiu-Ming Chang | 2020-08-14 21:50:36 +0800 |
---|---|---|
committer | Hsiu-Ming Chang | 2020-08-14 22:18:16 +0800 |
commit | 819c53ebacb2113104ac5131ee2e4189497d3b5b (patch) | |
tree | edc736973ef62fc390cfa70fb984cb373a4c2947 /PKGBUILD | |
download | aur-819c53ebacb2113104ac5131ee2e4189497d3b5b.tar.gz |
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..db5a11c6c634 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,71 @@ +# Maintainer: Hsiu-Ming Chang <cges30901@gmail.com> +# Contributor: Christian Hesse <mail@eworm.de> +# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org> +# Contributor: Brad Fanella <bradfanella@archlinux.us> +# Contributor: Stefan Husmann <stefan-husmann@t-online.de> +# Contributor: Pierre-Paul Paquin <pierrepaulpaquin@gmail.com> +# Contributor: xduugu + +pkgname=libmupdf-pymupdf +pkgver=1.17.0 +pkgrel=2 +pkgdesc='Lightweight PDF and XPS viewer with patch to build PyMuPDF' +arch=('x86_64') +url='https://mupdf.com/' +license=('AGPL3') +makedepends=('desktop-file-utils' 'freetype2' 'freeglut' 'glu' 'harfbuzz' + 'jbig2dec' 'libjpeg' 'mesa-libgl' 'openjpeg2' 'libxext') +# we need static libs for zathura-pdf-mupdf +provides=('libmupdf=1.17.0') +conflicts=('libmupdf') +options=('staticlibs') +source=("https://mupdf.com/downloads/archive/mupdf-${pkgver/_/}-source.tar.xz" + '0001-Set-noexecstack-on-linker-generated-binary-data-files.patch' + '0002-pymupdf.patch' + 'mupdf.desktop' + 'mupdf.xpm') +sha256sums=('c935fb2593d9a28d9b56b59dad6e3b0716a6790f8a257a68fa7dcb4430bc6086' + '53e3ccc9dd613277a1cfb99dcf7e71216c8497a84f6a7663a2fbff9d58a10be5' + 'e1c908e0126fdcd2cb1fa6a8ee72e373ee3cc4f9c30ced0b09ea44a98e25f272' + 'ccff66979249bd4ab4ba8918660f194eb90eb0ae231b16e36a6cecdcf471883f' + 'a435f44425f5432c074dee745d8fbaeb879038ec1f1ec64f037c74662f09aca8') + +prepare() { + cd mupdf-${pkgver/_/}-source + + # remove bundled packages, we want our system libraries + rm -rf thirdparty/{freeglut,freetype,harfbuzz,jbig2dec,libjpeg,openjpeg,zlib} + + # Set noexecstack on linker-generated binary data files. + patch -Np1 < ../0001-Set-noexecstack-on-linker-generated-binary-data-files.patch + + # Add patch to build PyMuPDF + patch -Np1 < ../0002-pymupdf.patch +} + +build() { + CFLAGS+=' -fPIC' + CXXFLAGS+=' -fPIC' + export CFLAGS CXXFLAGS + + USE_SYSTEM_LIBS='yes' + export USE_SYSTEM_LIBS + + cd mupdf-${pkgver/_/}-source + make build=release libs apps +} + +package() { + pkgdesc='Library for Lightweight PDF and XPS viewer' + + cd mupdf-${pkgver/_/}-source + + make build=release prefix="$pkgdir"/usr install + + rm -rf "$pkgdir"/usr/{bin,share/man} + mv "$pkgdir"/usr/share/doc/mupdf "$pkgdir"/usr/share/doc/libmupdf + + find "$pkgdir"/usr/include "$pkgdir"/usr/share "$pkgdir"/usr/lib \ + -type f -exec chmod 0644 {} + +} + |