[arch-commits] Commit in zlib/trunk (PKGBUILD gzflush.patch)

Pierre Schmitz pierre at archlinux.org
Thu Jan 28 03:49:49 UTC 2010


    Date: Wednesday, January 27, 2010 @ 22:49:49
  Author: pierre
Revision: 65351

upgpkg: zlib 1.2.3.7-2
    fix http://bugs.archlinux.org/task/18042

Added:
  zlib/trunk/gzflush.patch
Modified:
  zlib/trunk/PKGBUILD

---------------+
 PKGBUILD      |   11 +++++++----
 gzflush.patch |   12 ++++++++++++
 2 files changed, 19 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-01-28 03:48:48 UTC (rev 65350)
+++ PKGBUILD	2010-01-28 03:49:49 UTC (rev 65351)
@@ -3,7 +3,7 @@
 
 pkgname=zlib
 pkgver=1.2.3.7
-pkgrel=1
+pkgrel=2
 pkgdesc='compression library implementing the deflate compression method found in gzip and PKZIP'
 arch=('i686' 'x86_64')
 license=('custom')
@@ -11,12 +11,15 @@
 groups=('base')
 depends=('glibc')
 # source from zlib-devel
-source=("ftp://ftp.archlinux.org/other/zlib/zlib-${pkgver}.tar.gz")
-md5sums=('323e45f54f321116a34950e8fbf5b6e7')
+source=("ftp://ftp.archlinux.org/other/zlib/zlib-${pkgver}.tar.gz"
+        'gzflush.patch')
+md5sums=('323e45f54f321116a34950e8fbf5b6e7'
+         '7e2f3d8815f1e9398e46a2a0e47399fb')
 
 build() {
 	cd ${srcdir}/zlib-$pkgver
-
+	# add missing line which causes a segfault when using gzflush on read
+	patch -p0 -i ${srcdir}/gzflush.patch || return 1
 	export CFLAGS="${CFLAGS/-O2/-O3} -DUNALIGNED_OK"
 	./configure --prefix=/usr --shared
 	make || return 1

Added: gzflush.patch
===================================================================
--- gzflush.patch	                        (rev 0)
+++ gzflush.patch	2010-01-28 03:49:49 UTC (rev 65351)
@@ -0,0 +1,12 @@
+--- gzwrite.c	2010-01-18 21:18:27.000000000 +0100
++++ 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)




More information about the arch-commits mailing list