blob: bc9ed9cdd5b06739e766a6baa8edcb5d16a1b423 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Michael Zhou <zhoumichaely@gmail.com>
# Maintainer: Daniel Sabogal <dsabogalcc@gmail.com>
pkgname=mupdf
pkgver=1.10a
pkgrel=0
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 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.patch
"
builddir="$srcdir/$pkgname-$pkgver-source"
prepare() {
default_prepare || return 1
cd "$builddir"
for file in thirdparty/*; do
[ "${file##*/}" != "mujs" ] && rm -rf "$file"
done
sed '/^JBIG2DEC_CFLAGS :=/s|$| -I./include/mupdf|' \
-i Makethird || return 1
}
build() {
make HAVE_GLFW=yes SYS_GLFW_LIBS="$(pkgconf --libs glfw3 gl)" \
prefix=/usr -C "$builddir" || return 1
}
package() {
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
}
_x11() {
pkgdesc="A lightweight PDF and XPS viewer with X11 backend"
depends=""
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=""
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/mupdf-gl \
"$subpkgdir"/usr/bin/ || return 1
}
_tools() {
pkgdesc="Tools for a lightweight PDF and XPS viewer"
depends=""
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/mutool \
"$pkgdir"/usr/bin/mujstest \
"$subpkgdir"/usr/bin/ || return 1
}
md5sums="f80fbba2524d1d52f6ed09237d382411 mupdf-1.10a-source.tar.gz
8c4c5ec03c3df7e87a672c79302f6df5 shared-lib.patch
a5b85a55be0e958c16f900730ff24ad8 openjpeg-2.1.patch"
sha256sums="aacc1f36b9180f562022ef1ab3439b009369d944364f3cff8a2a898834e3a836 mupdf-1.10a-source.tar.gz
3ff3c9413c4c1005db7e41a085ce8e72ee1e956e8d1538a615f51f86f8bb1d14 shared-lib.patch
12ea2a295b62ca85298273d54b423ec8e73fb52d712bcee20bab0507a595b7a0 openjpeg-2.1.patch"
sha512sums="8c735963364985e74ceb38242afae555a3d2ee7c69abe3fe5c485e8613a83d996a58f231cb689a156019d431fa67d565503247d010b0a404054850483aed9fec mupdf-1.10a-source.tar.gz
bc38cc6935ed1c5941773e0671bea25d33897c1018c30f11ff3a1ec1e583276597f521b9e526f9bd38a6f9a1e76aa3e52782995ded72a618d07811abcd7ca734 shared-lib.patch
bfb509c529e26c3d2dc827298ce3a6083640fbe3fd7491560ffb1e8f86d62bbd4a5d52721079caef8a38d6f332132b581859276000b397f9512673eedb0315a7 openjpeg-2.1.patch"
|