1 |
commit: 3508c0568adcbbf745a439115e3adc666ad0f7d4 |
2 |
Author: Samuel Bauer <samuel.bauer <AT> yahoo <DOT> fr> |
3 |
AuthorDate: Sat Jan 8 00:03:33 2022 +0000 |
4 |
Commit: Samuel Bauer <samuel.bauer <AT> yahoo <DOT> fr> |
5 |
CommitDate: Sat Jan 8 00:19:26 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=3508c056 |
7 |
|
8 |
games-emulation/yuzu: updates |
9 |
|
10 |
* use mainline build |
11 |
* use system spirv-headers |
12 |
* update ffmpeg, opus, vulkan-headers requirements |
13 |
* discord: only when used, else skip |
14 |
* pull/download |
15 |
* unbundle rapidjson |
16 |
* use system robin-map |
17 |
|
18 |
Signed-off-by: Samuel Bauer <samuel.bauer <AT> yahoo.fr> |
19 |
|
20 |
games-emulation/yuzu/files/yuzu-9999-assert.patch | 34 --------------- |
21 |
games-emulation/yuzu/metadata.xml | 1 - |
22 |
games-emulation/yuzu/yuzu-9999.ebuild | 51 ++++++++++++++--------- |
23 |
3 files changed, 32 insertions(+), 54 deletions(-) |
24 |
|
25 |
diff --git a/games-emulation/yuzu/files/yuzu-9999-assert.patch b/games-emulation/yuzu/files/yuzu-9999-assert.patch |
26 |
deleted file mode 100644 |
27 |
index cd342ffba..000000000 |
28 |
--- a/games-emulation/yuzu/files/yuzu-9999-assert.patch |
29 |
+++ /dev/null |
30 |
@@ -1,34 +0,0 @@ |
31 |
---- a/src/common/assert.h |
32 |
-+++ b/src/common/assert.h |
33 |
-@@ -28,22 +28,19 @@ __declspec(noinline, noreturn) |
34 |
- } |
35 |
- |
36 |
- #define ASSERT(_a_) \ |
37 |
-- do \ |
38 |
-- if (!(_a_)) { \ |
39 |
-- assert_noinline_call([] { LOG_CRITICAL(Debug, "Assertion Failed!"); }); \ |
40 |
-- } \ |
41 |
-- while (0) |
42 |
-+ if (!(_a_)) { \ |
43 |
-+ LOG_CRITICAL(Debug, "Assertion Failed!"); \ |
44 |
-+ } |
45 |
- |
46 |
- #define ASSERT_MSG(_a_, ...) \ |
47 |
-- do \ |
48 |
-- if (!(_a_)) { \ |
49 |
-- assert_noinline_call([&] { LOG_CRITICAL(Debug, "Assertion Failed!\n" __VA_ARGS__); }); \ |
50 |
-- } \ |
51 |
-- while (0) |
52 |
-+ if (!(_a_)) { \ |
53 |
-+ LOG_CRITICAL(Debug, "Assertion Failed! " __VA_ARGS__); \ |
54 |
-+ } |
55 |
- |
56 |
--#define UNREACHABLE() assert_noinline_call([] { LOG_CRITICAL(Debug, "Unreachable code!"); }) |
57 |
-+#define UNREACHABLE() \ |
58 |
-+ { LOG_CRITICAL(Debug, "Unreachable code!"); } |
59 |
- #define UNREACHABLE_MSG(...) \ |
60 |
-- assert_noinline_call([&] { LOG_CRITICAL(Debug, "Unreachable code!\n" __VA_ARGS__); }) |
61 |
-+ { LOG_CRITICAL(Debug, "Unreachable code!\n" __VA_ARGS__); } |
62 |
- |
63 |
- #ifdef _DEBUG |
64 |
- #define DEBUG_ASSERT(_a_) ASSERT(_a_) |
65 |
|
66 |
diff --git a/games-emulation/yuzu/metadata.xml b/games-emulation/yuzu/metadata.xml |
67 |
index b1edc6d5d..d012102f5 100644 |
68 |
--- a/games-emulation/yuzu/metadata.xml |
69 |
+++ b/games-emulation/yuzu/metadata.xml |
70 |
@@ -6,7 +6,6 @@ |
71 |
<email>samuel.bauer@×××××.fr</email> |
72 |
</maintainer> |
73 |
<use> |
74 |
- <flag name="boxcat">Enable the Boxcat service, a yuzu high-level implementation of BCAT</flag> |
75 |
<flag name="cubeb">Enables the cubeb audio backend</flag> |
76 |
<flag name="compatibility-list">Downloads the latest compatibility list</flag> |
77 |
<flag name="discord">Enables Discord Rich Presence</flag> |
78 |
|
79 |
diff --git a/games-emulation/yuzu/yuzu-9999.ebuild b/games-emulation/yuzu/yuzu-9999.ebuild |
80 |
index 7bb3ff721..48a21e0e1 100644 |
81 |
--- a/games-emulation/yuzu/yuzu-9999.ebuild |
82 |
+++ b/games-emulation/yuzu/yuzu-9999.ebuild |
83 |
@@ -1,4 +1,4 @@ |
84 |
-# Copyright 2020-2021 Gentoo Authors |
85 |
+# Copyright 2020-2022 Gentoo Authors |
86 |
# Distributed under the terms of the GNU General Public License v2 |
87 |
|
88 |
EAPI=8 |
89 |
@@ -7,9 +7,9 @@ inherit cmake git-r3 toolchain-funcs xdg |
90 |
|
91 |
DESCRIPTION="An emulator for Nintendo Switch" |
92 |
HOMEPAGE="https://yuzu-emu.org" |
93 |
-EGIT_REPO_URI="https://github.com/yuzu-emu/yuzu" |
94 |
-EGIT_SUBMODULES=( '*' '-ffmpeg' '-inih' '-libressl' '-libusb' '-opus' '-SDL' ) |
95 |
-# TODO '-libzip' when boxcat feature is reintroduced |
96 |
+EGIT_REPO_URI="https://github.com/yuzu-emu/yuzu-mainline" |
97 |
+EGIT_SUBMODULES=( '*' '-ffmpeg' '-inih' '-libressl' '-libusb' '-opus' '-SDL' |
98 |
+ '-externals/sirit/externals/SPIRV-Headers' ) |
99 |
# TODO '-xbyak' wait for bump in tree |
100 |
# TODO cubeb auto-links to jack, pulse, alsa .., allow determining cubeb output |
101 |
# media-libs/cubeb would benefit to a lot of packages: dolphin-emu, firefox, citra, self, ... |
102 |
@@ -20,7 +20,7 @@ LICENSE="|| ( Apache-2.0 GPL-2+ ) 0BSD BSD GPL-2+ ISC MIT |
103 |
!system-vulkan? ( Apache-2.0 )" |
104 |
SLOT="0" |
105 |
KEYWORDS="" |
106 |
-IUSE="+boxcat +compatibility-list +cubeb discord +qt5 sdl system-vulkan webengine +webservice" |
107 |
+IUSE="+compatibility-list +cubeb discord +qt5 sdl system-vulkan webengine +webservice" |
108 |
|
109 |
RDEPEND=" |
110 |
>=app-arch/lz4-1.8:= |
111 |
@@ -28,8 +28,8 @@ RDEPEND=" |
112 |
>=dev-libs/boost-1.73:=[context] |
113 |
>=dev-libs/libfmt-8:= |
114 |
>=dev-libs/openssl-1.1:= |
115 |
- >=media-libs/opus-1.3 |
116 |
- media-video/ffmpeg:= |
117 |
+ >=media-libs/opus-1.3.1 |
118 |
+ >=media-video/ffmpeg-4.3:= |
119 |
>=sys-libs/zlib-1.2 |
120 |
virtual/libusb:1 |
121 |
qt5? ( |
122 |
@@ -43,23 +43,23 @@ RDEPEND=" |
123 |
) |
124 |
" |
125 |
DEPEND="${RDEPEND} |
126 |
+ dev-util/spirv-headers |
127 |
system-vulkan? ( |
128 |
- >=dev-util/vulkan-headers-1.2.180 |
129 |
+ >=dev-util/vulkan-headers-1.2.198 |
130 |
) |
131 |
" |
132 |
BDEPEND=" |
133 |
>=dev-cpp/catch-2.13:0 |
134 |
>=dev-cpp/nlohmann_json-3.8.0 |
135 |
+ dev-cpp/robin-map |
136 |
dev-util/glslang |
137 |
discord? ( >=dev-libs/rapidjson-1.1.0 ) |
138 |
" |
139 |
-REQUIRED_USE="boxcat? ( webservice ) || ( qt5 sdl )" |
140 |
- |
141 |
-PATCHES=( "${FILESDIR}"/${P}-assert.patch ) |
142 |
+REQUIRED_USE="|| ( qt5 sdl )" |
143 |
|
144 |
pkg_setup() { |
145 |
- if tc-is-gcc; then |
146 |
- [[ "$(gcc-major-version)" -lt 11 ]] && \ |
147 |
+ if [ tc-is-gcc ]; then |
148 |
+ [ "$(gcc-major-version)" -lt 11 ] && \ |
149 |
die "You need gcc version 11 or clang to compile this package" |
150 |
fi |
151 |
grep -q 'ThreadEngineStarter<void>' /usr/include/qt5/QtConcurrent/qtconcurrentthreadengine.h \ |
152 |
@@ -67,6 +67,10 @@ pkg_setup() { |
153 |
} |
154 |
|
155 |
src_unpack() { |
156 |
+ if ! use discord; then |
157 |
+ EGIT_SUBMODULES+=('-discord-rpc') |
158 |
+ fi |
159 |
+ |
160 |
if use system-vulkan; then |
161 |
EGIT_SUBMODULES+=('-Vulkan-Headers') |
162 |
fi |
163 |
@@ -95,24 +99,35 @@ src_prepare() { |
164 |
|
165 |
if use system-vulkan; then # Unbundle vulkan headers |
166 |
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 |
167 |
- sed -i -e '/VK_ERROR_INCOMPATIBLE_VERSION_KHR/d' src/video_core/vulkan_common/vulkan_wrapper.cpp || die |
168 |
fi |
169 |
|
170 |
- # Unbundle discord rapidjson |
171 |
- sed -i '/NOT RAPIDJSONTEST/,/endif(NOT RAPIDJSONTEST)/d;/find_file(RAPIDJSON/d;s:\${RAPIDJSON}:"/usr/include/rapidjson":' externals/discord-rpc/CMakeLists.txt || die |
172 |
- |
173 |
# Workaround: GenerateSCMRev fails |
174 |
sed -i -e "s/@GIT_BRANCH@/${EGIT_BRANCH:-master}/" \ |
175 |
-e "s/@GIT_REV@/$(git rev-parse --short HEAD)/" \ |
176 |
-e "s/@GIT_DESC@/$(git describe --always --long)/" \ |
177 |
src/common/scm_rev.cpp.in || die |
178 |
|
179 |
+ # Lower sdl requirement |
180 |
+ sed -i -e '/SDL2/s/18/16/' CMakeLists.txt || die |
181 |
+ |
182 |
+ # Use system SPIRV headers |
183 |
+ sed -i -e '/SPIRV/d' externals/sirit/CMakeLists.txt || die |
184 |
+ |
185 |
+ if ! use discord; then |
186 |
+ sed -i -e '/discord-rpc/d' externals/CMakeLists.txt || die |
187 |
+ else |
188 |
+ # Unbundle discord rapidjson |
189 |
+ sed -i '/NOT RAPIDJSONTEST/,/endif(NOT RAPIDJSONTEST)/d;/find_file(RAPIDJSON/d;s:\${RAPIDJSON}:"/usr/include/rapidjson":' \ |
190 |
+ externals/discord-rpc/CMakeLists.txt || die |
191 |
+ fi |
192 |
+ |
193 |
cmake_src_prepare |
194 |
} |
195 |
|
196 |
src_configure() { |
197 |
local -a mycmakeargs=( |
198 |
-DBUILD_SHARED_LIBS=OFF |
199 |
+ -DDYNARMIC_NO_BUNDLED_ROBIN_MAP=ON |
200 |
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=$(usex compatibility-list) |
201 |
-DENABLE_CUBEB=$(usex cubeb) |
202 |
-DENABLE_QT=$(usex qt5) |
203 |
@@ -120,8 +135,6 @@ src_configure() { |
204 |
-DENABLE_SDL2=$(usex sdl) |
205 |
-DENABLE_WEB_SERVICE=$(usex webservice) |
206 |
-DUSE_DISCORD_PRESENCE=$(usex discord) |
207 |
- # -DYUZU_ENABLE_BOXCAT=$(usex boxcat) # feature removed |
208 |
- # upstream is now fixing it, will be reintroduced |
209 |
-DYUZU_USE_EXTERNAL_SDL2=OFF |
210 |
-DYUZU_USE_QT_WEB_ENGINE=$(usex webengine) |
211 |
) |