# Maintainer: Natanael Copa pkgname=poppler pkgver=0.71.0 pkgrel=1 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-or-later" 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 CVE-2019-9959.patch " # secfixes: # 0.71.0-r1: # - CVE-2019-9959 prepare() { local _linked_pkg=poppler-qt4 local _linked_apkbuild="$startdir"/../$_linked_pkg/APKBUILD mkdir -p "$builddir/build" cd "$builddir/build" 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 default_prepare } build() { cd "$builddir/build" # 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/build" 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 66ba4e941717a27bc2915cb7ea850617a7e05715c7597cbbc03eafccb5f533f5df57135f9f72108632f098d43ef0b843bd64cc593a08340243655bd0c033655a CVE-2019-9959.patch"