1 # Maintainer: Pierre Schmitz <pierre@archlinux.de>
10 url="https://www.zlib.net/"
12 options=('staticlibs') # needed by binutils testsuite
13 source=("https://zlib.net/zlib-${pkgver}.tar.gz"{,.asc}
14 $pkgname-handle-incorrect-crc-inputs.patch::https://github.com/madler/zlib/commit/ec3df00224d4.patch)
15 sha256sums=('91844808532e5ce316b3c010929493c0244f3d37593afd6de04f71821d5136d9'
17 '00e023c3ccb7b895ebb3421970b1b77f8a527b40190f35050b79fd0e817a7b0c')
18 validpgpkeys=('5ED46A6721D365587791E2AA783FCD8E58BCAFBA')
21 cd "${srcdir}/zlib-$pkgver"
22 grep -A 24 '^ Copyright' zlib.h > LICENSE
24 # https://github.com/madler/zlib/issues/613
25 patch -Np1 -i ../$pkgname-handle-incorrect-crc-inputs.patch
29 cd "${srcdir}/zlib-$pkgver"
31 CFLAGS+=" -ffat-lto-objects"
32 ./configure --prefix=/usr
36 cp Makefile Makefile.orig
37 cp ../README.contrib readme.txt
39 ./configure --prefix=/usr --enable-static=no
44 cd "${srcdir}/zlib-$pkgver"
48 make -f Makefile.orig test
52 pkgdesc='Compression library implementing the deflate compression method found in gzip and PKZIP'
54 cd "${srcdir}/zlib-$pkgver"
55 make install DESTDIR="${pkgdir}"
56 install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/zlib/LICENSE"
60 pkgdesc='Mini zip and unzip based on zlib'
63 cd "${srcdir}/zlib-$pkgver/contrib/minizip"
64 make install DESTDIR="${pkgdir}"
65 install -D -m644 "${srcdir}/zlib-$pkgver/LICENSE" "${pkgdir}/usr/share/licenses/minizip/LICENSE"
67 # https://github.com/madler/zlib/pull/229
68 rm "${pkgdir}/usr/include/minizip/crypt.h"