Revert "python-winsdk: skip broken mingw-w64 header"

This reverts commit 4ac9c683ec
This commit is contained in:
Biswapriyo Nath
2023-08-11 10:14:44 +05:30
parent 291847b2eb
commit 2de718d2e7
2 changed files with 3 additions and 21 deletions

View File

@@ -1,11 +0,0 @@
--- 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 <windows.graphics.capture.interop.h>
#else
// some environments like MSYS2 don't have this header

View File

@@ -4,7 +4,7 @@ _realname=winsdk
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
pkgver=1.0.0b9
pkgrel=4
pkgrel=5
pkgdesc="Python package with bindings for Windows SDK (mingw-w64)"
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
@@ -17,19 +17,12 @@ 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"
"001-skip-broken-header.patch")
sha256sums=('207d35f9ab445521d4f060b5c1f2181660390cd3db27b32961af7438478fb226'
'5ec3ddfede327d742b5bb60b328aca16b43da0a96a717060b3d42388054c5069')
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz")
sha256sums=('207d35f9ab445521d4f060b5c1f2181660390cd3db27b32961af7438478fb226')
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}"
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation