aboutsummaryrefslogtreecommitdiffstats
path: root/main/zlib
diff options
context:
space:
mode:
Diffstat (limited to 'main/zlib')
-rw-r--r--main/zlib/APKBUILD18
-rw-r--r--main/zlib/gzflush.patch12
2 files changed, 25 insertions, 5 deletions
diff --git a/main/zlib/APKBUILD b/main/zlib/APKBUILD
index cf98592f5c..11f1f87e94 100644
--- a/main/zlib/APKBUILD
+++ b/main/zlib/APKBUILD
@@ -1,22 +1,29 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=zlib
pkgver=1.2.3.7
-pkgrel=0
+pkgrel=1
pkgdesc="A compression/decompression Library"
license=custom:zlib
url="http://www.gzip.org/zlib"
depends=
-source="ftp://ftp.archlinux.org/other/$pkgname/$pkgname-$pkgver.tar.gz"
+source="ftp://ftp.archlinux.org/other/$pkgname/$pkgname-$pkgver.tar.gz
+ gzflush.patch"
subpackages="$pkgname-dev $pkgname-doc"
+_builddir="$srcdir/$pkgname-$pkgver"
+prepare() {
+ cd "$_builddir"
+ patch -p1 -i "$srcdir"/gzflush.patch
+}
+
build() {
- cd "$srcdir/$pkgname-$pkgver"
+ cd "$_builddir"
./configure --prefix=/usr --libdir=/lib --shared
make || return 1
}
package() {
- cd "$srcdir/$pkgname-$pkgver"
+ cd "$_builddir"
make install \
pkgconfigdir="/usr/lib/pkgconfig" \
DESTDIR="$pkgdir" || return 1
@@ -28,4 +35,5 @@ dev() {
mv "$pkgdir"/lib/libz.a "$subpkgdir"/lib/libz.a
}
-md5sums="323e45f54f321116a34950e8fbf5b6e7 zlib-1.2.3.7.tar.gz"
+md5sums="323e45f54f321116a34950e8fbf5b6e7 zlib-1.2.3.7.tar.gz
+36746b916479fcf14b7a4393bee2f2d6 gzflush.patch"
diff --git a/main/zlib/gzflush.patch b/main/zlib/gzflush.patch
new file mode 100644
index 0000000000..5e97e6573c
--- /dev/null
+++ b/main/zlib/gzflush.patch
@@ -0,0 +1,12 @@
+--- a/gzwrite.c 2010-01-18 21:18:27.000000000 +0100
++++ b/gzwrite.c 2010-01-28 04:37:20.330530306 +0100
+@@ -435,7 +435,8 @@
+ state = (gz_statep)file;
+
+ /* check that we're writing and that there's no error */
+- if (state->mode != GZ_WRITE|| state->err != Z_OK)
++ if (state->mode != GZ_WRITE || state->err != Z_OK)
++ return Z_STREAM_ERROR;
+
+ /* check flush parameter */
+ if (flush < 0 || flush > Z_FINISH)