From e6ae48273de4721cdb2af71471ba17a844ca5040 Mon Sep 17 00:00:00 2001 From: odrling Date: Fri, 25 Sep 2020 16:28:38 +0200 Subject: [PATCH] dolphin: oh well --- games-emulation/dolphin/dolphin-9999.ebuild | 70 ++++++++++++++++++++- 1 file changed, 68 insertions(+), 2 deletions(-) diff --git a/games-emulation/dolphin/dolphin-9999.ebuild b/games-emulation/dolphin/dolphin-9999.ebuild index c71c785..e67806f 100644 --- a/games-emulation/dolphin/dolphin-9999.ebuild +++ b/games-emulation/dolphin/dolphin-9999.ebuild @@ -14,9 +14,9 @@ then inherit git-r3 else inherit vcs-snapshot - commit=57f14b260bf043b6c261ca284b6c45fa3a7932de + commit=0dbe8fb2eaa608a6540df3d269648a596c29cf4b SRC_URI="https://github.com/dolphin-emu/dolphin/archive/${commit}.tar.gz -> ${P}.tar.gz" - KEYWORDS="amd64" + KEYWORDS="~amd64" fi DESCRIPTION="Gamecube and Wii game emulator" @@ -71,6 +71,69 @@ BDEPEND=" RDEPEND="${RDEPEND} media-libs/vulkan-loader" +src_prepare() { + cmake_src_prepare + + # remove -dirty in version name + sed -i 's/--dirty//' CMakeLists.txt + + # 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 + ) + 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}" == "$(l10n_get_locales)" ]]; then + return + else + rm "Languages/po/${1}.po" || die + fi + } + + l10n_find_plocales_changes "Languages/po/" "" '.po' + l10n_for_each_disabled_locale_do remove_locale +} src_configure() { local mycmakeargs=( @@ -96,6 +159,9 @@ src_configure() { # 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