From 0e2cdae7f3efcd1a7c6b2144f52d111b758143fd Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Sat, 7 Sep 2024 03:50:00 +0000 Subject: [PATCH] directxtk: Remove some mingw specific workarounds --- ...01-directxtk-remove-mingw-workaround.patch | 24 +++++++++++++++++++ mingw-w64-directxtk/PKGBUILD | 13 +++++++--- 2 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 mingw-w64-directxtk/0001-directxtk-remove-mingw-workaround.patch diff --git a/mingw-w64-directxtk/0001-directxtk-remove-mingw-workaround.patch b/mingw-w64-directxtk/0001-directxtk-remove-mingw-workaround.patch new file mode 100644 index 0000000000..fa71e7e334 --- /dev/null +++ b/mingw-w64-directxtk/0001-directxtk-remove-mingw-workaround.patch @@ -0,0 +1,24 @@ +--- a/Src/GamePad.cpp ++++ b/Src/GamePad.cpp +@@ -1417,9 +1417,7 @@ + #if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) + static_assert(XINPUT_DEVSUBTYPE_WHEEL == Capabilities::WHEEL, "xinput.h mismatch"); + static_assert(XINPUT_DEVSUBTYPE_ARCADE_STICK == Capabilities::ARCADE_STICK, "xinput.h mismatch"); +- #ifndef __MINGW32__ + static_assert(XINPUT_DEVSUBTYPE_FLIGHT_STICK == Capabilities::FLIGHT_STICK, "xinput.h mismatch"); +- #endif + static_assert(XINPUT_DEVSUBTYPE_DANCE_PAD == Capabilities::DANCE_PAD, "xinput.h mismatch"); + static_assert(XINPUT_DEVSUBTYPE_GUITAR == Capabilities::GUITAR, "xinput.h mismatch"); + static_assert(XINPUT_DEVSUBTYPE_GUITAR_ALTERNATE == Capabilities::GUITAR_ALTERNATE, "xinput.h mismatch"); +--- a/Src/ModelLoadSDKMESH.cpp ++++ b/Src/ModelLoadSDKMESH.cpp +@@ -182,9 +182,7 @@ + // Direct3D 9 Vertex Declaration to Direct3D 11 Input Layout mapping + + +-#ifndef __MINGW32__ + static_assert(D3D11_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT >= 32, "SDKMESH supports decls up to 32 entries"); +-#endif + + unsigned int GetInputLayoutDesc( + _In_reads_(32) const DXUT::D3DVERTEXELEMENT9 decl[], diff --git a/mingw-w64-directxtk/PKGBUILD b/mingw-w64-directxtk/PKGBUILD index 0c72e78f87..26cde8af8d 100644 --- a/mingw-w64-directxtk/PKGBUILD +++ b/mingw-w64-directxtk/PKGBUILD @@ -6,7 +6,7 @@ pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=1.8.8 _tag=jun2024 -pkgrel=2 +pkgrel=3 pkgdesc="DirectX Tool Kit for DirectX 11 (mingw-w64)" arch=('any') mingw_arch=('mingw64' 'ucrt64' 'clang64') @@ -18,8 +18,15 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-directxmath" "${MINGW_PACKAGE_PREFIX}-efxc2") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") -source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/microsoft/DirectXTK/archive/refs/tags/${_tag}.tar.gz") -sha256sums=('b2ab875c6abf482d4fb895f0c1f74fb8ed32cea5420165547b7a7ac01a3b08a6') +source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/microsoft/DirectXTK/archive/refs/tags/${_tag}.tar.gz" + 0001-directxtk-remove-mingw-workaround.patch) +sha256sums=('b2ab875c6abf482d4fb895f0c1f74fb8ed32cea5420165547b7a7ac01a3b08a6' + 'aab4d92f86afa117aaf323c7c4c87eaa30022565f2ca334892bf7b385bfabb20') + +prepare() { + cd "${_rn}-${_tag}" + patch -p1 -i "${srcdir}/0001-directxtk-remove-mingw-workaround.patch" +} build() { cd "${srcdir}/${_rn}-${_tag}"