Skip to content

Commit 69c9a7f

Browse files
radarherenulano
authored andcommitted
Use zlib-ng on Linux
1 parent 3f5f3bb commit 69c9a7f

2 files changed

Lines changed: 18 additions & 4 deletions

File tree

.github/workflows/wheels-dependencies.sh

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ if [[ -n "$IS_MACOS" ]]; then
5050
else
5151
GIFLIB_VERSION=5.2.1
5252
fi
53-
if [[ -n "$IS_MACOS" ]] || [[ "$MB_ML_VER" != 2014 ]]; then
53+
if [[ -n "$IS_MACOS" ]]; then
5454
ZLIB_VERSION=1.3.1
5555
else
56-
ZLIB_VERSION=1.2.8
56+
ZLIB_NG_VERSION=2.2.2
5757
fi
5858
LIBWEBP_VERSION=1.4.0
5959
BZIP2_VERSION=1.0.8
@@ -74,6 +74,16 @@ function build_pkg_config {
7474
touch pkg-config-stamp
7575
}
7676

77+
function build_zlib_ng {
78+
if [ -e zlib-stamp ]; then return; fi
79+
fetch_unpack https://github.com/zlib-ng/zlib-ng/archive/$ZLIB_NG_VERSION.tar.gz zlib-ng-$ZLIB_NG_VERSION.tar.gz
80+
(cd zlib-ng-$ZLIB_NG_VERSION \
81+
&& ./configure --prefix=$BUILD_PREFIX --zlib-compat \
82+
&& make -j4 \
83+
&& make install)
84+
touch zlib-stamp
85+
}
86+
7787
function build_brotli {
7888
if [ -e brotli-stamp ]; then return; fi
7989
local cmake=$(get_modern_cmake)
@@ -101,7 +111,11 @@ function build {
101111
if [ -z "$IS_ALPINE" ] && [ -z "$IS_MACOS" ]; then
102112
yum remove -y zlib-devel
103113
fi
104-
build_new_zlib
114+
if [ -n "$IS_MACOS" ]; then
115+
build_new_zlib
116+
else
117+
build_zlib_ng
118+
fi
105119

106120
build_simple xcb-proto 1.17.0 https://xorg.freedesktop.org/archive/individual/proto
107121
if [ -n "$IS_MACOS" ]; then

Tests/check_wheel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_wheel_features() -> None:
4040

4141
if sys.platform == "win32":
4242
expected_features.remove("xcb")
43-
else:
43+
elif sys.platform == "darwin":
4444
expected_features.remove("zlib_ng")
4545

4646
assert set(features.get_supported_features()) == expected_features

0 commit comments

Comments
 (0)