Skip to content

Commit c00d019

Browse files
committed
Updated openjpeg to 2.5.2
1 parent 18af646 commit c00d019

File tree

4 files changed

+12
-14
lines changed

4 files changed

+12
-14
lines changed

.github/workflows/wheels-dependencies.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ FREETYPE_VERSION=2.13.2
1919
HARFBUZZ_VERSION=8.3.0
2020
LIBPNG_VERSION=1.6.40
2121
JPEGTURBO_VERSION=3.0.1
22-
OPENJPEG_VERSION=2.5.0
22+
OPENJPEG_VERSION=2.5.2
2323
XZ_VERSION=5.4.5
2424
TIFF_VERSION=4.6.0
2525
LCMS2_VERSION=2.16
@@ -40,7 +40,7 @@ BROTLI_VERSION=1.1.0
4040

4141
if [[ -n "$IS_MACOS" ]] && [[ "$CIBW_ARCHS" == "x86_64" ]]; then
4242
function build_openjpeg {
43-
local out_dir=$(fetch_unpack https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG_VERSION}.tar.gz openjpeg-2.5.0.tar.gz)
43+
local out_dir=$(fetch_unpack https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG_VERSION}.tar.gz openjpeg-${OPENJPEG_VERSION}.tar.gz)
4444
(cd $out_dir \
4545
&& cmake -DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX -DCMAKE_INSTALL_NAME_DIR=$BUILD_PREFIX/lib . \
4646
&& make install)
@@ -93,6 +93,9 @@ function build {
9393
done
9494
fi
9595
build_openjpeg
96+
if [ -f /usr/local/lib64/libopenjp2.so ]; then
97+
cp /usr/local/lib64/libopenjp2.so /usr/local/lib
98+
fi
9699

97100
ORIGINAL_CFLAGS=$CFLAGS
98101
CFLAGS="$CFLAGS -O3 -DNDEBUG"

depends/install_openjpeg.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
# install openjpeg
33

4-
archive=openjpeg-2.5.0
4+
archive=openjpeg-2.5.2
55

66
./download-and-extract.sh $archive https://raw.githubusercontent.com/python-pillow/pillow-depends/main/$archive.tar.gz
77

docs/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ Many of Pillow's features require external libraries:
177177
* **openjpeg** provides JPEG 2000 functionality.
178178

179179
* Pillow has been tested with openjpeg **2.0.0**, **2.1.0**, **2.3.1**,
180-
**2.4.0** and **2.5.0**.
180+
**2.4.0**, **2.5.0** and **2.5.2**.
181181
* Pillow does **not** support the earlier **1.5** series which ships
182182
with Debian Jessie.
183183

winbuild/build_prepare.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -308,21 +308,16 @@ def cmd_msbuild(
308308
"libs": [r"Lib\MS\*.lib"],
309309
},
310310
"openjpeg": {
311-
"url": "https://github.com/uclouvain/openjpeg/archive/v2.5.0.tar.gz",
312-
"filename": "openjpeg-2.5.0.tar.gz",
313-
"dir": "openjpeg-2.5.0",
311+
"url": "https://github.com/uclouvain/openjpeg/archive/v2.5.2.tar.gz",
312+
"filename": "openjpeg-2.5.2.tar.gz",
313+
"dir": "openjpeg-2.5.2",
314314
"license": "LICENSE",
315-
"patch": {
316-
r"src\lib\openjp2\ht_dec.c": {
317-
"#ifdef OPJ_COMPILER_MSVC\n return (OPJ_UINT32)__popcnt(val);": "#if defined(OPJ_COMPILER_MSVC) && (defined(_M_IX86) || defined(_M_AMD64))\n return (OPJ_UINT32)__popcnt(val);", # noqa: E501
318-
}
319-
},
320315
"build": [
321316
*cmds_cmake(
322317
"openjp2", "-DBUILD_CODEC:BOOL=OFF", "-DBUILD_SHARED_LIBS:BOOL=OFF"
323318
),
324-
cmd_mkdir(r"{inc_dir}\openjpeg-2.5.0"),
325-
cmd_copy(r"src\lib\openjp2\*.h", r"{inc_dir}\openjpeg-2.5.0"),
319+
cmd_mkdir(r"{inc_dir}\openjpeg-2.5.2"),
320+
cmd_copy(r"src\lib\openjp2\*.h", r"{inc_dir}\openjpeg-2.5.2"),
326321
],
327322
"libs": [r"bin\*.lib"],
328323
},

0 commit comments

Comments
 (0)