diff --git a/mingw-w64-directxtex/001-missing-compression-enumeration.patch b/mingw-w64-directxtex/001-missing-compression-enumeration.patch new file mode 100644 index 0000000000..91a8d369ee --- /dev/null +++ b/mingw-w64-directxtex/001-missing-compression-enumeration.patch @@ -0,0 +1,16 @@ +diff --git a/Texconv/texconv.cpp b/Texconv/texconv.cpp +index 282fb69..9d12cb6 100644 +--- a/Texconv/texconv.cpp ++++ b/Texconv/texconv.cpp +@@ -3856,11 +3856,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[]) + { + options.pstrName = const_cast(L"HeifCompressionMethod"); + varValues.vt = VT_UI1; +- #if defined(NTDDI_WIN10_CU) +- varValues.bVal = WICHeifCompressionNone; +- #else + varValues.bVal = 0x1 /* WICHeifCompressionNone */; +- #endif + } + else if (wicQuality >= 0.f) + { diff --git a/mingw-w64-directxtex/PKGBUILD b/mingw-w64-directxtex/PKGBUILD index 48a7e69dff..226d6eece9 100644 --- a/mingw-w64-directxtex/PKGBUILD +++ b/mingw-w64-directxtex/PKGBUILD @@ -1,17 +1,19 @@ # Maintainer: J. Peter Mugaas +# Contributor: Dirk Stolle _realname=directxtex pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") # Version from CMakeLists.txt -pkgver=2.0.6 -_tag=oct2024 -pkgrel=3 +pkgver=2.0.8 +_tag=jul2025 +pkgrel=1 pkgdesc="DirectXTex texture processing library (mingw-w64)" arch=('any') mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64') url='http://go.microsoft.com/fwlink/?LinkId=248926' msys2_repository_url="https://github.com/microsoft/DirectXTex" +msys2_changelog_url='https://github.com/microsoft/DirectXTex/blob/main/CHANGELOG.md' msys2_references=( 'aur: mingw-w64-directxtex' ) @@ -23,8 +25,29 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cc" "${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-ninja" "${MINGW_PACKAGE_PREFIX}-efxc2") -source=("https://github.com/microsoft/DirectXTex/archive/$_tag/${_realname}-${_tag}.tar.gz") -sha256sums=('0caea49c52bba24eb6025ad1f46c9aa00224e91c075b55a21b738a23ed5fedfe') +source=("https://github.com/microsoft/DirectXTex/archive/$_tag/${_realname}-${_tag}.tar.gz" + '001-missing-compression-enumeration.patch') +sha256sums=('25356ef10e0a2ba20fe344c337a6db6c7220a19971fc266831f7a505d88ece5d' + '8ee961d7340eeccaddf53b1848d177ec370ada5e27fd9ff4f17995b2c3a76f9d') + +apply_patch_with_msg() { + for _patch in "$@" + do + msg2 "Applying ${_patch}" + patch -Nbp1 -i "${srcdir}/${_patch}" + done +} + +prepare() { + cd "${srcdir}"/DirectXTex-${_tag} + + # Currently, the wincodec.h header in the headers-git package is missing the + # WICHeifCompressionOption enumeration () + # and thus the WICHeifCompressionNone value, so we always have to use the + # literal value instead. + apply_patch_with_msg \ + 001-missing-compression-enumeration.patch +} build() { mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}"