summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfred Wingate <parona@protonmail.com>2024-08-11 21:39:50 +0300
committerMichał Górny <mgorny@gentoo.org>2024-08-17 21:16:22 +0200
commit5e93f7dee2f851f322693995b3fd2bf946ef436b (patch)
tree0d0c9bbc71e92a5b100412fd0e37f4eca6f0de21 /games-emulation
parentgames-emulation/dolphin: add 2407 (diff)
downloadgentoo-5e93f7dee2f851f322693995b3fd2bf946ef436b.tar.gz
gentoo-5e93f7dee2f851f322693995b3fd2bf946ef436b.tar.bz2
gentoo-5e93f7dee2f851f322693995b3fd2bf946ef436b.zip
games-emulation/dolphin: update live
Closes: https://bugs.gentoo.org/917573 Signed-off-by: Alfred Wingate <parona@protonmail.com> Closes: https://github.com/gentoo/gentoo/pull/38105 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'games-emulation')
-rw-r--r--games-emulation/dolphin/dolphin-9999.ebuild220
1 files changed, 154 insertions, 66 deletions
diff --git a/games-emulation/dolphin/dolphin-9999.ebuild b/games-emulation/dolphin/dolphin-9999.ebuild
index 25bf321c0c70..99620fc6f3d9 100644
--- a/games-emulation/dolphin/dolphin-9999.ebuild
+++ b/games-emulation/dolphin/dolphin-9999.ebuild
@@ -1,28 +1,54 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit cmake desktop flag-o-matic xdg-utils pax-utils
+LLVM_COMPAT=( 18 )
+LLVM_OPTIONAL=1
-if [[ ${PV} == *9999 ]]
-then
- EGIT_REPO_URI="https://github.com/dolphin-emu/dolphin"
- EGIT_SUBMODULES=( Externals/mGBA/mgba )
+inherit cmake llvm-r1 pax-utils xdg-utils
+
+if [[ ${PV} == *9999 ]]; then
inherit git-r3
+ EGIT_REPO_URI="https://github.com/dolphin-emu/dolphin"
+ EGIT_SUBMODULES=(
+ Externals/mGBA/mgba
+ Externals/implot/implot
+ Externals/tinygltf/tinygltf
+ Externals/Vulkan-Headers
+ Externals/VulkanMemoryAllocator
+ Externals/zlib-ng/zlib-ng
+ Externals/minizip-ng/minizip-ng
+ )
else
- EGIT_COMMIT=0f2540a0d1133950467845f20b1e003181147781
- MGBA_COMMIT=40d4c430fc36caeb7ea32fd39624947ed487d2f2
+ MGBA_COMMIT=8739b22fbc90fdf0b4f6612ef9c0520f0ba44a51
+ IMPLOT_COMMIT=cc5e1daa5c7f2335a9460ae79c829011dc5cef2d
+ TINYGLTF_COMMIT=c5641f2c22d117da7971504591a8f6a41ece488b
+ VULKAN_HEADERS_COMMIT=05fe2cc910a68c9ba5dac07db46ef78573acee72
+ VULKANMEMORYALLOCATOR_COMMIT=009ecd192c1289c7529bff248a16cfe896254816
+ ZLIB_NG_COMMIT=ce01b1e41da298334f8214389cc9369540a7560f
+ MINIZIP_NG_COMMIT=3eed562ef0ea3516db30d1c8ecb0e1b486d8cb70
SRC_URI="
- https://github.com/dolphin-emu/dolphin/archive/${EGIT_COMMIT}.tar.gz
+ https://github.com/dolphin-emu/dolphin/archive/${PV}.tar.gz
-> ${P}.tar.gz
+ https://github.com/epezent/implot/archive/${IMPLOT_COMMIT}.tar.gz
+ -> implot-${IMPLOT_COMMIT}.tar.gz
+ https://github.com/syoyo/tinygltf/archive/${TINYGLTF_COMMIT}.tar.gz
+ -> tinygltf-${TINYGLTF_COMMIT}.tar.gz
+ https://github.com/KhronosGroup/Vulkan-Headers/archive/${VULKAN_HEADERS_COMMIT}.tar.gz
+ -> Vulkan-Headers-${VULKAN_HEADERS_COMMIT}.tar.gz
+ https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/archive/${VULKANMEMORYALLOCATOR_COMMIT}.tar.gz
+ -> VulkanMemoryAllocator-${VULKANMEMORYALLOCATOR_COMMIT}.tar.gz
+ https://github.com/zlib-ng/zlib-ng/archive/${ZLIB_NG_COMMIT}.tar.gz
+ -> zlib-ng-${ZLIB_NG_COMMIT}.tar.gz
+ https://github.com/zlib-ng/minizip-ng/archive/${MINIZIP_NG_COMMIT}.tar.gz
+ -> minizip-ng-${MINIZIP_NG_COMMIT}.tar.gz
mgba? (
https://github.com/mgba-emu/mgba/archive/${MGBA_COMMIT}.tar.gz
-> mgba-${MGBA_COMMIT}.tar.gz
)
"
- S=${WORKDIR}/${PN}-${EGIT_COMMIT}
- KEYWORDS="~amd64 ~arm64"
+ KEYWORDS="~amd64"
fi
DESCRIPTION="Gamecube and Wii game emulator"
@@ -31,51 +57,58 @@ HOMEPAGE="https://dolphin-emu.org/"
LICENSE="GPL-2+ BSD BSD-2 LGPL-2.1+ MIT ZLIB"
SLOT="0"
IUSE="
- alsa bluetooth discord-presence doc +evdev ffmpeg +gui log mgba
- profile pulseaudio systemd upnp vulkan
+ alsa bluetooth discord-presence doc egl +evdev ffmpeg +gui llvm log mgba
+ profile pulseaudio sdl systemd telemetry test upnp vulkan
+"
+REQUIRED_USE="
+ mgba? ( gui )
+ llvm? ( ${LLVM_REQUIRED_USE} )
"
+RESTRICT="!test? ( test )"
RDEPEND="
app-arch/bzip2:=
- app-arch/xz-utils:=
- app-arch/zstd:=
- dev-libs/hidapi:=
- >=dev-libs/libfmt-8:=
- dev-libs/lzo:=
- dev-libs/pugixml:=
- media-libs/cubeb:=
- media-libs/libpng:=
+ >=app-arch/lz4-1.8:=
+ app-arch/xz-utils
+ >=app-arch/zstd-1.4.0:=
+ dev-libs/hidapi
+ >=dev-libs/libfmt-10.1:=
+ dev-libs/lzo:2
+ dev-libs/pugixml
+ dev-libs/xxhash
+ media-libs/cubeb
media-libs/libsfml:=
- media-libs/mesa[egl(+)]
- net-libs/enet:1.3
+ media-libs/libspng
+ >=net-libs/enet-1.3.18:1.3=
net-libs/mbedtls:=
- net-misc/curl:=
- sys-libs/readline:=
- sys-libs/zlib:=[minizip]
- x11-libs/libXext
+ net-misc/curl
+ x11-libs/libX11
x11-libs/libXi
x11-libs/libXrandr
virtual/libusb:1
virtual/opengl
alsa? ( media-libs/alsa-lib )
- bluetooth? ( net-wireless/bluez )
+ bluetooth? ( net-wireless/bluez:= )
evdev? (
dev-libs/libevdev
virtual/udev
)
ffmpeg? ( media-video/ffmpeg:= )
gui? (
- dev-qt/qtcore:5
- dev-qt/qtgui:5
- dev-qt/qtwidgets:5
+ dev-qt/qtbase:6[gui,widgets]
+ dev-qt/qtsvg:6
)
+ llvm? ( $(llvm_gen_dep 'sys-devel/llvm:${LLVM_SLOT}=') )
profile? ( dev-util/oprofile )
pulseaudio? ( media-libs/libpulse )
+ sdl? ( media-libs/libsdl2 )
systemd? ( sys-apps/systemd:0= )
- upnp? ( net-libs/miniupnpc )
+ upnp? ( net-libs/miniupnpc:= )
"
DEPEND="
${RDEPEND}
+ egl? ( media-libs/libglvnd )
+ test? ( dev-cpp/gtest )
"
BDEPEND="
sys-devel/gettext
@@ -92,16 +125,17 @@ RDEPEND+="
declare -A KEEP_BUNDLED=(
# please keep this list in CMakeLists.txt order
+ # TODO: use system libraries
+ [zlib-ng]=ZLIB
+ [minizip-ng]=ZLIB
+
[Bochs_disasm]=LGPL-2.1+
[cpp-optparse]=MIT
[imgui]=MIT
+ [implot]=MIT
[glslang]=BSD
- # FIXME: xxhash can't be found by cmake
- [xxhash]=BSD-2
-
- # FIXME: requires minizip-ng
- #[minizip]=ZLIB
+ [tinygltf]=MIT
[FreeSurround]=GPL-2+
[soundtouch]=LGPL-2.1+
@@ -112,14 +146,40 @@ declare -A KEEP_BUNDLED=(
[mGBA]=MPL-2.0
[picojson]=BSD-2
+ [expr]=MIT
[rangeset]=ZLIB
- [gtest]= # (build-time only)
+ [FatFs]=FatFs
+ [Vulkan-Headers]="|| ( Apache-2.0 MIT )"
+ [VulkanMemoryAllocator]=MIT
+)
+
+PATCHES=(
+ "${FILESDIR}"/dolphin-2407-libfmt-11-fix.patch
+ "${FILESDIR}"/dolphin-2407-minizip.patch
)
+add_bundled_licenses() {
+ for license in ${KEEP_BUNDLED[@]}; do
+ LICENSE+=" ${license}"
+ done
+}
+add_bundled_licenses
+
+pkg_setup() {
+ use llvm && llvm-r1_pkg_setup
+}
+
src_prepare() {
- if use mgba && [[ ${PV} != *9999 ]]; then
- rmdir Externals/mGBA/mgba || die
- mv "${WORKDIR}/mgba-${MGBA_COMMIT}" Externals/mGBA/mgba || die
+ if [[ ${PV} != *9999 ]]; then
+ mv -T "${WORKDIR}/implot-${IMPLOT_COMMIT}" Externals/implot/implot || die
+ mv -T "${WORKDIR}/tinygltf-${TINYGLTF_COMMIT}" Externals/tinygltf/tinygltf || die
+ mv -T "${WORKDIR}/Vulkan-Headers-${VULKAN_HEADERS_COMMIT}" Externals/Vulkan-Headers || die
+ mv -T "${WORKDIR}/VulkanMemoryAllocator-${VULKANMEMORYALLOCATOR_COMMIT}" Externals/VulkanMemoryAllocator || die
+ mv -T "${WORKDIR}/zlib-ng-${ZLIB_NG_COMMIT}" Externals/zlib-ng/zlib-ng || die
+ mv -T "${WORKDIR}/minizip-ng-${MINIZIP_NG_COMMIT}" Externals/minizip-ng/minizip-ng || die
+ if use mgba; then
+ mv -T "${WORKDIR}/mgba-${MGBA_COMMIT}" Externals/mGBA/mgba || die
+ fi
fi
cmake_src_prepare
@@ -140,43 +200,64 @@ src_prepare() {
sed -i -e '/Externals\/glslang/d' CMakeLists.txt || die
fi
- # Allow regular minizip.
- sed -i -e '/minizip/s:>=2[.]0[.]0::' CMakeLists.txt || die
-
# Remove dirty suffix: needed for netplay
- sed -i -e 's/--dirty/&=""/' CMakeLists.txt || die
-
- # Force Qt5 rather than automagic until support is properly handled here
- sed -i -e '/NAMES Qt6 COMP/d' Source/Core/DolphinQt/CMakeLists.txt || die
+ sed -i -e 's/--dirty/&=""/' CMake/ScmRevGen.cmake || die
}
src_configure() {
- # bug #891225 (https://bugs.dolphin-emu.org/issues/11481, QTBUG-61710)
- use gui && filter-lto
-
local mycmakeargs=(
- # Use ccache only when user did set FEATURES=ccache (or similar)
- # not when ccache binary is present in system (automagic).
- -DCCACHE_BIN=CCACHE_BIN-NOTFOUND
+ -DDSPTOOL=ON
-DENABLE_ALSA=$(usex alsa)
+ -DENABLE_ANALYTICS=$(usex telemetry)
-DENABLE_AUTOUPDATE=OFF
-DENABLE_BLUEZ=$(usex bluetooth)
+ -DENABLE_CLI_TOOL=ON
+ -DENABLE_EGL=$(usex egl)
-DENABLE_EVDEV=$(usex evdev)
- -DENCODE_FRAMEDUMPS=$(usex ffmpeg)
- -DENABLE_LLVM=OFF
- # just adds -flto, user can do that via flags
- -DENABLE_LTO=OFF
- -DUSE_MGBA=$(usex mgba)
+ -DENABLE_LLVM=$(usex llvm)
+ -DENABLE_LTO=OFF # just adds -flto, user can do that via flags
+ -DENABLE_NOGUI=$(usex !gui)
-DENABLE_PULSEAUDIO=$(usex pulseaudio)
-DENABLE_QT=$(usex gui)
- -DENABLE_SDL=OFF # not supported: #666558
+ -DENABLE_SDL=$(usex sdl)
+ -DENABLE_TESTS=$(usex test)
-DENABLE_VULKAN=$(usex vulkan)
+ -DENCODE_FRAMEDUMPS=$(usex ffmpeg)
-DFASTLOG=$(usex log)
-DOPROFILING=$(usex profile)
+ -DSTEAM=OFF
-DUSE_DISCORD_PRESENCE=$(usex discord-presence)
- -DUSE_SHARED_ENET=ON
+ -DUSE_MGBA=$(usex mgba)
+ -DUSE_RETRO_ACHIEVEMENTS=OFF
-DUSE_UPNP=$(usex upnp)
+ -DCMAKE_DISABLE_FIND_PACKAGE_SYSTEMD=$(usex !systemd)
+
+ # Use system libraries
+ -DUSE_SYSTEM_FMT=ON
+ -DUSE_SYSTEM_PUGIXML=ON
+ -DUSE_SYSTEM_ENET=ON
+ -DUSE_SYSTEM_XXHASH=ON
+ -DUSE_SYSTEM_BZIP2=ON
+ -DUSE_SYSTEM_LIBLZMA=ON
+ -DUSE_SYSTEM_ZSTD=ON
+ -DUSE_SYSTEM_ZLIB=OFF
+ -DUSE_SYSTEM_MINIZIP=OFF
+ -DUSE_SYSTEM_LZO=ON
+ -DUSE_SYSTEM_LZ4=ON
+ -DUSE_SYSTEM_SPNG=ON
+ -DUSE_SYSTEM_CUBEB=ON
+ -DUSE_SYSTEM_LIBUSB=ON
+ -DUSE_SYSTEM_SFML=ON
+ -DUSE_SYSTEM_MBEDTLS=ON
+ -DUSE_SYSTEM_CURL=ON
+ -DUSE_SYSTEM_ICONV=ON
+ -DUSE_SYSTEM_HIDAPI=ON
+
+ # Use ccache only when user did set FEATURES=ccache (or similar)
+ # not when ccache binary is present in system (automagic).
+ -DCCACHE_BIN=CCACHE_BIN-NOTFOUND
+
# Undo cmake.eclass's defaults.
# All dolphin's libraries are private
# and rely on circular dependency resolution.
@@ -186,6 +267,14 @@ src_configure() {
-Wno-dev
)
+ # System installed git shouldnt affect non live builds
+ [[ ${PV} != *9999 ]] && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON )
+
+ use test && mycmakeargs+=( -DUSE_SYSTEM_GTEST=ON )
+ use mgba && mycmakeargs+=( -DUSE_SYSTEM_LIBMGBA=OFF )
+ use sdl && mycmakeargs+=( -DUSE_SYSTEM_SDL2=ON )
+ use upnp && mycmakeargs+=( -DUSE_SYSTEM_MINIUPNPC=ON )
+
cmake_src_configure
}
@@ -201,17 +290,16 @@ src_install() {
dodoc -r docs/ActionReplay docs/DSP docs/WiiMote
fi
- doicon -s 48 Data/dolphin-emu.png
- doicon -s scalable Data/dolphin-emu.svg
- doicon Data/dolphin-emu.svg
+ # Add pax markings for hardened systems
+ pax-mark -m "${ED}"/usr/bin/"${PN}"{-emu{,-nogui},-tool}
}
pkg_postinst() {
- # Add pax markings for hardened systems
- pax-mark -m "${EPREFIX}"/usr/games/bin/"${PN}"-emu
+ xdg_desktop_database_update
xdg_icon_cache_update
}
pkg_postrm() {
+ xdg_desktop_database_update
xdg_icon_cache_update
}