games-emulation/yuzu: update snapshot

Signed-off-by: Samuel Bauer <samuel.bauer@yahoo.fr>
This commit is contained in:
Samuel Bauer
2023-02-02 19:46:57 +01:00
parent a18ddce132
commit bef015d946
2 changed files with 293 additions and 0 deletions

View File

@@ -0,0 +1,169 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8896fe0..f2a09e2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -216,7 +215,7 @@ find_package(ZLIB 1.2 REQUIRED)
find_package(zstd 1.5 REQUIRED)
if (NOT YUZU_USE_EXTERNAL_VULKAN_HEADERS)
- find_package(Vulkan 1.3.238 REQUIRED)
+ find_package(Vulkan 1.3.236 REQUIRED)
endif()
if (ENABLE_LIBUSB)
diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt
index 8532fd7..67bed9a 100644
--- a/externals/CMakeLists.txt
+++ b/externals/CMakeLists.txt
@@ -29,13 +29,7 @@ endif()
add_subdirectory(glad)
# inih
-if (NOT TARGET inih::INIReader)
- add_subdirectory(inih)
-endif()
-# mbedtls
-add_subdirectory(mbedtls EXCLUDE_FROM_ALL)
-target_include_directories(mbedtls PUBLIC ./mbedtls/include)
# MicroProfile
add_library(microprofile INTERFACE)
@@ -77,18 +71,8 @@ if (YUZU_USE_EXTERNAL_SDL2)
endif()
# ENet
-if (NOT TARGET enet::enet)
- add_subdirectory(enet EXCLUDE_FROM_ALL)
- target_include_directories(enet INTERFACE ./enet/include)
- add_library(enet::enet ALIAS enet)
-endif()
# Cubeb
-if (ENABLE_CUBEB AND NOT TARGET cubeb::cubeb)
- set(BUILD_TESTS OFF)
- add_subdirectory(cubeb EXCLUDE_FROM_ALL)
- add_library(cubeb::cubeb ALIAS cubeb)
-endif()
# DiscordRPC
if (USE_DISCORD_PRESENCE AND NOT TARGET DiscordRPC::discord-rpc)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c7283e8..123a745 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -101,11 +101,6 @@ if (MSVC)
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/DEBUG /MANIFEST:NO /INCREMENTAL:NO /OPT:REF,ICF" CACHE STRING "" FORCE)
else()
add_compile_options(
- -Werror=all
- -Werror=extra
- -Werror=missing-declarations
- -Werror=shadow
- -Werror=unused
-Wno-attributes
-Wno-invalid-offsetof
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 9884a4a..46df96b 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -177,7 +177,7 @@ endif()
create_target_directory_groups(common)
target_link_libraries(common PUBLIC ${Boost_LIBRARIES} fmt::fmt microprofile Threads::Threads)
-target_link_libraries(common PRIVATE lz4::lz4 zstd::zstd LLVM::Demangle)
+target_link_libraries(common PRIVATE lz4 zstd::zstd LLVM::Demangle)
if (YUZU_USE_PRECOMPILED_HEADERS)
target_precompile_headers(common PRIVATE precompiled_headers.h)
diff --git a/src/common/scm_rev.cpp.in b/src/common/scm_rev.cpp.in
index f0c124d..739c4a6 100644
--- a/src/common/scm_rev.cpp.in
+++ b/src/common/scm_rev.cpp.in
@@ -3,9 +3,9 @@
#include "common/scm_rev.h"
-#define GIT_REV "@GIT_REV@"
-#define GIT_BRANCH "@GIT_BRANCH@"
-#define GIT_DESC "@GIT_DESC@"
+#define GIT_REV "d5f6201"
+#define GIT_BRANCH "master"
+#define GIT_DESC "d5f6201"
#define BUILD_NAME "@REPO_NAME@"
#define BUILD_DATE "@BUILD_DATE@"
#define BUILD_FULLNAME "@BUILD_FULLNAME@"
diff --git a/src/dedicated_room/CMakeLists.txt b/src/dedicated_room/CMakeLists.txt
index 136109a..6a6924c 100644
--- a/src/dedicated_room/CMakeLists.txt
+++ b/src/dedicated_room/CMakeLists.txt
@@ -15,7 +15,7 @@ if (ENABLE_WEB_SERVICE)
target_link_libraries(yuzu-room PRIVATE web_service)
endif()
-target_link_libraries(yuzu-room PRIVATE mbedtls mbedcrypto)
+target_link_libraries(yuzu-room PRIVATE mbedtls mbedcrypto mbedx509 mbedcrypto)
if (MSVC)
target_link_libraries(yuzu-room PRIVATE getopt)
endif()
diff --git a/src/network/network.cpp b/src/network/network.cpp
index 6652a18..8513d52 100644
--- a/src/network/network.cpp
+++ b/src/network/network.cpp
@@ -3,7 +3,7 @@
#include "common/assert.h"
#include "common/logging/log.h"
-#include "enet/enet.h"
+#include <enet/enet.h>
#include "network/network.h"
namespace Network {
diff --git a/src/video_core/vulkan_common/vulkan_wrapper.cpp b/src/video_core/vulkan_common/vulkan_wrapper.cpp
index 486d4df..abad557 100644
--- a/src/video_core/vulkan_common/vulkan_wrapper.cpp
+++ b/src/video_core/vulkan_common/vulkan_wrapper.cpp
@@ -337,18 +337,6 @@ const char* ToString(VkResult result) noexcept {
return "VK_ERROR_VALIDATION_FAILED_EXT";
case VkResult::VK_ERROR_INVALID_SHADER_NV:
return "VK_ERROR_INVALID_SHADER_NV";
- case VkResult::VK_ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR:
- return "VK_ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR";
- case VkResult::VK_ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR:
- return "VK_ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR";
- case VkResult::VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR:
- return "VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR";
- case VkResult::VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR:
- return "VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR";
- case VkResult::VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR:
- return "VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR";
- case VkResult::VK_ERROR_VIDEO_STD_VERSION_NOT_SUPPORTED_KHR:
- return "VK_ERROR_VIDEO_STD_VERSION_NOT_SUPPORTED_KHR";
case VkResult::VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT:
return "VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT";
case VkResult::VK_ERROR_FRAGMENTATION_EXT:
diff --git a/src/yuzu_cmd/CMakeLists.txt b/src/yuzu_cmd/CMakeLists.txt
index 46eddf4..afbe9ff 100644
--- a/src/yuzu_cmd/CMakeLists.txt
+++ b/src/yuzu_cmd/CMakeLists.txt
@@ -1,4 +1,6 @@
# SPDX-FileCopyrightText: 2018 yuzu Emulator Project
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(INIH REQUIRED INIReader)
# SPDX-License-Identifier: GPL-2.0-or-later
# Credits to Samantas5855 and others for this function.
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 3eee1cf..8775f79 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -808,7 +808,7 @@ endif()
create_target_directory_groups(core)
target_link_libraries(core PUBLIC common PRIVATE audio_core network video_core)
-target_link_libraries(core PUBLIC Boost::boost PRIVATE fmt::fmt nlohmann_json::nlohmann_json mbedtls Opus::opus)
+target_link_libraries(core PUBLIC Boost::boost PRIVATE fmt::fmt nlohmann_json::nlohmann_json mbedtls mbedcrypto mbedx509 Opus::opus)
if (MINGW)
target_link_libraries(core PRIVATE ${MSWSOCK_LIBRARY})
endif()

View File

@@ -0,0 +1,124 @@
# Copyright 2020-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake toolchain-funcs xdg
DESCRIPTION="An emulator for Nintendo Switch"
HOMEPAGE="https://yuzu-emu.org"
SRC_URI="https://github.com/yuzu-emu/yuzu-mainline/archive/d5f6201521cdfd0be09a187d62f95d3a38f18c3e.tar.gz -> ${P}.tar.gz
https://github.com/merryhime/dynarmic/archive/befe547d5631024a70d81d2ccee808bbfcb3854e.tar.gz -> ${PN}-dynarmic-${PV}.tar.gz
https://github.com/herumi/xbyak/archive/a1ac3750f9a639b5a6c6d6c7da4259b8d6790989.tar.gz -> ${PN}-xbyak-${PV}.tar.gz
https://github.com/yuzu-emu/sirit/archive/ab75463999f4f3291976b079d42d52ee91eebf3f.tar.gz -> ${PN}-sirit-${PV}.tar.gz
compatibility-list? ( https://gist.githubusercontent.com/mazes-80/e3f1518e67c3292656a9055ba338994f/raw/b975f96366294d9cf65f844ed8df9189a488463d/yuzu-0_p20230202-compatibility_list.json )
discord? ( https://github.com/yuzu-emu/discord-rpc/archive/20cc99aeffa08a4834f156b6ab49ed68618cf94a.tar.gz -> ${PN}-discord-${PV}.tar.gz )"
# Dynarmic is not intended to be generic, it is tweaked to fit emulated processor
# TODO wait 'xbyak' waiting version bump. see #860816
LICENSE="|| ( Apache-2.0 GPL-2+ ) 0BSD BSD GPL-2+ ISC MIT
!system-vulkan? ( Apache-2.0 )"
SLOT="0"
KEYWORDS="~amd64"
IUSE="+compatibility-list +cubeb discord +qt5 sdl +system-vulkan webengine webservice"
RDEPEND="
<net-libs/mbedtls-3.1[cmac]
>=app-arch/zstd-1.5
>=dev-libs/libfmt-9:=
>=dev-libs/openssl-1.1:=
>=media-video/ffmpeg-4.3:=
>=net-libs/enet-1.3
app-arch/lz4:=
dev-libs/boost:=[context]
media-libs/opus
sys-libs/zlib
virtual/libusb:1
cubeb? ( media-libs/cubeb )
qt5? (
>=dev-qt/qtcore-5.15:5
>=dev-qt/qtgui-5.15:5
>=dev-qt/qtmultimedia-5.15:5
>=dev-qt/qtwidgets-5.15:5
)
sdl? (
>=media-libs/libsdl2-2.0.18
>=dev-libs/inih-52
)
"
DEPEND="${RDEPEND}
dev-cpp/cpp-httplib
dev-cpp/cpp-jwt
system-vulkan? ( >=dev-util/vulkan-headers-1.3.236 )
"
BDEPEND="
>=dev-cpp/nlohmann_json-3.8.0
dev-cpp/robin-map
dev-util/glslang
discord? ( >=dev-libs/rapidjson-1.1.0 )
"
S="${WORKDIR}"/yuzu-mainline-d5f6201521cdfd0be09a187d62f95d3a38f18c3e
PATCHES=( "${FILESDIR}/${P}.patch" )
REQUIRED_USE="|| ( qt5 sdl )"
pkg_setup() {
if tc-is-gcc; then
[[ "$(gcc-major-version)" -lt 11 ]] && \
die "You need gcc version 11 or clang to compile this package"
fi
}
src_unpack() {
default
mv "${WORKDIR}"/dynarmic*/* "${S}/externals/dynarmic" || die
mv "${WORKDIR}"/sirit*/* "${S}/externals/sirit" || die
mv "${WORKDIR}"/xbyak*/* "${S}/externals/xbyak" || die
if use discord; then
mv "${WORKDIR}"/discord*/* "${S}/externals/discord-rpc" || die
fi
}
src_prepare() {
# Allow skip submodule downloading
rm .gitmodules || die
# Unbundle cubeb
use cubeb && sed -i '$afind_package(Threads REQUIRED)' CMakeLists.txt || die
if ! use discord; then
sed -i -e '/^if.*discord-rpc/,/^endif()/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=(
# Libraries are private and rely on circular dependency resolution.
-DBUILD_SHARED_LIBS=OFF # dynarmic
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=$(usex compatibility-list)
-DENABLE_CUBEB=$(usex cubeb)
-DENABLE_LIBUSB=ON
-DENABLE_QT=$(usex qt5)
-DENABLE_QT_TRANSLATION=$(usex qt5)
-DENABLE_SDL2=$(usex sdl)
-DENABLE_WEB_SERVICE=$(usex webservice)
-DSIRIT_USE_SYSTEM_SPIRV_HEADERS=yes
-DUSE_DISCORD_PRESENCE=$(usex discord)
-DYUZU_TESTS=OFF
-DYUZU_USE_EXTERNAL_VULKAN_HEADERS=$(use system-vulkan no yes)
-DYUZU_USE_EXTERNAL_SDL2=OFF
-DYUZU_USE_QT_WEB_ENGINE=$(usex webengine)
)
cmake_src_configure
if use compatibility-list; then
cp "${DISTDIR}"/${P}-compatibility_list.json "${BUILD_DIR}"/dist/compatibility_list/ || die
fi
}