From 0400977eb3e24d86bd96c058d14acc5fc7df054e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= Date: Tue, 1 Jun 2021 11:48:02 +0200 Subject: [PATCH] python-imagecodecs: fix cfitsio include path --- .../0004-mingw-fix-cfitsio-header.patch | 10 ++++++++ mingw-w64-python-imagecodecs/PKGBUILD | 23 +++++++++++-------- 2 files changed, 24 insertions(+), 9 deletions(-) create mode 100644 mingw-w64-python-imagecodecs/0004-mingw-fix-cfitsio-header.patch diff --git a/mingw-w64-python-imagecodecs/0004-mingw-fix-cfitsio-header.patch b/mingw-w64-python-imagecodecs/0004-mingw-fix-cfitsio-header.patch new file mode 100644 index 0000000000..2445d5929a --- /dev/null +++ b/mingw-w64-python-imagecodecs/0004-mingw-fix-cfitsio-header.patch @@ -0,0 +1,10 @@ +--- imagecodecs-2021.5.20/setup.py.orig 2021-05-22 07:09:28.000000000 +0200 ++++ imagecodecs-2021.5.20/setup.py 2021-06-01 11:27:24.303209900 +0200 +@@ -475,6 +475,7 @@ + ) + ) + EXTENSIONS['jpegxr']['include_dirs'].append(sys.prefix + '/include/jxrlib') ++ EXTENSIONS['rcomp']['include_dirs'].append(sys.prefix + '/include/cfitsio') + + + # customize builds based on environment diff --git a/mingw-w64-python-imagecodecs/PKGBUILD b/mingw-w64-python-imagecodecs/PKGBUILD index ee316b200a..57adc913c3 100644 --- a/mingw-w64-python-imagecodecs/PKGBUILD +++ b/mingw-w64-python-imagecodecs/PKGBUILD @@ -31,30 +31,35 @@ depends=("${MINGW_PACKAGE_PREFIX}-blosc" makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools" "${MINGW_PACKAGE_PREFIX}-cython") options=('staticlibs' 'strip' '!debug') -source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/cgohlke/${_realname}/archive/v${pkgver}.tar.gz") -sha256sums=('2fd34251a28602ec75ae605ee7b0ecb85a4340584bfd12ce668f84b96cf057d1') +source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/cgohlke/${_realname}/archive/v${pkgver}.tar.gz" + 0004-mingw-fix-cfitsio-header.patch) +sha256sums=('2fd34251a28602ec75ae605ee7b0ecb85a4340584bfd12ce668f84b96cf057d1' + '8d86f0a59cffcfc7f523902aca31a1b68ba299d0cd5e6e287f9298b8f762acf4') prepare() { cd "${srcdir}" + pushd "${_realname}-${pkgver}" > /dev/null + patch -p1 -i ${srcdir}/0004-mingw-fix-cfitsio-header.patch + popd > /dev/null - rm -rf python-build-${CARCH} || true - cp -r "${_realname}-${pkgver}" "python-build-${CARCH}" + rm -rf python-build-${MINGW_ARCH} || true + cp -r "${_realname}-${pkgver}" "python-build-${MINGW_ARCH}" } build() { - msg "Python build for ${CARCH}" - cd "${srcdir}/python-build-${CARCH}" + msg "Python build for ${MINGW_ARCH}" + cd "${srcdir}/python-build-${MINGW_ARCH}" ${MINGW_PREFIX}/bin/python setup.py build } check() { - msg "Python test for ${CARCH}" - cd "${srcdir}/python-build-${CARCH}" + msg "Python test for ${MINGW_ARCH}" + cd "${srcdir}/python-build-${MINGW_ARCH}" ${MINGW_PREFIX}/bin/python setup.py check --strict } package() { - cd "${srcdir}/python-build-${CARCH}" + cd "${srcdir}/python-build-${MINGW_ARCH}" MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} \ --root="${pkgdir}" --optimize=1 --skip-build