diff --git a/ports/sdl2-mixer/fix-deps-link.patch b/ports/sdl2-mixer/fix-deps-link.patch deleted file mode 100644 index 9d89c4758e..0000000000 --- a/ports/sdl2-mixer/fix-deps-link.patch +++ /dev/null @@ -1,33 +0,0 @@ -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() - diff --git a/ports/sdl2-mixer/fix-deps-targets.patch b/ports/sdl2-mixer/fix-deps-targets.patch new file mode 100644 index 0000000000..ec0bfc9bb6 --- /dev/null +++ b/ports/sdl2-mixer/fix-deps-targets.patch @@ -0,0 +1,137 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 54317572..5f84dd22 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -366,7 +366,7 @@ if(SDL2MIXER_OPUS) + endif() + else() + message(STATUS "Using system opusfile") +- find_package(opusfile REQUIRED) ++ find_package(OpusFile CONFIG REQUIRED) + if(NOT SDL2MIXER_OPUS_SHARED) + list(APPEND PC_REQUIRES opusfile) + endif() +@@ -384,7 +384,7 @@ if(SDL2MIXER_OPUS) + add_dependencies(SDL2_mixer opusfile::opusfile) + endif() + else() +- target_link_libraries(SDL2_mixer PRIVATE opusfile::opusfile) ++ target_link_libraries(SDL2_mixer PRIVATE OpusFile::opusfile) + endif() + endif() + +@@ -467,7 +467,7 @@ if(SDL2MIXER_VORBIS_VORBISFILE) + endif() + else() + message(STATUS "Using system vorbisfile") +- find_package(vorbisfile REQUIRED) ++ find_package(Vorbis CONFIG REQUIRED) + if(NOT SDL2MIXER_VORBIS_VORBISFILE_SHARED) + list(APPEND PC_REQUIRES vorbisfile) + endif() +@@ -485,7 +485,7 @@ if(SDL2MIXER_VORBIS_VORBISFILE) + add_dependencies(SDL2_mixer vorbisfile::vorbisfile) + endif() + else() +- target_link_libraries(SDL2_mixer PRIVATE vorbisfile::vorbisfile) ++ target_link_libraries(SDL2_mixer PRIVATE Vorbis::vorbisfile) + endif() + endif() + +@@ -510,7 +510,7 @@ if(SDL2MIXER_FLAC_LIBFLAC) + endif() + else() + message(STATUS "Using system libflac") +- find_package(FLAC REQUIRED) ++ find_package(FLAC CONFIG REQUIRED) + if(NOT SDL2MIXER_FLAC_LIBFLAC_SHARED) + list(APPEND PC_REQUIRES flac) + endif() +@@ -528,7 +528,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() + +@@ -643,7 +643,7 @@ if(SDL2MIXER_MP3_MPG123) + endif() + else() + message(STATUS "Using system mpg123") +- find_package(MPG123 REQUIRED) ++ find_package(MPG123 CONFIG REQUIRED) + if(NOT SDL2MIXER_MP3_MPG123_SHARED) + list(APPEND PC_REQUIRES libmpg123) + endif() +@@ -661,7 +661,7 @@ if(SDL2MIXER_MP3_MPG123) + add_dependencies(SDL2_mixer MPG123::mpg123) + endif() + else() +- target_link_libraries(SDL2_mixer PRIVATE MPG123::mpg123) ++ target_link_libraries(SDL2_mixer PRIVATE MPG123::libmpg123) + endif() + endif() + +@@ -672,7 +672,7 @@ if(SDL2MIXER_MIDI_FLUIDSYNTH) + message(FATAL_ERROR "FluidSynth is not vendored.") + else() + message(STATUS "Using system FluidSynth") +- find_package(FluidSynth REQUIRED) ++ find_package(FluidSynth CONFIG REQUIRED) + if(NOT SDL2MIXER_MIDI_FLUIDSYNTH_SHARED) + list(APPEND PC_REQUIRES fluidsynth) + endif() +@@ -690,7 +690,7 @@ if(SDL2MIXER_MIDI_FLUIDSYNTH) + add_dependencies(SDL2_mixer FluidSynth::FluidSynth) + endif() + else() +- target_link_libraries(SDL2_mixer PRIVATE FluidSynth::FluidSynth) ++ target_link_libraries(SDL2_mixer PRIVATE FluidSynth::libfluidsynth) + endif() + endif() + +diff --git a/SDL2_mixerConfig.cmake.in b/SDL2_mixerConfig.cmake.in +index d65a43ce..29866349 100644 +--- a/SDL2_mixerConfig.cmake.in ++++ b/SDL2_mixerConfig.cmake.in +@@ -54,7 +54,7 @@ if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2_mixer-static-targets.cmake") + + include(CMakeFindDependencyMacro) + if(SDL2MIXER_FLAC_LIBFLAC AND NOT SDL2MIXER_VENDORED AND NOT TARGET FLAC::FLAC) +- find_dependency(FLAC) ++ find_dependency(FLAC CONFIG) + endif() + + if(SDL2MIXER_MOD_MODPLUG AND NOT SDL2MIXER_VENDORED AND NOT TARGET modplug::modplug) +@@ -69,20 +69,23 @@ include(CMakeFindDependencyMacro) + find_dependency(libxmp-lite) + endif() + +- if(SDL2MIXER_MP3_MPG123 AND NOT SDL2MIXER_VENDORED AND NOT TARGET MPG123::mpg123) +- find_dependency(MPG123) ++ if(SDL2MIXER_MP3_MPG123 AND NOT SDL2MIXER_VENDORED AND NOT TARGET MPG123::libmpg123) ++ find_dependency(MPG123 CONFIG) + endif() + +- if(SDL2MIXER_MIDI_FLUIDSYNTH AND NOT SDL2MIXER_VENDORED AND NOT TARGET FluidSynth::FluidSynth) +- find_dependency(FluidSynth) ++ if(SDL2MIXER_MIDI_FLUIDSYNTH AND NOT SDL2MIXER_VENDORED AND NOT TARGET FluidSynth::libfluidsynth) ++ find_dependency(FluidSynth CONFIG) + endif() + + if(SDL2MIXER_VORBIS_TREMOR AND NOT SDL2MIXER_VENDORED AND NOT TARGET tremor::tremor) + find_dependency(tremor) + endif() + +- if(SDL2MIXER_VORBIS_VORBISFILE AND NOT SDL2MIXER_VENDORED AND NOT TARGET vorbisfile::vorbisfile) +- find_dependency(vorbisfile) ++ if(SDL2MIXER_VORBIS_VORBISFILE AND NOT SDL2MIXER_VENDORED AND NOT TARGET Vorbis::vorbisfile) ++ find_dependency(Vorbis CONFIG) ++ endif() ++ if(SDL2MIXER_OPUS AND NOT SDL2MIXER_VENDORED AND NOT TARGET OpusFile::opusfile) ++ find_dependency(OpusFile CONFIG) + endif() + + if((NOT SDL2MIXER_VENDORED AND SDL2MIXER_MOD_MODPLUG) OR (HAIKU AND SDL2MIXER_MIDI_NATIVE)) diff --git a/ports/sdl2-mixer/fix-missing-find-opusfile.patch b/ports/sdl2-mixer/fix-missing-find-opusfile.patch deleted file mode 100644 index 2061d4c554..0000000000 --- a/ports/sdl2-mixer/fix-missing-find-opusfile.patch +++ /dev/null @@ -1,14 +0,0 @@ -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) diff --git a/ports/sdl2-mixer/fix-windows-static-findfluidsynth.patch b/ports/sdl2-mixer/fix-windows-static-findfluidsynth.patch deleted file mode 100644 index 5a34a392d0..0000000000 --- a/ports/sdl2-mixer/fix-windows-static-findfluidsynth.patch +++ /dev/null @@ -1,13 +0,0 @@ -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 diff --git a/ports/sdl2-mixer/portfile.cmake b/ports/sdl2-mixer/portfile.cmake index 2b8633c458..0a592cc47c 100644 --- a/ports/sdl2-mixer/portfile.cmake +++ b/ports/sdl2-mixer/portfile.cmake @@ -6,43 +6,43 @@ vcpkg_from_github( PATCHES fix-pkg-prefix.patch fix-pkgconfig.patch - fix-windows-static-findfluidsynth.patch - fix-missing-find-opusfile.patch - fix-deps-link.patch + fix-deps-targets.patch ) vcpkg_check_features( OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES + fluidsynth SDL2MIXER_MIDI fluidsynth SDL2MIXER_MIDI_FLUIDSYNTH + libflac SDL2MIXER_FLAC libflac SDL2MIXER_FLAC_LIBFLAC libmodplug SDL2MIXER_MOD libmodplug SDL2MIXER_MOD_MODPLUG - libvorbis SDL2MIXER_VORBIS_VORBISFILE + mpg123 SDL2MIXER_MP3 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") +if("fluidsynth" IN_LIST FEATURES) + vcpkg_find_acquire_program(PKGCONFIG) + list(APPEND EXTRA_OPTIONS "-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}") endif() vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS ${FEATURE_OPTIONS} + ${EXTRA_OPTIONS} -DSDL2MIXER_VENDORED=OFF -DSDL2MIXER_SAMPLES=OFF -DSDL2MIXER_DEPS_SHARED=OFF -DSDL2MIXER_OPUS_SHARED=OFF -DSDL2MIXER_VORBIS_VORBISFILE_SHARED=OFF - -DSDL2MIXER_VORBIS=${VORBIS_BACKEND} + -DSDL2MIXER_VORBIS="VORBISFILE" + -DSDL2MIXER_FLAC_DRFLAC=OFF + -DSDL2MIXER_MIDI_NATIVE=OFF + -DSDL2MIXER_MIDI_TIMIDITY=OFF + -DSDL2MIXER_MP3_DRMP3=OFF ) vcpkg_cmake_install() diff --git a/ports/sdl2-mixer/vcpkg.json b/ports/sdl2-mixer/vcpkg.json index 5329fa3718..63226e7c87 100644 --- a/ports/sdl2-mixer/vcpkg.json +++ b/ports/sdl2-mixer/vcpkg.json @@ -1,10 +1,12 @@ { "name": "sdl2-mixer", "version": "2.6.3", + "port-version": 1, "description": "Multi-channel audio mixer library for SDL.", "homepage": "https://github.com/libsdl-org/SDL_mixer", "license": "Zlib", "dependencies": [ + "libvorbis", "sdl2", { "name": "vcpkg-cmake", @@ -15,9 +17,6 @@ "host": true } ], - "default-features": [ - "nativemidi" - ], "features": { "fluidsynth": { "description": "Use FluidSynth to play MIDI audio format.", @@ -26,34 +25,25 @@ ] }, "libflac": { - "description": "Use libflac to play FLAC audio format instead of the built-in dr_flac.", + "description": "Use libflac to play FLAC audio format.", "dependencies": [ "libflac" ] }, "libmodplug": { - "description": "Support for MOD audio format using libmodplug.", + "description": "Use libmodplug to play MOD audio format.", "dependencies": [ "libmodplug" ] }, - "libvorbis": { - "description": "Use libvorbis to play OGG Vorbis audio format instead of the built-in stb_vorbis.", - "dependencies": [ - "libvorbis" - ] - }, "mpg123": { - "description": "Use mpg123 to play MP3 audio format instead of the built-in dr_mp3.", + "description": "Use mpg123 to play MP3 audio format.", "dependencies": [ "mpg123" ] }, - "nativemidi": { - "description": "Support for MIDI audio format on Windows and macOS." - }, "opusfile": { - "description": "Support for Opus audio format using opusfile.", + "description": "Use opusfile to play Opus audio format.", "dependencies": [ "opusfile" ] diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index b386feb61a..081047eb72 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -879,8 +879,6 @@ sdformat6:x64-windows-static-md=fail sdformat9:arm-uwp=fail sdformat9:x64-uwp=fail sdformat9:x64-windows-static-md=fail -sdl2-mixer:arm-uwp=fail -sdl2-mixer:x64-uwp=fail sdl2-net:arm-uwp=fail sdl2-net:x64-uwp=fail septag-sx:arm64-windows=fail diff --git a/versions/baseline.json b/versions/baseline.json index e25d9aac06..40c974e17b 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7138,7 +7138,7 @@ }, "sdl2-mixer": { "baseline": "2.6.3", - "port-version": 0 + "port-version": 1 }, "sdl2-net": { "baseline": "2.2.0", diff --git a/versions/s-/sdl2-mixer.json b/versions/s-/sdl2-mixer.json index 830b372d7a..1f24d00eda 100644 --- a/versions/s-/sdl2-mixer.json +++ b/versions/s-/sdl2-mixer.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "4c169dd178363fec7d46194a45dc250b604b1f2e", + "version": "2.6.3", + "port-version": 1 + }, { "git-tree": "dfa1721f4df6e01b9d30886c569c88128d7243f0", "version": "2.6.3",