1 # Maintainer: AndyRTR <andyrtr@archlinux.org>
2 # Maintainer: Jan de Groot <jgc@archlinux.org>
5 pkgname=('poppler' 'poppler-glib' 'poppler-qt5' 'poppler-qt6')
10 makedepends=('libjpeg' 'gcc-libs' 'cairo' 'fontconfig' 'openjpeg2' 'gtk3' 'pkgconfig' 'lcms2'
11 'gobject-introspection' 'icu' 'qt5-base' 'qt6-base' 'git' 'nss' 'gtk-doc' 'curl' 'poppler-data'
12 'cmake' 'python' 'boost')
13 options=('!emptydirs' 'debug')
14 url="https://poppler.freedesktop.org/"
15 # https://gitlab.freedesktop.org/poppler/poppler
16 source=(https://poppler.freedesktop.org/${pkgbase}-${pkgver}.tar.xz{,.sig}
17 test::git+https://anongit.freedesktop.org/git/poppler/test/#commit=920c89f8f43bdfe8966c8e397e7f67f5302e9435)
18 sha256sums=('420230c5c43782e2151259b3e523e632f4861342aad70e7e20b8773d9eaf3428'
21 validpgpkeys=('CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7') # "Albert Astals Cid <aacid@kde.org>"
29 cmake ../${pkgbase}-${pkgver} \
30 -DCMAKE_BUILD_TYPE=Release \
31 -DCMAKE_INSTALL_PREFIX:PATH=/usr \
32 -DCMAKE_INSTALL_LIBDIR=/usr/lib \
33 -DENABLE_UNSTABLE_API_ABI_HEADERS=ON \
40 LANG=en_US.UTF8 make test
44 pkgdesc="PDF rendering library based on xpdf 3.0"
45 depends=('libjpeg' 'gcc-libs' 'cairo' 'fontconfig' 'openjpeg2' 'lcms2' 'nss' 'curl')
46 optdepends=('poppler-data: highly recommended encoding data to display PDF documents with certain encodings and characters')
47 provides=('libpoppler.so' 'libpoppler-cpp.so')
48 conflicts=("poppler-qt3<${pkgver}" "poppler-qt4<${pkgver}")
51 make DESTDIR="${pkgdir}" install
53 # cleanup for splitted build
54 rm -vrf "${pkgdir}"/usr/include/poppler/{glib,qt5,qt6}
55 rm -vf "${pkgdir}"//usr/lib/libpoppler-{glib,qt5,qt6}.*
56 rm -vf "${pkgdir}"/usr/lib/pkgconfig/poppler-{glib,qt5,qt6}.pc
57 rm -vrf "${pkgdir}"/usr/{lib,share}/gir*
58 rm -vrf "${pkgdir}"/usr/share/gtk-doc
61 package_poppler-glib() {
62 pkgdesc="Poppler glib bindings"
63 depends=("poppler=${pkgver}" 'glib2')
64 provides=('libpoppler-glib.so')
68 make -C glib DESTDIR="${pkgdir}" install
69 install -m755 -d "${pkgdir}/usr/lib/pkgconfig"
70 install -m644 poppler-glib.pc "${pkgdir}/usr/lib/pkgconfig/"
71 rm -vf "${pkgdir}"/usr/lib/libpoppler.*
72 rm -vf "${pkgdir}/usr/bin/poppler-glib-demo"
75 package_poppler-qt5() {
76 pkgdesc="Poppler Qt5 bindings"
77 depends=("poppler=${pkgver}" 'qt5-base')
78 provides=('libpoppler-qt5.so')
81 make -C qt5 DESTDIR="${pkgdir}" install
82 install -m755 -d "${pkgdir}/usr/lib/pkgconfig"
83 install -m644 poppler-qt5.pc "${pkgdir}/usr/lib/pkgconfig/"
86 package_poppler-qt6() {
87 pkgdesc="Poppler Qt6 bindings"
88 depends=("poppler=${pkgver}" 'qt6-base')
89 provides=('libpoppler-qt6.so')
92 make -C qt6 DESTDIR="${pkgdir}" install
93 install -m755 -d "${pkgdir}/usr/lib/pkgconfig"
94 install -m644 poppler-qt6.pc "${pkgdir}/usr/lib/pkgconfig/"