diff --git a/archlinuxcn/sudachi/0001-fix-build-error-in-CMakeList.patch b/archlinuxcn/sudachi/0001-fix-build-error-in-CMakeList.patch new file mode 100644 index 000000000000..aea339a4b91f --- /dev/null +++ b/archlinuxcn/sudachi/0001-fix-build-error-in-CMakeList.patch @@ -0,0 +1,78 @@ +From 69fd5143491f03254b5873fabdc3a5a5ea8416b7 Mon Sep 17 00:00:00 2001 +From: sukanka +Date: Sat, 5 Apr 2025 19:07:45 +0800 +Subject: [PATCH 1/7] fix build error in CMakeList + +build external after find package to skip unsupported cmake command + +change USE_SDL3_FROM_EXTERNALS to option to use system sdl3 + +strip package ver so system packages work + +fix build error caused by Werror=conversion + +4 5 CMakeLists.txt +1 1 src/input_common/CMakeLists.txt + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6d1b186..f6d072f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -15,7 +15,7 @@ include(CTest) + # Set bundled sdl3/qt as dependent options. + # OFF by default, but if ENABLE_SDL3 and MSVC are true then ON + option(ENABLE_SDL3 "Enable the SDL3 frontend" ON) +-set(USE_SDL3_FROM_EXTERNALS "Uses SDL3 from the externals directory" ON) ++option(USE_SDL3_FROM_EXTERNALS "Uses SDL3 from the externals directory" ON) + CMAKE_DEPENDENT_OPTION(SUDACHI_USE_BUNDLED_SDL3 "Download bundled SDL3 binaries" ON "ENABLE_SDL3;MSVC" OFF) + # On Linux system SDL3 is likely to be lacking HIDAPI support which have drawbacks but is needed for SDL motion + CMAKE_DEPENDENT_OPTION(SUDACHI_USE_EXTERNAL_SDL3 "Compile external SDL3" ON "ENABLE_SDL3;NOT MSVC" OFF) +@@ -304,13 +304,12 @@ set(FFmpeg_COMPONENTS + avutil + swscale) + +-add_subdirectory(externals) + + # Enforce the search mode of non-required packages for better and shorter failure messages + find_package(Boost 1.79.0 REQUIRED context) + find_package(enet 1.3 MODULE) + find_package(fmt 9 REQUIRED) +-find_package(LLVM 17.0.2 MODULE COMPONENTS Demangle) ++find_package(LLVM MODULE COMPONENTS Demangle) + find_package(lz4 REQUIRED) + find_package(nlohmann_json 3.8 REQUIRED) + find_package(Opus 1.3 MODULE) +@@ -355,7 +354,7 @@ endif() + + if (ENABLE_WEB_SERVICE) + find_package(cpp-jwt 1.4 CONFIG) +- find_package(httplib 0.12 MODULE COMPONENTS OpenSSL) ++ find_package(httplib MODULE COMPONENTS OpenSSL) + endif() + + if (SUDACHI_TESTS) +@@ -707,7 +706,7 @@ if (SUDACHI_USE_FASTER_LD AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + add_link_options("-fuse-ld=lld") + endif() + endif() +- ++add_subdirectory(externals) + add_subdirectory(src) + + # Set sudachi project or sudachi-cmd project as default StartUp Project in Visual Studio depending on whether QT is enabled or not +diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt +index 54f7741..b460f17 100644 +--- a/src/input_common/CMakeLists.txt ++++ b/src/input_common/CMakeLists.txt +@@ -43,7 +43,7 @@ if (MSVC) + ) + else() + target_compile_options(input_common PRIVATE +- -Werror=conversion ++ -Wno-error=conversion + ) + endif() + +-- +2.49.0 + diff --git a/archlinuxcn/sudachi/0002-fix-fmt11-and-memory-errors.patch b/archlinuxcn/sudachi/0002-fix-fmt11-and-memory-errors.patch new file mode 100644 index 000000000000..d004f41525d3 --- /dev/null +++ b/archlinuxcn/sudachi/0002-fix-fmt11-and-memory-errors.patch @@ -0,0 +1,473 @@ +From 89d2b86003d3cff6b813d51d801fb9b132893a6b Mon Sep 17 00:00:00 2001 +From: sukanka +Date: Sat, 5 Apr 2025 19:08:53 +0800 +Subject: [PATCH 2/7] fix fmt11 and memory errors + + +1 1 src/common/logging/formatter.h +3 3 src/common/typed_address.h +1 1 src/core/arm/dynarmic/arm_dynarmic_cp15.cpp +1 1 src/core/arm/dynarmic/dynarmic_cp15.cpp +1 0 src/core/debugger/gdbstub.cpp +1 0 src/core/frontend/applets/cabinet.h +1 0 src/core/hle/service/nfc/common/device.cpp +1 1 src/core/hle/service/psc/time/common.h +1 0 src/core/memory/dmnt_cheat_vm.h +1 1 src/hid_core/resources/applet_resource.h +1 1 src/hid_core/resources/npad/npad_vibration.h +1 1 src/hid_core/resources/touch_screen/gesture.h +1 1 src/hid_core/resources/touch_screen/touch_screen.h +1 0 src/hid_core/resources/touch_screen/touch_screen_resource.h +7 7 src/shader_recompiler/backend/glasm/reg_alloc.h +1 1 src/shader_recompiler/frontend/ir/attribute.h +1 1 src/shader_recompiler/frontend/ir/condition.h +1 1 src/shader_recompiler/frontend/ir/flow_test.h +1 1 src/shader_recompiler/frontend/ir/opcodes.h +1 1 src/shader_recompiler/frontend/ir/pred.h +1 1 src/shader_recompiler/frontend/ir/reg.h +1 1 src/shader_recompiler/frontend/ir/type.h +1 1 src/shader_recompiler/frontend/maxwell/location.h +1 1 src/shader_recompiler/frontend/maxwell/opcodes.h +1 0 src/sudachi/main.cpp +1 0 src/video_core/renderer_vulkan/renderer_vulkan.cpp +3 3 src/video_core/texture_cache/formatter.h + +diff --git a/src/common/logging/formatter.h b/src/common/logging/formatter.h +index 88e5550..16bddde 100644 +--- a/src/common/logging/formatter.h ++++ b/src/common/logging/formatter.h +@@ -14,7 +14,7 @@ template + struct fmt::formatter, char>> + : formatter> { + template +- auto format(const T& value, FormatContext& ctx) -> decltype(ctx.out()) { ++ auto format(const T& value, FormatContext& ctx) const -> decltype(ctx.out()) { + return fmt::formatter>::format( + static_cast>(value), ctx); + } +diff --git a/src/common/typed_address.h b/src/common/typed_address.h +index d5e7435..41f7f1e 100644 +--- a/src/common/typed_address.h ++++ b/src/common/typed_address.h +@@ -262,7 +262,7 @@ struct fmt::formatter { + return ctx.begin(); + } + template +- auto format(const Common::PhysicalAddress& addr, FormatContext& ctx) { ++ auto format(const Common::PhysicalAddress& addr, FormatContext& ctx) const { + return fmt::format_to(ctx.out(), "{:#x}", static_cast(addr.GetValue())); + } + }; +@@ -273,7 +273,7 @@ struct fmt::formatter { + return ctx.begin(); + } + template +- auto format(const Common::ProcessAddress& addr, FormatContext& ctx) { ++ auto format(const Common::ProcessAddress& addr, FormatContext& ctx) const { + return fmt::format_to(ctx.out(), "{:#x}", static_cast(addr.GetValue())); + } + }; +@@ -284,7 +284,7 @@ struct fmt::formatter { + return ctx.begin(); + } + template +- auto format(const Common::VirtualAddress& addr, FormatContext& ctx) { ++ auto format(const Common::VirtualAddress& addr, FormatContext& ctx) const { + return fmt::format_to(ctx.out(), "{:#x}", static_cast(addr.GetValue())); + } + }; +diff --git a/src/core/arm/dynarmic/arm_dynarmic_cp15.cpp b/src/core/arm/dynarmic/arm_dynarmic_cp15.cpp +index 5a4eba3..9871c9d 100644 +--- a/src/core/arm/dynarmic/arm_dynarmic_cp15.cpp ++++ b/src/core/arm/dynarmic/arm_dynarmic_cp15.cpp +@@ -22,7 +22,7 @@ struct fmt::formatter { + return ctx.begin(); + } + template +- auto format(const Dynarmic::A32::CoprocReg& reg, FormatContext& ctx) { ++ auto format(const Dynarmic::A32::CoprocReg& reg, FormatContext& ctx) const { + return fmt::format_to(ctx.out(), "cp{}", static_cast(reg)); + } + }; +diff --git a/src/core/arm/dynarmic/dynarmic_cp15.cpp b/src/core/arm/dynarmic/dynarmic_cp15.cpp +index f3eee0d..ee97ac6 100644 +--- a/src/core/arm/dynarmic/dynarmic_cp15.cpp ++++ b/src/core/arm/dynarmic/dynarmic_cp15.cpp +@@ -22,7 +22,7 @@ struct fmt::formatter { + return ctx.begin(); + } + template +- auto format(const Dynarmic::A32::CoprocReg& reg, FormatContext& ctx) { ++ auto format(const Dynarmic::A32::CoprocReg& reg, FormatContext& ctx) const { + return fmt::format_to(ctx.out(), "cp{}", static_cast(reg)); + } + }; +diff --git a/src/core/debugger/gdbstub.cpp b/src/core/debugger/gdbstub.cpp +index 80091cc..a5667d1 100644 +--- a/src/core/debugger/gdbstub.cpp ++++ b/src/core/debugger/gdbstub.cpp +@@ -10,6 +10,7 @@ + + #include + ++#include + #include "common/hex_util.h" + #include "common/logging/log.h" + #include "common/scope_exit.h" +diff --git a/src/core/frontend/applets/cabinet.h b/src/core/frontend/applets/cabinet.h +index af3fc6c..7c0694f 100644 +--- a/src/core/frontend/applets/cabinet.h ++++ b/src/core/frontend/applets/cabinet.h +@@ -6,6 +6,7 @@ + #include + #include "core/frontend/applets/applet.h" + #include "core/hle/service/nfp/nfp_types.h" ++#include + + namespace Service::NFC { + class NfcDevice; +diff --git a/src/core/hle/service/nfc/common/device.cpp b/src/core/hle/service/nfc/common/device.cpp +index 14e6c7a..5291aa7 100644 +--- a/src/core/hle/service/nfc/common/device.cpp ++++ b/src/core/hle/service/nfc/common/device.cpp +@@ -15,6 +15,7 @@ + #endif + + #include ++#include + + #include "common/fs/file.h" + #include "common/fs/fs.h" +diff --git a/src/core/hle/service/psc/time/common.h b/src/core/hle/service/psc/time/common.h +index 3e13144..a3f1009 100644 +--- a/src/core/hle/service/psc/time/common.h ++++ b/src/core/hle/service/psc/time/common.h +@@ -167,7 +167,7 @@ constexpr inline Result GetSpanBetweenTimePoints(s64* out_seconds, const SteadyC + template <> + struct fmt::formatter : fmt::formatter { + template +- auto format(Service::PSC::Time::TimeType type, FormatContext& ctx) { ++ auto format(Service::PSC::Time::TimeType type, FormatContext& ctx) const { + const string_view name = [type] { + using Service::PSC::Time::TimeType; + switch (type) { +diff --git a/src/core/memory/dmnt_cheat_vm.h b/src/core/memory/dmnt_cheat_vm.h +index 8abf5d3..f36d83a 100644 +--- a/src/core/memory/dmnt_cheat_vm.h ++++ b/src/core/memory/dmnt_cheat_vm.h +@@ -3,6 +3,7 @@ + + #pragma once + ++#include + #include + #include + #include +diff --git a/src/hid_core/resources/applet_resource.h b/src/hid_core/resources/applet_resource.h +index 4a5416f..81a8122 100644 +--- a/src/hid_core/resources/applet_resource.h ++++ b/src/hid_core/resources/applet_resource.h +@@ -4,8 +4,8 @@ + #pragma once + + #include ++#include + #include +- + #include "common/bit_field.h" + #include "common/common_types.h" + #include "core/hle/result.h" +diff --git a/src/hid_core/resources/npad/npad_vibration.h b/src/hid_core/resources/npad/npad_vibration.h +index 6412ca4..4b22098 100644 +--- a/src/hid_core/resources/npad/npad_vibration.h ++++ b/src/hid_core/resources/npad/npad_vibration.h +@@ -2,7 +2,7 @@ + // SPDX-License-Identifier: GPL-3.0-or-later + + #pragma once +- ++#include + #include + + #include "common/common_types.h" +diff --git a/src/hid_core/resources/touch_screen/gesture.h b/src/hid_core/resources/touch_screen/gesture.h +index d92912b..2710642 100644 +--- a/src/hid_core/resources/touch_screen/gesture.h ++++ b/src/hid_core/resources/touch_screen/gesture.h +@@ -3,8 +3,8 @@ + + #pragma once + ++#include + #include +- + #include "common/common_types.h" + #include "core/hle/result.h" + +diff --git a/src/hid_core/resources/touch_screen/touch_screen.h b/src/hid_core/resources/touch_screen/touch_screen.h +index 2fcb624..0a05dd3 100644 +--- a/src/hid_core/resources/touch_screen/touch_screen.h ++++ b/src/hid_core/resources/touch_screen/touch_screen.h +@@ -2,7 +2,7 @@ + // SPDX-License-Identifier: GPL-3.0-or-later + + #pragma once +- ++#include + #include + + #include "common/common_types.h" +diff --git a/src/hid_core/resources/touch_screen/touch_screen_resource.h b/src/hid_core/resources/touch_screen/touch_screen_resource.h +index 095cddd..c0e7be7 100644 +--- a/src/hid_core/resources/touch_screen/touch_screen_resource.h ++++ b/src/hid_core/resources/touch_screen/touch_screen_resource.h +@@ -4,6 +4,7 @@ + #pragma once + + #include ++#include + #include + + #include "common/common_types.h" +diff --git a/src/shader_recompiler/backend/glasm/reg_alloc.h b/src/shader_recompiler/backend/glasm/reg_alloc.h +index bd6e2d9..7cd8c41 100644 +--- a/src/shader_recompiler/backend/glasm/reg_alloc.h ++++ b/src/shader_recompiler/backend/glasm/reg_alloc.h +@@ -184,7 +184,7 @@ struct fmt::formatter { + return ctx.begin(); + } + template +- auto format(Shader::Backend::GLASM::Id id, FormatContext& ctx) { ++ auto format(Shader::Backend::GLASM::Id id, FormatContext& ctx) const { + return Shader::Backend::GLASM::FormatTo(ctx, id); + } + }; +@@ -195,7 +195,7 @@ struct fmt::formatter { + return ctx.begin(); + } + template +- auto format(const Shader::Backend::GLASM::Register& value, FormatContext& ctx) { ++ auto format(const Shader::Backend::GLASM::Register& value, FormatContext& ctx) const { + if (value.type != Shader::Backend::GLASM::Type::Register) { + throw Shader::InvalidArgument("Register value type is not register"); + } +@@ -209,7 +209,7 @@ struct fmt::formatter { + return ctx.begin(); + } + template +- auto format(const Shader::Backend::GLASM::ScalarRegister& value, FormatContext& ctx) { ++ auto format(const Shader::Backend::GLASM::ScalarRegister& value, FormatContext& ctx) const { + if (value.type != Shader::Backend::GLASM::Type::Register) { + throw Shader::InvalidArgument("Register value type is not register"); + } +@@ -223,7 +223,7 @@ struct fmt::formatter { + return ctx.begin(); + } + template +- auto format(const Shader::Backend::GLASM::ScalarU32& value, FormatContext& ctx) { ++ auto format(const Shader::Backend::GLASM::ScalarU32& value, FormatContext& ctx) const { + switch (value.type) { + case Shader::Backend::GLASM::Type::Void: + break; +@@ -244,7 +244,7 @@ struct fmt::formatter { + return ctx.begin(); + } + template +- auto format(const Shader::Backend::GLASM::ScalarS32& value, FormatContext& ctx) { ++ auto format(const Shader::Backend::GLASM::ScalarS32& value, FormatContext& ctx) const { + switch (value.type) { + case Shader::Backend::GLASM::Type::Void: + break; +@@ -265,7 +265,7 @@ struct fmt::formatter { + return ctx.begin(); + } + template +- auto format(const Shader::Backend::GLASM::ScalarF32& value, FormatContext& ctx) { ++ auto format(const Shader::Backend::GLASM::ScalarF32& value, FormatContext& ctx) const { + switch (value.type) { + case Shader::Backend::GLASM::Type::Void: + break; +@@ -286,7 +286,7 @@ struct fmt::formatter { + return ctx.begin(); + } + template +- auto format(const Shader::Backend::GLASM::ScalarF64& value, FormatContext& ctx) { ++ auto format(const Shader::Backend::GLASM::ScalarF64& value, FormatContext& ctx) const { + switch (value.type) { + case Shader::Backend::GLASM::Type::Void: + break; +diff --git a/src/shader_recompiler/frontend/ir/attribute.h b/src/shader_recompiler/frontend/ir/attribute.h +index 5f039b6..45084ab 100644 +--- a/src/shader_recompiler/frontend/ir/attribute.h ++++ b/src/shader_recompiler/frontend/ir/attribute.h +@@ -250,7 +250,7 @@ struct fmt::formatter { + return ctx.begin(); + } + template +- auto format(const Shader::IR::Attribute& attribute, FormatContext& ctx) { ++ auto format(const Shader::IR::Attribute& attribute, FormatContext& ctx) const { + return fmt::format_to(ctx.out(), "{}", Shader::IR::NameOf(attribute)); + } + }; +diff --git a/src/shader_recompiler/frontend/ir/condition.h b/src/shader_recompiler/frontend/ir/condition.h +index 1cad46b..d9172a1 100644 +--- a/src/shader_recompiler/frontend/ir/condition.h ++++ b/src/shader_recompiler/frontend/ir/condition.h +@@ -52,7 +52,7 @@ struct fmt::formatter { + return ctx.begin(); + } + template +- auto format(const Shader::IR::Condition& cond, FormatContext& ctx) { ++ auto format(const Shader::IR::Condition& cond, FormatContext& ctx) const { + return fmt::format_to(ctx.out(), "{}", Shader::IR::NameOf(cond)); + } + }; +diff --git a/src/shader_recompiler/frontend/ir/flow_test.h b/src/shader_recompiler/frontend/ir/flow_test.h +index 88f7c9e..d719d3e 100644 +--- a/src/shader_recompiler/frontend/ir/flow_test.h ++++ b/src/shader_recompiler/frontend/ir/flow_test.h +@@ -55,7 +55,7 @@ struct fmt::formatter { + return ctx.begin(); + } + template +- auto format(const Shader::IR::FlowTest& flow_test, FormatContext& ctx) { ++ auto format(const Shader::IR::FlowTest& flow_test, FormatContext& ctx) const { + return fmt::format_to(ctx.out(), "{}", Shader::IR::NameOf(flow_test)); + } + }; +diff --git a/src/shader_recompiler/frontend/ir/opcodes.h b/src/shader_recompiler/frontend/ir/opcodes.h +index e300714..85ff20d 100644 +--- a/src/shader_recompiler/frontend/ir/opcodes.h ++++ b/src/shader_recompiler/frontend/ir/opcodes.h +@@ -103,7 +103,7 @@ struct fmt::formatter { + return ctx.begin(); + } + template +- auto format(const Shader::IR::Opcode& op, FormatContext& ctx) { ++ auto format(const Shader::IR::Opcode& op, FormatContext& ctx) const { + return fmt::format_to(ctx.out(), "{}", Shader::IR::NameOf(op)); + } + }; +diff --git a/src/shader_recompiler/frontend/ir/pred.h b/src/shader_recompiler/frontend/ir/pred.h +index a77c1e2..d54681d 100644 +--- a/src/shader_recompiler/frontend/ir/pred.h ++++ b/src/shader_recompiler/frontend/ir/pred.h +@@ -33,7 +33,7 @@ struct fmt::formatter { + return ctx.begin(); + } + template +- auto format(const Shader::IR::Pred& pred, FormatContext& ctx) { ++ auto format(const Shader::IR::Pred& pred, FormatContext& ctx) const { + if (pred == Shader::IR::Pred::PT) { + return fmt::format_to(ctx.out(), "PT"); + } else { +diff --git a/src/shader_recompiler/frontend/ir/reg.h b/src/shader_recompiler/frontend/ir/reg.h +index f7cb716..feb24a9 100644 +--- a/src/shader_recompiler/frontend/ir/reg.h ++++ b/src/shader_recompiler/frontend/ir/reg.h +@@ -319,7 +319,7 @@ struct fmt::formatter { + return ctx.begin(); + } + template +- auto format(const Shader::IR::Reg& reg, FormatContext& ctx) { ++ auto format(const Shader::IR::Reg& reg, FormatContext& ctx) const { + if (reg == Shader::IR::Reg::RZ) { + return fmt::format_to(ctx.out(), "RZ"); + } else if (static_cast(reg) >= 0 && static_cast(reg) < 255) { +diff --git a/src/shader_recompiler/frontend/ir/type.h b/src/shader_recompiler/frontend/ir/type.h +index 04c8c4d..af9c360 100644 +--- a/src/shader_recompiler/frontend/ir/type.h ++++ b/src/shader_recompiler/frontend/ir/type.h +@@ -54,7 +54,7 @@ struct fmt::formatter { + return ctx.begin(); + } + template +- auto format(const Shader::IR::Type& type, FormatContext& ctx) { ++ auto format(const Shader::IR::Type& type, FormatContext& ctx) const { + return fmt::format_to(ctx.out(), "{}", NameOf(type)); + } + }; +diff --git a/src/shader_recompiler/frontend/maxwell/location.h b/src/shader_recompiler/frontend/maxwell/location.h +index 0c0477e..d82057c 100644 +--- a/src/shader_recompiler/frontend/maxwell/location.h ++++ b/src/shader_recompiler/frontend/maxwell/location.h +@@ -102,7 +102,7 @@ struct fmt::formatter { + return ctx.begin(); + } + template +- auto format(const Shader::Maxwell::Location& location, FormatContext& ctx) { ++ auto format(const Shader::Maxwell::Location& location, FormatContext& ctx) const { + return fmt::format_to(ctx.out(), "{:04x}", location.Offset()); + } + }; +diff --git a/src/shader_recompiler/frontend/maxwell/opcodes.h b/src/shader_recompiler/frontend/maxwell/opcodes.h +index 72dd143..028eabf 100644 +--- a/src/shader_recompiler/frontend/maxwell/opcodes.h ++++ b/src/shader_recompiler/frontend/maxwell/opcodes.h +@@ -23,7 +23,7 @@ struct fmt::formatter { + return ctx.begin(); + } + template +- auto format(const Shader::Maxwell::Opcode& opcode, FormatContext& ctx) { ++ auto format(const Shader::Maxwell::Opcode& opcode, FormatContext& ctx) const { + return fmt::format_to(ctx.out(), "{}", NameOf(opcode)); + } + }; +diff --git a/src/sudachi/main.cpp b/src/sudachi/main.cpp +index af7a33f..001de43 100644 +--- a/src/sudachi/main.cpp ++++ b/src/sudachi/main.cpp +@@ -94,6 +94,7 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual + #endif + + #include ++#include + #include "common/detached_tasks.h" + #include "common/fs/fs.h" + #include "common/fs/path_util.h" +diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.cpp b/src/video_core/renderer_vulkan/renderer_vulkan.cpp +index dc64a36..281659c 100644 +--- a/src/video_core/renderer_vulkan/renderer_vulkan.cpp ++++ b/src/video_core/renderer_vulkan/renderer_vulkan.cpp +@@ -10,6 +10,7 @@ + #include + + #include ++#include + + #include "common/logging/log.h" + #include "common/polyfill_ranges.h" +diff --git a/src/video_core/texture_cache/formatter.h b/src/video_core/texture_cache/formatter.h +index cabbfcb..ea1c2df 100644 +--- a/src/video_core/texture_cache/formatter.h ++++ b/src/video_core/texture_cache/formatter.h +@@ -13,7 +13,7 @@ + template <> + struct fmt::formatter : fmt::formatter { + template +- auto format(VideoCore::Surface::PixelFormat format, FormatContext& ctx) { ++ auto format(VideoCore::Surface::PixelFormat format, FormatContext& ctx) const { + using VideoCore::Surface::PixelFormat; + const string_view name = [format] { + switch (format) { +@@ -234,7 +234,7 @@ struct fmt::formatter : fmt::formatter + struct fmt::formatter : fmt::formatter { + template +- auto format(VideoCommon::ImageType type, FormatContext& ctx) { ++ auto format(VideoCommon::ImageType type, FormatContext& ctx) const { + const string_view name = [type] { + using VideoCommon::ImageType; + switch (type) { +@@ -262,7 +262,7 @@ struct fmt::formatter { + } + + template +- auto format(const VideoCommon::Extent3D& extent, FormatContext& ctx) { ++ auto format(const VideoCommon::Extent3D& extent, FormatContext& ctx) const { + return fmt::format_to(ctx.out(), "{{{}, {}, {}}}", extent.width, extent.height, + extent.depth); + } +-- +2.49.0 + diff --git a/archlinuxcn/sudachi/0003-fix-for-ffmpeg7.patch b/archlinuxcn/sudachi/0003-fix-for-ffmpeg7.patch new file mode 100644 index 000000000000..f177d2591cbf --- /dev/null +++ b/archlinuxcn/sudachi/0003-fix-for-ffmpeg7.patch @@ -0,0 +1,136 @@ +From 8315dfe4ac0e78438e5237e766f71dbcb548d497 Mon Sep 17 00:00:00 2001 +From: sukanka +Date: Sat, 5 Apr 2025 20:39:02 +0800 +Subject: [PATCH 3/7] fix for ffmpeg7 + + +21 66 src/video_core/host1x/ffmpeg/ffmpeg.cpp +0 3 src/video_core/host1x/ffmpeg/ffmpeg.h + +diff --git a/src/video_core/host1x/ffmpeg/ffmpeg.cpp b/src/video_core/host1x/ffmpeg/ffmpeg.cpp +index a6a991f..5ead726 100644 +--- a/src/video_core/host1x/ffmpeg/ffmpeg.cpp ++++ b/src/video_core/host1x/ffmpeg/ffmpeg.cpp +@@ -222,22 +222,6 @@ bool DecoderContext::SendPacket(const Packet& packet) { + m_temp_frame = std::make_shared(); + m_got_frame = 0; + +-// Android can randomly crash when calling decode directly, so skip. +-// TODO update ffmpeg and hope that fixes it. +-#ifndef ANDROID +- if (!m_codec_context->hw_device_ctx && m_codec_context->codec_id == AV_CODEC_ID_H264) { +- m_decode_order = true; +- auto* codec{ffcodec(m_decoder.GetCodec())}; +- if (const int ret = codec->cb.decode(m_codec_context, m_temp_frame->GetFrame(), +- &m_got_frame, packet.GetPacket()); +- ret < 0) { +- LOG_DEBUG(Service_NVDRV, "avcodec_send_packet error {}", AVError(ret)); +- return false; +- } +- return true; +- } +-#endif +- + if (const int ret = avcodec_send_packet(m_codec_context, packet.GetPacket()); ret < 0) { + LOG_ERROR(HW_GPU, "avcodec_send_packet error: {}", AVError(ret)); + return false; +@@ -247,61 +231,32 @@ bool DecoderContext::SendPacket(const Packet& packet) { + } + + std::shared_ptr DecoderContext::ReceiveFrame() { +- // Android can randomly crash when calling decode directly, so skip. +- // TODO update ffmpeg and hope that fixes it. +-#ifndef ANDROID +- if (!m_codec_context->hw_device_ctx && m_codec_context->codec_id == AV_CODEC_ID_H264) { +- m_decode_order = true; +- auto* codec{ffcodec(m_decoder.GetCodec())}; +- int ret{0}; +- +- if (m_got_frame == 0) { +- Packet packet{{}}; +- auto* pkt = packet.GetPacket(); +- pkt->data = nullptr; +- pkt->size = 0; +- ret = codec->cb.decode(m_codec_context, m_temp_frame->GetFrame(), &m_got_frame, pkt); +- m_codec_context->has_b_frames = 0; ++ const auto ReceiveImpl = [&](AVFrame* frame) { ++ if (const int ret = avcodec_receive_frame(m_codec_context, frame); ret < 0) { ++ LOG_ERROR(HW_GPU, "avcodec_receive_frame error: {}", AVError(ret)); ++ return false; + } + +- if (m_got_frame == 0 || ret < 0) { +- LOG_ERROR(Service_NVDRV, "Failed to receive a frame! error {}", ret); ++ return true; ++ }; ++ ++ if (m_codec_context->hw_device_ctx) { ++ Frame intermediate_frame; ++ ++ if (!ReceiveImpl(intermediate_frame.GetFrame())) { + return {}; + } +- } else +-#endif +- { +- +- const auto ReceiveImpl = [&](AVFrame* frame) { +- if (const int ret = avcodec_receive_frame(m_codec_context, frame); ret < 0) { +- LOG_ERROR(HW_GPU, "avcodec_receive_frame error: {}", AVError(ret)); +- return false; +- } + +- return true; +- }; +- +- if (m_codec_context->hw_device_ctx) { +- // If we have a hardware context, make a separate frame here to receive the +- // hardware result before sending it to the output. +- Frame intermediate_frame; +- +- if (!ReceiveImpl(intermediate_frame.GetFrame())) { +- return {}; +- } +- +- m_temp_frame->SetFormat(PreferredGpuFormat); +- if (const int ret = av_hwframe_transfer_data(m_temp_frame->GetFrame(), +- intermediate_frame.GetFrame(), 0); +- ret < 0) { +- LOG_ERROR(HW_GPU, "av_hwframe_transfer_data error: {}", AVError(ret)); +- return {}; +- } +- } else { +- // Otherwise, decode the frame as normal. +- if (!ReceiveImpl(m_temp_frame->GetFrame())) { +- return {}; +- } ++ m_temp_frame->SetFormat(PreferredGpuFormat); ++ if (const int ret = av_hwframe_transfer_data(m_temp_frame->GetFrame(), ++ intermediate_frame.GetFrame(), 0); ++ ret < 0) { ++ LOG_ERROR(HW_GPU, "av_hwframe_transfer_data error: {}", AVError(ret)); ++ return {}; ++ } ++ } else { ++ if (!ReceiveImpl(m_temp_frame->GetFrame())) { ++ return {}; + } + } + +diff --git a/src/video_core/host1x/ffmpeg/ffmpeg.h b/src/video_core/host1x/ffmpeg/ffmpeg.h +index 98b2508..d15b731 100644 +--- a/src/video_core/host1x/ffmpeg/ffmpeg.h ++++ b/src/video_core/host1x/ffmpeg/ffmpeg.h +@@ -21,9 +21,6 @@ extern "C" { + + #include + #include +-#ifndef ANDROID +-#include +-#endif + + #if defined(__GNUC__) || defined(__clang__) + #pragma GCC diagnostic pop +-- +2.49.0 + diff --git a/archlinuxcn/sudachi/0004-fix-dynarmic6.7.0.patch b/archlinuxcn/sudachi/0004-fix-dynarmic6.7.0.patch new file mode 100644 index 000000000000..0e8b858003b9 --- /dev/null +++ b/archlinuxcn/sudachi/0004-fix-dynarmic6.7.0.patch @@ -0,0 +1,92 @@ +From 7a298e797549a5b5715c841f8ec046d9ce0157d9 Mon Sep 17 00:00:00 2001 +From: sukanka +Date: Sat, 5 Apr 2025 20:51:52 +0800 +Subject: [PATCH 4/7] fix dynarmic6.7.0 + + +8 5 src/core/arm/dynarmic/arm_dynarmic_32.cpp +8 5 src/core/arm/dynarmic/arm_dynarmic_64.cpp + +diff --git a/src/core/arm/dynarmic/arm_dynarmic_32.cpp b/src/core/arm/dynarmic/arm_dynarmic_32.cpp +index 36478f7..bcf539b 100644 +--- a/src/core/arm/dynarmic/arm_dynarmic_32.cpp ++++ b/src/core/arm/dynarmic/arm_dynarmic_32.cpp +@@ -16,8 +16,8 @@ using namespace Common::Literals; + class DynarmicCallbacks32 : public Dynarmic::A32::UserCallbacks { + public: + explicit DynarmicCallbacks32(ArmDynarmic32& parent, Kernel::KProcess* process) +- : m_parent{parent}, m_memory(process->GetMemory()), +- m_process(process), m_debugger_enabled{parent.m_system.DebuggerEnabled()}, ++ : m_parent{parent}, m_memory(process->GetMemory()), m_process(process), ++ m_debugger_enabled{parent.m_system.DebuggerEnabled()}, + m_check_memory_access{m_debugger_enabled || + !Settings::values.cpuopt_ignore_memory_aborts.GetValue()} {} + +@@ -192,9 +192,12 @@ std::shared_ptr ArmDynarmic32::MakeJit(Common::PageTable* pa + config.detect_misaligned_access_via_page_table = 16 | 32 | 64 | 128; + config.only_detect_misalignment_via_page_table_on_page_boundary = true; + +- config.fastmem_pointer = page_table->fastmem_arena; ++ config.fastmem_pointer = ++ (page_table->fastmem_arena != nullptr) ++ ? std::optional{reinterpret_cast(page_table->fastmem_arena)} ++ : std::nullopt; + +- config.fastmem_exclusive_access = config.fastmem_pointer != nullptr; ++ config.fastmem_exclusive_access = config.fastmem_pointer != std::nullopt; + config.recompile_on_exclusive_fastmem_failure = true; + } + +@@ -251,7 +254,7 @@ std::shared_ptr ArmDynarmic32::MakeJit(Common::PageTable* pa + config.only_detect_misalignment_via_page_table_on_page_boundary = false; + } + if (!Settings::values.cpuopt_fastmem) { +- config.fastmem_pointer = nullptr; ++ config.fastmem_pointer = std::nullopt; + config.fastmem_exclusive_access = false; + } + if (!Settings::values.cpuopt_fastmem_exclusives) { +diff --git a/src/core/arm/dynarmic/arm_dynarmic_64.cpp b/src/core/arm/dynarmic/arm_dynarmic_64.cpp +index c811c8a..a9afb82 100644 +--- a/src/core/arm/dynarmic/arm_dynarmic_64.cpp ++++ b/src/core/arm/dynarmic/arm_dynarmic_64.cpp +@@ -16,8 +16,8 @@ using namespace Common::Literals; + class DynarmicCallbacks64 : public Dynarmic::A64::UserCallbacks { + public: + explicit DynarmicCallbacks64(ArmDynarmic64& parent, Kernel::KProcess* process) +- : m_parent{parent}, m_memory(process->GetMemory()), +- m_process(process), m_debugger_enabled{parent.m_system.DebuggerEnabled()}, ++ : m_parent{parent}, m_memory(process->GetMemory()), m_process(process), ++ m_debugger_enabled{parent.m_system.DebuggerEnabled()}, + m_check_memory_access{m_debugger_enabled || + !Settings::values.cpuopt_ignore_memory_aborts.GetValue()} {} + +@@ -239,11 +239,14 @@ std::shared_ptr ArmDynarmic64::MakeJit(Common::PageTable* pa + config.detect_misaligned_access_via_page_table = 16 | 32 | 64 | 128; + config.only_detect_misalignment_via_page_table_on_page_boundary = true; + +- config.fastmem_pointer = page_table->fastmem_arena; ++ config.fastmem_pointer = ++ (page_table->fastmem_arena != nullptr) ++ ? std::optional{reinterpret_cast(page_table->fastmem_arena)} ++ : std::nullopt; + config.fastmem_address_space_bits = address_space_bits; + config.silently_mirror_fastmem = false; + +- config.fastmem_exclusive_access = config.fastmem_pointer != nullptr; ++ config.fastmem_exclusive_access = config.fastmem_pointer != std::nullopt; + config.recompile_on_exclusive_fastmem_failure = true; + } + +@@ -310,7 +313,7 @@ std::shared_ptr ArmDynarmic64::MakeJit(Common::PageTable* pa + config.only_detect_misalignment_via_page_table_on_page_boundary = false; + } + if (!Settings::values.cpuopt_fastmem) { +- config.fastmem_pointer = nullptr; ++ config.fastmem_pointer = std::nullopt; + config.fastmem_exclusive_access = false; + } + if (!Settings::values.cpuopt_fastmem_exclusives) { +-- +2.49.0 + diff --git a/archlinuxcn/sudachi/0005-fix-sdl3.patch b/archlinuxcn/sudachi/0005-fix-sdl3.patch new file mode 100644 index 000000000000..8196813303dd --- /dev/null +++ b/archlinuxcn/sudachi/0005-fix-sdl3.patch @@ -0,0 +1,37 @@ +From a312fac07123c8163af6421121fc3dd1cf2ec75d Mon Sep 17 00:00:00 2001 +From: sukanka +Date: Sat, 5 Apr 2025 21:18:08 +0800 +Subject: [PATCH 5/7] fix sdl3 + + +4 4 src/sudachi_cmd/emu_window/emu_window_sdl3_vk.cpp + +diff --git a/src/sudachi_cmd/emu_window/emu_window_sdl3_vk.cpp b/src/sudachi_cmd/emu_window/emu_window_sdl3_vk.cpp +index ff9cbdf..5657569 100644 +--- a/src/sudachi_cmd/emu_window/emu_window_sdl3_vk.cpp ++++ b/src/sudachi_cmd/emu_window/emu_window_sdl3_vk.cpp +@@ -40,17 +40,17 @@ EmuWindow_SDL3_VK::EmuWindow_SDL3_VK(InputCommon::InputSubsystem* input_subsyste + #elif defined(SDL_PLATFORM_LINUX) + if (SDL_strcmp(SDL_GetCurrentVideoDriver(), "x11") == 0) { + Display* xdisplay = (Display*)SDL_GetPointerProperty( +- SDL_GetWindowProperties(window), SDL_PROP_WINDOW_X11_DISPLAY_POINTER, NULL); +- Window xwindow = (Window)SDL_GetNumberProperty(SDL_GetWindowProperties(window), ++ SDL_GetWindowProperties(render_window), SDL_PROP_WINDOW_X11_DISPLAY_POINTER, NULL); ++ Window xwindow = (Window)SDL_GetNumberProperty(SDL_GetWindowProperties(render_window), + SDL_PROP_WINDOW_X11_WINDOW_NUMBER, 0); + window_info.type = Core::Frontend::WindowSystemType::X11; + window_info.display_connection = xdisplay; + window_info.render_surface = reinterpret_cast(xwindow); + } else if (SDL_strcmp(SDL_GetCurrentVideoDriver(), "wayland") == 0) { + struct wl_display* display = (struct wl_display*)SDL_GetPointerProperty( +- SDL_GetWindowProperties(window), SDL_PROP_WINDOW_WAYLAND_DISPLAY_POINTER, NULL); ++ SDL_GetWindowProperties(render_window), SDL_PROP_WINDOW_WAYLAND_DISPLAY_POINTER, NULL); + struct wl_surface* surface = (struct wl_surface*)SDL_GetPointerProperty( +- SDL_GetWindowProperties(window), SDL_PROP_WINDOW_WAYLAND_SURFACE_POINTER, NULL); ++ SDL_GetWindowProperties(render_window), SDL_PROP_WINDOW_WAYLAND_SURFACE_POINTER, NULL); + window_info.type = Core::Frontend::WindowSystemType::Wayland; + window_info.display_connection = display; + window_info.render_surface = reinterpret_cast(surface); +-- +2.49.0 + diff --git a/archlinuxcn/sudachi/0006-fix-for-mbedtls2.patch b/archlinuxcn/sudachi/0006-fix-for-mbedtls2.patch new file mode 100644 index 000000000000..9802221da012 --- /dev/null +++ b/archlinuxcn/sudachi/0006-fix-for-mbedtls2.patch @@ -0,0 +1,80 @@ +From 3b417405c2300086c38c57a468b8fb9f2166ab20 Mon Sep 17 00:00:00 2001 +From: sukanka +Date: Sat, 5 Apr 2025 22:59:21 +0800 +Subject: [PATCH 6/7] fix for mbedtls2 + + +2 8 externals/CMakeLists.txt +2 2 src/CMakeLists.txt +1 1 src/sudachi/CMakeLists.txt +1 1 src/sudachi_cmd/CMakeLists.txt + +diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt +index 00615d7..7bf34ba 100644 +--- a/externals/CMakeLists.txt ++++ b/externals/CMakeLists.txt +@@ -40,13 +40,8 @@ endif() + add_subdirectory(glad) + + # mbedtls +-add_subdirectory(mbedtls) +-target_include_directories(mbedtls PUBLIC ./mbedtls/include) +-if (NOT MSVC) +- target_compile_options(mbedcrypto PRIVATE +- -Wno-unused-but-set-variable +- -Wno-string-concatenation) +-endif() ++set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/lib/mbedtls2/pkgconfig") ++pkg_check_modules(MbedTLS REQUIRED IMPORTED_TARGET GLOBAL mbedtls mbedcrypto) + + # MicroProfile + add_library(microprofile INTERFACE) +@@ -322,4 +317,3 @@ if (ARCHITECTURE_arm64 AND NOT TARGET sse2neon) + add_library(sse2neon INTERFACE) + target_include_directories(sse2neon INTERFACE sse2neon) + endif() +- +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index a0eec56..aba1704 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -2,8 +2,8 @@ + # SPDX-License-Identifier: GPL-2.0-or-later + + # Enable modules to include each other's files +-include_directories(.) +- ++include_directories(. ${MbedTLS_INCLUDE_DIRS}) ++link_directories(${MbedTLS_LIBRARY_DIRS}) + # CMake seems to only define _DEBUG on Windows + set_property(DIRECTORY APPEND PROPERTY + COMPILE_DEFINITIONS $<$:_DEBUG> $<$>:NDEBUG>) +diff --git a/src/sudachi/CMakeLists.txt b/src/sudachi/CMakeLists.txt +index f0a1cdf..dd19f11 100644 +--- a/src/sudachi/CMakeLists.txt ++++ b/src/sudachi/CMakeLists.txt +@@ -384,7 +384,7 @@ endif() + target_link_libraries(sudachi PRIVATE common core input_common frontend_common network video_core) + target_link_libraries(sudachi PRIVATE Boost::headers glad Qt${QT_MAJOR_VERSION}::Widgets) + target_link_libraries(sudachi PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads) +- ++target_link_libraries(sudachi PRIVATE mbedtls mbedcrypto) + target_link_libraries(sudachi PRIVATE Vulkan::Headers) + if (NOT WIN32) + target_include_directories(sudachi PRIVATE ${Qt${QT_MAJOR_VERSION}Gui_PRIVATE_INCLUDE_DIRS}) +diff --git a/src/sudachi_cmd/CMakeLists.txt b/src/sudachi_cmd/CMakeLists.txt +index c5a7ce5..5f9fc57 100644 +--- a/src/sudachi_cmd/CMakeLists.txt ++++ b/src/sudachi_cmd/CMakeLists.txt +@@ -29,7 +29,7 @@ add_executable(sudachi-cmd + ) + + target_link_libraries(sudachi-cmd PRIVATE common core input_common frontend_common) +-target_link_libraries(sudachi-cmd PRIVATE glad) ++target_link_libraries(sudachi-cmd PRIVATE glad mbedtls mbedcrypto) + if (MSVC) + target_link_libraries(sudachi-cmd PRIVATE getopt) + endif() +-- +2.49.0 + diff --git a/archlinuxcn/sudachi/0007-add-general-optimize.patch b/archlinuxcn/sudachi/0007-add-general-optimize.patch new file mode 100644 index 000000000000..e7d2488ab6ed --- /dev/null +++ b/archlinuxcn/sudachi/0007-add-general-optimize.patch @@ -0,0 +1,52 @@ +From f7a16f69fe295f6d849cf029ed1485dd63899967 Mon Sep 17 00:00:00 2001 +From: sukanka +Date: Sat, 5 Apr 2025 23:32:58 +0800 +Subject: [PATCH 7/7] add general optimize + +inherit from yuzu-early-access + +0 2 CMakeLists.txt +1 1 src/sudachi/aboutdialog.ui +1 0 src/video_core/CMakeLists.txt + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f6d072f..7f95c5d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -274,8 +274,6 @@ endif() + # Configure C++ standard + # =========================== + +-# boost asio's concept usage doesn't play nicely with some compilers yet. +-add_definitions(-DBOOST_ASIO_DISABLE_CONCEPTS) + if (MSVC) + set(CMAKE_CXX_STANDARD 23) + # add_compile_options($<$:/std:c++23>) +diff --git a/src/sudachi/aboutdialog.ui b/src/sudachi/aboutdialog.ui +index a66e03e..7ffb1d7 100644 +--- a/src/sudachi/aboutdialog.ui ++++ b/src/sudachi/aboutdialog.ui +@@ -82,7 +82,7 @@ + + + +- <html><head/><body><p>%1 (%2)</p></body></html> ++ <html><head/><body><p>%1</p></body></html> + + + +diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt +index 4267993..623211f 100644 +--- a/src/video_core/CMakeLists.txt ++++ b/src/video_core/CMakeLists.txt +@@ -357,6 +357,7 @@ else() + + target_compile_options(video_core PRIVATE + -Wno-sign-conversion ++ -msse4.1 + ) + + # xbyak +-- +2.49.0 + diff --git a/archlinuxcn/sudachi/0008-fix-for-boost-1.88.0.patch b/archlinuxcn/sudachi/0008-fix-for-boost-1.88.0.patch new file mode 100644 index 000000000000..addcae0819c4 --- /dev/null +++ b/archlinuxcn/sudachi/0008-fix-for-boost-1.88.0.patch @@ -0,0 +1,33 @@ +From f946353a1899eb0e56a2b5f3dac45b412716854c Mon Sep 17 00:00:00 2001 +From: sukanka +Date: Sat, 3 May 2025 17:03:55 +0800 +Subject: [PATCH] fix for boost 1.88.0 + + +2 2 src/core/debugger/debugger.cpp + +diff --git a/src/core/debugger/debugger.cpp b/src/core/debugger/debugger.cpp +index e86aae8..af3f71c 100644 +--- a/src/core/debugger/debugger.cpp ++++ b/src/core/debugger/debugger.cpp +@@ -6,7 +6,7 @@ + #include + + #include +-#include ++#include + + #include "common/logging/log.h" + #include "common/polyfill_thread.h" +@@ -326,7 +326,7 @@ private: + + struct ConnectionState { + boost::asio::ip::tcp::socket client_socket; +- boost::process::async_pipe signal_pipe; ++ boost::process::v1::async_pipe signal_pipe; + + SignalInfo info; + Kernel::KScopedAutoObject active_thread; +-- +2.49.0 + diff --git a/archlinuxcn/sudachi/PKGBUILD b/archlinuxcn/sudachi/PKGBUILD new file mode 100644 index 000000000000..361c85b1c47c --- /dev/null +++ b/archlinuxcn/sudachi/PKGBUILD @@ -0,0 +1,136 @@ +# Maintainer: Sébastien TERRIER +pkgname=sudachi +_xbyak_tag=7.22 +_pkgname=${pkgname} +pkgver=1.0.15 +pkgrel=2 +pkgdesc="Nintendo Switch emulator forked from yuzu." +arch=(x86_64) +url=https://sudachi.emuplace.app +license=(GPL-3.0-or-later) +depends=('boost-libs' 'hicolor-icon-theme' 'sdl3' 'qt6-base' 'qt6-webengine' 'fmt' 'opus' 'lz4' + 'openssl' 'zstd' 'cubeb' 'enet' 'discord-rpc' 'cpp-httplib' 'dynarmic' 'mbedtls2' 'ffmpeg' +) +makedepends=('llvm' 'git' 'glslang' 'cmake' 'ninja' 'perl' 'clang' 'patch' 'unzip' 'dos2unix' + 'qt6-tools' 'qt6-multimedia' 'libxkbcommon-x11' 'libzip' 'libfdk-aac' 'libinih' + 'vulkan-memory-allocator' 'vulkan-utility-libraries' 'vulkan-headers' 'spirv-headers' + 'boost' 'nlohmann-json' 'robin-map' 'cpp-jwt' 'gamemode' 'python' 'renderdoc' + + # 'xbyak' + # with xbyak we get the runtime err: + # terminate called after throwing an instance of 'Xbyak::Error' what(): bad size of register + + # for documentation + # 'doxygen' 'python-jinja' 'python-jsonschema' 'graphviz' + + # for testing + # 'catch2' + +) +optdepends=('qt6-wayland: for Wayland support') + +source=(${pkgname}-${pkgver}.zip::https://github.com/emuplace/sudachi.emuplace.app/releases/download/v${pkgver}/latest.zip + git+https://github.com/yuzu-mirror/sirit.git#commit=ab75463 + git+https://github.com/herumi/xbyak.git#tag=v${_xbyak_tag:-7.22} + # xbyak first bad commit: 54173384271 + git+https://github.com/brofield/simpleini.git#commit=6048871ea9 + "https://github.com/lat9nq/tzdb_to_nx/releases/download/221202/221202.zip" + 0001-fix-build-error-in-CMakeList.patch + 0002-fix-fmt11-and-memory-errors.patch + 0003-fix-for-ffmpeg7.patch + 0004-fix-dynarmic6.7.0.patch + 0005-fix-sdl3.patch + 0006-fix-for-mbedtls2.patch + 0007-add-general-optimize.patch + 0008-fix-for-boost-1.88.0.patch +) + +noextract=(${pkgname}-${pkgver}.zip + '221202.zip' +) +b2sums=('deacfbf286580efea76745c973b497eaa83a27b8157cb3af978e8911ad94f2d428c98c1160fd56d99762670a6fd8a618f562c49c6b69661c6ff7cce5a912feda' + '91e4cd03d67c930b6d751ca19cf6fbaaba86084412bd13b172186387ea27b461457a3e19bc0af315c807839e64f91c865298678af748e2d6e07df2abc85430ed' + '0541b74044b53c58f3427cc24a19bb04ae688f56d9467ab83bed9cf464418a4b055867f95832315aa1e77fea008401b638b100606bbf2ad2ef795875038b0bbe' + 'fae42bb13f180ab991f6bfc8a45ea3df08ced1d77db77f54cf5a222f93ea468bd6fc0d36d65f9f3739e9813d77dbae31931948dc9afa28e884c53b8128c13c94' + '7bd0ff5ca80cf560344ae7edbfeb7c9466c096dc499a7348276cff5d30aa07464f7e2ea391ca9cedac0e21ba6f563169a8b38f2df729a230a0acfb1125ea1b66' + '3b2bd56f134e8567cc9acddaac96aa127dbc5c237e34c6f793ab3174ec5740911cfdd3e68348fff5297209efeadedd6bc3832005481e3d27d7c6e55602089529' + '65eff7488dc27f2b6e5b82567f8dc85b103cae644d6115df308c35316311c64eb9acc6e379b6951a3b8259abc1eeb3a201d959278ed5d04928ab0e533b1502f0' + '07a4561a39dcd71bba76b51085a225b985a1c9112d8bca75fc7057d1aca0796946110f8b492ce1914bf9a13ccaff1e2682ddf735ac2c4df266d2f6ec5cbd02d0' + '70fad80522592912d1825d997ace61ea4203ea3189e7b2f05f782c62f3361ce9fefcf9767150acd69912a92b8b7312bbeef811ac4183eea3cbf0d8417124e189' + '5756d3877a1d437a12a4f8f50a6f11d9b3bbcfeaa1ddda2c8c432a83affd0d0a3e470e7c4d5df5bc8059ed78cbaa944f61a7d990bc04350da57c7bcb29b569d0' + 'e91258b8d8b2e10fde9fb2dcf9c0120f1f505192521c17081d50c626f6cd10ed5b9d7b5beec63b201c7b83c23f7f4f2032e4422b271fb47a33fdde9ebc013cc7' + '962aa39ef90a8cd8ee3c8823e77501d3ff5856e6ddc8278a39ce362a1fe3e13c483d781aaeeeadbf115f200bd8d3d3e6eb2ea156c5ed2cdf8e300cb4cbe55a10' + '946fcb9ff52a8e1ffbfd5665e23860678a9d56d83cdbe651b00f8e631dce525ef697a2e41020fe55b99e0f81d6c72205f6b8f396db48fe6db2c78b15fea5ffb5') + +prepare() { + install -d $srcdir/${pkgname} + unzip -q $srcdir/${pkgname}-${pkgver}.zip -d $srcdir/${pkgname} + local submods=( + sirit + simpleini + xbyak + ) + + for pro in ${submods[@]}; do + if [ -d $srcdir/$_pkgname/externals/${pro} ]; then + cp -rf ${srcdir}/${pro}/* $srcdir/$_pkgname/externals/${pro} + else + cp -rf ${srcdir}/${pro} $srcdir/$_pkgname/externals/${pro} + fi + done + + cd $srcdir/${pkgname}/ + # change line endings + find . -type f -print0 | xargs -0 -I{} dos2unix -k -q {} + + for p in $srcdir/*.patch; do + patch -p1 -l <$p + done + + sed -i externals/nx_tzdb/CMakeLists.txt \ + -e "s|https://github.com/lat9nq/tzdb_to_nx/releases/download/\${NX_TZDB_VERSION}|file://${srcdir}|g" +} +build() { + export CC=clang + export CXX=clang++ + + local cmake_args=( + -GNinja + -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON + -DTITLE_BAR_FORMAT_IDLE="$pkgname $pkgver" + -DTITLE_BAR_FORMAT_RUNNING="$pkgname $pkgver | {3}" + -DCMAKE_INSTALL_PREFIX=/usr + -DCMAKE_BUILD_TYPE=Release + -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=OFF + -DSUDACHI_USE_QT_WEB_ENGINE=ON + -DUSE_DISCORD_PRESENCE=ON + -DENABLE_QT_TRANSLATION=ON + -DSUDACHI_USE_BUNDLED_FFMPEG=OFF + -DSUDACHI_USE_BUNDLED_QT=OFF + -DENABLE_SDL3=ON + -DSUDACHI_USE_BUNDLED_SDL3=OFF + -DUSE_SDL3_FROM_EXTERNALS=OFF + -DSUDACHI_CHECK_SUBMODULES=OFF + -DSUDACHI_USE_EXTERNAL_VULKAN_HEADERS=OFF + -DSUDACHI_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES=OFF + -DSUDACHI_USE_FASTER_LD=OFF + -DSUDACHI_USE_PRECOMPILED_HEADERS=OFF + -DSUDACHI_USE_QT_MULTIMEDIA=ON + # download timezone data from our zip file. + -DSUDACHI_DOWNLOAD_TIME_ZONE_DATA=ON + -DSUDACHI_TESTS=OFF + -DSIRIT_USE_SYSTEM_SPIRV_HEADERS=ON + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + -DENABLE_QT6=ON + ) + install -d build + cmake -S ${pkgname} -B build "${cmake_args[@]}" + ninja -C build + +} + +package() { + install -Dm644 $srcdir/${pkgname}/dist/72-${pkgname,,}-input.rules -t ${pkgdir}/usr/lib/udev/rules.d/ + DESTDIR="$pkgdir/" ninja -C $srcdir/build install + +} diff --git a/archlinuxcn/sudachi/lilac.yaml b/archlinuxcn/sudachi/lilac.yaml new file mode 100644 index 000000000000..55a878e314e9 --- /dev/null +++ b/archlinuxcn/sudachi/lilac.yaml @@ -0,0 +1,33 @@ +# This file is auto-generated by n2y + +maintainers: + - github: sukanka + email: su975853527@gmail.com + +build_prefix: extra-x86_64 + +pre_build_script: | + update_pkgver_and_pkgrel(_G.newver) + +post_build: git_pkgbuild_commit + +repo_depends: + - discord-rpc-git + - cubeb-git + - cpp-httplib + - cpp-jwt + - vulkan-memory-allocator-git + - xbyak + - dynarmic + +update_on: + - source: alpm + alpm: fmt + repo: extra + - source: alpm + alpm: openssl + - alias: boost + - source: github + github: emuplace/sudachi.emuplace.app + use_latest_release: true + prefix: v