diff --git a/mingw-w64-python-winsdk/001-skip-broken-header.patch b/mingw-w64-python-winsdk/001-skip-broken-header.patch new file mode 100644 index 0000000000..d6a6450a63 --- /dev/null +++ b/mingw-w64-python-winsdk/001-skip-broken-header.patch @@ -0,0 +1,11 @@ +--- winsdk-1.0.0b9/pywinrt/winsdk/src/py.Windows.Graphics.Capture.Interop.cpp.orig 2023-07-27 19:06:30.317410400 +0200 ++++ winsdk-1.0.0b9/pywinrt/winsdk/src/py.Windows.Graphics.Capture.Interop.cpp 2023-07-27 19:06:01.066530800 +0200 +@@ -1,6 +1,7 @@ + // WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.9 + +-#if __has_include("windows.graphics.capture.interop.h") ++// windows.graphics.capture.interop.h is broken in mingw-w64 atm ++#if __has_include("windows.graphics.capture.interop.h") && !defined(__MINGW32__) + #include + #else + // some environments like MSYS2 don't have this header diff --git a/mingw-w64-python-winsdk/PKGBUILD b/mingw-w64-python-winsdk/PKGBUILD index c166408785..9adaf1d214 100644 --- a/mingw-w64-python-winsdk/PKGBUILD +++ b/mingw-w64-python-winsdk/PKGBUILD @@ -4,7 +4,7 @@ _realname=winsdk pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}") pkgver=1.0.0b9 -pkgrel=3 +pkgrel=4 pkgdesc="Python package with bindings for Windows SDK (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') @@ -17,11 +17,18 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-python-build" "${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-ninja" "${MINGW_PACKAGE_PREFIX}-cc") -source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz") -sha256sums=('207d35f9ab445521d4f060b5c1f2181660390cd3db27b32961af7438478fb226') +source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz" + "001-skip-broken-header.patch") +sha256sums=('207d35f9ab445521d4f060b5c1f2181660390cd3db27b32961af7438478fb226' + '5ec3ddfede327d742b5bb60b328aca16b43da0a96a717060b3d42388054c5069') build() { msg "Python build for ${MSYSTEM}" + + cd "${srcdir}/${_realname}-${pkgver}" + # windows.ui.composition.h:4919:30: error: use of enum 'DirectXAlphaMode' without previous declaration + patch -Np1 -i "${srcdir}/001-skip-broken-header.patch" + cd "${srcdir}" cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}"