Skip to content

Commit 0b70b34

Browse files
committed
Fix build on manylinux_2_28 x86_64
1 parent e2105f3 commit 0b70b34

4 files changed

Lines changed: 35 additions & 14 deletions

File tree

.ci/install.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,8 @@ pushd depends && sudo ./install_raqm.sh && popd
5656
# libavif
5757
pushd depends && sudo ./install_libavif.sh && popd
5858

59+
# libjxl
60+
pushd depends && sudo ./install_libjxl.sh && popd
61+
5962
# extra test images
6063
pushd depends && ./install_extra_test_images.sh && popd

.github/workflows/wheels-dependencies.sh

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -321,19 +321,6 @@ function build {
321321
build_libpng
322322
build_lcms2
323323
build_openjpeg
324-
325-
webp_cflags="-O3 -DNDEBUG"
326-
if [[ -n "$IS_MACOS" ]]; then
327-
webp_cflags="$webp_cflags -Wl,-headerpad_max_install_names"
328-
fi
329-
webp_ldflags=""
330-
if [[ -n "$IOS_SDK" ]]; then
331-
webp_ldflags="$webp_ldflags -llzma -lz"
332-
fi
333-
CFLAGS="$CFLAGS $webp_cflags" LDFLAGS="$LDFLAGS $webp_ldflags" build_simple libwebp $LIBWEBP_VERSION \
334-
https://storage.googleapis.com/downloads.webmproject.org/releases/webp tar.gz \
335-
--enable-libwebpmux --enable-libwebpdemux
336-
337324
build_brotli
338325

339326
if [[ -n "$IS_MACOS" ]]; then
@@ -356,6 +343,18 @@ function build {
356343
build_jpegxl
357344
fi
358345
fi
346+
347+
webp_cflags="-O3 -DNDEBUG"
348+
if [[ -n "$IS_MACOS" ]]; then
349+
webp_cflags="$webp_cflags -Wl,-headerpad_max_install_names"
350+
fi
351+
webp_ldflags=""
352+
if [[ -n "$IOS_SDK" ]]; then
353+
webp_ldflags="$webp_ldflags -llzma -lz"
354+
fi
355+
CFLAGS="$CFLAGS $webp_cflags" LDFLAGS="$LDFLAGS $webp_ldflags" build_simple libwebp $LIBWEBP_VERSION \
356+
https://storage.googleapis.com/downloads.webmproject.org/releases/webp tar.gz \
357+
--enable-libwebpmux --enable-libwebpdemux
359358
}
360359

361360
function create_meson_cross_config {

depends/install_libjxl.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
version=0.11.1
4+
5+
./download-and-extract.sh highway-1.3.0 https://github.com/google/highway/archive/1.3.0.tar.gz
6+
7+
pushd highway-1.3.0
8+
cmake .
9+
make -j4 install
10+
popd
11+
12+
./download-and-extract.sh libjxl-$version https://github.com/libjxl/libjxl/archive/v$version.tar.gz
13+
14+
pushd libjxl-$version
15+
cmake -DCMAKE_INSTALL_PREFIX=/usr -DJPEGXL_ENABLE_SJPEG=OFF -DJPEGXL_ENABLE_SKCMS=OFF -DBUILD_TESTING=OFF .
16+
make -j4 install
17+
popd

docs/installation/building-from-source.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ Many of Pillow's features require external libraries:
129129
To install libraqm, ``sudo apt-get install meson`` and then see
130130
``depends/install_raqm.sh``.
131131

132+
To install libjxl, see ``depends/install_libjxl.sh``.
133+
132134
Build prerequisites for libavif on Ubuntu are installed with::
133135

134136
sudo apt-get install cmake ninja-build nasm
@@ -166,7 +168,7 @@ Many of Pillow's features require external libraries:
166168
The easiest way to install external libraries is via `Homebrew
167169
<https://brew.sh/>`_. After you install Homebrew, run::
168170

169-
brew install libavif libjpeg libraqm libtiff little-cms2 openjpeg webp
171+
brew install jpeg-xl libavif libjpeg libraqm libtiff little-cms2 openjpeg webp
170172

171173
If you would like to use libavif with more codecs than just aom, then
172174
instead of installing libavif through Homebrew directly, you can use

0 commit comments

Comments
 (0)