directxmath: update to 3.20.b (April 2025)

This commit is contained in:
Dirk Stolle 2025-09-25 16:06:19 +02:00
parent 2f5c7d46de
commit 04d1cea996
2 changed files with 59 additions and 4 deletions

View File

@ -0,0 +1,31 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 48b8d38..b398a56 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,7 +38,7 @@ add_library(${PROJECT_NAME} INTERFACE)
target_include_directories(${PROJECT_NAME} INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Inc>
- $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/directxmath>)
target_compile_features(${PROJECT_NAME} INTERFACE cxx_std_11)
@@ -69,7 +69,7 @@ install(EXPORT ${PROJECT_NAME}-targets
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PACKAGE_NAME})
install(FILES ${LIBRARY_HEADERS}
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/directxmath)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE_NAME}-config.cmake
@@ -79,7 +79,7 @@ install(FILES
# Create pkg-config file
include(build/JoinPaths.cmake)
# from: https://github.com/jtojnar/cmake-snips#concatenating-paths-when-building-pkg-config-files
-join_paths(DIRECTXMATH_INCLUDEDIR_FOR_PKG_CONFIG "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}")
+join_paths(DIRECTXMATH_INCLUDEDIR_FOR_PKG_CONFIG "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}/directxmath")
join_paths(DIRECTXMATH_LIBDIR_FOR_PKG_CONFIG "\${prefix}" "${CMAKE_INSTALL_LIBDIR}")
configure_file(

View File

@ -4,13 +4,14 @@ _realname=directxmath
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
# Version from CMakeLists.txt
pkgver=3.20
_tag=oct2024
pkgver=3.20.b
_tag=apr2025
pkgrel=1
pkgdesc="DirectXMath is an all inline SIMD C++ linear algebra library for use in games and graphics apps (mingw-w64)"
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url='https://go.microsoft.com/fwlink/?LinkID=615560'
msys2_changelog_url='https://github.com/microsoft/DirectXMath/blob/main/CHANGELOG.md'
msys2_repository_url="https://github.com/microsoft/DirectXMath"
msys2_references=(
'aur: mingw-w64-directxmath'
@ -19,8 +20,31 @@ license=('spdx:MIT')
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-ninja"
"${MINGW_PACKAGE_PREFIX}-cc")
source=("https://github.com/microsoft/DirectXMath/archive/${_tag}/${_realname}-${_tag}.tar.gz")
sha256sums=('69af50e165e8458b0422068cff24dbdaf7d649c3174f140acbb71c39f3c93716')
source=("https://github.com/microsoft/DirectXMath/archive/${_tag}/${_realname}-${_tag}.tar.gz"
'001-path-adjustment.patch')
sha256sums=('8ac7f060d7fcc971d77c5a9f3ff98548ecf119c144a7c2dd9d21f4b66ba94cd4'
'749352c566989b0bd4ad39b5185afc236b581e6b51aaec786ba6b9dfb5fc8e39')
apply_patch_with_msg() {
for _patch in "$@"
do
msg2 "Applying ${_patch}"
patch -Nbp1 -i "${srcdir}/${_patch}"
done
}
prepare() {
cd "${srcdir}"/DirectXMath-${_tag}
# Upstream changed the path for installed files to be located directly in
# ${prefix}/include/ instead of ${prefix}/include/directxmath/. See
# <https://github.com/microsoft/DirectXMath/commit/78922ff9e7aea7384643b5734eec6fa6b163575b>.
# That causes conflicts with the headers-git package which also has a file
# at ${prefix}/include/directxmath.h. The patch reverts that so that the
# old location is kept and the file location conflict is avoided.
apply_patch_with_msg \
001-path-adjustment.patch
}
build() {
declare -a extra_config