mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 01:09:07 +08:00
[sdl2-mixer] Bump to 2.6.3 (#29487)
* [sdl2-mixer] Bump to version 2.6.3 * [sdl2-mixer] Fix findFluidSynth on windows-static. * [sdl2-mixer] vcpkg_minimum_required is not needed * [sdl2-mixer] Control SDL2MIXER_MOD with libmodplug If SDL2MIXER_MOD is left on when no backend is availble, CMake issues a warning. * [sdl2-mixer] Turn off SDL2MIXER_DEPS_SHARED Similar issue to #28137. SDL2MIXER_OPUS_SHARED and SDL2MIXER_VORBIS_VORBISFILE_SHARED need to be manually turned off as they are unconditionally turned on. * [sdl2-mixer] Set the correct vorbis backend. Even when SDL2MIXER_VORBIS_VORBISFILE was set to ON, stb_vorbis would be used as the default backend. * [sdl2-mixer] Use vcpkg_install_copyright * [sdl2-mixer] Ensure flac and mpg123 are selected. Turn off header-only libraries when the features are selected. * [sdl2-mixer] Patch missing call to find_dependency This is fixed upstream but has not been included in the 2.6.x branch. * [sdl2-mixer] Fix dependency linking. - The FLAC target is an upstream patch. - VCPKG's opusfile port is static-only, meaning Opus and Ogg needs to be linked explicitly. * [sdl2-mixer] Update baseline. --------- Co-authored-by: MonicaLiu <v-liumonica@microsoft.com>
This commit is contained in:
parent
6706cf05f0
commit
785cbdb8ba
33
ports/sdl2-mixer/fix-deps-link.patch
Normal file
33
ports/sdl2-mixer/fix-deps-link.patch
Normal file
@ -0,0 +1,33 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 54317572..4fcd92d5 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -323,6 +323,9 @@ if(SDL2MIXER_OGG)
|
||||
if(SDL2MIXER_OGG_install)
|
||||
list(APPEND INSTALL_EXTRA_TARGETS ogg)
|
||||
endif()
|
||||
+ else()
|
||||
+ find_package(Ogg CONFIG REQUIRED)
|
||||
+ target_link_libraries(SDL2_mixer PRIVATE Ogg::ogg)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -384,7 +387,8 @@ if(SDL2MIXER_OPUS)
|
||||
add_dependencies(SDL2_mixer opusfile::opusfile)
|
||||
endif()
|
||||
else()
|
||||
- target_link_libraries(SDL2_mixer PRIVATE opusfile::opusfile)
|
||||
+ find_package(Opus CONFIG REQUIRED)
|
||||
+ target_link_libraries(SDL2_mixer PRIVATE opusfile::opusfile Opus::opus)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -528,7 +532,7 @@ if(SDL2MIXER_FLAC_LIBFLAC)
|
||||
add_dependencies(SDL2_mixer FLAC)
|
||||
endif()
|
||||
else()
|
||||
- target_link_libraries(SDL2_mixer PRIVATE FLAC)
|
||||
+ target_link_libraries(SDL2_mixer PRIVATE FLAC::FLAC)
|
||||
endif()
|
||||
endif()
|
||||
|
14
ports/sdl2-mixer/fix-missing-find-opusfile.patch
Normal file
14
ports/sdl2-mixer/fix-missing-find-opusfile.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff --git a/SDL2_mixerConfig.cmake.in b/SDL2_mixerConfig.cmake.in
|
||||
index d65a43ce..15a461d4 100644
|
||||
--- a/SDL2_mixerConfig.cmake.in
|
||||
+++ b/SDL2_mixerConfig.cmake.in
|
||||
@@ -85,6 +85,9 @@ include(CMakeFindDependencyMacro)
|
||||
find_dependency(vorbisfile)
|
||||
endif()
|
||||
|
||||
+ if(SDL2MIXER_OPUS AND NOT SDL2MIXER_VENDORED AND NOT TARGET opusfile::opusfile)
|
||||
+ find_dependency(opusfile)
|
||||
+ endif()
|
||||
if((NOT SDL2MIXER_VENDORED AND SDL2MIXER_MOD_MODPLUG) OR (HAIKU AND SDL2MIXER_MIDI_NATIVE))
|
||||
include(CheckLanguage)
|
||||
check_language(CXX)
|
13
ports/sdl2-mixer/fix-windows-static-findfluidsynth.patch
Normal file
13
ports/sdl2-mixer/fix-windows-static-findfluidsynth.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/cmake/FindFluidSynth.cmake b/cmake/FindFluidSynth.cmake
|
||||
index 435840b6..6fd9db7b 100644
|
||||
--- a/cmake/FindFluidSynth.cmake
|
||||
+++ b/cmake/FindFluidSynth.cmake
|
||||
@@ -1,7 +1,7 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_library(FluidSynth_LIBRARY
|
||||
- NAMES fluidsynth
|
||||
+ NAMES fluidsynth libfluidsynth
|
||||
)
|
||||
|
||||
find_path(FluidSynth_INCLUDE_PATH
|
@ -1,9 +1,14 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO libsdl-org/SDL_mixer
|
||||
REF 1cf51b6e16552e4118d90799ef752f7644efb9fd # release-2.6.1
|
||||
SHA512 c18c5d374ba1db8b07c796be5acae3e82b2191c43f9e1156b86f5ce6a088bd8200d9b7feee36de88d518f1ee2a6ff7410e911d37ac641ee4b46f7b098bf916fe
|
||||
PATCHES fix-pkg-prefix.patch fix-pkgconfig.patch
|
||||
REF "release-${VERSION}"
|
||||
SHA512 74c2b449e8a9928679d42e25bd7a5967e41fe9d51732f26197c6bbe1db9170be784125b7f268476050017f3dc970497e09a0409d50731026a18355375d0369ce
|
||||
PATCHES
|
||||
fix-pkg-prefix.patch
|
||||
fix-pkgconfig.patch
|
||||
fix-windows-static-findfluidsynth.patch
|
||||
fix-missing-find-opusfile.patch
|
||||
fix-deps-link.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(
|
||||
@ -11,19 +16,33 @@ vcpkg_check_features(
|
||||
FEATURES
|
||||
fluidsynth SDL2MIXER_MIDI_FLUIDSYNTH
|
||||
libflac SDL2MIXER_FLAC_LIBFLAC
|
||||
libmodplug SDL2MIXER_MOD
|
||||
libmodplug SDL2MIXER_MOD_MODPLUG
|
||||
libvorbis SDL2MIXER_VORBIS_VORBISFILE
|
||||
mpg123 SDL2MIXER_MP3_MPG123
|
||||
nativemidi SDL2MIXER_MIDI_NATIVE
|
||||
opusfile SDL2MIXER_OPUS
|
||||
INVERTED_FEATURES
|
||||
libflac SDL2MIXER_FLAC_DRFLAC
|
||||
mpg123 SDL2MIXER_MP3_DRMP3
|
||||
)
|
||||
|
||||
if(FEATURE_OPTIONS MATCHES "SDL2MIXER_VORBIS_VORBISFILE=ON")
|
||||
set(VORBIS_BACKEND "VORBISFILE")
|
||||
else()
|
||||
set(VORBIS_BACKEND "STB")
|
||||
endif()
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
${FEATURE_OPTIONS}
|
||||
-DSDL2MIXER_VENDORED=OFF
|
||||
-DSDL2MIXER_SAMPLES=OFF
|
||||
-DSDL2MIXER_DEPS_SHARED=OFF
|
||||
-DSDL2MIXER_OPUS_SHARED=OFF
|
||||
-DSDL2MIXER_VORBIS_VORBISFILE_SHARED=OFF
|
||||
-DSDL2MIXER_VORBIS=${VORBIS_BACKEND}
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
@ -38,4 +57,4 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "sdl2-mixer",
|
||||
"version": "2.6.1",
|
||||
"port-version": 2,
|
||||
"version": "2.6.3",
|
||||
"description": "Multi-channel audio mixer library for SDL.",
|
||||
"homepage": "https://github.com/libsdl-org/SDL_mixer",
|
||||
"license": "Zlib",
|
||||
|
@ -7049,8 +7049,8 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"sdl2-mixer": {
|
||||
"baseline": "2.6.1",
|
||||
"port-version": 2
|
||||
"baseline": "2.6.3",
|
||||
"port-version": 0
|
||||
},
|
||||
"sdl2-net": {
|
||||
"baseline": "2.2.0",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "dfa1721f4df6e01b9d30886c569c88128d7243f0",
|
||||
"version": "2.6.3",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "6994c429d80fd95894a448a6bb55260563cc3946",
|
||||
"version": "2.6.1",
|
||||
|
Loading…
Reference in New Issue
Block a user