From dd4d19fce2296aaadd4443f8f8551f2f8e5aa7a4 Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Thu, 21 Apr 2022 15:30:55 +1200 Subject: zlib: Update to zlib-1.2.12 Bring in the following changes - Fix a deflate bug when using the Z_FIXED strategy that can result in out-of-bound accesses. - Fix a deflate bug when the window is full in deflate_stored(). - Speed up CRC-32 computations by a factor of 1.5 to 3. - Use the hardware CRC-32 instruction on ARMv8 processors. - Speed up crc32_combine() with powers of x tables. - Add crc32_combine_gen() and crc32_combine_op() for fast combines. Drop two patches that have been applied upstream and regenerate the remaining two. Fixes #1708 Signed-off-by: Chris Packham --- packages/zlib/1.2.11/0000-make-check-fail.patch | 37 ---------------------- packages/zlib/1.2.11/0001-no-_wopen-cygwin.patch | 25 --------------- packages/zlib/1.2.11/0002-mingw-static-only.patch | 28 ---------------- .../1.2.11/0003-crossbuild-macos-libtool.patch | 36 --------------------- packages/zlib/1.2.11/chksum | 8 ----- packages/zlib/1.2.11/version.desc | 0 packages/zlib/1.2.12/0000-mingw-static-only.patch | 28 ++++++++++++++++ .../1.2.12/0001-crossbuild-macos-libtool.patch | 36 +++++++++++++++++++++ packages/zlib/1.2.12/chksum | 8 +++++ packages/zlib/1.2.12/version.desc | 0 10 files changed, 72 insertions(+), 134 deletions(-) delete mode 100644 packages/zlib/1.2.11/0000-make-check-fail.patch delete mode 100644 packages/zlib/1.2.11/0001-no-_wopen-cygwin.patch delete mode 100644 packages/zlib/1.2.11/0002-mingw-static-only.patch delete mode 100644 packages/zlib/1.2.11/0003-crossbuild-macos-libtool.patch delete mode 100644 packages/zlib/1.2.11/chksum delete mode 100644 packages/zlib/1.2.11/version.desc create mode 100644 packages/zlib/1.2.12/0000-mingw-static-only.patch create mode 100644 packages/zlib/1.2.12/0001-crossbuild-macos-libtool.patch create mode 100644 packages/zlib/1.2.12/chksum create mode 100644 packages/zlib/1.2.12/version.desc diff --git a/packages/zlib/1.2.11/0000-make-check-fail.patch b/packages/zlib/1.2.11/0000-make-check-fail.patch deleted file mode 100644 index 203a5178..00000000 --- a/packages/zlib/1.2.11/0000-make-check-fail.patch +++ /dev/null @@ -1,37 +0,0 @@ -'make check' should return with non-zero status - -... if the test fails. - ---- - Makefile.in | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - ---- a/Makefile.in -+++ b/Makefile.in -@@ -91,7 +91,7 @@ - echo ' *** zlib test OK ***'; \ - else \ - echo ' *** zlib test FAILED ***'; false; \ -- fi; \ -+ fi - rm -f $$TMPST - - testshared: shared -@@ -104,7 +104,7 @@ - echo ' *** zlib shared test OK ***'; \ - else \ - echo ' *** zlib shared test FAILED ***'; false; \ -- fi; \ -+ fi - rm -f $$TMPSH - - test64: all64 -@@ -113,7 +113,7 @@ - echo ' *** zlib 64-bit test OK ***'; \ - else \ - echo ' *** zlib 64-bit test FAILED ***'; false; \ -- fi; \ -+ fi - rm -f $$TMP64 - - infcover.o: $(SRCDIR)test/infcover.c $(SRCDIR)zlib.h zconf.h diff --git a/packages/zlib/1.2.11/0001-no-_wopen-cygwin.patch b/packages/zlib/1.2.11/0001-no-_wopen-cygwin.patch deleted file mode 100644 index 67085bab..00000000 --- a/packages/zlib/1.2.11/0001-no-_wopen-cygwin.patch +++ /dev/null @@ -1,25 +0,0 @@ -From a5e814c69315f3b7528418f6a5185c4f8a9dc250 Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Wed, 15 Feb 2017 22:36:35 -0800 -Subject: [PATCH] Fix unresolved reference to _wopen on Cygwin - -The default Cygwin GCC/glibc do not provide _wopen. This seems to be -part of Win32API, which is provided by x86-w64-mingw32-gcc - but that -compiler does not define __CYGWIN__, it defines _WIN32. - -Signed-off-by: Alexey Neyman ---- - gzguts.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/gzguts.h -+++ b/gzguts.h -@@ -39,7 +39,7 @@ - # include - #endif - --#if defined(_WIN32) || defined(__CYGWIN__) -+#if defined(_WIN32) - # define WIDECHAR - #endif - diff --git a/packages/zlib/1.2.11/0002-mingw-static-only.patch b/packages/zlib/1.2.11/0002-mingw-static-only.patch deleted file mode 100644 index 6d5c89c5..00000000 --- a/packages/zlib/1.2.11/0002-mingw-static-only.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- - win32/Makefile.gcc | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - ---- a/win32/Makefile.gcc -+++ b/win32/Makefile.gcc -@@ -71,7 +71,11 @@ - gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o - OBJA = - --all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) example.exe minigzip.exe example_d.exe minigzip_d.exe -+all: $(STATICLIB) example.exe minigzip.exe -+ -+ifeq ($(SHARED_MODE),1) -+all: $(SHAREDLIB) $(IMPLIB) example_d.exe minigzip_d.exe -+endif - - test: example.exe minigzip.exe - ./example -@@ -125,7 +129,7 @@ - .PHONY: install uninstall clean - - install: zlib.h zconf.h $(STATICLIB) $(IMPLIB) -- @if test -z "$(DESTDIR)$(INCLUDE_PATH)" -o -z "$(DESTDIR)$(LIBRARY_PATH)" -o -z "$(DESTDIR)$(BINARY_PATH)"; then \ -+ @if test -z "$(INCLUDE_PATH)" -o -z "$(LIBRARY_PATH)" -o -z "$(BINARY_PATH)"; then \ - echo INCLUDE_PATH, LIBRARY_PATH, and BINARY_PATH must be specified; \ - exit 1; \ - fi diff --git a/packages/zlib/1.2.11/0003-crossbuild-macos-libtool.patch b/packages/zlib/1.2.11/0003-crossbuild-macos-libtool.patch deleted file mode 100644 index 3220a544..00000000 --- a/packages/zlib/1.2.11/0003-crossbuild-macos-libtool.patch +++ /dev/null @@ -1,36 +0,0 @@ -commit 1f6bc557ec5c90eced96ae81ff1d443ee5770993 -Author: Heiko Lewin -Date: Fri May 22 03:32:33 2020 +0200 - - configure: use LIBTOOL variable for Darwin builds - ---- - configure | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - ---- a/configure -+++ b/configure -@@ -66,6 +66,12 @@ - else - NM=${NM-"nm"} - fi -+if "${CROSS_PREFIX}libtool" --version >/dev/null 2>/dev/null || test $? -lt 126; then -+ LIBTOOL=${LIBTOOL-"${CROSS_PREFIX}libtool"} -+ test -n "${CROSS_PREFIX}" && echo Using ${LIBTOOL} | tee -a configure.log -+else -+ LIBTOOL=${LIBTOOL-"libtool"} -+fi - - # set defaults before processing command line options - LDCONFIG=${LDCONFIG-"ldconfig"} -@@ -241,8 +247,8 @@ - SHAREDLIBV=libz.$VER$shared_ext - SHAREDLIBM=libz.$VER1$shared_ext - LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER3"} -- if libtool -V 2>&1 | grep Apple > /dev/null; then -- AR="libtool" -+ if ${LIBTOOL} -V 2>&1 | grep Apple > /dev/null; then -+ AR="${LIBTOOL}" - else - AR="/usr/bin/libtool" - fi diff --git a/packages/zlib/1.2.11/chksum b/packages/zlib/1.2.11/chksum deleted file mode 100644 index e33c164b..00000000 --- a/packages/zlib/1.2.11/chksum +++ /dev/null @@ -1,8 +0,0 @@ -md5 zlib-1.2.11.tar.xz 85adef240c5f370b308da8c938951a68 -sha1 zlib-1.2.11.tar.xz e1cb0d5c92da8e9a8c2635dfa249c341dfd00322 -sha256 zlib-1.2.11.tar.xz 4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066 -sha512 zlib-1.2.11.tar.xz b7f50ada138c7f93eb7eb1631efccd1d9f03a5e77b6c13c8b757017b2d462e19d2d3e01c50fad60a4ae1bc86d431f6f94c72c11ff410c25121e571953017cb67 -md5 zlib-1.2.11.tar.gz 1c9f62f0778697a09d36121ead88e08e -sha1 zlib-1.2.11.tar.gz e6d119755acdf9104d7ba236b1242696940ed6dd -sha256 zlib-1.2.11.tar.gz c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1 -sha512 zlib-1.2.11.tar.gz 73fd3fff4adeccd4894084c15ddac89890cd10ef105dd5e1835e1e9bbb6a49ff229713bd197d203edfa17c2727700fce65a2a235f07568212d820dca88b528ae diff --git a/packages/zlib/1.2.11/version.desc b/packages/zlib/1.2.11/version.desc deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/zlib/1.2.12/0000-mingw-static-only.patch b/packages/zlib/1.2.12/0000-mingw-static-only.patch new file mode 100644 index 00000000..cab2389c --- /dev/null +++ b/packages/zlib/1.2.12/0000-mingw-static-only.patch @@ -0,0 +1,28 @@ +--- + win32/Makefile.gcc | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +--- a/win32/Makefile.gcc ++++ b/win32/Makefile.gcc +@@ -66,7 +66,11 @@ + gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o + OBJA = + +-all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) example.exe minigzip.exe example_d.exe minigzip_d.exe ++all: $(STATICLIB) example.exe minigzip.exe ++ ++ifeq ($(SHARED_MODE),1) ++all: $(SHAREDLIB) $(IMPLIB) example_d.exe minigzip_d.exe ++endif + + test: example.exe minigzip.exe + ./example +@@ -120,7 +124,7 @@ + .PHONY: install uninstall clean + + install: zlib.h zconf.h $(STATICLIB) $(IMPLIB) +- @if test -z "$(DESTDIR)$(INCLUDE_PATH)" -o -z "$(DESTDIR)$(LIBRARY_PATH)" -o -z "$(DESTDIR)$(BINARY_PATH)"; then \ ++ @if test -z "$(INCLUDE_PATH)" -o -z "$(LIBRARY_PATH)" -o -z "$(BINARY_PATH)"; then \ + echo INCLUDE_PATH, LIBRARY_PATH, and BINARY_PATH must be specified; \ + exit 1; \ + fi diff --git a/packages/zlib/1.2.12/0001-crossbuild-macos-libtool.patch b/packages/zlib/1.2.12/0001-crossbuild-macos-libtool.patch new file mode 100644 index 00000000..f448e99a --- /dev/null +++ b/packages/zlib/1.2.12/0001-crossbuild-macos-libtool.patch @@ -0,0 +1,36 @@ +commit 1f6bc557ec5c90eced96ae81ff1d443ee5770993 +Author: Heiko Lewin +Date: Fri May 22 03:32:33 2020 +0200 + + configure: use LIBTOOL variable for Darwin builds + +--- + configure | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +--- a/configure ++++ b/configure +@@ -66,6 +66,12 @@ + else + NM=${NM-"nm"} + fi ++if "${CROSS_PREFIX}libtool" --version >/dev/null 2>/dev/null || test $? -lt 126; then ++ LIBTOOL=${LIBTOOL-"${CROSS_PREFIX}libtool"} ++ test -n "${CROSS_PREFIX}" && echo Using ${LIBTOOL} | tee -a configure.log ++else ++ LIBTOOL=${LIBTOOL-"libtool"} ++fi + + # set defaults before processing command line options + LDCONFIG=${LDCONFIG-"ldconfig"} +@@ -252,8 +258,8 @@ + SHAREDLIBV=libz.$VER$shared_ext + SHAREDLIBM=libz.$VER1$shared_ext + LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER3"} +- if libtool -V 2>&1 | grep Apple > /dev/null; then +- AR="libtool" ++ if ${LIBTOOL} -V 2>&1 | grep Apple > /dev/null; then ++ AR="${LIBTOOL}" + else + AR="/usr/bin/libtool" + fi diff --git a/packages/zlib/1.2.12/chksum b/packages/zlib/1.2.12/chksum new file mode 100644 index 00000000..ef430376 --- /dev/null +++ b/packages/zlib/1.2.12/chksum @@ -0,0 +1,8 @@ +md5 zlib-1.2.12.tar.xz 28687d676c04e7103bb6ff2b9694c471 +sha1 zlib-1.2.12.tar.xz 37d26cd1138597c866b8e3e137156c82a0f0f960 +sha256 zlib-1.2.12.tar.xz 7db46b8d7726232a621befaab4a1c870f00a90805511c0e0090441dac57def18 +sha512 zlib-1.2.12.tar.xz 12940e81e988f7661da52fa20bdc333314ae86a621fdb748804a20840b065a1d6d984430f2d41f3a057de0effc6ff9bcf42f9ee9510b88219085f59cbbd082bd +md5 zlib-1.2.12.tar.gz 5fc414a9726be31427b440b434d05f78 +sha1 zlib-1.2.12.tar.gz 207ba741d387e2c1607104cf0bd8cff27deb2605 +sha256 zlib-1.2.12.tar.gz 91844808532e5ce316b3c010929493c0244f3d37593afd6de04f71821d5136d9 +sha512 zlib-1.2.12.tar.gz cc2366fa45d5dfee1f983c8c51515e0cff959b61471e2e8d24350dea22d3f6fcc50723615a911b046ffc95f51ba337d39ae402131a55e6d1541d3b095d6c0a14 diff --git a/packages/zlib/1.2.12/version.desc b/packages/zlib/1.2.12/version.desc new file mode 100644 index 00000000..e69de29b -- cgit v1.2.3