From a3466aa28681d976dc9c4aea0fe2ef635807dc94 Mon Sep 17 00:00:00 2001 From: Zach van Rijn Date: Mon, 10 Apr 2023 14:11:39 +0000 Subject: user/qpdf: add patch for deprecated egrep usage. fixes #989. --- user/qpdf/APKBUILD | 9 ++++++--- user/qpdf/fix-deprecated-use-of-egrep.patch | 22 ++++++++++++++++++++++ 2 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 user/qpdf/fix-deprecated-use-of-egrep.patch diff --git a/user/qpdf/APKBUILD b/user/qpdf/APKBUILD index 30efe0385..17f0a600b 100644 --- a/user/qpdf/APKBUILD +++ b/user/qpdf/APKBUILD @@ -1,4 +1,4 @@ -# Maintainer: +# Maintainer: Zach van Rijn pkgname=qpdf pkgver=8.4.2 pkgrel=0 @@ -11,7 +11,9 @@ checkdepends="coreutils perl" makedepends="bash libjpeg-turbo-dev zlib-dev" subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-fix-qdf:fix_qdf:noarch" -source="https://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz" +source="https://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz + fix-deprecated-use-of-egrep.patch + " # secfixes: # 7.0.0-r0: @@ -57,4 +59,5 @@ fix_qdf() { mv "$pkgdir"/usr/bin/fix-qdf "$subpkgdir"/usr/bin/ } -sha512sums="9cde046fb5e42dc331933294155583fb20408704a0cab3075cc3e97bd4643e3178e4162b8de7434aa2304097e7734f985fdc8e7b05cc028c37193dce91797f7a qpdf-8.4.2.tar.gz" +sha512sums="9cde046fb5e42dc331933294155583fb20408704a0cab3075cc3e97bd4643e3178e4162b8de7434aa2304097e7734f985fdc8e7b05cc028c37193dce91797f7a qpdf-8.4.2.tar.gz +7fe1d3fd8161f1a757e08fdfa921b78c04f7af0bccc0ec37f15c21bfb4b86b945883920b1e476078476c60abea0b045839f0648274f6ddb04e4150708dfde31f fix-deprecated-use-of-egrep.patch" diff --git a/user/qpdf/fix-deprecated-use-of-egrep.patch b/user/qpdf/fix-deprecated-use-of-egrep.patch new file mode 100644 index 000000000..a07b89a36 --- /dev/null +++ b/user/qpdf/fix-deprecated-use-of-egrep.patch @@ -0,0 +1,22 @@ +diff -ur a/qpdf/qtest/qpdf/diff-encrypted b/qpdf/qtest/qpdf/diff-encrypted +--- a/qpdf/qtest/qpdf/diff-encrypted 2023-04-10 14:03:24.943059112 +0000 ++++ b/qpdf/qtest/qpdf/diff-encrypted 2023-04-10 14:04:26.012776963 +0000 +@@ -1,5 +1,5 @@ + #!/bin/sh +-lines=$(expr 0 + $(diff "$1" "$2" | egrep '^[<>]' | egrep -v '(Date|InstanceID)' | wc -l)) ++lines=$(expr 0 + $(diff "$1" "$2" | grep -E '^[<>]' | grep -E -v '(Date|InstanceID)' | wc -l)) + if [ "$lines" = "0" ]; then + echo okay + else +diff -ur a/qpdf/qtest/qpdf/diff-ignore-ID-version b/qpdf/qtest/qpdf/diff-ignore-ID-version +--- a/qpdf/qtest/qpdf/diff-ignore-ID-version 2023-04-10 14:03:24.939059262 +0000 ++++ b/qpdf/qtest/qpdf/diff-ignore-ID-version 2023-04-10 14:04:51.635819337 +0000 +@@ -1,6 +1,6 @@ + #!/bin/sh +-lines=$(expr 0 + $(diff "$1" "$2" | egrep '^[<>]' | \ +- egrep -v '/ID' | egrep -v '%PDF-' | wc -l)) ++lines=$(expr 0 + $(diff "$1" "$2" | grep -E '^[<>]' | \ ++ grep -E -v '/ID' | grep -E -v '%PDF-' | wc -l)) + if [ "$lines" = "0" ]; then + echo okay + else -- cgit v1.2.3-70-g09d2