summaryrefslogtreecommitdiff
path: root/games-emulation/dolphin/dolphin-9999.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'games-emulation/dolphin/dolphin-9999.ebuild')
-rw-r--r--games-emulation/dolphin/dolphin-9999.ebuild148
1 files changed, 73 insertions, 75 deletions
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