From 181b90e18d3ecba209932f9cff456a89dc451d7d Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Sat, 16 Nov 2024 14:21:29 -0800 Subject: [PATCH] [openal-soft] Update to 1.24.0 --- ...d2df39ab1f5ea92b97d4d3e0894da87e297b.patch | 40 +++++++++ ...2e37e9ae015ee104e568cb57ea0d8964a84b.patch | 89 +++++++++++++++++++ ...da68951ea67a59bef7d4fcdf22334990c12a.patch | 54 ----------- ports/openal-soft/portfile.cmake | 18 ++-- ports/openal-soft/vcpkg.json | 9 +- versions/baseline.json | 4 +- versions/o-/openal-soft.json | 5 ++ 7 files changed, 152 insertions(+), 67 deletions(-) create mode 100644 ports/openal-soft/187ed2df39ab1f5ea92b97d4d3e0894da87e297b.patch create mode 100644 ports/openal-soft/96f62e37e9ae015ee104e568cb57ea0d8964a84b.patch delete mode 100644 ports/openal-soft/c12ada68951ea67a59bef7d4fcdf22334990c12a.patch diff --git a/ports/openal-soft/187ed2df39ab1f5ea92b97d4d3e0894da87e297b.patch b/ports/openal-soft/187ed2df39ab1f5ea92b97d4d3e0894da87e297b.patch new file mode 100644 index 00000000000000..866739b0168fe1 --- /dev/null +++ b/ports/openal-soft/187ed2df39ab1f5ea92b97d4d3e0894da87e297b.patch @@ -0,0 +1,40 @@ +From 187ed2df39ab1f5ea92b97d4d3e0894da87e297b Mon Sep 17 00:00:00 2001 +From: Darryl Pogue +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 + diff --git a/ports/openal-soft/96f62e37e9ae015ee104e568cb57ea0d8964a84b.patch b/ports/openal-soft/96f62e37e9ae015ee104e568cb57ea0d8964a84b.patch new file mode 100644 index 00000000000000..94755a5b1dced3 --- /dev/null +++ b/ports/openal-soft/96f62e37e9ae015ee104e568cb57ea0d8964a84b.patch @@ -0,0 +1,89 @@ +From 96f62e37e9ae015ee104e568cb57ea0d8964a84b Mon Sep 17 00:00:00 2001 +From: Darryl Pogue +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 + diff --git a/ports/openal-soft/c12ada68951ea67a59bef7d4fcdf22334990c12a.patch b/ports/openal-soft/c12ada68951ea67a59bef7d4fcdf22334990c12a.patch deleted file mode 100644 index 09709ab90a2e86..00000000000000 --- a/ports/openal-soft/c12ada68951ea67a59bef7d4fcdf22334990c12a.patch +++ /dev/null @@ -1,54 +0,0 @@ -From c12ada68951ea67a59bef7d4fcdf22334990c12a Mon Sep 17 00:00:00 2001 -From: Chris Robinson -Date: Tue, 4 Jul 2023 11:30:18 -0700 -Subject: [PATCH] Don't use an import target for OpenSL - ---- - CMakeLists.txt | 3 ++- - cmake/FindOpenSL.cmake | 12 +++++------- - 2 files changed, 7 insertions(+), 8 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 34fd33122..af25a96c7 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1183,7 +1183,8 @@ if(ALSOFT_BACKEND_OPENSL) - set(HAVE_OPENSL 1) - set(ALC_OBJS ${ALC_OBJS} alc/backends/opensl.cpp alc/backends/opensl.h) - set(BACKENDS "${BACKENDS} OpenSL,") -- set(EXTRA_LIBS "OpenSL::OpenSLES" ${EXTRA_LIBS}) -+ set(EXTRA_LIBS ${OPENSL_LIBRARIES} ${EXTRA_LIBS}) -+ set(INC_PATHS ${INC_PATHS} ${OPENSL_INCLUDE_DIRS}) - endif() - endif() - if(ALSOFT_REQUIRE_OPENSL AND NOT HAVE_OPENSL) -diff --git a/cmake/FindOpenSL.cmake b/cmake/FindOpenSL.cmake -index 004287494..3df54d447 100644 ---- a/cmake/FindOpenSL.cmake -+++ b/cmake/FindOpenSL.cmake -@@ -2,8 +2,9 @@ - # Find the OpenSL libraries - # - # This module defines the following variables and targets: --# OPENSL_FOUND - True if OPENSL was found --# OpenSL::OpenSLES - The OpenSLES target -+# OPENSL_FOUND - True if OPENSL was found -+# OPENSL_INCLUDE_DIRS - The OpenSL include paths -+# OPENSL_LIBRARIES - The OpenSL libraries to link - # - - #============================================================================= -@@ -53,11 +54,8 @@ find_package_handle_standard_args(OpenSL REQUIRED_VARS OPENSL_LIBRARY OPENSL_INC - OPENSL_ANDROID_INCLUDE_DIR) - - if(OPENSL_FOUND) -- add_library(OpenSL::OpenSLES UNKNOWN IMPORTED) -- set_target_properties(OpenSL::OpenSLES PROPERTIES -- IMPORTED_LOCATION ${OPENSL_LIBRARY} -- INTERFACE_INCLUDE_DIRECTORIES ${OPENSL_INCLUDE_DIR} -- INTERFACE_INCLUDE_DIRECTORIES ${OPENSL_ANDROID_INCLUDE_DIR}) -+ set(OPENSL_LIBRARIES ${OPENSL_LIBRARY}) -+ set(OPENSL_INCLUDE_DIRS ${OPENSL_INCLUDE_DIR} ${OPENSL_ANDROID_INCLUDE_DIR}) - endif() - - mark_as_advanced(OPENSL_INCLUDE_DIR OPENSL_ANDROID_INCLUDE_DIR OPENSL_LIBRARY) diff --git a/ports/openal-soft/portfile.cmake b/ports/openal-soft/portfile.cmake index 73bc9c56bdd1ef..0f582bd20c4d06 100644 --- a/ports/openal-soft/portfile.cmake +++ b/ports/openal-soft/portfile.cmake @@ -2,10 +2,11 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO kcat/openal-soft REF ${VERSION} - SHA512 21f768484978e4321b733004988cb5ecf43d908e7e08f2d421a338633fcfb2ade722d035de73742470ff135ab538d6b9b56df14020976adb1d1e081dfb095c6b + SHA512 6fdb5e02f4d4e2d483bccf69121dda9b691170e88d301f53b5e3b3ab196541d7b0b23a868acdf85f6dacac9d8508079f67cb7d733e186a13a66ee70ecdd813f0 HEAD_REF master PATCHES - c12ada68951ea67a59bef7d4fcdf22334990c12a.patch # Merged upstream, remove in next version + 96f62e37e9ae015ee104e568cb57ea0d8964a84b.patch # Merged upstream, remove in next version + 187ed2df39ab1f5ea92b97d4d3e0894da87e297b.patch # Fix CppWinRT for UWP ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS @@ -44,9 +45,9 @@ vcpkg_cmake_configure( -DALSOFT_UTILS=OFF -DALSOFT_NO_CONFIG_UTIL=ON -DALSOFT_EXAMPLES=OFF - -DALSOFT_CONFIG=OFF - -DALSOFT_HRTF_DEFS=OFF - -DALSOFT_AMBDEC_PRESETS=OFF + -DALSOFT_INSTALL_CONFIG=OFF + -DALSOFT_INSTALL_HRTF_DATA=OFF + -DALSOFT_INSTALL_AMBDEC_PRESETS=OFF -DALSOFT_BACKEND_ALSA=${ALSOFT_REQUIRE_LINUX} -DALSOFT_BACKEND_OSS=OFF -DALSOFT_BACKEND_SOLARIS=OFF @@ -64,7 +65,7 @@ vcpkg_cmake_configure( -DCMAKE_DISABLE_FIND_PACKAGE_WindowsSDK=ON -DCMAKE_POLICY_DEFAULT_CMP0057=NEW MAYBE_UNUSED_VARIABLES - ALSOFT_AMBDEC_PRESETS + ALSOFT_INSTALL_AMBDEC_PRESETS ALSOFT_BACKEND_ALSA ALSOFT_BACKEND_COREAUDIO ALSOFT_BACKEND_JACK @@ -75,12 +76,13 @@ vcpkg_cmake_configure( ALSOFT_BACKEND_PULSEAUDIO ALSOFT_BACKEND_SNDIO ALSOFT_BACKEND_SOLARIS - ALSOFT_CONFIG + ALSOFT_INSTALL_CONFIG ALSOFT_CPUEXT_NEON - ALSOFT_HRTF_DEFS + ALSOFT_INSTALL_HRTF_DATA ALSOFT_BACKEND_WINMM ALSOFT_BACKEND_DSOUND CMAKE_DISABLE_FIND_PACKAGE_WindowsSDK + CMAKE_POLICY_DEFAULT_CMP0057 ) vcpkg_cmake_install() diff --git a/ports/openal-soft/vcpkg.json b/ports/openal-soft/vcpkg.json index f480d86de00734..85d542d43669f8 100644 --- a/ports/openal-soft/vcpkg.json +++ b/ports/openal-soft/vcpkg.json @@ -1,16 +1,19 @@ { "name": "openal-soft", - "version": "1.23.1", - "port-version": 2, + "version": "1.24.0", "description": "OpenAL Soft is an LGPL-licensed, cross-platform, software implementation of the OpenAL 3D audio API.", "homepage": "https://github.com/kcat/openal-soft", "license": "LGPL-2.0-or-later", - "supports": "!uwp & !xbox", + "supports": "!xbox", "dependencies": [ { "name": "alsa", "platform": "linux" }, + { + "name": "cppwinrt", + "platform": "uwp" + }, { "name": "vcpkg-cmake", "host": true diff --git a/versions/baseline.json b/versions/baseline.json index cb756c9d0a8c3a..eba0891923c8a0 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6617,8 +6617,8 @@ "port-version": 0 }, "openal-soft": { - "baseline": "1.23.1", - "port-version": 2 + "baseline": "1.24.0", + "port-version": 0 }, "openblas": { "baseline": "0.3.28", diff --git a/versions/o-/openal-soft.json b/versions/o-/openal-soft.json index 73f83e569eb855..fe8050e7242531 100644 --- a/versions/o-/openal-soft.json +++ b/versions/o-/openal-soft.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "137257eb7378d83836adecdaf83807ef8f7f120c", + "version": "1.24.0", + "port-version": 0 + }, { "git-tree": "f6ba0a57ee95816ceac7fc3b882bdcc6029591cb", "version": "1.23.1",