From 22cf228711fc3cfcbf5b1b0d0fe0fbc649741dae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Sun, 19 Jun 2022 20:35:55 +0200 Subject: [PATCH] python-imagecodecs: use correct calling convention for libdeflate --- mingw-w64-python-imagecodecs/0001-deflate.patch | 11 +++++++++++ .../0001-setup-customize.patch | 11 ----------- mingw-w64-python-imagecodecs/PKGBUILD | 10 +++++++--- 3 files changed, 18 insertions(+), 14 deletions(-) create mode 100644 mingw-w64-python-imagecodecs/0001-deflate.patch delete mode 100644 mingw-w64-python-imagecodecs/0001-setup-customize.patch diff --git a/mingw-w64-python-imagecodecs/0001-deflate.patch b/mingw-w64-python-imagecodecs/0001-deflate.patch new file mode 100644 index 0000000000..fe38a07d3e --- /dev/null +++ b/mingw-w64-python-imagecodecs/0001-deflate.patch @@ -0,0 +1,11 @@ +--- imagecodecs-2022.2.22/setup.py.orig 2022-06-19 20:09:02.175217700 +0200 ++++ imagecodecs-2022.2.22/setup.py 2022-06-19 20:15:53.590230600 +0200 +@@ -148,7 +148,7 @@ + 'brunsli': ext(libraries=['brunslidec-c', 'brunslienc-c']), + 'bz2': ext(libraries=['bz2']), + 'cms': ext(libraries=['lcms2']), +- 'deflate': ext(libraries=['deflate']), ++ 'deflate': ext(libraries=['deflate'],define_macros=[('LIBDEFLATE_DLL', 1)]), + 'gif': ext(libraries=['gif']), + # 'heif': ext(libraries=['heif']), + 'jpeg2k': ext( diff --git a/mingw-w64-python-imagecodecs/0001-setup-customize.patch b/mingw-w64-python-imagecodecs/0001-setup-customize.patch deleted file mode 100644 index 055cbc4def..0000000000 --- a/mingw-w64-python-imagecodecs/0001-setup-customize.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Naur imagecodecs-2021.11.11_orig/setup.py imagecodecs-2021.11.11/setup.py ---- imagecodecs-2021.11.11_orig/setup.py 2021-11-12 12:43:03.000000000 +0100 -+++ imagecodecs-2021.11.11/setup.py 2021-11-12 11:11:25.939183200 +0100 -@@ -499,6 +499,7 @@ - del EXTENSIONS['brunsli'] - del EXTENSIONS['jpeg12'] - del EXTENSIONS['jpegxl'] -+ del EXTENSIONS['mozjpeg'] - del EXTENSIONS['zfp'] - del EXTENSIONS['zlibng'] - diff --git a/mingw-w64-python-imagecodecs/PKGBUILD b/mingw-w64-python-imagecodecs/PKGBUILD index d7fe6fd21c..ad6b8d13ac 100644 --- a/mingw-w64-python-imagecodecs/PKGBUILD +++ b/mingw-w64-python-imagecodecs/PKGBUILD @@ -4,7 +4,7 @@ _realname=imagecodecs pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}") pkgver=2022.2.22 -pkgrel=5 +pkgrel=6 pkgdesc="Image transformation, compression, and decompression codecs (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') @@ -35,15 +35,19 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools" "${MINGW_PACKAGE_PREFIX}-cc") options=('staticlibs' 'strip' '!debug') source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/cgohlke/${_realname}/archive/v${pkgver}.tar.gz" - "https://github.com/cgohlke/imagecodecs/commit/8adae25efb68c5e1e64e2cf1ad96903b182914e9.patch") + "https://github.com/cgohlke/imagecodecs/commit/8adae25efb68c5e1e64e2cf1ad96903b182914e9.patch" + "0001-deflate.patch" + ) sha256sums=('7a2f3edc805fb8342c819a11ad0f40f7a14e641c8a8d74b7116cbbdc802572d0' - 'e998832e14b6099e9f644e4bffb48c1b22d678fbf5df69604ce7b36ec9311249') + 'e998832e14b6099e9f644e4bffb48c1b22d678fbf5df69604ce7b36ec9311249' + '591603ce15e255eb90d64190964249d619c5f950a72c751b711368c1dea5ec8d') prepare() { cd "${srcdir}" pushd "${_realname}-${pkgver}" # https://github.com/cgohlke/imagecodecs/pull/39 patch -Np1 -i "${srcdir}"/8adae25efb68c5e1e64e2cf1ad96903b182914e9.patch + patch -Np1 -i "${srcdir}"/0001-deflate.patch popd rm -rf python-build-${MSYSTEM} || true