zlib: bump version

This commit is contained in:
Jerome Duval
2022-05-10 19:41:20 +02:00
parent 605910beae
commit 5dd18b4473
3 changed files with 84 additions and 37 deletions

View File

@@ -1,24 +0,0 @@
From faf76068355cc9169c3b3cc6564a352218ee47d1 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sun, 28 Aug 2016 18:33:07 +0200
Subject: zlib: export Haiku shared object symbols
zlib by default hides all symbols starting with _ from its ABI, which
also hides symbols used for ABI versionning on Haiku. This makes
runtime_loader complain that it can't identify the version used.
diff --git a/zlib.map b/zlib.map
index 40fa9db..05fa43a 100644
--- a/zlib.map
+++ b/zlib.map
@@ -6,6 +6,7 @@ ZLIB_1.2.0 {
inflateBackEnd;
inflateBackInit_;
inflateCopy;
+ _gSharedObjectHaiku*;
local:
deflate_copyright;
inflate_copyright;
--
2.7.0

View File

@@ -0,0 +1,76 @@
From 537ab038d530752fbdb34302f35ee71be07e701b Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sun, 28 Aug 2016 18:33:07 +0200
Subject: zlib: export Haiku shared object symbols
zlib by default hides all symbols starting with _ from its ABI, which
also hides symbols used for ABI versionning on Haiku. This makes
runtime_loader complain that it can't identify the version used.
diff --git a/zlib.map b/zlib.map
index b330b60..eb6470f 100644
--- a/zlib.map
+++ b/zlib.map
@@ -6,6 +6,7 @@ ZLIB_1.2.0 {
inflateBackEnd;
inflateBackInit_;
inflateCopy;
+ _gSharedObjectHaiku*;
local:
deflate_copyright;
inflate_copyright;
--
2.30.2
From b9e2b0c41fe70dea8b2d5f697bcce21b4391f70f Mon Sep 17 00:00:00 2001
From: Mark Adler <madler@alumni.caltech.edu>
Date: Wed, 30 Mar 2022 11:14:53 -0700
Subject: 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.
diff --git a/crc32.c b/crc32.c
index a1bdce5..451887b 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);
}
--
2.30.2

View File

@@ -12,13 +12,13 @@ reduced, if necessary, at some cost in compression."
HOMEPAGE="http://www.zlib.net/"
COPYRIGHT="1995-2017 Jean-loup Gailly and Mark Adler"
LICENSE="Zlib"
REVISION="4"
SOURCE_URI="http://zlib.net/fossils/zlib-$portVersion.tar.gz"
CHECKSUM_SHA256="c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1"
REVISION="1"
SOURCE_URI="http://zlib.net/zlib-$portVersion.tar.gz"
CHECKSUM_SHA256="91844808532e5ce316b3c010929493c0244f3d37593afd6de04f71821d5136d9"
PATCHES="zlib-$portVersion.patchset"
ARCHITECTURES="all ?ppc"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
zlib$secondaryArchSuffix = $portVersion compat >= 1
@@ -61,20 +61,15 @@ PATCH()
BUILD()
{
rm -rf build
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=$prefix ..
cmake -S. -Bbuild \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX:PATH=$prefix
make $jobArgs
}
INSTALL()
{
cd build
make install
touch $libDir/libz.so.1
make -C build install
prepareInstalledDevelLib libz