From b61e5146d2e883945beda481ca4ab42fd3c287f5 Mon Sep 17 00:00:00 2001 From: Pierre Wendling <50808272+FtZPetruska@users.noreply.github.com> Date: Wed, 13 Aug 2025 00:04:49 +0200 Subject: [PATCH] [sdl2-mixer] Fix pc file on *-windows-static (#46828) Co-authored-by: Billy Robert O'Neal III --- ports/sdl2-mixer/portfile.cmake | 8 +++++++- ports/sdl2-mixer/vcpkg.json | 2 +- scripts/ci.feature.baseline.txt | 2 -- versions/baseline.json | 2 +- versions/s-/sdl2-mixer.json | 5 +++++ 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ports/sdl2-mixer/portfile.cmake b/ports/sdl2-mixer/portfile.cmake index a7652862cb..429592ed90 100644 --- a/ports/sdl2-mixer/portfile.cmake +++ b/ports/sdl2-mixer/portfile.cmake @@ -63,8 +63,14 @@ vcpkg_cmake_config_fixup( ) vcpkg_fixup_pkgconfig() +set(debug_libname "SDL2_mixerd") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" AND VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/SDL2_mixer.pc" "-lSDL2_mixer" "-lSDL2_mixer-static") + set(debug_libname "SDL2_mixer-staticd") +endif() + if(NOT VCPKG_BUILD_TYPE) - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/SDL2_mixer.pc" "-lSDL2_mixer" "-lSDL2_mixerd") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/SDL2_mixer.pc" "-lSDL2_mixer" "-l${debug_libname}") endif() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") diff --git a/ports/sdl2-mixer/vcpkg.json b/ports/sdl2-mixer/vcpkg.json index d8085f2f10..9dc0c1cdaf 100644 --- a/ports/sdl2-mixer/vcpkg.json +++ b/ports/sdl2-mixer/vcpkg.json @@ -1,7 +1,7 @@ { "name": "sdl2-mixer", "version": "2.8.1", - "port-version": 1, + "port-version": 2, "description": "Multi-channel audio mixer library for SDL.", "homepage": "https://github.com/libsdl-org/SDL_mixer", "license": "Zlib", diff --git a/scripts/ci.feature.baseline.txt b/scripts/ci.feature.baseline.txt index a543f4f829..5c10bd3c99 100644 --- a/scripts/ci.feature.baseline.txt +++ b/scripts/ci.feature.baseline.txt @@ -1896,9 +1896,7 @@ sdformat9:x64-windows-static = cascade sdl1-mixer(android) = cascade sdl1-net(android | osx | uwp) = cascade sdl2-mixer[fluidsynth,libmodplug,opusfile](uwp) = cascade -sdl2-mixer[wavpack](android) = cascade sdl2-mixer-ext[fluidsynth,libmodplug,opusfile](uwp) = cascade -sdl2-mixer-ext[wavpack](android) = cascade sdl2-ttf[harfbuzz]:arm64-uwp = cascade sdl2-ttf[harfbuzz]:x64-uwp = cascade seacas:arm64-uwp = cascade diff --git a/versions/baseline.json b/versions/baseline.json index 586c77618c..8869b9390e 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -8666,7 +8666,7 @@ }, "sdl2-mixer": { "baseline": "2.8.1", - "port-version": 1 + "port-version": 2 }, "sdl2-mixer-ext": { "baseline": "2.6.0", diff --git a/versions/s-/sdl2-mixer.json b/versions/s-/sdl2-mixer.json index 0683c44495..bc91c3bb03 100644 --- a/versions/s-/sdl2-mixer.json +++ b/versions/s-/sdl2-mixer.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "ee2053a681764a5fda41536fee42df58397d0c37", + "version": "2.8.1", + "port-version": 2 + }, { "git-tree": "0e4455e30cc3ef71f5da509ca3d6ced01f84a01e", "version": "2.8.1",