mingw-w64-directxmath - Fix for cpuid.h being used instead of intrin.h.
This could effect things besides DirectxTex.
This commit is contained in:
@@ -6,7 +6,7 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
# Version from CMakeLists.txt
|
||||
pkgver=3.1.8
|
||||
_tag=dec2023
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
pkgdesc="DirectXMath is an all inline SIMD C++ linear algebra library for use in games and graphics apps (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
|
||||
@@ -18,8 +18,15 @@ license=('spdx:MIT')
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
|
||||
"${MINGW_PACKAGE_PREFIX}-ninja"
|
||||
"${MINGW_PACKAGE_PREFIX}-cc")
|
||||
source=("${_realname}-${_tag}.tar.gz"::"https://github.com/microsoft/DirectXMath/archive/refs/tags/${_tag}.tar.gz")
|
||||
sha256sums=('cdc09f55a9999497d8c350d1c8c0e3f0fe92055cbf5490a2c319f9625080dc13')
|
||||
source=("${_realname}-${_tag}.tar.gz"::"https://github.com/microsoft/DirectXMath/archive/refs/tags/${_tag}.tar.gz"
|
||||
fix_intrin_h.patch)
|
||||
sha256sums=('cdc09f55a9999497d8c350d1c8c0e3f0fe92055cbf5490a2c319f9625080dc13'
|
||||
'ed1b3ad71571801c140fac2163f44dec1d6fdb24e217cb2db1add4b8d4bd339d')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}-${_tag}"
|
||||
patch -Np0 -i "${srcdir}/fix_intrin_h.patch"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${_realname}-${_tag}"
|
||||
|
||||
19
mingw-w64-directxmath/fix_intrin_h.patch
Normal file
19
mingw-w64-directxmath/fix_intrin_h.patch
Normal file
@@ -0,0 +1,19 @@
|
||||
--- Inc/DirectXMath.h.orig 2024-01-04 05:44:10.027221700 -0500
|
||||
+++ Inc/DirectXMath.h 2024-01-04 05:08:58.083980100 -0500
|
||||
@@ -114,11 +114,15 @@
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4987)
|
||||
// C4987: Off by default noise
|
||||
+#endif
|
||||
+#ifdef _WIN32
|
||||
#include <intrin.h>
|
||||
+#endif
|
||||
+#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
-#if (defined(__clang__) || defined(__GNUC__)) && (__x86_64__ || __i386__)
|
||||
+#if (defined(__clang__) || defined(__GNUC__)) && (__x86_64__ || __i386__) && !defined(_WIN32)
|
||||
#include <cpuid.h>
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user