commit: 96a8facc344757b14abc4bccbdba5b8307e8302e Author: Pavel Sobolev <contact <AT> paveloom <DOT> dev> AuthorDate: Sun Jun 8 12:02:00 2025 +0000 Commit: Viorel Munteanu <ceamac <AT> gentoo <DOT> org> CommitDate: Sun Jun 8 14:03:31 2025 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=96a8facc
games-emulation/libretro-dolphin: new package, add 0.0.1_pre20250517 Signed-off-by: Pavel Sobolev <contact <AT> paveloom.dev> games-emulation/libretro-dolphin/Manifest | 1 + ...tro-dolphin-0.0.1_pre20250517-fix-for-fmt.patch | 18 +++ .../libretro-dolphin-0.0.1_pre20250517.ebuild | 148 +++++++++++++++++++++ games-emulation/libretro-dolphin/metadata.xml | 16 +++ 4 files changed, 183 insertions(+) diff --git a/games-emulation/libretro-dolphin/Manifest b/games-emulation/libretro-dolphin/Manifest new file mode 100644 index 0000000000..d3e381f017 --- /dev/null +++ b/games-emulation/libretro-dolphin/Manifest @@ -0,0 +1 @@ +DIST libretro-dolphin-0.0.1_pre20250517.tar.gz 41706321 BLAKE2B 6659875008484ef9427e16b944ccb1cbb17051ff59da8c4a50c5d32716b386539e6d4d87cad77dfaae8e3476bccd2c601be2d3a6a2cd0a19370d716252fc523e SHA512 0ddd7c799f97b753275742f5c539e1f353a4b63ddccda3dbd2d5384dd54004f7bc194fc76edfcdda41b7108a2c3fd16c853338d41ab7eda437a2d92beb68a58f diff --git a/games-emulation/libretro-dolphin/files/libretro-dolphin-0.0.1_pre20250517-fix-for-fmt.patch b/games-emulation/libretro-dolphin/files/libretro-dolphin-0.0.1_pre20250517-fix-for-fmt.patch new file mode 100644 index 0000000000..e985cc62ae --- /dev/null +++ b/games-emulation/libretro-dolphin/files/libretro-dolphin-0.0.1_pre20250517-fix-for-fmt.patch @@ -0,0 +1,18 @@ +From: Pavel Sobolev <[email protected]> +Subject: [PATCH] Print `IOS::HLE::SeekMode` as an int. + +This avoids compilation errors with `>=libfmt-10.0`. + +Signed-off-by: Pavel Sobolev <[email protected]> + +--- a/Source/Core/Core/IOS/FS/FileSystemProxy.cpp ++++ b/Source/Core/Core/IOS/FS/FileSystemProxy.cpp +@@ -272,7 +272,7 @@ IPCCommandResult FS::Seek(const SeekRequest& request) + + const Result<u32> result = + m_ios.GetFS()->SeekFile(handle.fs_fd, request.offset, IOS::HLE::FS::SeekMode(request.mode)); +- LogResult(result, "Seek({}, 0x{:08x}, {})", handle.name.data(), request.offset, request.mode); ++ LogResult(result, "Seek({}, 0x{:08x}, {})", handle.name.data(), request.offset, static_cast<int>(request.mode)); + if (!result) + return GetFSReply(ConvertResult(result.Error())); + return GetFSReply(*result); diff --git a/games-emulation/libretro-dolphin/libretro-dolphin-0.0.1_pre20250517.ebuild b/games-emulation/libretro-dolphin/libretro-dolphin-0.0.1_pre20250517.ebuild new file mode 100644 index 0000000000..b85edcc523 --- /dev/null +++ b/games-emulation/libretro-dolphin/libretro-dolphin-0.0.1_pre20250517.ebuild @@ -0,0 +1,148 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# This ebuild mirrors the setup done in `games-emulation/dolphin::gentoo` + +EAPI=7 + +LIBRETRO_COMMIT_SHA="a09f78f735f0d2184f64ba5b134abe98ee99c65f" +LIBRETRO_REPO_NAME="libretro/dolphin" + +inherit cmake libretro-core + +DESCRIPTION="Dolphin libretro port" + +LICENSE="GPL-2+ BSD BSD-2 LGPL-2.1+ MIT ZLIB" +SLOT="0" +KEYWORDS="~amd64" +IUSE="bluetooth egl +evdev log profile systemd test" +RESTRICT="!test? ( test )" + +RDEPEND=" + app-arch/bzip2:= + app-arch/xz-utils + app-arch/zstd:= + dev-libs/hidapi + dev-libs/libfmt:= + dev-libs/lzo:2 + dev-libs/pugixml + dev-libs/xxhash + games-emulation/libretro-info + media-libs/cubeb + <media-libs/libsfml-3.0:= + net-libs/enet + net-libs/mbedtls:0= + sys-libs/zlib + x11-libs/libX11 + x11-libs/libXi + x11-libs/libXrandr + virtual/libusb:1 + virtual/opengl + bluetooth? ( net-wireless/bluez:= ) + evdev? ( + dev-libs/libevdev + virtual/libudev + ) + profile? ( dev-util/oprofile ) + systemd? ( sys-apps/systemd:0= ) +" +DEPEND=" + ${RDEPEND} + egl? ( media-libs/libglvnd ) +" +BDEPEND=" + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}/${P}-fix-for-fmt.patch" +) + +# [directory]=license +declare -A KEEP_BUNDLED=( + # Issues revealed at configure time + # + # Please keep this list in `CMakeLists.txt` order + [Bochs_disasm]=LGPL-2.1+ + [cpp-optparse]=MIT + [glslang]=BSD + [imgui]=MIT + [xxhash]=BSD-2 + [minizip]=ZLIB + [libpng]=libpng2 # Intentionally static for Libretro + [FreeSurround]=GPL-2+ + [soundtouch]=LGPL-2.1+ + [curl]=curl # Intentionally static for Libretro + [gtest]=BSD + + # Issues revealed at compile time + [Libretro]=MIT + [picojson]=BSD-2 # Complains about exception handling being disabled + [Vulkan]=Apache-2.0 # Relies on `VK_PRESENT_MODE_RANGE_SIZE_KHR` +) + +add_bundled_licenses() { + for license in "${KEEP_BUNDLED[@]}"; do + LICENSE+=" ${license}" + done +} +add_bundled_licenses + +src_prepare() { + cmake_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 +} + +src_configure() { + local mycmakeargs=( + -DLIBRETRO=yes + + -DENABLE_BLUEZ=$(usex bluetooth) + -DENABLE_EGL=$(usex egl) + -DENABLE_EVDEV=$(usex evdev) + -DENABLE_LTO=no # just adds -flto, user can do that via flags + -DENABLE_NOGUI=no + -DENABLE_TESTS=$(usex test) + -DFASTLOG=$(usex log) + -DOPROFILING=$(usex profile) + + # Use system libraries + -DUSE_SHARED_ENET=yes + + # Undo cmake.eclass's defaults. + # All Dolphin's libraries are private + # and rely on circular dependency resolution. + -DBUILD_SHARED_LIBS=no + + # Avoid warning spam around unset variables. + -Wno-dev + + # System installed Git shouldn't affect non-live builds + -DCMAKE_DISABLE_FIND_PACKAGE_Git=yes + ) + + cmake_src_configure +} + +src_compile() { + cmake_src_compile +} + +src_test() { + cmake_build unittests +} + +src_install() { + LIBRETRO_CORE_LIB_FILE="${BUILD_DIR}/${LIBRETRO_CORE_NAME}_libretro.so" + libretro-core_src_install +} diff --git a/games-emulation/libretro-dolphin/metadata.xml b/games-emulation/libretro-dolphin/metadata.xml new file mode 100644 index 0000000000..3d1b7e295a --- /dev/null +++ b/games-emulation/libretro-dolphin/metadata.xml @@ -0,0 +1,16 @@ +<?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> + <use> + <flag name="evdev">Enable evdev input support</flag> + <flag name="log">Increase logging output</flag> + </use> + <upstream> + <bugs-to>https://github.com/libretro/dolphin/issues</bugs-to> + <remote-id type="github">libretro/dolphin</remote-id> + </upstream> +</pkgmetadata>
