# Maintainer: Natanael Copa # this aport only includes glib/gtk support in order to break the # circular make dependency: gtk <- cups <- poppler <- gtk pkgname=poppler-qt5 _pkgname=poppler pkgver=0.71.0 pkgrel=0 pkgdesc="PDF rendering library based on xpdf 3.0" url="https://poppler.freedesktop.org/" arch="all" license="GPL-2.0-only" subpackages="$pkgname-dev" makedepends="cmake libjpeg-turbo-dev jpeg-dev cairo-dev libxml2-dev fontconfig-dev qt5-qtbase-dev poppler-dev>=$pkgver lcms2-dev openjpeg-dev openjpeg-dev libpng-dev tiff-dev zlib-dev openjpeg-tools " depends= replaces="poppler-glib" depends_dev="$makedepends" provides="poppler-qt4-$pkgver-$pkgrel" options="!check" # no test suite source="https://poppler.freedesktop.org/poppler-$pkgver.tar.xz" builddir="$srcdir/$_pkgname-$pkgver/build" prepare() { local _linked_pkg=poppler 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" cmake .. \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DENABLE_GLIB=ON \ -DENABLE_XPDF_HEADERS=ON \ -DENABLE_QT5=ON make } package() { cd "$builddir" install -D -m644 poppler-qt5.pc "$pkgdir"/usr/lib/pkgconfig/poppler-qt5.pc cd qt5 make DESTDIR="$pkgdir" install } sha512sums="8e0ce95e7b58c37761c36a20f1282e63373a9557bf9f746ce2936562f12648506043d9559cf816944aa238814fc1b3f3a3c0a6cb002fd214b067e399bcc6ab1e poppler-0.71.0.tar.xz"