aboutsummaryrefslogtreecommitdiffstats
path: root/testing/mupdf
diff options
context:
space:
mode:
authorDaniel Sabogal <dsabogalcc@gmail.com>2016-08-21 23:23:21 -0400
committerNatanael Copa <ncopa@alpinelinux.org>2016-09-06 08:10:51 +0000
commit5982ab20d53896e24421e0e9e3917c4ac0e6da2b (patch)
treee9893df48eff935b05b3aceab7f885b15979c106 /testing/mupdf
parenta9971d953bd0eef09cf3a04927da6a6b03e66ba9 (diff)
downloadaports-5982ab20d53896e24421e0e9e3917c4ac0e6da2b.tar.bz2
aports-5982ab20d53896e24421e0e9e3917c4ac0e6da2b.tar.xz
testing/mupdf: build mupdf-gl and add subpackages
fixes #5921 build mupdf with OpenGL backend split mupdf-x11, mupdf-gl, and mupdf-tools into subpackages
Diffstat (limited to 'testing/mupdf')
-rw-r--r--testing/mupdf/APKBUILD48
1 files changed, 38 insertions, 10 deletions
diff --git a/testing/mupdf/APKBUILD b/testing/mupdf/APKBUILD
index a3f0b40232..7b554aa4b6 100644
--- a/testing/mupdf/APKBUILD
+++ b/testing/mupdf/APKBUILD
@@ -2,22 +2,22 @@
# Maintainer: Michael Zhou <zhoumichaely@gmail.com>
pkgname=mupdf
pkgver=1.9a
-pkgrel=2
+pkgrel=3
pkgdesc="A lightweight PDF and XPS viewer"
url="http://mupdf.com"
arch="all"
license="AGPL3+"
depends=""
makedepends="freetype-dev jpeg-dev jbig2dec-dev libx11-dev libxext-dev
- openjpeg-dev harfbuzz-dev"
-install=""
-subpackages="$pkgname-doc $pkgname-dev"
+ openjpeg-dev harfbuzz-dev glfw-dev"
+subpackages="$pkgname-doc $pkgname-dev $pkgname-x11:_x11
+ $pkgname-gl:_gl $pkgname-tools:_tools"
source="http://mupdf.com/downloads/archive/$pkgname-$pkgver-source.tar.gz
shared-lib.patch
openjpeg-2.1.1.patch
"
-builddir="$srcdir/$pkgname-${pkgver}-source"
+builddir="$srcdir/$pkgname-$pkgver-source"
prepare() {
default_prepare || return 1
@@ -31,16 +31,44 @@ prepare() {
}
build() {
- cd "$builddir"
- make prefix=/usr || return 1
+ make HAVE_GLFW=yes SYS_GLFW_LIBS="-lglfw -lGL" \
+ prefix=/usr -C "$builddir" || return 1
}
package() {
- cd "$builddir"
- make prefix=/usr DESTDIR="$pkgdir" install || return 1
+ make HAVE_GLFW=yes \
+ prefix=/usr DESTDIR="$pkgdir" \
+ -C "$builddir" install || return 1
+
ln -s libmupdf.so.0 "$pkgdir"/usr/lib/libmupdf.so
ln -s libmupdfthird.so.0 "$pkgdir"/usr/lib/libmupdfthird.so
- ln -s /usr/bin/$pkgname-x11 "$pkgdir"/usr/bin/$pkgname
+}
+
+_x11() {
+ pkgdesc="A lightweight PDF and XPS viewer with X11 backend"
+ depends="!mupdf-gl mupdf"
+ mkdir -p "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/mupdf-x11 \
+ "$subpkgdir"/usr/bin/ || return 1
+ ln -s /usr/bin/mupdf-x11 "$subpkgdir"/usr/bin/mupdf
+}
+
+_gl() {
+ pkgdesc="A lightweight PDF and XPS viewer with OpenGL backend"
+ depends="!mupdf-x11 mupdf"
+ mkdir -p "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/mupdf-gl \
+ "$subpkgdir"/usr/bin/ || return 1
+ ln -s /usr/bin/mupdf-gl "$subpkgdir"/usr/bin/mupdf
+}
+
+_tools() {
+ pkgdesc="Tools for a lightweight PDF and XPS viewer"
+ depends="mupdf"
+ mkdir -p "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/mutool \
+ "$pkgdir"/usr/bin/mujstest \
+ "$subpkgdir"/usr/bin/ || return 1
}
md5sums="658b90788a57d858dcb069cf326e11c3 mupdf-1.9a-source.tar.gz