summaryrefslogtreecommitdiffstats
path: root/archive-libs/zlib
diff options
context:
space:
mode:
Diffstat (limited to 'archive-libs/zlib')
-rw-r--r--archive-libs/zlib/0002-fix-crc32.patch53
-rwxr-xr-xarchive-libs/zlib/BUILD6
-rwxr-xr-xarchive-libs/zlib/DETAILS12
-rw-r--r--archive-libs/zlib/HISTORY13
-rwxr-xr-xarchive-libs/zlib/PRE_BUILD2
5 files changed, 24 insertions, 62 deletions
diff --git a/archive-libs/zlib/0002-fix-crc32.patch b/archive-libs/zlib/0002-fix-crc32.patch
deleted file mode 100644
index 9546308cc0..0000000000
--- a/archive-libs/zlib/0002-fix-crc32.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-# From https://github.com/madler/zlib/commit/ec3df00224d4b396e2ac6586ab5d25f673caa4c2.patch
-From ec3df00224d4b396e2ac6586ab5d25f673caa4c2 Mon Sep 17 00:00:00 2001
-From: Mark Adler <madler@alumni.caltech.edu>
-Date: Wed, 30 Mar 2022 11:14:53 -0700
-Subject: [PATCH] Correct incorrect inputs provided to the CRC functions.
-
-The previous releases of zlib were not sensitive to incorrect CRC
-inputs with bits set above the low 32. This commit restores that
-behavior, so that applications with such bugs will continue to
-operate as before.
----
- crc32.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/crc32.c b/crc32.c
-index a1bdce5c2..451887bc7 100644
---- a/crc32.c
-+++ b/crc32.c
-@@ -630,7 +630,7 @@ unsigned long ZEXPORT crc32_z(crc, buf, len)
- #endif /* DYNAMIC_CRC_TABLE */
-
- /* Pre-condition the CRC */
-- crc ^= 0xffffffff;
-+ crc = (~crc) & 0xffffffff;
-
- /* Compute the CRC up to a word boundary. */
- while (len && ((z_size_t)buf & 7) != 0) {
-@@ -749,7 +749,7 @@ unsigned long ZEXPORT crc32_z(crc, buf, len)
- #endif /* DYNAMIC_CRC_TABLE */
-
- /* Pre-condition the CRC */
-- crc ^= 0xffffffff;
-+ crc = (~crc) & 0xffffffff;
-
- #ifdef W
-
-@@ -1077,7 +1077,7 @@ uLong ZEXPORT crc32_combine64(crc1, crc2, len2)
- #ifdef DYNAMIC_CRC_TABLE
- once(&made, make_crc_table);
- #endif /* DYNAMIC_CRC_TABLE */
-- return multmodp(x2nmodp(len2, 3), crc1) ^ crc2;
-+ return multmodp(x2nmodp(len2, 3), crc1) ^ (crc2 & 0xffffffff);
- }
-
- /* ========================================================================= */
-@@ -1112,5 +1112,5 @@ uLong crc32_combine_op(crc1, crc2, op)
- uLong crc2;
- uLong op;
- {
-- return multmodp(op, crc1) ^ crc2;
-+ return multmodp(op, crc1) ^ (crc2 & 0xffffffff);
- }
-
diff --git a/archive-libs/zlib/BUILD b/archive-libs/zlib/BUILD
index 6885a7ae23..41f5b5d98a 100755
--- a/archive-libs/zlib/BUILD
+++ b/archive-libs/zlib/BUILD
@@ -4,7 +4,11 @@ CFLAGS="$CFLAGS -DPIC -fPIC" &&
CFLAGS="${CFLAGS//-O[gs0-9]/-O3}" &&
CFLAGS="${CFLAGS//-Ofast/-O3}" &&
CFLAGS="${CFLAGS//-O /-O3 }" &&
-CFLAGS+=" -fno-tree-vectorize -mstackrealign -DUNALIGNED_OK" &&
+CFLAGS+=" -fno-tree-vectorize" &&
+if [[ "${SMGL_COMPAT_ARCHS[1]}" == "ia32"
+ || "${SMGL_COMPAT_ARCHS[1]}" == "x86_64" ]]; then
+ CFLAGS+=" -mstackrealign -DUNALIGNED_OK"
+fi &&
sedit "s/-O/$CFLAGS/" Makefile &&
diff --git a/archive-libs/zlib/DETAILS b/archive-libs/zlib/DETAILS
index a86839333d..6b794ab7d3 100755
--- a/archive-libs/zlib/DETAILS
+++ b/archive-libs/zlib/DETAILS
@@ -1,13 +1,13 @@
+# Watch: https://zlib.net/
SPELL=zlib
- VERSION=1.2.12
- SOURCE_HASH=sha512:cc2366fa45d5dfee1f983c8c51515e0cff959b61471e2e8d24350dea22d3f6fcc50723615a911b046ffc95f51ba337d39ae402131a55e6d1541d3b095d6c0a14
+ VERSION=1.3.1
+ SOURCE_HASH=sha512:580677aad97093829090d4b605ac81c50327e74a6c2de0b85dd2e8525553f3ddde17556ea46f8f007f89e435493c9a20bc997d1ef1c1c2c23274528e3c46b94f
SECURITY_PATCH=1
SOURCE=$SPELL-$VERSION.tar.gz
SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
- SOURCE_URL[0]=http://www.zlib.net/$SOURCE
- SOURCE_URL[1]=http://prdownloads.sourceforge.net/libpng/${SOURCE}
- PATCHLEVEL=1
- WEB_SITE=http://www.zlib.net/
+ SOURCE_URL[0]=https://www.zlib.net/$SOURCE
+ SOURCE_URL[1]=https://prdownloads.sourceforge.net/libpng/${SOURCE}
+ WEB_SITE=https://www.zlib.net/
ENTERED=20010922
LICENSE[0]=ZLIB
KEYWORDS="archive libs"
diff --git a/archive-libs/zlib/HISTORY b/archive-libs/zlib/HISTORY
index d64f8e091a..232fe02052 100644
--- a/archive-libs/zlib/HISTORY
+++ b/archive-libs/zlib/HISTORY
@@ -1,3 +1,16 @@
+2024-02-25 Treeve Jelbert <treeve@sourcemage.org>
+ * DETAILS: version 1.3.1
+
+2023-08-18 Pavel Vinogradov <public@sourcemage.org>
+ * DETAILS: version 1.3, removed Watch line duplicate
+
+2022-11-19 Remko van der Vossen <wich@sourcemage.org>
+ * BUILD: -mstackrealign -DUNALIGNED_OK only for x86*
+
+2022-10-14 Pavel Vinogradov <public@sourcemage.org>
+ * DETAILS: version 1.2.13
+ * PRE_BUILD, 0002-fix-crc32.patch: dropped, merged in upstream
+
2022-06-13 Eric Sandall <sandalle@sourcemage.org>
* DETAILS: PATCHLEVEL++
* PRE_BUILD: Apply 0002-fix-crc32.patch
diff --git a/archive-libs/zlib/PRE_BUILD b/archive-libs/zlib/PRE_BUILD
index 534bad3441..3756c5f364 100755
--- a/archive-libs/zlib/PRE_BUILD
+++ b/archive-libs/zlib/PRE_BUILD
@@ -2,8 +2,6 @@ default_pre_build &&
cd "$SOURCE_DIRECTORY" &&
patch -p1 < "$SPELL_DIRECTORY/0001-fix-zlib.pc-install-path.patch" &&
-message "${MESSAGE_COLOR}Fix CRC32 'bug'...${DEFAULT_COLOR}" &&
-patch -p1 < "${SPELL_DIRECTORY}"/0002-fix-crc32.patch &&
mk_source_dir "$SOURCE_DIRECTORY.static" &&
cp -a $SOURCE_DIRECTORY/* $SOURCE_DIRECTORY.static