diff options
author | Gaetan Bisson | 2016-07-09 07:15:36 -1000 |
---|---|---|
committer | Gaetan Bisson | 2016-07-09 07:15:36 -1000 |
commit | 8eb0732d9d703a20dc4cdd7cfffd5e6eb6686106 (patch) | |
tree | 32e5830445914346876151ddcb6fc4f2ac213be4 | |
parent | 79f49d645b49f597ec896732562f29957f4243ca (diff) | |
download | aur-8eb0732d9d703a20dc4cdd7cfffd5e6eb6686106.tar.gz |
reduce package size: no CJK font, no static lib
For a while the ever-increasing size of this package has been a real
annoyance to me. It's a direct consequence of upstream's static-linking
policy: common code and fonts are embedded into each individual binary.
Ideally they would be built into a shared library which individual
binaries would link against. However that's not trivial to achieve in
our modest PKGBUILD. So in the meantime I tried to keep the package size
under control with two slightly controversial tweaks:
- static libraries are no longer provided
- CJK fonts are no longer embedded
I believe this keeps this package fit for nearly everyone's purpose and
it brings its size down from 176 MB to 44 MB. Feel free to voice any
concerns you might have, together with suggestions on alternative ways
to keep this package manageable. Cheers.
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 19 |
2 files changed, 12 insertions, 12 deletions
@@ -1,12 +1,12 @@ pkgbase = mupdf-git pkgdesc = Lightweight PDF, XPS and CBZ viewer - pkgver = 20160630.5da66a0 + pkgver = 20160709.67af3ff pkgrel = 1 url = http://mupdf.com/ arch = i686 arch = x86_64 arch = armv7h - license = GPL3 + license = AGPL3 makedepends = git depends = curl depends = freetype2 @@ -15,7 +15,6 @@ pkgbase = mupdf-git depends = libxext provides = mupdf conflicts = mupdf - options = staticlibs source = git://git.ghostscript.com/mupdf.git source = desktop sha1sums = SKIP @@ -4,12 +4,12 @@ pkgname=mupdf-git _pkgname=mupdf -pkgver=20160630.5da66a0 +pkgver=20160709.67af3ff pkgrel=1 pkgdesc='Lightweight PDF, XPS and CBZ viewer' arch=('i686' 'x86_64' 'armv7h') url='http://mupdf.com/' -license=('GPL3') +license=('AGPL3') makedepends=('git') depends=('curl' 'freetype2' 'jbig2dec' 'libjpeg' 'libxext') source=('git://git.ghostscript.com/mupdf.git' @@ -19,7 +19,6 @@ sha1sums=('SKIP' conflicts=("${_pkgname}") provides=("${_pkgname}") -options=('staticlibs') pkgver() { cd "${srcdir}/${_pkgname}" @@ -32,18 +31,17 @@ prepare() { git submodule update --init thirdparty/mujs git submodule update --init thirdparty/openjpeg - # needed for zathura-pdf-mupdf - CFLAGS+=' -fPIC' - CXXFLAGS+=' -fPIC' - # fix memento.h confusion sed '/^JBIG2DEC_CFLAGS :=/s|$| -I./include/mupdf|' -i Makethird + + # embedding a CJK font into each binary is madness... + sed '/TOFU_CJK /c #define TOFU_CJK 1/' -i include/mupdf/fitz/config.h } build() { cd "${srcdir}/${_pkgname}" - make release XCFLAGS="$CPPFLAGS $CFLAGS" XLIBS="$LDFLAGS" + make release XCFLAGS="$CFLAGS -fPIC" XLIBS="$LDFLAGS" } package() { @@ -54,5 +52,8 @@ package() { rm "${pkgdir}"/usr/bin/mupdf-x11 install -Dm644 ../desktop "${pkgdir}"/usr/share/applications/mupdf.desktop - find "${pkgdir}"/usr/{include,lib,share} -type f | xargs chmod 644 + find "${pkgdir}"/usr/share -type f -exec chmod 0644 {} + + + # prevent the static-linking madness from spreading... + rm -fr "${pkgdir}"/usr/{include,lib} } |