Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated openjpeg to 2.3.1 #3794

Merged
merged 3 commits into from Apr 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion depends/install_openjpeg.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# install openjpeg

archive=openjpeg-2.3.0
archive=openjpeg-2.3.1

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

Expand Down
2 changes: 1 addition & 1 deletion docs/installation.rst
Expand Up @@ -163,7 +163,7 @@ Many of Pillow's features require external libraries:

* **openjpeg** provides JPEG 2000 functionality.

* Pillow has been tested with openjpeg **2.0.0** and **2.1.0**.
* Pillow has been tested with openjpeg **2.0.0**, **2.1.0** and **2.3.1**.
* Pillow does **not** support the earlier **1.5** series which ships
with Debian Jessie.

Expand Down
14 changes: 9 additions & 5 deletions winbuild/build_dep.py
Expand Up @@ -113,23 +113,27 @@ def end_compiler():
"""


def nmake_openjpeg(compiler):
atts = {'op_ver': '2.1'}
def nmake_openjpeg(compiler, bit):
if compiler['env_version'] == 'v7.0':
return ""

atts = {'op_ver': '2.3.1'}
atts.update(compiler)
return r"""
rem build openjpeg
setlocal
""" + vc_setup(compiler, bit) + r"""
@echo on
cd /D %%OPENJPEG%%%(inc_dir)s

%%CMAKE%% -DBUILD_THIRDPARTY:BOOL=OFF -G "NMake Makefiles" .
%%CMAKE%% -DBUILD_THIRDPARTY:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=OFF -G "NMake Makefiles" .
nmake -f Makefile clean
nmake -f Makefile
copy /Y /B bin\* %%INCLIB%%
mkdir %%INCLIB%%\openjpeg-%(op_ver)s
copy /Y /B src\lib\openjp2\*.h %%INCLIB%%\openjpeg-%(op_ver)s
endlocal
""" % atts
""" % atts # noqa: E501


def nmake_libs(compiler, bit):
Expand Down Expand Up @@ -284,7 +288,7 @@ def add_compiler(compiler, bit):

script.append(msbuild_freetype(compiler, bit))
script.append(build_lcms2(compiler))
# script.append(nmake_openjpeg(compiler))
script.append(nmake_openjpeg(compiler, bit))
script.append(build_ghostscript(compiler, bit))
script.append(end_compiler())

Expand Down
6 changes: 3 additions & 3 deletions winbuild/config.py
Expand Up @@ -75,9 +75,9 @@
'dir': 'libwebp-1.0.2',
},
'openjpeg': {
'url': SF_MIRROR+'/project/openjpeg/openjpeg/2.3.0/openjpeg-2.3.0.tar.gz',
'filename': PILLOW_DEPENDS_DIR + 'openjpeg-2.3.0.tar.gz',
'dir': 'openjpeg-2.3.0',
'url': 'https://github.com/uclouvain/openjpeg/archive/v2.3.1.tar.gz',
'filename': PILLOW_DEPENDS_DIR + 'openjpeg-2.3.1.tar.gz',
'dir': 'openjpeg-2.3.1',
},
}

Expand Down