Skip to content

Commit

Permalink
Update vcpkg.
Browse files Browse the repository at this point in the history
  • Loading branch information
henricj committed Dec 22, 2023
1 parent e0fc379 commit d2cd07b
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 17 deletions.
13 changes: 13 additions & 0 deletions external/vcpkg/config/ports/sdl2/alsa-dep-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/SDL2Config.cmake.in b/SDL2Config.cmake.in
index cc8bcf26d..ead829767 100644
--- a/SDL2Config.cmake.in
+++ b/SDL2Config.cmake.in
@@ -35,7 +35,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/sdlfind.cmake")

set(SDL_ALSA @SDL_ALSA@)
set(SDL_ALSA_SHARED @SDL_ALSA_SHARED@)
-if(SDL_ALSA AND NOT SDL_ALSA_SHARED AND TARGET SDL2::SDL2-static)
+if(SDL_ALSA)
sdlFindALSA()
endif()
unset(SDL_ALSA)
17 changes: 12 additions & 5 deletions external/vcpkg/config/ports/sdl2/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO libsdl-org/SDL
REF "release-${VERSION}"
SHA512 90858ae8c5fdddd5e13724e05ad0970e11bbab1df8a0201c3f4ce354dc6018e5d4ab7279402a263c716aacdaa52745f78531dc225d48d790ee9307e2f6198695
SHA512 d3cf7d356b79184dd211c9fbbfcb2a83d1acb68ee549ab82be109cd899039f18f0dbf3aedbf0800793c3a68580688014863b5d9bf79bcd366ff0e88252955e3c
HEAD_REF main
PATCHES
deps.patch
disable-dynapi.patch
deps.patch
alsa-dep-fix.patch
)

string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SDL_STATIC)
Expand All @@ -15,11 +16,15 @@ string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" FORCE_STATIC_VCRT)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
alsa SDL_ALSA
alsa CMAKE_REQUIRE_FIND_PACKAGE_ALSA
ibus SDL_IBUS
samplerate SDL_LIBSAMPLERATE
vulkan SDL_VULKAN
x11 SDL_X11
wayland SDL_WAYLAND
samplerate SDL_LIBSAMPLERATE
ibus SDL_IBUS
x11 SDL_X11
INVERTED_FEATURES
alsa CMAKE_DISABLE_FIND_PACKAGE_ALSA
)

if ("x11" IN_LIST FEATURES)
Expand Down Expand Up @@ -47,9 +52,11 @@ vcpkg_cmake_configure(
-DSDL_TEST=OFF
-DSDL_INSTALL_CMAKEDIR="cmake"
-DCMAKE_DISABLE_FIND_PACKAGE_Git=ON
-DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=ON
-DSDL_LIBSAMPLERATE_SHARED=OFF
MAYBE_UNUSED_VARIABLES
SDL_FORCE_STATIC_VCRT
PKG_CONFIG_USE_CMAKE_PREFIX_PATH
)

vcpkg_cmake_install()
Expand Down
33 changes: 22 additions & 11 deletions external/vcpkg/config/ports/sdl2/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
{
"name": "sdl2",
"version": "2.26.5",
"version": "2.28.5",
"port-version": 1,
"description": "Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D.",
"homepage": "https://www.libsdl.org/download-2.0.php",
"license": "Zlib",
"dependencies": [
{
"name": "dbus",
"default-features": false,
"platform": "linux"
},
{
"name": "vcpkg-cmake",
"host": true
Expand All @@ -15,20 +21,25 @@
}
],
"default-features": [
"base"
{
"name": "ibus",
"platform": "linux"
},
{
"name": "wayland",
"platform": "linux"
},
{
"name": "x11",
"platform": "linux"
}
],
"features": {
"base": {
"description": "Base functionality for SDL",
"alsa": {
"description": "Support for alsa audio",
"dependencies": [
{
"name": "sdl2",
"default-features": false,
"features": [
"ibus",
"wayland",
"x11"
],
"name": "alsa",
"platform": "linux"
}
]
Expand Down
2 changes: 1 addition & 1 deletion external/vcpkg/vcpkg
Submodule vcpkg updated 3736 files

0 comments on commit d2cd07b

Please sign in to comment.