diff --git a/mingw-w64-python-pillow/PKGBUILD b/mingw-w64-python-pillow/PKGBUILD index 146c6a2cb5f06..9874917202ae7 100644 --- a/mingw-w64-python-pillow/PKGBUILD +++ b/mingw-w64-python-pillow/PKGBUILD @@ -4,7 +4,7 @@ _realname=pillow pkgbase=mingw-w64-python-pillow pkgname=("${MINGW_PACKAGE_PREFIX}-python-pillow") pkgver=11.1.0 -pkgrel=1 +pkgrel=2 provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}=${pkgver}" "${MINGW_PACKAGE_PREFIX}-python3-pillow=${pkgver}") conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}" @@ -22,7 +22,7 @@ url="https://github.com/python-pillow/Pillow/" pkgdesc="Python Imaging Library (PIL) fork Python3 version (mingw-w64)" depends=("${MINGW_PACKAGE_PREFIX}-freetype" "${MINGW_PACKAGE_PREFIX}-lcms2" - "${MINGW_PACKAGE_PREFIX}-libimagequant" + $([[ "${CARCH}" == "i686" ]] || echo "${MINGW_PACKAGE_PREFIX}-libimagequant") "${MINGW_PACKAGE_PREFIX}-libjpeg" "${MINGW_PACKAGE_PREFIX}-libraqm" "${MINGW_PACKAGE_PREFIX}-libtiff" @@ -45,7 +45,13 @@ prepare() { build() { cd "${srcdir}/python-build-${MSYSTEM}" - ${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation + + declare -a _extra_config + if [ "${CARCH}" == "i686" ]; then + _extra_config+=("-Cimagequant=disable") + fi + + ${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation "${_extra_config[@]}" } check() { @@ -68,11 +74,4 @@ package() { install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE" install -dm755 "${pkgdir}${MINGW_PREFIX}/include/python${_pybasever}/" install -m644 -t "${pkgdir}${MINGW_PREFIX}/include/python${_pybasever}/" src/libImaging/*.h - - # clean up bins - # cd "${pkgdir}${MINGW_PREFIX}/bin" - # for f in *.py; do - # sed -e "s|${_mingw_prefix}/bin/|/usr/bin/env |g" -i ${f} - # mv "$f" "${f%.py}" - # done }