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

Pierre Schmitz pierre at archlinux.org
Fri Dec 25 17:52:12 UTC 2009


    Date: Friday, December 25, 2009 @ 12:52:12
  Author: pierre
Revision: 61803

upstream update; PKGBUILD cleanup; enabled asm optimizations

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

---------------+
 PKGBUILD      |   35 ++++++++++++++++++++++++-----------
 install.patch |   19 +++++++++++++++++++
 2 files changed, 43 insertions(+), 11 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-12-25 03:20:42 UTC (rev 61802)
+++ PKGBUILD	2009-12-25 17:52:12 UTC (rev 61803)
@@ -2,25 +2,38 @@
 # Maintainer: Pierre Schmitz <pierre at archlinux.de>
 
 pkgname=zlib
-pkgver=1.2.3.3
-pkgrel=3
-pkgdesc="A compression/decompression Library"
+pkgver=1.2.3.4
+pkgrel=1
+pkgdesc='compression library implementing the deflate compression method found in gzip and PKZIP'
 arch=('i686' 'x86_64')
-license=('custom:zlib')
+license=('custom')
 url="http://www.zlib.net/"
 groups=('base')
 depends=('glibc')
-source=("ftp://ftp.archlinux.org/other/zlib/zlib-${pkgver}.tar.gz")
-md5sums=('c444cf020e5f0e3323b11f5a2d8af8d3')
+# source from http://packages.qa.debian.org/z/zlib.html
+source=("ftp://ftp.archlinux.org/other/zlib/zlib-${pkgver}.tar.gz"
+        'install.patch')
+md5sums=('70cad33163abe3c234939a5c63bf95ea'
+         'e0b303fabe9272803ab57d988be1e88e')
 
 build() {
 	cd ${srcdir}/zlib-$pkgver
 
+	export CFLAGS="${CFLAGS/-O2/-O3} -DUNALIGNED_OK"
+	patch -p1 -i ${srcdir}/install.patch || return 1
 	./configure --prefix=/usr --shared
-	make || return 1
-	make install prefix=${pkgdir}/usr || return 1
-	chmod 644 ${pkgdir}/usr/lib/libz.a
+	if [ "${CARCH}" == "x86_64" ]; then
+		ln -s contrib/amd64/amd64-match.S match.S
+	elif [ "${CARCH}" == "i686" ]; then
+		ln -s contrib/asm686/match.S match.S
+	fi
+	make LOC=-DASMV OBJA=match.o PIC_OBJA=match.lo || return 1
 
-	grep -A 24 '^  Copyright' zlib.h > license.txt
-	install -D license.txt ${pkgdir}/usr/share/licenses/zlib/license.txt
+	grep -A 24 '^  Copyright' zlib.h > LICENSE
 }
+
+package() {
+	cd ${srcdir}/zlib-$pkgver
+	make install DESTDIR=${pkgdir} || return 1
+	install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/zlib/LICENSE
+}

Added: install.patch
===================================================================
--- install.patch	                        (rev 0)
+++ install.patch	2009-12-25 17:52:12 UTC (rev 61803)
@@ -0,0 +1,19 @@
+--- zlib-1.2.3.4/Makefile.in	2009-12-24 16:09:43.000000000 +0100
++++ zlib-1.2.3.4/Makefile.in	2009-12-25 17:19:13.594735916 +0100
+@@ -34,7 +34,7 @@
+ SHAREDLIB=libz.so
+ SHAREDLIBV=libz.so.1.2.3.4
+ SHAREDLIBM=libz.so.1
+-LIBS=$(STATICLIB) $(SHAREDLIB)
++LIBS=$(STATICLIB) $(SHAREDLIB) $(SHAREDLIBV)
+ 
+ AR=ar rc
+ RANLIB=ranlib
+@@ -179,6 +179,7 @@
+ 	chmod 644 $(DESTDIR)$(man3dir)/zlib.3
+ 	cp zlib.pc $(DESTDIR)$(pkgconfigdir)
+ 	chmod 644 $(DESTDIR)$(pkgconfigdir)/zlib.pc
++	chmod 644 $(DESTDIR)$(libdir)/libz.a
+ # The ranlib in install is needed on NeXTSTEP which checks file times
+ # ldconfig is for Linux
+ 




More information about the arch-commits mailing list