commit: 24a9775992c13ed46bfc53573514474126f8a32f Author: Pavel Sobolev <contact <AT> paveloom <DOT> dev> AuthorDate: Sat Jul 12 10:32:38 2025 +0000 Commit: Pavel Sobolev <contact <AT> paveloom <DOT> dev> CommitDate: Sat Jul 19 18:14:39 2025 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=24a97759
games-emulation/azahar: new package, add 2122.1 Signed-off-by: Pavel Sobolev <contact <AT> paveloom.dev> games-emulation/azahar/Manifest | 1 + games-emulation/azahar/azahar-2122.1.ebuild | 128 +++++++++++++++++++++ ...-2122.1-don-t-search-for-the-zstd-package.patch | 21 ++++ ...licitly-require-the-tsl-robin-map-package.patch | 16 +++ ...122.1-import-some-of-the-symbols-from-spv.patch | 18 +++ ...ink-to-Catch2-only-when-tests-are-enabled.patch | 23 ++++ ...PT_TYPE_CHANNEL_LAYOUT-to-AV_OPT_TYPE_CHL.patch | 38 ++++++ ...t-asio-io_service-to-boost-asio-io_contex.patch | 17 +++ ...zahar-2122.1-use-the-system-faad2-library.patch | 27 +++++ ...zahar-2122.1-use-the-system-sirit-library.patch | 16 +++ ...ahar-2122.1-use-the-system-teakra-library.patch | 16 +++ games-emulation/azahar/metadata.xml | 12 ++ 12 files changed, 333 insertions(+) diff --git a/games-emulation/azahar/Manifest b/games-emulation/azahar/Manifest new file mode 100644 index 0000000000..ab1f26e660 --- /dev/null +++ b/games-emulation/azahar/Manifest @@ -0,0 +1 @@ +DIST azahar-2122.1.tar.xz 38057480 BLAKE2B 4a2545a1c4e8e0cf4473dce6b8c211c3c0e720dadbc48a03c9da22f99109d57a5461626fbc719e11277787e831a3e3e075ad4954810c3fd1d6270d62215f1888 SHA512 150455aaf3382f76e52b07ebcbb792bc9526047b488de979e2172de134a7e1a5b0eceb0a240b56821306937b17ea1953e61dd6cf6a3b758a234ca665820b1626 diff --git a/games-emulation/azahar/azahar-2122.1.ebuild b/games-emulation/azahar/azahar-2122.1.ebuild new file mode 100644 index 0000000000..81dd2a91de --- /dev/null +++ b/games-emulation/azahar/azahar-2122.1.ebuild @@ -0,0 +1,128 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake xdg + +DESCRIPTION="An open-source 3DS emulator project based on Citra" +HOMEPAGE="https://azahar-emu.org" +SRC_URI="https://github.com/azahar-emu/azahar/releases/download/${PV}/azahar-unified-source-${PV}.tar.xz -> ${P}.tar.xz" + +S="${WORKDIR}/azahar-unified-source-${PV}" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64" +IUSE="cpu_flags_x86_sse4_2 test" +RESTRICT="!test? ( test )" + +RDEPEND=" + app-arch/zstd + dev-cpp/nlohmann_json + dev-cpp/robin-map + dev-libs/boost:= + dev-libs/crypto++:= + dev-libs/dynarmic + dev-libs/inih + dev-libs/libfmt:= + dev-libs/microprofile + dev-libs/nihstro + dev-libs/openssl:= + dev-libs/sirit + dev-libs/teakra + dev-qt/qtbase:6[concurrent,dbus,widgets] + dev-qt/qtmultimedia:6 + dev-util/glslang + media-libs/cubeb + media-libs/faad2 + media-libs/libsdl2 + media-libs/libsoundtouch:= + media-libs/openal + media-video/ffmpeg + net-libs/enet + virtual/libusb +" +DEPEND=" + ${RDEPEND} + dev-util/vulkan-headers + media-libs/VulkanMemoryAllocator + amd64? ( dev-libs/xbyak ) + arm64? ( dev-libs/oaknut ) +" +BDEPEND=" + test? ( >=dev-cpp/catch-3:0 ) +" + +PATCHES=( + "${FILESDIR}/${PN}-2122.1-don-t-search-for-the-zstd-package.patch" + "${FILESDIR}/${PN}-2122.1-explicitly-require-the-tsl-robin-map-package.patch" + "${FILESDIR}/${PN}-2122.1-import-some-of-the-symbols-from-spv.patch" + "${FILESDIR}/${PN}-2122.1-link-to-Catch2-only-when-tests-are-enabled.patch" + "${FILESDIR}/${PN}-2122.1-rename-AV_OPT_TYPE_CHANNEL_LAYOUT-to-AV_OPT_TYPE_CHL.patch" + "${FILESDIR}/${PN}-2122.1-rename-boost-asio-io_service-to-boost-asio-io_contex.patch" + "${FILESDIR}/${PN}-2122.1-use-the-system-faad2-library.patch" + "${FILESDIR}/${PN}-2122.1-use-the-system-sirit-library.patch" + "${FILESDIR}/${PN}-2122.1-use-the-system-teakra-library.patch" +) + +# [directory]=license +declare -A KEEP_BUNDLED=( + # Generated or copied files for internal usage + [cmake-modules]=Boost-1.0 + [dds-ktx]=BSD-2 + [gamemode]=BSD + [glad]=MIT + [open_source_archives]=GPL-2+ + + # Reasons to keep are in `src_configure` + [httplib]=MIT + [lodepng]=ZLIB +) + +add_bundled_licenses() { + for license in "${KEEP_BUNDLED[@]}"; do + if [[ -n "$license" ]]; then + LICENSE+=" ${license}" + fi + done +} +add_bundled_licenses + +src_prepare() { + local s remove=() + for s in externals/*; do + [[ -f ${s} ]] && continue + if ! has "${s#externals/}" "${!KEEP_BUNDLED[@]}"; then + remove+=( "${s}" ) + fi + done + + einfo "removing sources: ${remove[*]}" + rm -r "${remove[@]}" || die + + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DBUILD_SHARED_LIBS=no + -DCITRA_USE_PRECOMPILED_HEADERS=no + -DCITRA_WARNINGS_AS_ERRORS=no + -DENABLE_WEB_SERVICE=no + -DUSE_SYSTEM_LIBS=yes + + -DENABLE_SSE42=$(usex cpu_flags_x86_sse4_2) + -DENABLE_TESTS=$(usex test) + + # Shared library is not supported + -DDISABLE_SYSTEM_CPP_HTTPLIB=yes + + # Lodepng is designed to be bundled + -DDISABLE_SYSTEM_LODEPNG=yes + + -Wno-dev + ) + + cmake_src_configure +} diff --git a/games-emulation/azahar/files/azahar-2122.1-don-t-search-for-the-zstd-package.patch b/games-emulation/azahar/files/azahar-2122.1-don-t-search-for-the-zstd-package.patch new file mode 100644 index 0000000000..14ad1c92be --- /dev/null +++ b/games-emulation/azahar/files/azahar-2122.1-don-t-search-for-the-zstd-package.patch @@ -0,0 +1,21 @@ +From: Pavel Sobolev <[email protected]> +Subject: [PATCH] Don't search for the `zstd` package. + +Signed-off-by: Pavel Sobolev <[email protected]> + +--- a/externals/CMakeLists.txt ++++ b/externals/CMakeLists.txt +@@ -205,12 +205,7 @@ endif() + + # Zstandard + if(USE_SYSTEM_ZSTD) +- find_package(zstd REQUIRED) +- add_library(zstd INTERFACE) +- if(TARGET zstd::libzstd_shared) +- message(STATUS "Found system Zstandard") +- endif() +- target_link_libraries(zstd INTERFACE zstd::libzstd_shared) ++ add_library(zstd SHARED IMPORTED) + else() + set(ZSTD_LEGACY_SUPPORT OFF) + set(ZSTD_BUILD_PROGRAMS OFF) diff --git a/games-emulation/azahar/files/azahar-2122.1-explicitly-require-the-tsl-robin-map-package.patch b/games-emulation/azahar/files/azahar-2122.1-explicitly-require-the-tsl-robin-map-package.patch new file mode 100644 index 0000000000..2c09fad66d --- /dev/null +++ b/games-emulation/azahar/files/azahar-2122.1-explicitly-require-the-tsl-robin-map-package.patch @@ -0,0 +1,16 @@ +From: Pavel Sobolev <[email protected]> +Subject: [PATCH] Explicitly require the `tsl-robin-map` package. + +Signed-off-by: Pavel Sobolev <[email protected]> + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -327,7 +327,7 @@ if (ENABLE_QT) + endif() + + # Use system tsl::robin_map if available (otherwise we fallback to version bundled with dynarmic) +-find_package(tsl-robin-map QUIET) ++find_package(tsl-robin-map REQUIRED) + + # Platform-specific library requirements + # ====================================== diff --git a/games-emulation/azahar/files/azahar-2122.1-import-some-of-the-symbols-from-spv.patch b/games-emulation/azahar/files/azahar-2122.1-import-some-of-the-symbols-from-spv.patch new file mode 100644 index 0000000000..aa3b7c1ebd --- /dev/null +++ b/games-emulation/azahar/files/azahar-2122.1-import-some-of-the-symbols-from-spv.patch @@ -0,0 +1,18 @@ +From: Pavel Sobolev <[email protected]> +Subject: [PATCH] Import some of the symbols from `spv`. + +Signed-off-by: Pavel Sobolev <[email protected]> + +--- a/src/video_core/shader/generator/spv_fs_shader_gen.cpp ++++ b/src/video_core/shader/generator/spv_fs_shader_gen.cpp +@@ -8,6 +8,10 @@ + + namespace Pica::Shader::Generator::SPIRV { + ++using spv::Op::OpDot; ++using spv::Op::OpVectorShuffle; ++using spv::Op::OpVectorTimesScalar; ++ + using Pica::FramebufferRegs; + using Pica::LightingRegs; + using Pica::RasterizerRegs; diff --git a/games-emulation/azahar/files/azahar-2122.1-link-to-Catch2-only-when-tests-are-enabled.patch b/games-emulation/azahar/files/azahar-2122.1-link-to-Catch2-only-when-tests-are-enabled.patch new file mode 100644 index 0000000000..091f19e53d --- /dev/null +++ b/games-emulation/azahar/files/azahar-2122.1-link-to-Catch2-only-when-tests-are-enabled.patch @@ -0,0 +1,23 @@ +From: Pavel Sobolev <[email protected]> +Subject: [PATCH] Link to Catch2 only when tests are enabled. + +Signed-off-by: Pavel Sobolev <[email protected]> + +--- a/externals/CMakeLists.txt ++++ b/externals/CMakeLists.txt +@@ -41,6 +41,7 @@ else() + endif() + + # Catch2 ++if (ENABLE_TESTS) + add_library(catch2 INTERFACE) + if(USE_SYSTEM_CATCH2) + find_package(Catch2 3.0.0 REQUIRED) +@@ -50,6 +51,7 @@ else() + add_subdirectory(catch2) + endif() + target_link_libraries(catch2 INTERFACE Catch2::Catch2WithMain) ++endif() + + # Crypto++ + if(USE_SYSTEM_CRYPTOPP) diff --git a/games-emulation/azahar/files/azahar-2122.1-rename-AV_OPT_TYPE_CHANNEL_LAYOUT-to-AV_OPT_TYPE_CHL.patch b/games-emulation/azahar/files/azahar-2122.1-rename-AV_OPT_TYPE_CHANNEL_LAYOUT-to-AV_OPT_TYPE_CHL.patch new file mode 100644 index 0000000000..d11ce7f29a --- /dev/null +++ b/games-emulation/azahar/files/azahar-2122.1-rename-AV_OPT_TYPE_CHANNEL_LAYOUT-to-AV_OPT_TYPE_CHL.patch @@ -0,0 +1,38 @@ +From: Pavel Sobolev <[email protected]> +Subject: [PATCH] Rename `AV_OPT_TYPE_CHANNEL_LAYOUT` to `AV_OPT_TYPE_CHLAYOUT`. + +This makes it compile with FFmpeg 7. + +Signed-off-by: Pavel Sobolev <[email protected]> + +--- a/src/citra_qt/dumping/option_set_dialog.cpp ++++ b/src/citra_qt/dumping/option_set_dialog.cpp +@@ -27,7 +27,7 @@ static const std::unordered_map<AVOptionType, const char*> TypeNameMap{{ + {AV_OPT_TYPE_STRING, QT_TR_NOOP("string")}, + {AV_OPT_TYPE_DICT, QT_TR_NOOP("dictionary")}, + {AV_OPT_TYPE_VIDEO_RATE, QT_TR_NOOP("video rate")}, +- {AV_OPT_TYPE_CHANNEL_LAYOUT, QT_TR_NOOP("channel layout")}, ++ {AV_OPT_TYPE_CHLAYOUT, QT_TR_NOOP("channel layout")}, + }}; + + static const std::unordered_map<AVOptionType, const char*> TypeDescriptionMap{{ +@@ -39,7 +39,7 @@ static const std::unordered_map<AVOptionType, const char*> TypeDescriptionMap{{ + {AV_OPT_TYPE_DICT, + QT_TR_NOOP("Comma-splitted list of <key>=<value>. Do not put spaces.")}, + {AV_OPT_TYPE_VIDEO_RATE, QT_TR_NOOP("<num>/<den>, or preset values like 'pal'.")}, +- {AV_OPT_TYPE_CHANNEL_LAYOUT, QT_TR_NOOP("Hexadecimal channel layout mask starting with '0x'.")}, ++ {AV_OPT_TYPE_CHLAYOUT, QT_TR_NOOP("Hexadecimal channel layout mask starting with '0x'.")}, + }}; + + /// Get the preset values of an option. returns {display value, real value} +--- a/src/core/dumping/ffmpeg_backend.cpp ++++ b/src/core/dumping/ffmpeg_backend.cpp +@@ -956,7 +956,7 @@ std::string FormatDefaultValue(const AVOption* option, + case AV_OPT_TYPE_VIDEO_RATE: { + return ToStdString(option->default_val.str); + } +- case AV_OPT_TYPE_CHANNEL_LAYOUT: { ++ case AV_OPT_TYPE_CHLAYOUT: { + return fmt::format("{:#x}", option->default_val.i64); + } + default: diff --git a/games-emulation/azahar/files/azahar-2122.1-rename-boost-asio-io_service-to-boost-asio-io_contex.patch b/games-emulation/azahar/files/azahar-2122.1-rename-boost-asio-io_service-to-boost-asio-io_contex.patch new file mode 100644 index 0000000000..bb3f6dc603 --- /dev/null +++ b/games-emulation/azahar/files/azahar-2122.1-rename-boost-asio-io_service-to-boost-asio-io_contex.patch @@ -0,0 +1,17 @@ +From: Pavel Sobolev <[email protected]> +Subject: [PATCH] Rename `boost::asio::io_service` to `boost::asio::io_context`. + +This makes it compile with newer versions of Boost. + +Signed-off-by: Pavel Sobolev <[email protected]> + +--- a/src/input_common/udp/client.cpp ++++ b/src/input_common/udp/client.cpp +@@ -108,7 +108,7 @@ private: + } + + SocketCallback callback; +- boost::asio::io_service io_service; ++ boost::asio::io_context io_service; + boost::asio::basic_waitable_timer<clock> timer; + udp::socket socket; diff --git a/games-emulation/azahar/files/azahar-2122.1-use-the-system-faad2-library.patch b/games-emulation/azahar/files/azahar-2122.1-use-the-system-faad2-library.patch new file mode 100644 index 0000000000..c02cfecab4 --- /dev/null +++ b/games-emulation/azahar/files/azahar-2122.1-use-the-system-faad2-library.patch @@ -0,0 +1,27 @@ +From: Pavel Sobolev <[email protected]> +Subject: [PATCH] Use the system `faad2` library. + +Signed-off-by: Pavel Sobolev <[email protected]> + +--- a/externals/CMakeLists.txt ++++ b/externals/CMakeLists.txt +@@ -158,7 +158,7 @@ endif() + add_subdirectory(open_source_archives) + + # faad2 +-add_subdirectory(faad2 EXCLUDE_FROM_ALL) ++add_library(faad2 INTERFACE) + + # Dynamic library headers + add_library(library-headers INTERFACE) +--- a/src/audio_core/CMakeLists.txt ++++ b/src/audio_core/CMakeLists.txt +@@ -44,7 +44,7 @@ add_library(audio_core STATIC + create_target_directory_groups(audio_core) + + target_link_libraries(audio_core PUBLIC citra_common citra_core) +-target_link_libraries(audio_core PRIVATE faad2 SoundTouch teakra) ++target_link_libraries(audio_core PRIVATE faad SoundTouch teakra) + + if(ENABLE_SDL2) + target_link_libraries(audio_core PRIVATE SDL2::SDL2) diff --git a/games-emulation/azahar/files/azahar-2122.1-use-the-system-sirit-library.patch b/games-emulation/azahar/files/azahar-2122.1-use-the-system-sirit-library.patch new file mode 100644 index 0000000000..19e666aed1 --- /dev/null +++ b/games-emulation/azahar/files/azahar-2122.1-use-the-system-sirit-library.patch @@ -0,0 +1,16 @@ +From: Pavel Sobolev <[email protected]> +Subject: [PATCH] Use the system `sirit` library. + +Signed-off-by: Pavel Sobolev <[email protected]> + +--- a/externals/CMakeLists.txt ++++ b/externals/CMakeLists.txt +@@ -401,7 +401,7 @@ if (ENABLE_VULKAN) + endif() + + # sirit +- add_subdirectory(sirit EXCLUDE_FROM_ALL) ++ add_library(sirit SHARED IMPORTED) + + # VMA + if(USE_SYSTEM_VMA) diff --git a/games-emulation/azahar/files/azahar-2122.1-use-the-system-teakra-library.patch b/games-emulation/azahar/files/azahar-2122.1-use-the-system-teakra-library.patch new file mode 100644 index 0000000000..645ff85397 --- /dev/null +++ b/games-emulation/azahar/files/azahar-2122.1-use-the-system-teakra-library.patch @@ -0,0 +1,16 @@ +From: Pavel Sobolev <[email protected]> +Subject: [PATCH] Use the system `teakra` library. + +Signed-off-by: Pavel Sobolev <[email protected]> + +--- a/externals/CMakeLists.txt ++++ b/externals/CMakeLists.txt +@@ -185,7 +185,7 @@ endif() + + # Teakra + set(BUILD_TESTING OFF CACHE BOOL "") +-add_subdirectory(teakra EXCLUDE_FROM_ALL) ++add_library(teakra SHARED IMPORTED) + + # SDL2 + if (ENABLE_SDL2 AND NOT USE_SYSTEM_SDL2) diff --git a/games-emulation/azahar/metadata.xml b/games-emulation/azahar/metadata.xml new file mode 100644 index 0000000000..e6240deeca --- /dev/null +++ b/games-emulation/azahar/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>[email protected]</email> + <name>Pavel Sobolev</name> + </maintainer> + <upstream> + <bugs-to>https://github.com/azahar-emu/azahar/issues</bugs-to> + <remote-id type="github">azahar-emu/azahar</remote-id> + </upstream> +</pkgmetadata>
