zlib: Update to 1.2.13
sync things with cygwin (this build system is... not ideal)
This commit is contained in:
parent
53ebce874b
commit
51b49dcab4
@ -1,51 +0,0 @@
|
|||||||
--- origsrc/zlib-1.2.7/contrib/minizip/Makefile.am 2012-03-26 23:17:41.000000000 -0400
|
|
||||||
+++ src/zlib-1.2.7/contrib/minizip/Makefile.am 2012-05-03 15:05:29.961313800 -0400
|
|
||||||
@@ -22,7 +22,8 @@ libminizip_la_SOURCES = \
|
|
||||||
zip.c \
|
|
||||||
${iowin32_src}
|
|
||||||
|
|
||||||
-libminizip_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0 -lz
|
|
||||||
+libminizip_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0 -no-undefined
|
|
||||||
+libminizip_la_LIBADD = -lz
|
|
||||||
|
|
||||||
minizip_includedir = $(includedir)/minizip
|
|
||||||
minizip_include_HEADERS = \
|
|
||||||
--- origsrc/zlib-1.2.7/contrib/minizip/ioapi.c 2012-01-21 14:58:45.000000000 -0500
|
|
||||||
+++ src/zlib-1.2.7/contrib/minizip/ioapi.c 2012-05-03 15:05:29.961313800 -0400
|
|
||||||
@@ -14,8 +14,9 @@
|
|
||||||
#define _CRT_SECURE_NO_WARNINGS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#if defined(__APPLE__) || defined(IOAPI_NO_64)
|
|
||||||
+#if defined(__APPLE__) || defined(IOAPI_NO_64) || defined(__CYGWIN__)
|
|
||||||
// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
|
|
||||||
+// Ditto cygwin.
|
|
||||||
#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
|
|
||||||
#define FTELLO_FUNC(stream) ftello(stream)
|
|
||||||
#define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin)
|
|
||||||
--- origsrc/zlib-1.2.7/contrib/minizip/miniunz.c 2010-07-18 12:04:24.000000000 -0400
|
|
||||||
+++ src/zlib-1.2.7/contrib/minizip/miniunz.c 2012-05-03 15:05:29.961313800 -0400
|
|
||||||
@@ -27,8 +27,9 @@
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#ifdef __APPLE__
|
|
||||||
+#if defined(__APPLE__) || defined(__CYGWIN__)
|
|
||||||
// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
|
|
||||||
+// Ditto cygwin.
|
|
||||||
#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
|
|
||||||
#define FTELLO_FUNC(stream) ftello(stream)
|
|
||||||
#define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin)
|
|
||||||
--- origsrc/zlib-1.2.7/contrib/minizip/minizip.c 2012-01-21 15:00:26.000000000 -0500
|
|
||||||
+++ src/zlib-1.2.7/contrib/minizip/minizip.c 2012-05-03 15:05:29.976938300 -0400
|
|
||||||
@@ -28,8 +28,9 @@
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#ifdef __APPLE__
|
|
||||||
+#if defined(__APPLE__) || defined(__CYGWIN__)
|
|
||||||
// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
|
|
||||||
+// Ditto cygwin.
|
|
||||||
#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
|
|
||||||
#define FTELLO_FUNC(stream) ftello(stream)
|
|
||||||
#define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin)
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
--- origsrc/zlib-1.2.7/win32/zlib.def 2012-03-16 22:53:09.000000000 -0500
|
|
||||||
+++ src/zlib-1.2.7/win32/zlib.def 2013-02-13 17:39:00.812212400 -0600
|
|
||||||
@@ -81,4 +81,3 @@ EXPORTS
|
|
||||||
inflateUndermine
|
|
||||||
inflateResetKeep
|
|
||||||
deflateResetKeep
|
|
||||||
- gzopen_w
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
--- origsrc/zlib-1.2.8/zconf.h 2013-04-28 18:57:11.000000000 -0400
|
|
||||||
+++ src/zlib-1.2.8/zconf.h 2013-05-09 16:40:53.393931700 -0400
|
|
||||||
@@ -408,11 +408,11 @@ typedef uLong FAR uLongf;
|
|
||||||
typedef unsigned long z_crc_t;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
|
|
||||||
+#if 1 /* HAVE_UNISTD_H may be set to #if 1 by ./configure */
|
|
||||||
# define Z_HAVE_UNISTD_H
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
|
|
||||||
+#if 1 /* HAVE_STDARG_H may be set to #if 1 by ./configure */
|
|
||||||
# define Z_HAVE_STDARG_H
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@ -1,41 +1,54 @@
|
|||||||
# Maintainer: Alexey Pavlov <Alexpux@gmail.com>
|
# Maintainer: Alexey Pavlov <Alexpux@gmail.com>
|
||||||
|
|
||||||
pkgname=('zlib' 'zlib-devel')
|
pkgname=('zlib' 'zlib-devel')
|
||||||
pkgver=1.2.12
|
pkgver=1.2.13
|
||||||
pkgrel=2
|
pkgrel=1
|
||||||
pkgdesc='Compression library implementing the deflate compression method found in gzip and PKZIP'
|
pkgdesc='Compression library implementing the deflate compression method found in gzip and PKZIP'
|
||||||
arch=('i686' 'x86_64')
|
arch=('i686' 'x86_64')
|
||||||
groups=('libraries')
|
groups=('libraries')
|
||||||
license=('custom')
|
license=('custom')
|
||||||
url="https://www.zlib.net/"
|
url="https://www.zlib.net/"
|
||||||
makedepends=('gcc' 'make' 'autotools')
|
makedepends=('gcc' 'make' 'autotools')
|
||||||
source=("https://zlib.net/current/zlib-${pkgver}.tar.gz"
|
source=("https://github.com/madler/zlib/releases/download/v${pkgver}/zlib-${pkgver}.tar.gz"
|
||||||
#"https://sourceforge.net/projects/libpng/files/zlib/${pkgver}/zlib-${pkgver}.tar.gz"
|
zlib-1.2.13-configure.patch
|
||||||
1.2.7-minizip-cygwin.patch
|
zlib-1.2.13-gzopen_w.patch
|
||||||
1.2.7-zlib-symbols.patch
|
zlib-1.2.13-minizip-fixuncrypt.patch)
|
||||||
zlib-1.2.11-msys2.patch
|
sha256sums=('b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30'
|
||||||
"https://patch-diff.githubusercontent.com/raw/madler/zlib/pull/607.patch")
|
'43726a2170b298059391c0faec0c893aa7ca59b1201afd9f807c49d39ce25527'
|
||||||
sha256sums=('91844808532e5ce316b3c010929493c0244f3d37593afd6de04f71821d5136d9'
|
'3c5186940741cf380ab598362c564c792965e9d25906ef75087e9e7389becbc5'
|
||||||
'58daf0d9041ed6687fa17cfa244562a0f8db1ef9924d57b8a427adf40a8ecfb0'
|
'3022d46bd933076cff754d8247eb12125cf72e4dbecdb8e90805cbe5393bd0b7')
|
||||||
'16e9ce18df14a700dda0572843cdb42b5cb3d398c64706af0acc7cd77c181b7e'
|
|
||||||
'65c946a22df5f7beab8fbf556e69c66269c8c0e251f370378d566afe10defe5d'
|
|
||||||
'f35eb05334a4f8d7b40b6c5610a6369f654863b5fa1a19c2507888f918025238')
|
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
cd ${srcdir}/${pkgname}-${pkgver}
|
cd ${srcdir}/${pkgname}-${pkgver}
|
||||||
grep -A 24 '^ Copyright' zlib.h > LICENSE
|
|
||||||
|
|
||||||
patch -p2 -i ${srcdir}/1.2.7-minizip-cygwin.patch
|
patch -p2 -i ${srcdir}/zlib-1.2.13-configure.patch
|
||||||
patch -p2 -i ${srcdir}/1.2.7-zlib-symbols.patch
|
patch -p2 -i ${srcdir}/zlib-1.2.13-gzopen_w.patch
|
||||||
patch -p1 -i ${srcdir}/zlib-1.2.11-msys2.patch
|
patch -p2 -i ${srcdir}/zlib-1.2.13-minizip-fixuncrypt.patch
|
||||||
patch -p1 -i ${srcdir}/607.patch
|
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd ${srcdir}/${pkgname}-${pkgver}
|
cd ${srcdir}/${pkgname}-${pkgver}
|
||||||
|
|
||||||
|
# configure doesn't really work.. but leave it here in case things improve
|
||||||
|
export MSYSTEM=CYGWIN
|
||||||
|
export CHOST="${CHOST/-msys/-cygwin}"
|
||||||
./configure --prefix=/usr
|
./configure --prefix=/usr
|
||||||
make
|
|
||||||
make install DESTDIR="${srcdir}/dest"
|
# Instead we use some "other" makefile
|
||||||
|
make -j1 -f win32/Makefile.gcc \
|
||||||
|
CFLAGS="${CFLAGS}" \
|
||||||
|
SHAREDLIB=msys-z.dll
|
||||||
|
|
||||||
|
make -f win32/Makefile.gcc install \
|
||||||
|
DESTDIR="${srcdir}/dest" \
|
||||||
|
SHAREDLIB=msys-z.dll \
|
||||||
|
BINARY_PATH=/usr/bin \
|
||||||
|
INCLUDE_PATH=/usr/include \
|
||||||
|
LIBRARY_PATH=/usr/lib \
|
||||||
|
prefix=/usr \
|
||||||
|
SHARED_MODE=1
|
||||||
|
|
||||||
|
install -D zlib.3 "${srcdir}/dest/usr/share/man/man3/zlib.3"
|
||||||
}
|
}
|
||||||
|
|
||||||
check() {
|
check() {
|
||||||
|
|||||||
10
zlib/zlib-1.2.13-configure.patch
Normal file
10
zlib/zlib-1.2.13-configure.patch
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--- origsrc/zlib-1.2.13/configure 2022-10-10 20:11:12.000000000 +0200
|
||||||
|
+++ src/zlib-1.2.13/configure 2022-10-15 19:47:10.544034900 +0200
|
||||||
|
@@ -232,6 +232,7 @@ if test "$gcc" -eq 1 && ($cc -c $test.c)
|
||||||
|
LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"}
|
||||||
|
LDCONFIG="ldconfig -m" ;;
|
||||||
|
CYGWIN* | Cygwin* | cygwin* | *-cygwin* | OS/2*)
|
||||||
|
+ LDSHARED=${LDSHARED-"$cc -shared"}
|
||||||
|
EXE='.exe' ;;
|
||||||
|
MINGW* | mingw* | *-mingw*)
|
||||||
|
rm -f $test.[co] $test $test$shared_ext
|
||||||
7
zlib/zlib-1.2.13-gzopen_w.patch
Normal file
7
zlib/zlib-1.2.13-gzopen_w.patch
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
--- origsrc/zlib-1.2.13/win32/zlib.def
|
||||||
|
+++ src/zlib-1.2.13/win32/zlib.def
|
||||||
|
@@ -94,4 +94,3 @@ EXPORTS
|
||||||
|
inflateCodesUsed
|
||||||
|
inflateResetKeep
|
||||||
|
deflateResetKeep
|
||||||
|
- gzopen_w
|
||||||
13
zlib/zlib-1.2.13-minizip-fixuncrypt.patch
Normal file
13
zlib/zlib-1.2.13-minizip-fixuncrypt.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
--- origsrc/zlib-1.2.13/contrib/minizip/unzip.c.fixuncrypt
|
||||||
|
+++ src/zlib-1.2.13/contrib/minizip/unzip.c
|
||||||
|
@@ -68,10 +68,6 @@
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
-#ifndef NOUNCRYPT
|
||||||
|
- #define NOUNCRYPT
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
#include "zlib.h"
|
||||||
|
#include "unzip.h"
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user