Skip to content

Commit

Permalink
Use zlib-ng on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere authored and nulano committed Nov 21, 2024
1 parent 3f5f3bb commit 69c9a7f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/wheels-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ if [[ -n "$IS_MACOS" ]]; then
else
GIFLIB_VERSION=5.2.1
fi
if [[ -n "$IS_MACOS" ]] || [[ "$MB_ML_VER" != 2014 ]]; then
if [[ -n "$IS_MACOS" ]]; then
ZLIB_VERSION=1.3.1
else
ZLIB_VERSION=1.2.8
ZLIB_NG_VERSION=2.2.2
fi
LIBWEBP_VERSION=1.4.0
BZIP2_VERSION=1.0.8
Expand All @@ -74,6 +74,16 @@ function build_pkg_config {
touch pkg-config-stamp
}

function build_zlib_ng {
if [ -e zlib-stamp ]; then return; fi
fetch_unpack https://github.com/zlib-ng/zlib-ng/archive/$ZLIB_NG_VERSION.tar.gz zlib-ng-$ZLIB_NG_VERSION.tar.gz
(cd zlib-ng-$ZLIB_NG_VERSION \
&& ./configure --prefix=$BUILD_PREFIX --zlib-compat \
&& make -j4 \
&& make install)
touch zlib-stamp
}

function build_brotli {
if [ -e brotli-stamp ]; then return; fi
local cmake=$(get_modern_cmake)
Expand Down Expand Up @@ -101,7 +111,11 @@ function build {
if [ -z "$IS_ALPINE" ] && [ -z "$IS_MACOS" ]; then
yum remove -y zlib-devel
fi
build_new_zlib
if [ -n "$IS_MACOS" ]; then
build_new_zlib
else
build_zlib_ng
fi

build_simple xcb-proto 1.17.0 https://xorg.freedesktop.org/archive/individual/proto
if [ -n "$IS_MACOS" ]; then
Expand Down
2 changes: 1 addition & 1 deletion Tests/check_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_wheel_features() -> None:

if sys.platform == "win32":
expected_features.remove("xcb")
else:
elif sys.platform == "darwin":
expected_features.remove("zlib_ng")

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

0 comments on commit 69c9a7f

Please sign in to comment.