Subject: [alpine-aports] [PATCH] main/poppler: upgrade to 0.71.0

From: Paul Bredbury <[email-masked]>
Date: Sun, 10 Feb 2019 19:47:48 +0000

"Lots" of security fixes, mentioned at
https://poppler.freedesktop.org/releases.html

Debian Buster uses this version, with no security patches.
https://packages.debian.org/source/buster/poppler

WARNING: Remove, or update (to qt5) the poppler-qt4 package.
---
 main/poppler/APKBUILD | 41 +++++++++++++++++------------------------
 1 file changed, 17 insertions(+), 24 deletions(-)

diff --git a/main/poppler/APKBUILD b/main/poppler/APKBUILD
index 2f1c8ea75d..95f69f97bd 100644
--- a/main/poppler/APKBUILD
+++ b/main/poppler/APKBUILD
@@ -1,11 +1,7 @@
 # Maintainer: Natanael Copa <[email-masked]>
-
-# this aport does not include qt support in order to break the
-# circular make dependency: qt <- cups <- poppler <- qt
-# So we build qt support in separate package poppler-qt4
 pkgname=poppler
-pkgver=0.56.0
-pkgrel=1
+pkgver=0.71.0
+pkgrel=0
 pkgdesc="PDF rendering library based on xpdf 3.0"
 url="https://poppler.freedesktop.org/"
 arch="all"
@@ -13,18 +9,18 @@ options="!check"  # No test suite.
 license="GPL-2.0+"
 depends=
 depends_dev="cairo-dev glib-dev"
-makedepends="$depends_dev libjpeg-turbo-dev cairo-dev libxml2-dev
+makedepends="$depends_dev cmake libjpeg-turbo-dev cairo-dev libxml2-dev
 	fontconfig-dev lcms2-dev gobject-introspection-dev
-	openjpeg-dev libpng-dev tiff-dev zlib-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"
+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")
@@ -37,19 +33,16 @@ prepare() {
 
 build() {
 	cd "$builddir"
-	./configure \
-		--build=$CBUILD \
-		--host=$CHOST \
-		--prefix=/usr \
-		--sysconfdir=/etc \
-		--localstatedir=/var \
-		--disable-static \
-		--enable-cairo-output \
-		--enable-xpdf-headers \
-		--enable-libjpeg \
-		--enable-zlib \
-		--enable-poppler-glib \
-		--disable-poppler-qt4
+
+	# 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
 }
 
@@ -80,4 +73,4 @@ _cpp() {
 		"$subpkgdir"/usr/lib/
 }
 
-sha512sums="74d2ca63afcb7e155c153b4ddc71621b7f4f2c60d4fcafd873176d5ac59fafedc35b200a22c7af2013d7f75e670a1cc23d6ba878167a02209917f8d30002d528  poppler-0.56.0.tar.xz"
+sha512sums="8e0ce95e7b58c37761c36a20f1282e63373a9557bf9f746ce2936562f12648506043d9559cf816944aa238814fc1b3f3a3c0a6cb002fd214b067e399bcc6ab1e  poppler-0.71.0.tar.xz"
-- 
2.20.1

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---