aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Bauer <samuel.bauer@yahoo.fr>2022-01-08 01:03:33 +0100
committerSamuel Bauer <samuel.bauer@yahoo.fr>2022-01-08 01:19:26 +0100
commit3508c0568adcbbf745a439115e3adc666ad0f7d4 (patch)
tree8b3cc84935a42c4089a54868604561202cf515d2
parentapp-editors/helix: added doc use flag (diff)
downloadguru-3508c056.tar.gz
guru-3508c056.tar.bz2
guru-3508c056.zip
games-emulation/yuzu: updates
* use mainline build * use system spirv-headers * update ffmpeg, opus, vulkan-headers requirements * discord: only when used, else skip * pull/download * unbundle rapidjson * use system robin-map Signed-off-by: Samuel Bauer <samuel.bauer@yahoo.fr>
-rw-r--r--games-emulation/yuzu/files/yuzu-9999-assert.patch34
-rw-r--r--games-emulation/yuzu/metadata.xml1
-rw-r--r--games-emulation/yuzu/yuzu-9999.ebuild51
3 files changed, 32 insertions, 54 deletions
diff --git a/games-emulation/yuzu/files/yuzu-9999-assert.patch b/games-emulation/yuzu/files/yuzu-9999-assert.patch
deleted file mode 100644
index cd342ffba..000000000
--- a/games-emulation/yuzu/files/yuzu-9999-assert.patch
+++ /dev/null
@@ -1,34 +0,0 @@
---- a/src/common/assert.h
-+++ b/src/common/assert.h
-@@ -28,22 +28,19 @@ __declspec(noinline, noreturn)
- }
-
- #define ASSERT(_a_) \
-- do \
-- if (!(_a_)) { \
-- assert_noinline_call([] { LOG_CRITICAL(Debug, "Assertion Failed!"); }); \
-- } \
-- while (0)
-+ if (!(_a_)) { \
-+ LOG_CRITICAL(Debug, "Assertion Failed!"); \
-+ }
-
- #define ASSERT_MSG(_a_, ...) \
-- do \
-- if (!(_a_)) { \
-- assert_noinline_call([&] { LOG_CRITICAL(Debug, "Assertion Failed!\n" __VA_ARGS__); }); \
-- } \
-- while (0)
-+ if (!(_a_)) { \
-+ LOG_CRITICAL(Debug, "Assertion Failed! " __VA_ARGS__); \
-+ }
-
--#define UNREACHABLE() assert_noinline_call([] { LOG_CRITICAL(Debug, "Unreachable code!"); })
-+#define UNREACHABLE() \
-+ { LOG_CRITICAL(Debug, "Unreachable code!"); }
- #define UNREACHABLE_MSG(...) \
-- assert_noinline_call([&] { LOG_CRITICAL(Debug, "Unreachable code!\n" __VA_ARGS__); })
-+ { LOG_CRITICAL(Debug, "Unreachable code!\n" __VA_ARGS__); }
-
- #ifdef _DEBUG
- #define DEBUG_ASSERT(_a_) ASSERT(_a_)
diff --git a/games-emulation/yuzu/metadata.xml b/games-emulation/yuzu/metadata.xml
index b1edc6d5d..d012102f5 100644
--- a/games-emulation/yuzu/metadata.xml
+++ b/games-emulation/yuzu/metadata.xml
@@ -6,7 +6,6 @@
<email>samuel.bauer@yahoo.fr</email>
</maintainer>
<use>
- <flag name="boxcat">Enable the Boxcat service, a yuzu high-level implementation of BCAT</flag>
<flag name="cubeb">Enables the cubeb audio backend</flag>
<flag name="compatibility-list">Downloads the latest compatibility list</flag>
<flag name="discord">Enables Discord Rich Presence</flag>
diff --git a/games-emulation/yuzu/yuzu-9999.ebuild b/games-emulation/yuzu/yuzu-9999.ebuild
index 7bb3ff721..48a21e0e1 100644
--- a/games-emulation/yuzu/yuzu-9999.ebuild
+++ b/games-emulation/yuzu/yuzu-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2020-2021 Gentoo Authors
+# Copyright 2020-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -7,9 +7,9 @@ inherit cmake git-r3 toolchain-funcs xdg
DESCRIPTION="An emulator for Nintendo Switch"
HOMEPAGE="https://yuzu-emu.org"
-EGIT_REPO_URI="https://github.com/yuzu-emu/yuzu"
-EGIT_SUBMODULES=( '*' '-ffmpeg' '-inih' '-libressl' '-libusb' '-opus' '-SDL' )
-# TODO '-libzip' when boxcat feature is reintroduced
+EGIT_REPO_URI="https://github.com/yuzu-emu/yuzu-mainline"
+EGIT_SUBMODULES=( '*' '-ffmpeg' '-inih' '-libressl' '-libusb' '-opus' '-SDL'
+ '-externals/sirit/externals/SPIRV-Headers' )
# TODO '-xbyak' wait for bump in tree
# TODO cubeb auto-links to jack, pulse, alsa .., allow determining cubeb output
# media-libs/cubeb would benefit to a lot of packages: dolphin-emu, firefox, citra, self, ...
@@ -20,7 +20,7 @@ LICENSE="|| ( Apache-2.0 GPL-2+ ) 0BSD BSD GPL-2+ ISC MIT
!system-vulkan? ( Apache-2.0 )"
SLOT="0"
KEYWORDS=""
-IUSE="+boxcat +compatibility-list +cubeb discord +qt5 sdl system-vulkan webengine +webservice"
+IUSE="+compatibility-list +cubeb discord +qt5 sdl system-vulkan webengine +webservice"
RDEPEND="
>=app-arch/lz4-1.8:=
@@ -28,8 +28,8 @@ RDEPEND="
>=dev-libs/boost-1.73:=[context]
>=dev-libs/libfmt-8:=
>=dev-libs/openssl-1.1:=
- >=media-libs/opus-1.3
- media-video/ffmpeg:=
+ >=media-libs/opus-1.3.1
+ >=media-video/ffmpeg-4.3:=
>=sys-libs/zlib-1.2
virtual/libusb:1
qt5? (
@@ -43,23 +43,23 @@ RDEPEND="
)
"
DEPEND="${RDEPEND}
+ dev-util/spirv-headers
system-vulkan? (
- >=dev-util/vulkan-headers-1.2.180
+ >=dev-util/vulkan-headers-1.2.198
)
"
BDEPEND="
>=dev-cpp/catch-2.13:0
>=dev-cpp/nlohmann_json-3.8.0
+ dev-cpp/robin-map
dev-util/glslang
discord? ( >=dev-libs/rapidjson-1.1.0 )
"
-REQUIRED_USE="boxcat? ( webservice ) || ( qt5 sdl )"
-
-PATCHES=( "${FILESDIR}"/${P}-assert.patch )
+REQUIRED_USE="|| ( qt5 sdl )"
pkg_setup() {
- if tc-is-gcc; then
- [[ "$(gcc-major-version)" -lt 11 ]] && \
+ if [ tc-is-gcc ]; then
+ [ "$(gcc-major-version)" -lt 11 ] && \
die "You need gcc version 11 or clang to compile this package"
fi
grep -q 'ThreadEngineStarter<void>' /usr/include/qt5/QtConcurrent/qtconcurrentthreadengine.h \
@@ -67,6 +67,10 @@ pkg_setup() {
}
src_unpack() {
+ if ! use discord; then
+ EGIT_SUBMODULES+=('-discord-rpc')
+ fi
+
if use system-vulkan; then
EGIT_SUBMODULES+=('-Vulkan-Headers')
fi
@@ -95,24 +99,35 @@ src_prepare() {
if use system-vulkan; then # Unbundle vulkan headers
sed -i -e 's:../../externals/Vulkan-Headers/include:/usr/include/vulkan/:' src/video_core/CMakeLists.txt src/yuzu/CMakeLists.txt src/yuzu_cmd/CMakeLists.txt || die
- sed -i -e '/VK_ERROR_INCOMPATIBLE_VERSION_KHR/d' src/video_core/vulkan_common/vulkan_wrapper.cpp || die
fi
- # Unbundle discord rapidjson
- sed -i '/NOT RAPIDJSONTEST/,/endif(NOT RAPIDJSONTEST)/d;/find_file(RAPIDJSON/d;s:\${RAPIDJSON}:"/usr/include/rapidjson":' externals/discord-rpc/CMakeLists.txt || die
-
# Workaround: GenerateSCMRev fails
sed -i -e "s/@GIT_BRANCH@/${EGIT_BRANCH:-master}/" \
-e "s/@GIT_REV@/$(git rev-parse --short HEAD)/" \
-e "s/@GIT_DESC@/$(git describe --always --long)/" \
src/common/scm_rev.cpp.in || die
+ # Lower sdl requirement
+ sed -i -e '/SDL2/s/18/16/' CMakeLists.txt || die
+
+ # Use system SPIRV headers
+ sed -i -e '/SPIRV/d' externals/sirit/CMakeLists.txt || die
+
+ if ! use discord; then
+ sed -i -e '/discord-rpc/d' externals/CMakeLists.txt || die
+ else
+ # Unbundle discord rapidjson
+ sed -i '/NOT RAPIDJSONTEST/,/endif(NOT RAPIDJSONTEST)/d;/find_file(RAPIDJSON/d;s:\${RAPIDJSON}:"/usr/include/rapidjson":' \
+ externals/discord-rpc/CMakeLists.txt || die
+ fi
+
cmake_src_prepare
}
src_configure() {
local -a mycmakeargs=(
-DBUILD_SHARED_LIBS=OFF
+ -DDYNARMIC_NO_BUNDLED_ROBIN_MAP=ON
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=$(usex compatibility-list)
-DENABLE_CUBEB=$(usex cubeb)
-DENABLE_QT=$(usex qt5)
@@ -120,8 +135,6 @@ src_configure() {
-DENABLE_SDL2=$(usex sdl)
-DENABLE_WEB_SERVICE=$(usex webservice)
-DUSE_DISCORD_PRESENCE=$(usex discord)
- # -DYUZU_ENABLE_BOXCAT=$(usex boxcat) # feature removed
- # upstream is now fixing it, will be reintroduced
-DYUZU_USE_EXTERNAL_SDL2=OFF
-DYUZU_USE_QT_WEB_ENGINE=$(usex webengine)
)