blob: 95f69f97bdce51e309c45c552838ebd590b845cc (
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
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=poppler
pkgver=0.71.0
pkgrel=0
pkgdesc="PDF rendering library based on xpdf 3.0"
url="https://poppler.freedesktop.org/"
arch="all"
options="!check" # No test suite.
license="GPL-2.0+"
depends=
depends_dev="cairo-dev glib-dev"
makedepends="$depends_dev cmake libjpeg-turbo-dev cairo-dev libxml2-dev
fontconfig-dev lcms2-dev gobject-introspection-dev
openjpeg-dev openjpeg-tools libpng-dev tiff-dev zlib-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-utils $pkgname-glib
"
source="https://poppler.freedesktop.org/poppler-$pkgver.tar.xz"
builddir="$srcdir/$pkgname-$pkgver/build"
prepare() {
local _linked_pkg=poppler-qt4
local _linked_apkbuild="$startdir"/../$_linked_pkg/APKBUILD
mkdir -p "$builddir"
cd "$builddir"
if [ -f "$_linked_apkbuild" ]; then
local _linked_ver=$( . "$_linked_apkbuild"; echo "$pkgver")
if [ "$_linked_ver" != "$pkgver" ]; then
error "pkgver needs to be identical with $_linked_pkg ($_linked_ver)"
return 1
fi
fi
}
build() {
cd "$builddir"
# JPEG2000Stream.cc:20:10: fatal error: openjpeg.h: No such file
sed -e "/^#include/s/openjpeg\.h/openjpeg-2.3\/openjpeg.h/" -i ../poppler/JPEG2000Stream.cc
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DENABLE_GLIB=ON \
-DENABLE_XPDF_HEADERS=ON \
-DENABLE_QT5=OFF
make
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
}
utils() {
pkgdesc="Poppler's xpdf-workalike command line utilities"
install -d "$subpkgdir"/usr
mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}
glib() {
pkgdesc="Glib wrapper for poppler"
replaces="poppler-gtk"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libpoppler-glib.so.* \
"$pkgdir"/usr/lib/girepository* \
"$subpkgdir"/usr/lib/
}
_cpp() {
pkgdesc="Pure C++ wrapper for poppler"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libpoppler-cpp.so.* \
"$subpkgdir"/usr/lib/
}
sha512sums="8e0ce95e7b58c37761c36a20f1282e63373a9557bf9f746ce2936562f12648506043d9559cf816944aa238814fc1b3f3a3c0a6cb002fd214b067e399bcc6ab1e poppler-0.71.0.tar.xz"
|