From 22099e7877a6dcef6e468a4e6de0fdde1b2a62cb Mon Sep 17 00:00:00 2001 From: crueter Date: Thu, 2 Oct 2025 22:26:37 -0400 Subject: [PATCH 1/5] [cmake] update CI deps, feat: sirit CI + new CI spec Updates sirit to our fork's latest version w/ SPIRV Headers included (end goal is to remove spirv-headers entirely, as spirv-tools-ci should include them inline as well) Adds a sirit CI on our fork for all platforms (saves a bit of compile time) My CI spec has changed a little bit, and now there is no need for an additional CMake file after the initial CMakeLists.txt (since targets are now global imported). Plus, UNIX amd64 now has the amd64 suffix like aarch64 and windows Updates SDL2 to 2.32.10 and OpenSSL to 3.6.0 Finally, on Solaris all CI packages (sans FFmpeg) are now built with OmniOS, which should in theory be fully compatible with OpenIndiana (our recommended Sun-based target) but obviously will need testing Need testing: - [ ] Make sure I didn't nuke shader emission - [ ] Make sure FreeBSD, OpenBSD, and OpenIndiana work fine with bundled sirit (check linking especially) - [ ] Make sure SDL2, OpenSSL work with OpenIndiana now - [ ] SDL2 on all platforms (input, etc) Signed-off-by: crueter --- CMakeLists.txt | 29 +++++++++++++++++++++-------- CMakeModules/CPMUtil.cmake | 24 +++++++++++++----------- cpmfile.json | 13 +++++++++---- docs/CPM.md | 24 ++++++++++++++++-------- externals/CMakeLists.txt | 6 +++++- externals/cpmfile.json | 20 +++++++++++++------- externals/ffmpeg/cpmfile.json | 5 +++-- tools/cpm-fetch.sh | 4 ++-- 8 files changed, 82 insertions(+), 43 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a9ff2e9458..8aa633a115 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -147,6 +147,7 @@ if (ENABLE_SDL2) option(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 build" "${MSVC}") endif() +# qt stuff option(ENABLE_QT "Enable the Qt frontend" ON) option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" OFF) option(ENABLE_QT_UPDATE_CHECKER "Enable update checker for the Qt frontend" OFF) @@ -163,9 +164,13 @@ if (MSVC OR ANDROID) endif() option(YUZU_USE_CPM "Use CPM to fetch system dependencies (fmt, boost, etc) if needed. Externals will still be fetched." ${EXT_DEFAULT}) +# ffmpeg option(YUZU_USE_BUNDLED_FFMPEG "Download bundled FFmpeg" ${EXT_DEFAULT}) cmake_dependent_option(YUZU_USE_EXTERNAL_FFMPEG "Build FFmpeg from source" OFF "NOT WIN32 AND NOT ANDROID" OFF) +# sirit +option(YUZU_USE_BUNDLED_SIRIT "Download bundled sirit" ${EXT_DEFAULT}) + cmake_dependent_option(ENABLE_LIBUSB "Enable the use of LibUSB" ON "NOT ANDROID" OFF) cmake_dependent_option(ENABLE_OPENGL "Enable OpenGL" ON "NOT WIN32 OR NOT ARCHITECTURE_arm64" OFF) @@ -492,7 +497,22 @@ if (YUZU_USE_CPM) endif() # SPIRV Headers - AddJsonPackage(spirv-headers) + + # We only need SPIRV-Headers iff spirv-tools is bundled + if (SPIRV-Tools_FORCE_BUNDLED) + set(NEED_SPIRV_HEADERS ON) + else() + find_package(SPIRV-Tools MODULE OPTIONAL QUIET) + if (NOT SPIRV-Tools_FOUND) + set(NEED_SPIRV_HEADERS ON) + else() + set(NEED_SPIRV_HEADERS OFF) + endif() + endif() + + if (NEED_SPIRV_HEADERS) + AddJsonPackage(spirv-headers) + endif() # SPIRV Tools AddJsonPackage(spirv-tools) @@ -537,13 +557,6 @@ else() find_package(VulkanUtilityLibraries REQUIRED) find_package(VulkanHeaders 1.3.274 REQUIRED) - # FreeBSD does not package spirv-headers - if (PLATFORM_FREEBSD) - AddJsonPackage(spirv-headers) - else() - find_package(SPIRV-Headers 1.3.274 REQUIRED) - endif() - find_package(SPIRV-Tools MODULE REQUIRED) if (YUZU_TESTS) diff --git a/CMakeModules/CPMUtil.cmake b/CMakeModules/CPMUtil.cmake index d84c069399..3347c7e884 100644 --- a/CMakeModules/CPMUtil.cmake +++ b/CMakeModules/CPMUtil.cmake @@ -107,7 +107,6 @@ function(AddJsonPackage) get_json_element("${object}" name name "${JSON_NAME}") get_json_element("${object}" extension extension "tar.zst") get_json_element("${object}" min_version min_version "") - get_json_element("${object}" cmake_filename cmake_filename "") get_json_element("${object}" raw_disabled disabled_platforms "") if (raw_disabled) @@ -124,7 +123,6 @@ function(AddJsonPackage) EXTENSION ${extension} MIN_VERSION ${min_version} DISABLED_PLATFORMS ${disabled_platforms} - CMAKE_FILENAME ${cmake_filename} ) # pass stuff to parent scope @@ -139,6 +137,7 @@ function(AddJsonPackage) endif() get_json_element("${object}" hash hash "") + get_json_element("${object}" hash_suffix hash_suffix "") get_json_element("${object}" sha sha "") get_json_element("${object}" url url "") get_json_element("${object}" key key "") @@ -208,6 +207,7 @@ function(AddJsonPackage) VERSION "${version}" URL "${url}" HASH "${hash}" + HASH_SUFFIX "${hash_suffix}" SHA "${sha}" REPO "${repo}" KEY "${key}" @@ -533,7 +533,6 @@ function(AddCIPackage) EXTENSION MIN_VERSION DISABLED_PLATFORMS - CMAKE_FILENAME ) cmake_parse_arguments(PKG_ARGS "" "${oneValueArgs}" "" ${ARGN}) @@ -589,25 +588,28 @@ function(AddCIPackage) add_ci_package(android) endif() - if(PLATFORM_SUN AND NOT "solaris" IN_LIST DISABLED_PLATFORMS) - add_ci_package(solaris) + if(PLATFORM_SUN AND NOT "solaris-amd64" IN_LIST DISABLED_PLATFORMS) + add_ci_package(solaris-amd64) endif() - if(PLATFORM_FREEBSD AND NOT "freebsd" IN_LIST DISABLED_PLATFORMS) - add_ci_package(freebsd) + if(PLATFORM_FREEBSD AND NOT "freebsd-amd64" IN_LIST DISABLED_PLATFORMS) + add_ci_package(freebsd-amd64) endif() - if((PLATFORM_LINUX AND ARCHITECTURE_x86_64) AND NOT "linux" IN_LIST DISABLED_PLATFORMS) - add_ci_package(linux) + if((PLATFORM_LINUX AND ARCHITECTURE_x86_64) AND NOT "linux-amd64" IN_LIST DISABLED_PLATFORMS) + add_ci_package(linux-amd64) endif() if((PLATFORM_LINUX AND ARCHITECTURE_arm64) AND NOT "linux-aarch64" IN_LIST DISABLED_PLATFORMS) add_ci_package(linux-aarch64) endif() - if (DEFINED ARTIFACT_DIR) - include(${ARTIFACT_DIR}/${ARTIFACT_CMAKE}.cmake) + # TODO(crueter): macOS amd64/aarch64 split mayhaps + if (APPLE AND NOT "macos-universal" IN_LIST DISABLED_PLATFORMS) + add_ci_package(macos-universal) + endif() + if (DEFINED ARTIFACT_DIR) set(${ARTIFACT_PACKAGE}_ADDED TRUE PARENT_SCOPE) set(${ARTIFACT_PACKAGE}_SOURCE_DIR "${ARTIFACT_DIR}" PARENT_SCOPE) else() diff --git a/cpmfile.json b/cpmfile.json index f1fd5ce1cf..0467cd5d29 100644 --- a/cpmfile.json +++ b/cpmfile.json @@ -4,8 +4,11 @@ "package": "OpenSSL", "name": "openssl", "repo": "crueter-ci/OpenSSL", - "version": "3.5.3", - "min_version": "1.1.1" + "version": "3.6.0", + "min_version": "1.1.1", + "disabled_platforms": [ + "macos-universal" + ] }, "boost": { "package": "Boost", @@ -178,9 +181,11 @@ "package": "SDL2", "name": "SDL2", "repo": "crueter-ci/SDL2", - "version": "2.32.8", + "version": "2.32.10", "min_version": "2.26.4", - "cmake_filename": "sdl2" + "disabled_platforms": [ + "macos-universal" + ] }, "llvm-mingw": { "repo": "misc/llvm-mingw", diff --git a/docs/CPM.md b/docs/CPM.md index 03d8a039f9..c01376469d 100644 --- a/docs/CPM.md +++ b/docs/CPM.md @@ -108,7 +108,9 @@ All dependencies must be identifiable in some way for usage in the dependency vi URLs: - `GIT_URL` -- `REPO` as a GitHub repository +- `REPO` as a Git repository + * You may optionally specify `GIT_HOST` to use a custom host, e.g. `GIT_HOST git.crueter.xyz`. Note that the git host MUST be GitHub-like in its artifact/archive downloads, e.g. Forgejo + * If `GIT_HOST` is unspecified, defaults to `github.com` - `URL` Versions (bundled): @@ -135,11 +137,11 @@ Adds a package that follows crueter's CI repository spec. * `windows-amd64` * `windows-arm64` * `android` - * `solaris` - * `freebsd` - * `linux` + * `solaris-amd64` + * `freebsd-amd64` + * `linux-amd64` * `linux-aarch64` -- `CMAKE_FILENAME`: Custom CMake filename, relative to the package root (default `${PACKAGE_ROOT}/${NAME}.cmake`) + * `macos-universal` ### AddJsonPackage @@ -155,10 +157,17 @@ The cpmfile is an object of objects, with each sub-object being named according If `ci` is `false`: - `hash` -> `HASH` +- `hash_suffix` -> `HASH_SUFFIX` - `sha` -> `SHA` +- `key` -> `KEY` - `tag` -> `TAG` + * If the tag contains `%VERSION%`, that part will be replaced by the `git_version`, OR `version` if `git_version` is not specified +- `url` -> `URL` - `artifact` -> `ARTIFACT` + * If the artifact contains `%VERSION%`, that part will be replaced by the `git_version`, OR `version` if `git_version` is not specified + * If the artifact contains `%TAG%`, that part will be replaced by the `tag` (with its replacement already done) - `git_version` -> `GIT_VERSION` +- `git_host` -> `GIT_HOST` - `source_subdir` -> `SOURCE_SUBDIR` - `bundled` -> `BUNDLED_PACKAGE` - `find_args` -> `FIND_PACKAGE_ARGUMENTS` @@ -172,7 +181,6 @@ If `ci` is `true`: - `name` -> `NAME`, defaults to the object key - `extension` -> `EXTENSION`, defaults to `tar.zst` - `min_version` -> `MIN_VERSION` -- `cmake_filename` -> `CMAKE_FILENAME` - `extension` -> `EXTENSION` ### Examples @@ -192,8 +200,8 @@ In order: OpenSSL CI, Boost (tag + artifact), Opus (options + find_args), discor "boost": { "package": "Boost", "repo": "boostorg/boost", - "tag": "boost-1.88.0", - "artifact": "boost-1.88.0-cmake.7z", + "tag": "boost-%VERSION%", + "artifact": "%TAG%-cmake.7z", "hash": "e5b049e5b61964480ca816395f63f95621e66cb9bcf616a8b10e441e0e69f129e22443acb11e77bc1e8170f8e4171b9b7719891efc43699782bfcd4b3a365f01", "git_version": "1.88.0", "version": "1.57" diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index 754ba61a0b..bb68aadb36 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -68,7 +68,11 @@ if (VulkanMemoryAllocator_ADDED) endif() # Sirit -AddJsonPackage(sirit) +if (YUZU_USE_BUNDLED_SIRIT) + AddJsonPackage(sirit-ci) +else() + AddJsonPackage(sirit) +endif() if(MSVC AND USE_CCACHE AND sirit_ADDED) get_target_property(_opts sirit COMPILE_OPTIONS) diff --git a/externals/cpmfile.json b/externals/cpmfile.json index dcafc8f97d..b9d05fb151 100644 --- a/externals/cpmfile.json +++ b/externals/cpmfile.json @@ -8,12 +8,18 @@ }, "sirit": { "repo": "eden-emulator/sirit", - "sha": "db1f1e8ab5", - "hash": "73eb3a042848c63a10656545797e85f40d142009dfb7827384548a385e1e28e1ac72f42b25924ce530d58275f8638554281e884d72f9c7aaf4ed08690a414b05", - "find_args": "CONFIG", - "options": [ - "SIRIT_USE_SYSTEM_SPIRV_HEADERS ON" - ] + "version": "1.0.0", + "tag": "v%VERSION%", + "artifact": "sirit-source-%VERSION%.tar.zst", + "hash_suffix": "sha512sum", + "find_args": "CONFIG" + }, + "sirit-ci": { + "ci": true, + "package": "sirit", + "name": "sirit", + "repo": "eden-emulator/sirit", + "version": "1.0.0" }, "httplib": { "repo": "yhirose/cpp-httplib", @@ -70,5 +76,5 @@ "sha": "73f3cbb237", "hash": "c08c03063938339d61392b687562909c1a92615b6ef39ec8df19ea472aa6b6478e70d7d5e33d4a27b5d23f7806daf57fe1bacb8124c8a945c918c7663a9e8532", "find_args": "CONFIG" - } + } } diff --git a/externals/ffmpeg/cpmfile.json b/externals/ffmpeg/cpmfile.json index 9b9efaadde..ff48ce742d 100644 --- a/externals/ffmpeg/cpmfile.json +++ b/externals/ffmpeg/cpmfile.json @@ -13,8 +13,9 @@ "version": "8.0", "min_version": "4.1", "disabled_platforms": [ - "freebsd", - "solaris" + "freebsd-amd64", + "solaris-amd64", + "macos-universal" ] } } diff --git a/tools/cpm-fetch.sh b/tools/cpm-fetch.sh index 088df8464e..0219845707 100755 --- a/tools/cpm-fetch.sh +++ b/tools/cpm-fetch.sh @@ -84,7 +84,7 @@ ci_package() { echo "-- CI package $PACKAGE" - for platform in windows-amd64 windows-arm64 android solaris freebsd linux linux-aarch64; do + for platform in windows-amd64 windows-arm64 android solaris-amd64 freebsd-amd64 linux-amd64 linux-aarch64 macos-universal; do echo "-- * platform $platform" case $DISABLED in @@ -227,7 +227,7 @@ do HASH_URL="${DOWNLOAD}.${HASH_SUFFIX}" fi - HASH=$(curl "$HASH_URL" -L -o -) + HASH=$(curl "$HASH_URL" -sS -L -o -) fi download_package From f4f3425d86c7e1ed4b9094365cd39cc0bfa174a5 Mon Sep 17 00:00:00 2001 From: Calchan Date: Fri, 3 Oct 2025 04:46:27 +0200 Subject: [PATCH 2/5] [sockets] block more domains (#2632) * Bring in the domain-blocking code from the legacy branch * Make blockedDomains a `static constexpr const std::array` Co-authored-by: crueter Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2632 Reviewed-by: MaranBr Reviewed-by: crueter Co-authored-by: Calchan Co-committed-by: Calchan --- src/core/hle/service/sockets/sfdnsres.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/core/hle/service/sockets/sfdnsres.cpp b/src/core/hle/service/sockets/sfdnsres.cpp index b07bd3e58e..68d73f0a59 100644 --- a/src/core/hle/service/sockets/sfdnsres.cpp +++ b/src/core/hle/service/sockets/sfdnsres.cpp @@ -53,6 +53,19 @@ enum class NetDbError : s32 { NoData = 4, }; +static const constexpr std::array blockedDomains = {"srv.nintendo.net", + "battle.net", + "microsoft.com", + "mojang.com", + "xboxlive.com", + "minecraftservices.com"}; + +static bool IsBlockedHost(const std::string& host) { + return std::any_of( + blockedDomains.begin(), blockedDomains.end(), + [&host](const std::string& domain) { return host.find(domain) != std::string::npos; }); +} + static NetDbError GetAddrInfoErrorToNetDbError(GetAddrInfoError result) { // These combinations have been verified on console (but are not // exhaustive). @@ -154,7 +167,7 @@ static std::pair GetHostByNameRequestImpl(HLERequestConte // For now, ignore options, which are in input buffer 1 for GetHostByNameRequestWithOptions. // Prevent resolution of Nintendo servers - if (host.find("srv.nintendo.net") != std::string::npos) { + if (IsBlockedHost(host)) { LOG_WARNING(Network, "Resolution of hostname {} requested, returning EAI_AGAIN", host); return {0, GetAddrInfoError::AGAIN}; } @@ -271,7 +284,7 @@ static std::pair GetAddrInfoRequestImpl(HLERequestContext const std::string host = Common::StringFromBuffer(host_buffer); // Prevent resolution of Nintendo servers - if (host.find("srv.nintendo.net") != std::string::npos) { + if (IsBlockedHost(host)) { LOG_WARNING(Network, "Resolution of hostname {} requested, returning EAI_AGAIN", host); return {0, GetAddrInfoError::AGAIN}; } @@ -359,5 +372,4 @@ void SFDNSRES::ResolverSetOptionRequest(HLERequestContext& ctx) { rb.Push(ResultSuccess); rb.Push(0); // bsd errno } - } // namespace Service::Sockets From 71a87b2c55eaf85582f0cc052e50861778790548 Mon Sep 17 00:00:00 2001 From: MaranBr Date: Fri, 3 Oct 2025 23:08:20 +0200 Subject: [PATCH 3/5] [video_core] Fix stutters and freezes when playing FMV content in some games (#2650) This fixes stutters and freezes when playing FMV content in some games. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2650 Co-authored-by: MaranBr Co-committed-by: MaranBr --- src/video_core/engines/maxwell_dma.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/video_core/engines/maxwell_dma.cpp b/src/video_core/engines/maxwell_dma.cpp index 1a8a7c8dce..52ca9bbdb6 100644 --- a/src/video_core/engines/maxwell_dma.cpp +++ b/src/video_core/engines/maxwell_dma.cpp @@ -64,7 +64,6 @@ void MaxwellDMA::Launch() { // TODO(Subv): Perform more research and implement all features of this engine. const LaunchDMA& launch = regs.launch_dma; ASSERT(launch.interrupt_type == LaunchDMA::InterruptType::NONE); - ASSERT(launch.data_transfer_type == LaunchDMA::DataTransferType::NON_PIPELINED); if (launch.multi_line_enable) { const bool is_src_pitch = launch.src_memory_layout == LaunchDMA::MemoryLayout::PITCH; @@ -157,8 +156,6 @@ void MaxwellDMA::Launch() { } void MaxwellDMA::CopyBlockLinearToPitch() { - UNIMPLEMENTED_IF(regs.launch_dma.remap_enable != 0); - u32 bytes_per_pixel = 1; DMA::ImageOperand src_operand; src_operand.bytes_per_pixel = bytes_per_pixel; From 272df1fa837909ab514c8c36a24485fb4bb99add Mon Sep 17 00:00:00 2001 From: lizzie Date: Sat, 4 Oct 2025 02:48:39 +0200 Subject: [PATCH 4/5] [settings] default to opengl on solaris (#2659) Vulkan support still wonky on most distros. Signed-off-by: lizzie Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2659 Reviewed-by: crueter Reviewed-by: MaranBr Co-authored-by: lizzie Co-committed-by: lizzie --- src/common/settings.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/common/settings.h b/src/common/settings.h index 891bde608c..59e75d3ee0 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -320,11 +320,19 @@ struct Values { linkage, true, "cpuopt_unsafe_ignore_global_monitor", Category::CpuUnsafe}; // Renderer - SwitchableSetting renderer_backend{ - linkage, RendererBackend::Vulkan, + SwitchableSetting renderer_backend{linkage, +#if defined(__sun__) || defined(__managarm__) + RendererBackend::OpenGL, +#else + RendererBackend::Vulkan, +#endif "backend", Category::Renderer}; - SwitchableSetting shader_backend{ - linkage, ShaderBackend::SpirV, + SwitchableSetting shader_backend{linkage, +#if defined(__sun__) || defined(__managarm__) + ShaderBackend::Glsl, +#else + ShaderBackend::SpirV, +#endif "shader_backend", Category::Renderer, Specialization::RuntimeList}; SwitchableSetting vulkan_device{linkage, 0, "vulkan_device", Category::Renderer, Specialization::RuntimeList}; From 3048ea8787e5799ce6c05ca73e8e1c0121d98593 Mon Sep 17 00:00:00 2001 From: crueter Date: Thu, 2 Oct 2025 22:26:37 -0400 Subject: [PATCH 5/5] [cmake] update CI deps, feat: sirit CI + new CI spec Updates sirit to our fork's latest version w/ SPIRV Headers included (end goal is to remove spirv-headers entirely, as spirv-tools-ci should include them inline as well) Adds a sirit CI on our fork for all platforms (saves a bit of compile time) My CI spec has changed a little bit, and now there is no need for an additional CMake file after the initial CMakeLists.txt (since targets are now global imported). Plus, UNIX amd64 now has the amd64 suffix like aarch64 and windows Updates SDL2 to 2.32.10 and OpenSSL to 3.6.0 Finally, on Solaris all CI packages (sans FFmpeg) are now built with OmniOS, which should in theory be fully compatible with OpenIndiana (our recommended Sun-based target) but obviously will need testing Need testing: - [ ] Make sure I didn't nuke shader emission - [ ] Make sure FreeBSD, OpenBSD, and OpenIndiana work fine with bundled sirit (check linking especially) - [ ] Make sure SDL2, OpenSSL work with OpenIndiana now - [ ] SDL2 on all platforms (input, etc) Signed-off-by: crueter --- CMakeLists.txt | 29 +++++++++++++++++++++-------- CMakeModules/CPMUtil.cmake | 24 +++++++++++++----------- cpmfile.json | 13 +++++++++---- docs/CPM.md | 24 ++++++++++++++++-------- externals/CMakeLists.txt | 6 +++++- externals/cpmfile.json | 20 +++++++++++++------- externals/ffmpeg/cpmfile.json | 5 +++-- tools/cpm-fetch.sh | 4 ++-- 8 files changed, 82 insertions(+), 43 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a9ff2e9458..8aa633a115 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -147,6 +147,7 @@ if (ENABLE_SDL2) option(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 build" "${MSVC}") endif() +# qt stuff option(ENABLE_QT "Enable the Qt frontend" ON) option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" OFF) option(ENABLE_QT_UPDATE_CHECKER "Enable update checker for the Qt frontend" OFF) @@ -163,9 +164,13 @@ if (MSVC OR ANDROID) endif() option(YUZU_USE_CPM "Use CPM to fetch system dependencies (fmt, boost, etc) if needed. Externals will still be fetched." ${EXT_DEFAULT}) +# ffmpeg option(YUZU_USE_BUNDLED_FFMPEG "Download bundled FFmpeg" ${EXT_DEFAULT}) cmake_dependent_option(YUZU_USE_EXTERNAL_FFMPEG "Build FFmpeg from source" OFF "NOT WIN32 AND NOT ANDROID" OFF) +# sirit +option(YUZU_USE_BUNDLED_SIRIT "Download bundled sirit" ${EXT_DEFAULT}) + cmake_dependent_option(ENABLE_LIBUSB "Enable the use of LibUSB" ON "NOT ANDROID" OFF) cmake_dependent_option(ENABLE_OPENGL "Enable OpenGL" ON "NOT WIN32 OR NOT ARCHITECTURE_arm64" OFF) @@ -492,7 +497,22 @@ if (YUZU_USE_CPM) endif() # SPIRV Headers - AddJsonPackage(spirv-headers) + + # We only need SPIRV-Headers iff spirv-tools is bundled + if (SPIRV-Tools_FORCE_BUNDLED) + set(NEED_SPIRV_HEADERS ON) + else() + find_package(SPIRV-Tools MODULE OPTIONAL QUIET) + if (NOT SPIRV-Tools_FOUND) + set(NEED_SPIRV_HEADERS ON) + else() + set(NEED_SPIRV_HEADERS OFF) + endif() + endif() + + if (NEED_SPIRV_HEADERS) + AddJsonPackage(spirv-headers) + endif() # SPIRV Tools AddJsonPackage(spirv-tools) @@ -537,13 +557,6 @@ else() find_package(VulkanUtilityLibraries REQUIRED) find_package(VulkanHeaders 1.3.274 REQUIRED) - # FreeBSD does not package spirv-headers - if (PLATFORM_FREEBSD) - AddJsonPackage(spirv-headers) - else() - find_package(SPIRV-Headers 1.3.274 REQUIRED) - endif() - find_package(SPIRV-Tools MODULE REQUIRED) if (YUZU_TESTS) diff --git a/CMakeModules/CPMUtil.cmake b/CMakeModules/CPMUtil.cmake index d84c069399..3347c7e884 100644 --- a/CMakeModules/CPMUtil.cmake +++ b/CMakeModules/CPMUtil.cmake @@ -107,7 +107,6 @@ function(AddJsonPackage) get_json_element("${object}" name name "${JSON_NAME}") get_json_element("${object}" extension extension "tar.zst") get_json_element("${object}" min_version min_version "") - get_json_element("${object}" cmake_filename cmake_filename "") get_json_element("${object}" raw_disabled disabled_platforms "") if (raw_disabled) @@ -124,7 +123,6 @@ function(AddJsonPackage) EXTENSION ${extension} MIN_VERSION ${min_version} DISABLED_PLATFORMS ${disabled_platforms} - CMAKE_FILENAME ${cmake_filename} ) # pass stuff to parent scope @@ -139,6 +137,7 @@ function(AddJsonPackage) endif() get_json_element("${object}" hash hash "") + get_json_element("${object}" hash_suffix hash_suffix "") get_json_element("${object}" sha sha "") get_json_element("${object}" url url "") get_json_element("${object}" key key "") @@ -208,6 +207,7 @@ function(AddJsonPackage) VERSION "${version}" URL "${url}" HASH "${hash}" + HASH_SUFFIX "${hash_suffix}" SHA "${sha}" REPO "${repo}" KEY "${key}" @@ -533,7 +533,6 @@ function(AddCIPackage) EXTENSION MIN_VERSION DISABLED_PLATFORMS - CMAKE_FILENAME ) cmake_parse_arguments(PKG_ARGS "" "${oneValueArgs}" "" ${ARGN}) @@ -589,25 +588,28 @@ function(AddCIPackage) add_ci_package(android) endif() - if(PLATFORM_SUN AND NOT "solaris" IN_LIST DISABLED_PLATFORMS) - add_ci_package(solaris) + if(PLATFORM_SUN AND NOT "solaris-amd64" IN_LIST DISABLED_PLATFORMS) + add_ci_package(solaris-amd64) endif() - if(PLATFORM_FREEBSD AND NOT "freebsd" IN_LIST DISABLED_PLATFORMS) - add_ci_package(freebsd) + if(PLATFORM_FREEBSD AND NOT "freebsd-amd64" IN_LIST DISABLED_PLATFORMS) + add_ci_package(freebsd-amd64) endif() - if((PLATFORM_LINUX AND ARCHITECTURE_x86_64) AND NOT "linux" IN_LIST DISABLED_PLATFORMS) - add_ci_package(linux) + if((PLATFORM_LINUX AND ARCHITECTURE_x86_64) AND NOT "linux-amd64" IN_LIST DISABLED_PLATFORMS) + add_ci_package(linux-amd64) endif() if((PLATFORM_LINUX AND ARCHITECTURE_arm64) AND NOT "linux-aarch64" IN_LIST DISABLED_PLATFORMS) add_ci_package(linux-aarch64) endif() - if (DEFINED ARTIFACT_DIR) - include(${ARTIFACT_DIR}/${ARTIFACT_CMAKE}.cmake) + # TODO(crueter): macOS amd64/aarch64 split mayhaps + if (APPLE AND NOT "macos-universal" IN_LIST DISABLED_PLATFORMS) + add_ci_package(macos-universal) + endif() + if (DEFINED ARTIFACT_DIR) set(${ARTIFACT_PACKAGE}_ADDED TRUE PARENT_SCOPE) set(${ARTIFACT_PACKAGE}_SOURCE_DIR "${ARTIFACT_DIR}" PARENT_SCOPE) else() diff --git a/cpmfile.json b/cpmfile.json index f1fd5ce1cf..0467cd5d29 100644 --- a/cpmfile.json +++ b/cpmfile.json @@ -4,8 +4,11 @@ "package": "OpenSSL", "name": "openssl", "repo": "crueter-ci/OpenSSL", - "version": "3.5.3", - "min_version": "1.1.1" + "version": "3.6.0", + "min_version": "1.1.1", + "disabled_platforms": [ + "macos-universal" + ] }, "boost": { "package": "Boost", @@ -178,9 +181,11 @@ "package": "SDL2", "name": "SDL2", "repo": "crueter-ci/SDL2", - "version": "2.32.8", + "version": "2.32.10", "min_version": "2.26.4", - "cmake_filename": "sdl2" + "disabled_platforms": [ + "macos-universal" + ] }, "llvm-mingw": { "repo": "misc/llvm-mingw", diff --git a/docs/CPM.md b/docs/CPM.md index 03d8a039f9..c01376469d 100644 --- a/docs/CPM.md +++ b/docs/CPM.md @@ -108,7 +108,9 @@ All dependencies must be identifiable in some way for usage in the dependency vi URLs: - `GIT_URL` -- `REPO` as a GitHub repository +- `REPO` as a Git repository + * You may optionally specify `GIT_HOST` to use a custom host, e.g. `GIT_HOST git.crueter.xyz`. Note that the git host MUST be GitHub-like in its artifact/archive downloads, e.g. Forgejo + * If `GIT_HOST` is unspecified, defaults to `github.com` - `URL` Versions (bundled): @@ -135,11 +137,11 @@ Adds a package that follows crueter's CI repository spec. * `windows-amd64` * `windows-arm64` * `android` - * `solaris` - * `freebsd` - * `linux` + * `solaris-amd64` + * `freebsd-amd64` + * `linux-amd64` * `linux-aarch64` -- `CMAKE_FILENAME`: Custom CMake filename, relative to the package root (default `${PACKAGE_ROOT}/${NAME}.cmake`) + * `macos-universal` ### AddJsonPackage @@ -155,10 +157,17 @@ The cpmfile is an object of objects, with each sub-object being named according If `ci` is `false`: - `hash` -> `HASH` +- `hash_suffix` -> `HASH_SUFFIX` - `sha` -> `SHA` +- `key` -> `KEY` - `tag` -> `TAG` + * If the tag contains `%VERSION%`, that part will be replaced by the `git_version`, OR `version` if `git_version` is not specified +- `url` -> `URL` - `artifact` -> `ARTIFACT` + * If the artifact contains `%VERSION%`, that part will be replaced by the `git_version`, OR `version` if `git_version` is not specified + * If the artifact contains `%TAG%`, that part will be replaced by the `tag` (with its replacement already done) - `git_version` -> `GIT_VERSION` +- `git_host` -> `GIT_HOST` - `source_subdir` -> `SOURCE_SUBDIR` - `bundled` -> `BUNDLED_PACKAGE` - `find_args` -> `FIND_PACKAGE_ARGUMENTS` @@ -172,7 +181,6 @@ If `ci` is `true`: - `name` -> `NAME`, defaults to the object key - `extension` -> `EXTENSION`, defaults to `tar.zst` - `min_version` -> `MIN_VERSION` -- `cmake_filename` -> `CMAKE_FILENAME` - `extension` -> `EXTENSION` ### Examples @@ -192,8 +200,8 @@ In order: OpenSSL CI, Boost (tag + artifact), Opus (options + find_args), discor "boost": { "package": "Boost", "repo": "boostorg/boost", - "tag": "boost-1.88.0", - "artifact": "boost-1.88.0-cmake.7z", + "tag": "boost-%VERSION%", + "artifact": "%TAG%-cmake.7z", "hash": "e5b049e5b61964480ca816395f63f95621e66cb9bcf616a8b10e441e0e69f129e22443acb11e77bc1e8170f8e4171b9b7719891efc43699782bfcd4b3a365f01", "git_version": "1.88.0", "version": "1.57" diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index 754ba61a0b..bb68aadb36 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -68,7 +68,11 @@ if (VulkanMemoryAllocator_ADDED) endif() # Sirit -AddJsonPackage(sirit) +if (YUZU_USE_BUNDLED_SIRIT) + AddJsonPackage(sirit-ci) +else() + AddJsonPackage(sirit) +endif() if(MSVC AND USE_CCACHE AND sirit_ADDED) get_target_property(_opts sirit COMPILE_OPTIONS) diff --git a/externals/cpmfile.json b/externals/cpmfile.json index dcafc8f97d..b9d05fb151 100644 --- a/externals/cpmfile.json +++ b/externals/cpmfile.json @@ -8,12 +8,18 @@ }, "sirit": { "repo": "eden-emulator/sirit", - "sha": "db1f1e8ab5", - "hash": "73eb3a042848c63a10656545797e85f40d142009dfb7827384548a385e1e28e1ac72f42b25924ce530d58275f8638554281e884d72f9c7aaf4ed08690a414b05", - "find_args": "CONFIG", - "options": [ - "SIRIT_USE_SYSTEM_SPIRV_HEADERS ON" - ] + "version": "1.0.0", + "tag": "v%VERSION%", + "artifact": "sirit-source-%VERSION%.tar.zst", + "hash_suffix": "sha512sum", + "find_args": "CONFIG" + }, + "sirit-ci": { + "ci": true, + "package": "sirit", + "name": "sirit", + "repo": "eden-emulator/sirit", + "version": "1.0.0" }, "httplib": { "repo": "yhirose/cpp-httplib", @@ -70,5 +76,5 @@ "sha": "73f3cbb237", "hash": "c08c03063938339d61392b687562909c1a92615b6ef39ec8df19ea472aa6b6478e70d7d5e33d4a27b5d23f7806daf57fe1bacb8124c8a945c918c7663a9e8532", "find_args": "CONFIG" - } + } } diff --git a/externals/ffmpeg/cpmfile.json b/externals/ffmpeg/cpmfile.json index 9b9efaadde..ff48ce742d 100644 --- a/externals/ffmpeg/cpmfile.json +++ b/externals/ffmpeg/cpmfile.json @@ -13,8 +13,9 @@ "version": "8.0", "min_version": "4.1", "disabled_platforms": [ - "freebsd", - "solaris" + "freebsd-amd64", + "solaris-amd64", + "macos-universal" ] } } diff --git a/tools/cpm-fetch.sh b/tools/cpm-fetch.sh index 088df8464e..0219845707 100755 --- a/tools/cpm-fetch.sh +++ b/tools/cpm-fetch.sh @@ -84,7 +84,7 @@ ci_package() { echo "-- CI package $PACKAGE" - for platform in windows-amd64 windows-arm64 android solaris freebsd linux linux-aarch64; do + for platform in windows-amd64 windows-arm64 android solaris-amd64 freebsd-amd64 linux-amd64 linux-aarch64 macos-universal; do echo "-- * platform $platform" case $DISABLED in @@ -227,7 +227,7 @@ do HASH_URL="${DOWNLOAD}.${HASH_SUFFIX}" fi - HASH=$(curl "$HASH_URL" -L -o -) + HASH=$(curl "$HASH_URL" -sS -L -o -) fi download_package