Subject: [alpine-aports] [PATCH] testing/optipng: use builtin zlib; patch info: https://sourceforge.net/p/optipng/bugs/63/

From: Michael Koloberdin <[email-masked]>
Date: Tue, 17 May 2016 19:19:25 +0000

---
 testing/optipng/APKBUILD           | 16 ++++++++++------
 testing/optipng/builtin-zlib.patch | 14 ++++++++++++++
 2 files changed, 24 insertions(+), 6 deletions(-)
 create mode 100644 testing/optipng/builtin-zlib.patch

diff --git a/testing/optipng/APKBUILD b/testing/optipng/APKBUILD
index 9980a0d..a409423 100644
--- a/testing/optipng/APKBUILD
+++ b/testing/optipng/APKBUILD
@@ -1,16 +1,17 @@
 # Maintainer: Michael Koloberdin <[email-masked]>
 pkgname=optipng
 pkgver=0.7.6
-pkgrel=0
+pkgrel=1
 pkgdesc="Compresses PNG files to a smaller size, without losing any information."
 url="http://optipng.sourceforge.net/"
 arch="all"
 license="ZLIB"
 depends=""
-makedepends="zlib-dev"
+makedepends=""
 install=""
 subpackages="$pkgname-doc"
-source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz"
+source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz
+	builtin-zlib.patch"
 
 _builddir="$srcdir/$pkgname-$pkgver"
 prepare() {
@@ -37,6 +38,9 @@ package() {
 	install -Dm0644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE" || return 1
 }
 
-md5sums="568e0738358450eca69ecf578d48f26c  optipng-0.7.6.tar.gz"
-sha256sums="4870631fcbd3825605f00a168b8debf44ea1cda8ef98a73e5411eee97199be80  optipng-0.7.6.tar.gz"
-sha512sums="d31d7494c23413d87b601a706cc2faf82923156a818da66e0bfad11741aed065db8f1b0c088d2abd66899ac192408c05f594295ded2684c4549c5f03b140a184  optipng-0.7.6.tar.gz"
+md5sums="568e0738358450eca69ecf578d48f26c  optipng-0.7.6.tar.gz
+510408cb0f6cdcdf9c94ab9872f33a9a  builtin-zlib.patch"
+sha256sums="4870631fcbd3825605f00a168b8debf44ea1cda8ef98a73e5411eee97199be80  optipng-0.7.6.tar.gz
+3824daeba9185b5aa3e8a21dc243817bebb0cfb53ee102d3f2cc81ce5263fa73  builtin-zlib.patch"
+sha512sums="d31d7494c23413d87b601a706cc2faf82923156a818da66e0bfad11741aed065db8f1b0c088d2abd66899ac192408c05f594295ded2684c4549c5f03b140a184  optipng-0.7.6.tar.gz
+062b12062f6d80127f89da88d216ad69c152f85ff03537f3c389c3e7ecc798bf21d62e1bb1065a0234b68b1acda6ef670ef5971c45d7ed4bbd5bdd3786fdd0b0  builtin-zlib.patch"
diff --git a/testing/optipng/builtin-zlib.patch b/testing/optipng/builtin-zlib.patch
new file mode 100644
index 0000000..a09cdad
--- /dev/null
+++ b/testing/optipng/builtin-zlib.patch
@@ -0,0 +1,14 @@
+diff -urp optipng-0.7.6-orig/configure optipng-0.7.6/configure
+--- optipng-0.7.6-orig/configure	2014-12-01 07:25:00.000000000 +0200
++++ optipng-0.7.6/configure	2016-05-17 20:56:08.950224977 +0300
+@@ -234,6 +234,10 @@ then
+         fi
+         if test "$CPPFLAGS"
+         then
++            if test "$with_system_zlib" -eq 0
++            then
++                CPPFLAGS="-I../zlib ${CPPFLAGS}"
++            fi
+             sed_preconfig_libpng="
+                 $sed_preconfig_libpng
+                 s|^CPPFLAGS *=.*|CPPFLAGS = $CPPFLAGS|
-- 
2.6.6

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