aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-emulation/yuzu')
-rw-r--r--games-emulation/yuzu/metadata.xml1
-rw-r--r--games-emulation/yuzu/yuzu-9999.ebuild38
2 files changed, 22 insertions, 17 deletions
diff --git a/games-emulation/yuzu/metadata.xml b/games-emulation/yuzu/metadata.xml
index 948f2e84..b1edc6d5 100644
--- a/games-emulation/yuzu/metadata.xml
+++ b/games-emulation/yuzu/metadata.xml
@@ -10,6 +10,7 @@
<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>
+ <flag name="system-vulkan">Use system dev-util/vulkan-headers</flag>
<flag name="webengine">Use QtWebEngine for web applet implementation</flag>
<flag name="webservice">Enable web services (telemetry, etc.)</flag>
</use>
diff --git a/games-emulation/yuzu/yuzu-9999.ebuild b/games-emulation/yuzu/yuzu-9999.ebuild
index 9a6f4bd8..f01ff4a7 100644
--- a/games-emulation/yuzu/yuzu-9999.ebuild
+++ b/games-emulation/yuzu/yuzu-9999.ebuild
@@ -8,7 +8,7 @@ inherit cmake git-r3 flag-o-matic 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' '-libzip' '-opus' '-SDL' '-Vulkan-Headers' )
+EGIT_SUBMODULES=( '*' '-ffmpeg' '-inih' '-libressl' '-libusb' '-libzip' '-opus' '-SDL' )
# 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, ...
@@ -18,7 +18,7 @@ EGIT_SUBMODULES=( '*' '-ffmpeg' '-inih' '-libressl' '-libusb' '-libzip' '-opus'
LICENSE="GPL-3"
SLOT="0"
KEYWORDS=""
-IUSE="+boxcat +compatibility-list +cubeb discord +qt5 sdl webengine +webservice"
+IUSE="+boxcat +compatibility-list +cubeb discord +qt5 sdl system-vulkan webengine +webservice"
DEPEND="
discord? ( >=dev-libs/rapidjson-1.1.0 )
@@ -27,9 +27,12 @@ DEPEND="
>=dev-qt/qtwidgets-5.15
)
sdl? (
- >=media-libs/libsdl2-2.0.14
+ >=media-libs/libsdl2-2.0.16
>=dev-libs/inih-52
)
+ system-vulkan? (
+ >=dev-util/vulkan-headers-1.2.180
+ )
>=app-arch/lz4-1.8
>=app-arch/zstd-1.5
>=dev-cpp/catch-2.13:0
@@ -39,22 +42,27 @@ DEPEND="
>=dev-libs/libzip-1.5
>=media-libs/opus-1.3.1
>=sys-libs/zlib-1.2
- dev-util/vulkan-headers
virtual/libusb:1
"
-# >=dev-libs/xbyak-5.96
RDEPEND="${DEPEND}"
REQUIRED_USE="boxcat? ( webservice ) || ( qt5 sdl )"
PATCHES=( "${FILESDIR}"/${P}-assert.patch )
pkg_setup() {
- if [ tc-is-gcc -a $(gcc-major-version) -lt 10 ]; then
- die "You need gcc version 10 or clang to compile this package"
+ 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 \
+ || die "add user patch for dev-qt/qtconcurrent: https://github.com/qt/qtbase/commit/659f7a06e91c04b239e3f4c0bcfccbe3581af1c3.diff"
}
src_unpack() {
+ if use system-vulkan; then
+ EGIT_SUBMODULES+=('-Vulkan-Headers')
+ fi
+
git-r3_src_unpack
# Do not fetch via sources because this file always changes
@@ -88,19 +96,14 @@ src_prepare() {
# Unbundle xbyak ( uncomment when xbyak version is ok or never as it is only headers )
# sed -i -e '/target_include_directories(xbyak/s:./xbyak/xbyak:/usr/include/xbyak/:' externals/CMakeLists.txt
- # 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
+ 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
- # Force disable bundled sdl2, use 2.0.14 in tree
- if use sdl; then
- sed -i '/find_package(SDL2/{s/2.0.15/2.0.14/;s/ QUIET//}' CMakeLists.txt || die
- sed -i '/PS5_RUMBLE/d' src/input_common/sdl/sdl_impl.cpp
- fi
-
# Workaround: GenerateSCMRev fails
sed -i -e "s/@GIT_BRANCH@/${EGIT_BRANCH:-master}/" \
-e "s/@GIT_REV@/$(git rev-parse --short HEAD)/" \
@@ -120,10 +123,11 @@ src_configure() {
-DENABLE_SDL2=$(usex sdl)
-DENABLE_WEB_SERVICE=$(usex webservice)
-DUSE_DISCORD_PRESENCE=$(usex discord)
- -DYUZU_ALLOW_SYSTEM_SDL2=$(usex sdl)
-DYUZU_ENABLE_BOXCAT=$(usex boxcat)
+ -DYUZU_USE_EXTERNAL_SDL2=OFF
-DYUZU_USE_QT_WEB_ENGINE=$(usex webengine)
)
+
cmake_src_configure
# This would be better in src_unpack but it would be unlinked