chore(vcpkg): remove SDL2 overlay and related configurations
- Eliminated the custom vcpkg overlay for SDL2, which was previously used to address installation issues on Windows. - Updated `vcpkg.json` to remove SDL2 dependency and related configurations from CI and release workflows. - Deleted associated documentation and files for the SDL2 overlay to streamline the project structure. Benefits: - Simplifies the vcpkg configuration by removing unnecessary overlays, improving maintainability. - Reduces complexity in the CI and release processes, enhancing overall build reliability.
This commit is contained in:
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
@@ -326,7 +326,6 @@ jobs:
|
|||||||
"-DCMAKE_TOOLCHAIN_FILE=$toolchain",
|
"-DCMAKE_TOOLCHAIN_FILE=$toolchain",
|
||||||
"-DVCPKG_TARGET_TRIPLET=x64-windows-static",
|
"-DVCPKG_TARGET_TRIPLET=x64-windows-static",
|
||||||
"-DVCPKG_MANIFEST_MODE=ON",
|
"-DVCPKG_MANIFEST_MODE=ON",
|
||||||
"-DVCPKG_OVERLAY_PORTS=${{ github.workspace }}/cmake/overlays",
|
|
||||||
"-DYAZE_BUILD_TESTS=ON",
|
"-DYAZE_BUILD_TESTS=ON",
|
||||||
"-DYAZE_BUILD_EMU=ON",
|
"-DYAZE_BUILD_EMU=ON",
|
||||||
"-DYAZE_BUILD_Z3ED=ON",
|
"-DYAZE_BUILD_Z3ED=ON",
|
||||||
|
|||||||
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
@@ -55,7 +55,6 @@ jobs:
|
|||||||
-DCMAKE_BUILD_TYPE=Release `
|
-DCMAKE_BUILD_TYPE=Release `
|
||||||
-DCMAKE_TOOLCHAIN_FILE=$toolchain `
|
-DCMAKE_TOOLCHAIN_FILE=$toolchain `
|
||||||
-DVCPKG_TARGET_TRIPLET=x64-windows-static `
|
-DVCPKG_TARGET_TRIPLET=x64-windows-static `
|
||||||
-DVCPKG_OVERLAY_PORTS="${{ github.workspace }}/cmake/overlays" `
|
|
||||||
-DYAZE_BUILD_TESTS=OFF `
|
-DYAZE_BUILD_TESTS=OFF `
|
||||||
-DYAZE_BUILD_EMU=ON `
|
-DYAZE_BUILD_EMU=ON `
|
||||||
-DYAZE_BUILD_Z3ED=ON `
|
-DYAZE_BUILD_Z3ED=ON `
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
# vcpkg Port Overlays
|
|
||||||
|
|
||||||
This directory contains custom vcpkg port overlays that modify the behavior of specific packages during installation.
|
|
||||||
|
|
||||||
## Purpose
|
|
||||||
|
|
||||||
vcpkg overlays allow us to patch specific ports without forking the entire vcpkg repository. These overlays are automatically used when `VCPKG_OVERLAY_PORTS` is set in the CMake configuration.
|
|
||||||
|
|
||||||
## Current Overlays
|
|
||||||
|
|
||||||
### sdl2/
|
|
||||||
|
|
||||||
**Problem**: The official SDL2 vcpkg port runs `vcpkg_fixup_pkgconfig()` on Windows, which attempts to download `pkgconf` from MSYS2 mirrors. These URLs frequently return 404 errors, causing build failures.
|
|
||||||
|
|
||||||
**Solution**: Patched portfile that skips pkgconfig fixup on Windows platforms while maintaining it for Linux/macOS where it's needed.
|
|
||||||
|
|
||||||
**Impact**: Prevents SDL2 installation failures on Windows without affecting functionality (pkgconfig isn't needed for Windows static builds).
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
The overlays are automatically applied via the GitHub Actions workflows:
|
|
||||||
|
|
||||||
```cmake
|
|
||||||
-DVCPKG_OVERLAY_PORTS=${github.workspace}/cmake/overlays
|
|
||||||
```
|
|
||||||
|
|
||||||
For local development on Windows:
|
|
||||||
```bash
|
|
||||||
cmake -B build -DVCPKG_OVERLAY_PORTS=cmake/overlays ...
|
|
||||||
```
|
|
||||||
|
|
||||||
## Maintenance
|
|
||||||
|
|
||||||
- Overlays are version-specific (currently SDL2 2.30.9)
|
|
||||||
- When updating SDL2 version in vcpkg.json, check if the overlay needs updating
|
|
||||||
- Monitor upstream vcpkg for fixes that would allow removing these overlays
|
|
||||||
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
# Patched SDL2 portfile that skips pkgconfig fixup on Windows
|
|
||||||
# This prevents MSYS2 download failures during vcpkg installation
|
|
||||||
# Based on official SDL2 port with pkgconfig fixup removed
|
|
||||||
|
|
||||||
vcpkg_from_github(
|
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
|
||||||
REPO libsdl-org/SDL
|
|
||||||
REF "release-${VERSION}"
|
|
||||||
SHA512 bbf9e35dc1cb1b47d1e452ef23bd3b49bdfd83c6e291e7e7f61c45fb07b33e01cc77811c8c854a599bcdafc2e98b03015fc5e9c6e4c1db8ec61a9e90ff17ed83
|
|
||||||
HEAD_REF main
|
|
||||||
PATCHES
|
|
||||||
deps.patch
|
|
||||||
alsa-dep-fix.patch
|
|
||||||
cxx-linkage-pkgconfig.diff
|
|
||||||
)
|
|
||||||
|
|
||||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SDL_STATIC)
|
|
||||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SDL_SHARED)
|
|
||||||
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" FORCE_STATIC_VCRT)
|
|
||||||
|
|
||||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
||||||
FEATURES
|
|
||||||
alsa SDL_ALSA
|
|
||||||
ibus SDL_IBUS
|
|
||||||
samplerate SDL_LIBSAMPLERATE
|
|
||||||
wayland SDL_WAYLAND
|
|
||||||
x11 SDL_X11
|
|
||||||
)
|
|
||||||
|
|
||||||
if(VCPKG_TARGET_IS_UWP)
|
|
||||||
set(configure_opts WINDOWS_USE_MSBUILD)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
vcpkg_cmake_configure(
|
|
||||||
SOURCE_PATH "${SOURCE_PATH}"
|
|
||||||
${configure_opts}
|
|
||||||
OPTIONS ${FEATURE_OPTIONS}
|
|
||||||
-DSDL_STATIC=${SDL_STATIC}
|
|
||||||
-DSDL_SHARED=${SDL_SHARED}
|
|
||||||
-DSDL_FORCE_STATIC_VCRT=${FORCE_STATIC_VCRT}
|
|
||||||
-DSDL_LIBC=ON
|
|
||||||
-DSDL_TEST=OFF
|
|
||||||
-DSDL_INSTALL_CMAKEDIR=share/sdl2
|
|
||||||
MAYBE_UNUSED_VARIABLES
|
|
||||||
SDL_FORCE_STATIC_VCRT
|
|
||||||
)
|
|
||||||
|
|
||||||
vcpkg_cmake_install()
|
|
||||||
vcpkg_cmake_config_fixup(CONFIG_PATH share/sdl2)
|
|
||||||
|
|
||||||
file(REMOVE_RECURSE
|
|
||||||
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
||||||
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
||||||
"${CURRENT_PACKAGES_DIR}/bin/sdl2-config"
|
|
||||||
"${CURRENT_PACKAGES_DIR}/debug/bin/sdl2-config"
|
|
||||||
"${CURRENT_PACKAGES_DIR}/share/licenses"
|
|
||||||
"${CURRENT_PACKAGES_DIR}/share/aclocal"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Skip pkgconfig fixup on Windows to avoid MSYS2 download issues
|
|
||||||
if(NOT VCPKG_TARGET_IS_WINDOWS)
|
|
||||||
vcpkg_fixup_pkgconfig()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_UWP)
|
|
||||||
if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
|
||||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/lib/manual-link")
|
|
||||||
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/SDL2main.lib" "${CURRENT_PACKAGES_DIR}/lib/manual-link/SDL2main.lib")
|
|
||||||
endif()
|
|
||||||
if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
|
||||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/lib/manual-link")
|
|
||||||
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/SDL2maind.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/SDL2maind.lib")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
file(GLOB SHARE_FILES "${CURRENT_PACKAGES_DIR}/share/sdl2/*.cmake")
|
|
||||||
foreach(SHARE_FILE ${SHARE_FILES})
|
|
||||||
vcpkg_replace_string("${SHARE_FILE}" "lib/SDL2main" "lib/manual-link/SDL2main")
|
|
||||||
endforeach()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
||||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
SDL2 provides CMake targets:
|
|
||||||
|
|
||||||
find_package(SDL2 CONFIG REQUIRED)
|
|
||||||
target_link_libraries(main PRIVATE $<IF:$<TARGET_EXISTS:SDL2::SDL2>,SDL2::SDL2,SDL2::SDL2-static>)
|
|
||||||
|
|
||||||
# SDL2::SDL2main may be optionally added manually to provide a main() function wrapper.
|
|
||||||
# If you use this, don't use SDL_MAIN_HANDLED.
|
|
||||||
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "sdl2",
|
|
||||||
"version": "2.30.9",
|
|
||||||
"description": "Simple DirectMedia Layer (patched to skip pkgconfig on Windows)",
|
|
||||||
"homepage": "https://www.libsdl.org/",
|
|
||||||
"license": "Zlib",
|
|
||||||
"dependencies": [
|
|
||||||
{
|
|
||||||
"name": "vcpkg-cmake",
|
|
||||||
"host": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "vcpkg-cmake-config",
|
|
||||||
"host": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"default-features": [],
|
|
||||||
"features": {
|
|
||||||
"alsa": {
|
|
||||||
"description": "Support for alsa audio",
|
|
||||||
"dependencies": [
|
|
||||||
{
|
|
||||||
"name": "alsa",
|
|
||||||
"platform": "linux"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"ibus": {
|
|
||||||
"description": "Build with support for IBus",
|
|
||||||
"dependencies": [
|
|
||||||
{
|
|
||||||
"name": "ibus",
|
|
||||||
"platform": "linux"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"samplerate": {
|
|
||||||
"description": "Use libsamplerate for audio rate conversion",
|
|
||||||
"dependencies": [
|
|
||||||
"libsamplerate"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"wayland": {
|
|
||||||
"description": "Build with support for Wayland",
|
|
||||||
"dependencies": [
|
|
||||||
{
|
|
||||||
"name": "wayland",
|
|
||||||
"platform": "linux"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "wayland-protocols",
|
|
||||||
"host": true,
|
|
||||||
"platform": "linux"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"x11": {
|
|
||||||
"description": "Build with support for X11",
|
|
||||||
"dependencies": [
|
|
||||||
{
|
|
||||||
"name": "libxext",
|
|
||||||
"platform": "linux"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
12
vcpkg.json
12
vcpkg.json
@@ -5,12 +5,6 @@
|
|||||||
"description": "Yet Another Zelda3 Editor",
|
"description": "Yet Another Zelda3 Editor",
|
||||||
"builtin-baseline": "7ba0ba7334c3346e7eee1e049ba85da193a8d821",
|
"builtin-baseline": "7ba0ba7334c3346e7eee1e049ba85da193a8d821",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
{
|
|
||||||
"name": "sdl2",
|
|
||||||
"platform": "windows",
|
|
||||||
"default-features": false,
|
|
||||||
"features": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "yaml-cpp",
|
"name": "yaml-cpp",
|
||||||
"platform": "windows"
|
"platform": "windows"
|
||||||
@@ -19,11 +13,5 @@
|
|||||||
"name": "zlib",
|
"name": "zlib",
|
||||||
"platform": "windows"
|
"platform": "windows"
|
||||||
}
|
}
|
||||||
],
|
|
||||||
"overrides": [
|
|
||||||
{
|
|
||||||
"name": "sdl2",
|
|
||||||
"version": "2.30.9"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user