summaryrefslogtreecommitdiff
path: root/games-emulation/dolphin
diff options
context:
space:
mode:
Diffstat (limited to 'games-emulation/dolphin')
-rw-r--r--games-emulation/dolphin/Manifest3
-rw-r--r--games-emulation/dolphin/dolphin-5.0_p20210506-r1.ebuild195
-rw-r--r--games-emulation/dolphin/dolphin-9999.ebuild148
3 files changed, 270 insertions, 76 deletions
diff --git a/games-emulation/dolphin/Manifest b/games-emulation/dolphin/Manifest
index d456d868cdce..33bae04e297a 100644
--- a/games-emulation/dolphin/Manifest
+++ b/games-emulation/dolphin/Manifest
@@ -1,5 +1,6 @@
AUX dolphin-5.0_p20210506-musl.patch 779 BLAKE2B 5f962082cf58377801a266ec987417b731332e31ce6d79bb8e66204f6299dc1912aea760a9545ac671b090e6a3625c54b9e00583695790bd5c51ba54d524e0d7 SHA512 7a611de89b84e0f706c37d2aacdfb62cb4115098ad1b31daa4e40bd47e3793ab59f626fced184965361ba776891a63d02d66a54f8b69f675b6b88047a283bd9e
DIST dolphin-5.0_p20210506.tar.gz 42098693 BLAKE2B bb9e5b5eb344bd944753c0198d5835109399fdfae46e6858833e5f279ff1979d39e0c512bedb96a91a1241fff525c6f945d16ce1a6b6cc22798490d73b853862 SHA512 5d23e9356995011a0e7b07622d58c8dddc5134a4ec83b3d9343b9eca8d0d2c200ea8c9a299c6aa2550ca74d8e28e258531368f7c167fe620053eb2a0f73b1f2f
+EBUILD dolphin-5.0_p20210506-r1.ebuild 4471 BLAKE2B 95406846ddc8fe4322c901cb1f7ce1c00fbc760172391531a6ef8e500e4fdaf4bd784854582476aaf339fcc7cc7587075913d10ad826ce63d6dc8b407fbad4dd SHA512 3e348d1ad30dc689e65bbbe4a296e82c2ff07cdfc6be87ec81e5ea4c259a19b0116f3b25b591b9b97620a62e8274dfd4cafb18cd67950aba57a54883be410c20
EBUILD dolphin-5.0_p20210506.ebuild 4817 BLAKE2B 5285d51e4404f2ae273c8315b143a18f5587356ad1d8c6b1c4fa369d5e9737742bb5b6af4c3c3f7d04e63edf5052245632256eed16136dfcc3beca83f861fb96 SHA512 f785395201fefb634972bd1c5b4538cb5e2534f1a4716f744ba1424f61deed7c833d406bfea71197d8a297e593d372c3b93c19447925ec8f72f518a900a016b6
-EBUILD dolphin-9999.ebuild 4910 BLAKE2B 6956e91cc557566ba3712050b4218f0994484037ba61ec21c66072f7d2ea050a93b52449c78c6400404f9126796f160ffdf8cc71339945304d7a1956d01e02bc SHA512 e3dd529047095cd936d9ba8dac650bc65011825e8345777e66ed35fd92523fda0a3e420a775b014081599e56804e3b28f175fd5f3c1d5857f75194db5806b207
+EBUILD dolphin-9999.ebuild 4578 BLAKE2B 94e3c6fbb50a2da4943d6a80d0e9e9cdf38fab6a9dc555a9ade12b314d1dbc62a653fb7ef215c0ffb074afd9fea5fc9108a59e96251864c769d0fbc11dc65eee SHA512 7ca40222418fa167a90880d2a9a1dd35b25da12b4ad7eb24c75893cddb08fd33e1e011c32a3b8a055d0e6eb9f1e0f2001c4701685385bc2069a0826dbb5521e1
MISC metadata.xml 1080 BLAKE2B ee31389514b6843ab5476a61b286b5d8462ea57576c8a915cb83cfcbe89f0379f0c7f661ea14b978aae0a75af880a10ccf36f18fca1fc150e2ddee419f850477 SHA512 457d96e3388258bbd8ac0b888b5cee96f08fb5663acb4756b7b90720f8f68b60396449243217064f1a95c6a2c56f580067139e59a7f1bfcd3a4f22f8bb991876
diff --git a/games-emulation/dolphin/dolphin-5.0_p20210506-r1.ebuild b/games-emulation/dolphin/dolphin-5.0_p20210506-r1.ebuild
new file mode 100644
index 000000000000..ff1c6123f877
--- /dev/null
+++ b/games-emulation/dolphin/dolphin-5.0_p20210506-r1.ebuild
@@ -0,0 +1,195 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake desktop xdg-utils pax-utils
+
+if [[ ${PV} == *9999 ]]
+then
+ EGIT_REPO_URI="https://github.com/dolphin-emu/dolphin"
+ inherit git-r3
+else
+ EGIT_COMMIT=eb5cd9be78c76b9ccbab9e5fbd1721ef6876cd68
+ SRC_URI="
+ https://github.com/dolphin-emu/dolphin/archive/${EGIT_COMMIT}.tar.gz
+ -> ${P}.tar.gz"
+ S=${WORKDIR}/${PN}-${EGIT_COMMIT}
+ KEYWORDS="~amd64 ~arm64"
+fi
+
+DESCRIPTION="Gamecube and Wii game emulator"
+HOMEPAGE="https://dolphin-emu.org/"
+
+# NB: appended below
+LICENSE="GPL-2+"
+SLOT="0"
+IUSE="alsa bluetooth discord-presence doc +evdev ffmpeg +gui log
+ profile pulseaudio systemd upnp vulkan"
+
+RDEPEND="
+ dev-libs/hidapi:0=
+ >=dev-libs/libfmt-7.1:0=
+ dev-libs/lzo:2=
+ dev-libs/pugixml:0=
+ media-libs/libpng:0=
+ media-libs/libsfml
+ media-libs/mesa[egl]
+ net-libs/enet:1.3
+ net-libs/mbedtls:0=
+ net-misc/curl:0=
+ sys-libs/readline:0=
+ sys-libs/zlib:0=
+ x11-libs/libXext
+ x11-libs/libXi
+ x11-libs/libXrandr
+ virtual/libusb:1
+ virtual/opengl
+ alsa? ( media-libs/alsa-lib )
+ 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
+ )
+ profile? ( dev-util/oprofile )
+ pulseaudio? ( media-sound/pulseaudio )
+ systemd? ( sys-apps/systemd:0= )
+ upnp? ( net-libs/miniupnpc )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+# vulkan-loader required for vulkan backend which can be selected
+# at runtime.
+RDEPEND="${RDEPEND}
+ vulkan? ( media-libs/vulkan-loader )"
+
+PATCHES=("${FILESDIR}"/${P}-musl.patch)
+
+# [directory]=license
+declare -A KEEP_BUNDLED=(
+ [Bochs_disasm]=LGPL-2.1+
+ [FreeSurround]=GPL-2+
+
+ # vulkan's API is not backwards-compatible:
+ # new release dropped VK_PRESENT_MODE_RANGE_SIZE_KHR
+ # but dolphin still relies on it, bug #729832
+ [Vulkan]=Apache-2.0
+
+ [cpp-optparse]=MIT
+ # no support for for using system library
+ [glslang]=BSD
+ [imgui]=MIT
+
+ # not packaged, tiny header library
+ [rangeset]=ZLIB
+
+ # FIXME: xxhash can't be found by cmake
+ [xxhash]=BSD-2
+ # no support for for using system library
+ [minizip]=ZLIB
+ # soundtouch uses shorts, not floats
+ [soundtouch]=LGPL-2.1+
+ [cubeb]=ISC
+ [discord-rpc]=MIT
+ # Their build set up solely relies on the build in gtest.
+ [gtest]= # (build-time only)
+ # gentoo's version requires exception support.
+ # dolphin disables exceptions and fails the build.
+ [picojson]=BSD-2
+ # No code to detect shared library.
+ [zstd]=BSD
+)
+LICENSE+=" ${KEEP_BUNDLED[*]}"
+
+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
+
+ # About 50% compile-time speedup
+ if ! use vulkan; then
+ sed -i -e '/Externals\/glslang/d' CMakeLists.txt || die
+ fi
+
+ # Remove dirty suffix: needed for netplay
+ sed -i -e 's/--dirty/&=""/' CMakeLists.txt || die
+}
+
+src_configure() {
+ 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
+ -DENABLE_ALSA=$(usex alsa)
+ -DENABLE_BLUEZ=$(usex bluetooth)
+ -DENABLE_EVDEV=$(usex evdev)
+ -DENCODE_FRAMEDUMPS=$(usex ffmpeg)
+ -DENABLE_LLVM=OFF
+ # just adds -flto, user can do that via flags
+ -DENABLE_LTO=OFF
+ -DENABLE_PULSEAUDIO=$(usex pulseaudio)
+ -DENABLE_QT=$(usex gui)
+ -DENABLE_SDL=OFF # not supported: #666558
+ -DENABLE_VULKAN=$(usex vulkan)
+ -DFASTLOG=$(usex log)
+ -DOPROFILING=$(usex profile)
+ -DUSE_DISCORD_PRESENCE=$(usex discord-presence)
+ -DUSE_SHARED_ENET=ON
+ -DUSE_UPNP=$(usex upnp)
+
+ # Undo cmake.eclass's defaults.
+ # All dolphin's libraries are private
+ # and rely on circular dependency resolution.
+ -DBUILD_SHARED_LIBS=OFF
+
+ # Avoid warning spam around unset variables.
+ -Wno-dev
+ )
+
+ cmake_src_configure
+}
+
+src_test() {
+ cmake_build unittests
+}
+
+src_install() {
+ cmake_src_install
+
+ dodoc Readme.md
+ if use doc; then
+ 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
+}
+
+pkg_postinst() {
+ # Add pax markings for hardened systems
+ pax-mark -m "${EPREFIX}"/usr/games/bin/"${PN}"-emu
+ xdg_icon_cache_update
+}
+
+pkg_postrm() {
+ xdg_icon_cache_update
+}
diff --git a/games-emulation/dolphin/dolphin-9999.ebuild b/games-emulation/dolphin/dolphin-9999.ebuild
index 891daca38b3c..3da7b2e3d4f8 100644
--- a/games-emulation/dolphin/dolphin-9999.ebuild
+++ b/games-emulation/dolphin/dolphin-9999.ebuild
@@ -3,10 +3,7 @@
EAPI=7
-PLOCALES="ar ca cs da de el en es fa fr hr hu it ja ko ms nb nl pl pt pt_BR ro ru sr sv tr zh_CN zh_TW"
-PLOCALE_BACKUP="en"
-
-inherit cmake desktop xdg-utils pax-utils plocale
+inherit cmake desktop xdg-utils pax-utils
if [[ ${PV} == *9999 ]]
then
@@ -14,18 +11,22 @@ then
EGIT_SUBMODULES=( Externals/mGBA/mgba )
inherit git-r3
else
- inherit vcs-snapshot
- commit=0dbe8fb2eaa608a6540df3d269648a596c29cf4b
- SRC_URI="https://github.com/dolphin-emu/dolphin/archive/${commit}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64"
+ EGIT_COMMIT=eb5cd9be78c76b9ccbab9e5fbd1721ef6876cd68
+ SRC_URI="
+ https://github.com/dolphin-emu/dolphin/archive/${EGIT_COMMIT}.tar.gz
+ -> ${P}.tar.gz"
+ S=${WORKDIR}/${PN}-${EGIT_COMMIT}
+ KEYWORDS="~amd64 ~arm64"
fi
DESCRIPTION="Gamecube and Wii game emulator"
-HOMEPAGE="https://www.dolphin-emu.org/"
+HOMEPAGE="https://dolphin-emu.org/"
-LICENSE="GPL-2"
+# NB: appended below
+LICENSE="GPL-2+"
SLOT="0"
-IUSE="alsa bluetooth discord-presence doc +evdev ffmpeg log lto mgba profile pulseaudio +qt5 systemd upnp vulkan"
+IUSE="alsa bluetooth discord-presence doc +evdev ffmpeg +gui log mgba
+ profile pulseaudio systemd upnp vulkan"
RDEPEND="
dev-libs/hidapi:0=
@@ -52,13 +53,13 @@ RDEPEND="
virtual/udev
)
ffmpeg? ( media-video/ffmpeg:= )
- profile? ( dev-util/oprofile )
- pulseaudio? ( media-sound/pulseaudio )
- qt5? (
+ gui? (
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtwidgets:5
)
+ profile? ( dev-util/oprofile )
+ pulseaudio? ( media-sound/pulseaudio )
systemd? ( sys-apps/systemd:0= )
upnp? ( net-libs/miniupnpc )
"
@@ -72,74 +73,66 @@ BDEPEND="
RDEPEND="${RDEPEND}
vulkan? ( media-libs/vulkan-loader )"
+# [directory]=license
+declare -A KEEP_BUNDLED=(
+ [Bochs_disasm]=LGPL-2.1+
+ [FreeSurround]=GPL-2+
+
+ # vulkan's API is not backwards-compatible:
+ # new release dropped VK_PRESENT_MODE_RANGE_SIZE_KHR
+ # but dolphin still relies on it, bug #729832
+ [Vulkan]=Apache-2.0
+
+ [cpp-optparse]=MIT
+ # no support for for using system library
+ [glslang]=BSD
+ [imgui]=MIT
+
+ # not packaged, tiny header library
+ [rangeset]=ZLIB
+
+ # FIXME: xxhash can't be found by cmake
+ [xxhash]=BSD-2
+ # no support for for using system library
+ [minizip]=ZLIB
+ # soundtouch uses shorts, not floats
+ [soundtouch]=LGPL-2.1+
+ [cubeb]=ISC
+ [discord-rpc]=MIT
+ # Their build set up solely relies on the build in gtest.
+ [gtest]= # (build-time only)
+ # gentoo's version requires exception support.
+ # dolphin disables exceptions and fails the build.
+ [picojson]=BSD-2
+ # No code to detect shared library.
+ [zstd]=BSD
+
+ # This is a stripped-down mGBA for integrated GBA support
+ [mGBA]=MPL-2.0
+)
+LICENSE+=" ${KEEP_BUNDLED[*]}"
+
src_prepare() {
cmake_src_prepare
- # Remove all the bundled libraries that support system-installed
- # preference. See CMakeLists.txt for conditional 'add_subdirectory' calls.
- local KEEP_SOURCES=(
- Bochs_disasm
- FreeSurround
-
- # vulkan's API is not backwards-compatible:
- # new release dropped VK_PRESENT_MODE_RANGE_SIZE_KHR
- # but dolphin still relies on it, bug #729832
- Vulkan
-
- cpp-optparse
- # no support for for using system library
- glslang
- imgui
-
- # not packaged, tiny header library
- rangeset
-
- # FIXME: xxhash can't be found by cmake
- xxhash
- # no support for for using system library
- minizip
- # soundtouch uses shorts, not floats
- soundtouch
- cubeb
- discord-rpc
- # Their build set up solely relies on the build in gtest.
- gtest
- # gentoo's version requires exception support.
- # dolphin disables exceptions and fails the build.
- picojson
- # No code to detect shared library.
- zstd
-
- # This is a stripped-down mGBA for integrated GBA support
- mGBA
- )
- local s
- for s in "${KEEP_SOURCES[@]}"; do
- mv -v "Externals/${s}" . || die
- done
- einfo "removing sources: $(echo Externals/*)"
- rm -r Externals/* || die "Failed to delete Externals dir."
- for s in "${KEEP_SOURCES[@]}"; do
- mv -v "${s}" "Externals/" || die
- done
-
- remove_locale() {
- # Ensure preservation of the backup locale when no valid LINGUA is set
- if [[ "${PLOCALE_BACKUP}" == "${1}" ]] && [[ "${PLOCALE_BACKUP}" == "$(plocale_get_locales)" ]]; then
- return
- else
- rm "Languages/po/${1}.po" || die
+ local s remove=()
+ for s in Externals/*; do
+ [[ -f ${s} ]] && continue
+ if ! has "${s#Externals/}" "${!KEEP_BUNDLED[@]}"; then
+ remove+=( "${s}" )
fi
- }
+ done
- plocale_find_changes "Languages/po/" "" '.po'
- plocale_for_each_disabled_locale remove_locale
+ einfo "removing sources: ${remove[*]}"
+ rm -r "${remove[@]}" || die
# About 50% compile-time speedup
- use vulkan || sed -i -e '/Externals\/glslang/d' CMakeLists.txt
+ if ! use vulkan; then
+ sed -i -e '/Externals\/glslang/d' CMakeLists.txt || die
+ fi
# Remove dirty suffix: needed for netplay
- sed -i -e 's/--dirty/&=""/' CMakeLists.txt
+ sed -i -e 's/--dirty/&=""/' CMakeLists.txt || die
}
src_configure() {
@@ -152,10 +145,11 @@ src_configure() {
-DENABLE_EVDEV=$(usex evdev)
-DENCODE_FRAMEDUMPS=$(usex ffmpeg)
-DENABLE_LLVM=OFF
- -DENABLE_LTO=$(usex lto)
+ # just adds -flto, user can do that via flags
+ -DENABLE_LTO=OFF
-DUSE_MGBA=$(usex mgba)
-DENABLE_PULSEAUDIO=$(usex pulseaudio)
- -DENABLE_QT=$(usex qt5)
+ -DENABLE_QT=$(usex gui)
-DENABLE_SDL=OFF # not supported: #666558
-DENABLE_VULKAN=$(usex vulkan)
-DFASTLOG=$(usex log)
@@ -176,6 +170,10 @@ src_configure() {
cmake_src_configure
}
+src_test() {
+ cmake_build unittests
+}
+
src_install() {
cmake_src_install