-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
152 additions
and
67 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
ports/openal-soft/187ed2df39ab1f5ea92b97d4d3e0894da87e297b.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
From 187ed2df39ab1f5ea92b97d4d3e0894da87e297b Mon Sep 17 00:00:00 2001 | ||
From: Darryl Pogue <darryl@dpogue.ca> | ||
Date: Mon, 25 Nov 2024 19:01:03 -0800 | ||
Subject: [PATCH] vcpkg fixup for finding CppWinRT | ||
|
||
--- | ||
CMakeLists.txt | 17 ++--------------- | ||
1 file changed, 2 insertions(+), 15 deletions(-) | ||
|
||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 412e8ae7..95b5d758 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -1414,21 +1414,8 @@ else() | ||
${MATH_LIB}) | ||
|
||
if(ALSOFT_UWP) | ||
- set(ALSOFT_CPPWINRT_VERSION "2.0.230706.1" CACHE STRING "The soft-oal default cppwinrt version") | ||
- | ||
- find_program(NUGET_EXE NAMES nuget) | ||
- if(NOT NUGET_EXE) | ||
- message("NUGET.EXE not found.") | ||
- message(FATAL_ERROR "Please install this executable, and run CMake again.") | ||
- endif() | ||
- | ||
- exec_program(${NUGET_EXE} | ||
- ARGS install "Microsoft.Windows.CppWinRT" -Version ${ALSOFT_CPPWINRT_VERSION} -ExcludeVersion -OutputDirectory "\"${CMAKE_BINARY_DIR}/packages\"") | ||
- | ||
- set_target_properties(${IMPL_TARGET} PROPERTIES | ||
- VS_PROJECT_IMPORT ${CMAKE_BINARY_DIR}/packages/Microsoft.Windows.CppWinRT/build/native/Microsoft.Windows.CppWinRT.props | ||
- ) | ||
- target_link_libraries(${IMPL_TARGET} PRIVATE ${CMAKE_BINARY_DIR}/packages/Microsoft.Windows.CppWinRT/build/native/Microsoft.Windows.CppWinRT.targets) | ||
+ find_package(cppwinrt CONFIG REQUIRED) | ||
+ target_link_libraries(${IMPL_TARGET} PRIVATE Microsoft::CppWinRT) | ||
endif() | ||
|
||
if(NOT WIN32 AND NOT APPLE) | ||
-- | ||
2.47.1 | ||
|
89 changes: 89 additions & 0 deletions
89
ports/openal-soft/96f62e37e9ae015ee104e568cb57ea0d8964a84b.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
From 96f62e37e9ae015ee104e568cb57ea0d8964a84b Mon Sep 17 00:00:00 2001 | ||
From: Darryl Pogue <darryl@dpogue.ca> | ||
Date: Sat, 23 Nov 2024 15:39:13 -0800 | ||
Subject: [PATCH] Only use noexcept in public headers on >= C++11 | ||
|
||
This resolves issues consuming openal-soft in projects that don't | ||
explicitly specify a C++ standard of C++11 or newer. | ||
|
||
This also handles the fact that __cplusplus is not set properly in MSVC | ||
(always claiming to be 199711L) which prevented both the C++11 noexcept | ||
and the C++17 noexcept annotations from taking effect. | ||
|
||
Ref: https://github.com/kcat/openal-soft/pull/1071 | ||
--- | ||
include/AL/al.h | 14 +++++++++++++- | ||
include/AL/alc.h | 14 +++++++++++++- | ||
2 files changed, 26 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/include/AL/al.h b/include/AL/al.h | ||
index e9f8f3b1..a4e3ad51 100644 | ||
--- a/include/AL/al.h | ||
+++ b/include/AL/al.h | ||
@@ -5,9 +5,19 @@ | ||
#ifdef __cplusplus | ||
extern "C" { | ||
|
||
+#ifdef _MSVC_LANG | ||
+#define AL_CPLUSPLUS _MSVC_LANG | ||
+#else | ||
+#define AL_CPLUSPLUS __cplusplus | ||
+#endif | ||
+ | ||
#ifndef AL_DISABLE_NOEXCEPT | ||
+#if AL_CPLUSPLUS >= 201103L | ||
#define AL_API_NOEXCEPT noexcept | ||
-#if __cplusplus >= 201703L | ||
+#else | ||
+#define AL_API_NOEXCEPT | ||
+#endif | ||
+#if AL_CPLUSPLUS >= 201703L | ||
#define AL_API_NOEXCEPT17 noexcept | ||
#else | ||
#define AL_API_NOEXCEPT17 | ||
@@ -19,6 +29,8 @@ extern "C" { | ||
#define AL_API_NOEXCEPT17 | ||
#endif | ||
|
||
+#undef AL_CPLUSPLUS | ||
+ | ||
#else /* __cplusplus */ | ||
|
||
#define AL_API_NOEXCEPT | ||
diff --git a/include/AL/alc.h b/include/AL/alc.h | ||
index 3311b57f..d048ca04 100644 | ||
--- a/include/AL/alc.h | ||
+++ b/include/AL/alc.h | ||
@@ -5,9 +5,19 @@ | ||
#ifdef __cplusplus | ||
extern "C" { | ||
|
||
+#ifdef _MSVC_LANG | ||
+#define ALC_CPLUSPLUS _MSVC_LANG | ||
+#else | ||
+#define ALC_CPLUSPLUS __cplusplus | ||
+#endif | ||
+ | ||
#ifndef AL_DISABLE_NOEXCEPT | ||
+#if ALC_CPLUSPLUS >= 201103L | ||
#define ALC_API_NOEXCEPT noexcept | ||
-#if __cplusplus >= 201703L | ||
+#else | ||
+#define ALC_API_NOEXCEPT | ||
+#endif | ||
+#if ALC_CPLUSPLUS >= 201703L | ||
#define ALC_API_NOEXCEPT17 noexcept | ||
#else | ||
#define ALC_API_NOEXCEPT17 | ||
@@ -19,6 +29,8 @@ extern "C" { | ||
#define ALC_API_NOEXCEPT17 | ||
#endif | ||
|
||
+#undef ALC_CPLUSPLUS | ||
+ | ||
#else /* __cplusplus */ | ||
|
||
#define ALC_API_NOEXCEPT | ||
-- | ||
2.47.0 | ||
|
54 changes: 0 additions & 54 deletions
54
ports/openal-soft/c12ada68951ea67a59bef7d4fcdf22334990c12a.patch
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters