aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Bauer <samuel.bauer@yahoo.fr>2022-07-26 03:55:59 +0200
committerSamuel Bauer <samuel.bauer@yahoo.fr>2022-07-26 04:20:16 +0200
commit4fa661d33a8320b29ef80a3fe37e405811bafa67 (patch)
treefb13dc3ceeccf3b9e460179887179bd6e76d4027 /games-emulation/yuzu
parentgames-emulation/yuzu: unbundle sirit cpp-httplib (diff)
downloadguru-4fa661d33a8320b29ef80a3fe37e405811bafa67.tar.gz
guru-4fa661d33a8320b29ef80a3fe37e405811bafa67.tar.bz2
guru-4fa661d33a8320b29ef80a3fe37e405811bafa67.zip
dev-libs/sirit: new ebuild
Signed-off-by: Samuel Bauer <samuel.bauer@yahoo.fr>
Diffstat (limited to 'games-emulation/yuzu')
-rw-r--r--games-emulation/yuzu/Manifest5
-rw-r--r--games-emulation/yuzu/files/yuzu-0_p20220725.patch175
-rw-r--r--games-emulation/yuzu/yuzu-0_p20220725.ebuild117
3 files changed, 297 insertions, 0 deletions
diff --git a/games-emulation/yuzu/Manifest b/games-emulation/yuzu/Manifest
new file mode 100644
index 000000000..d48c4e7d7
--- /dev/null
+++ b/games-emulation/yuzu/Manifest
@@ -0,0 +1,5 @@
+DIST yuzu-0_p20220725-compatibility_list.json 1255189 BLAKE2B e2f39f6703bfd49e918d62bcc05d03ae19e3c9be45ade4b266bf9ba8956fd3e8ef246db4804e72d4eb4782f0008ac63d118217e3ef95bbe4c148008c4b764407 SHA512 ba3b149c91d11be2f1033214f03a09e5a3b5cfd559acba40a78f3b3932a93675ff6751eb2701326adc15b90cb2508c03698c3a531fe1cb4ed445a5b189424410
+DIST yuzu-0_p20220725.tar.gz 4929471 BLAKE2B 0d7f633936ef571da02562a853576ad1acd5dcae9035e2539ea94269d3c266cc9ba60ad8c8b9cd1f15413de3ab2bbb9b9cb8fa0fb6d6d20561a4f42d89c99662 SHA512 8f2ab5dd406cdb26821ad621cb816f22866a83d92969fea6b90c77c8cb9e1d39e4179c1e3c5aa4be56ed8f1707c801071dd90807f6011bc8a631f62b22930d2e
+DIST yuzu-discord-0_p20220725.tar.gz 2108078 BLAKE2B e89ee4a196167cabaecfab82d191516eb0cf0fa89e35f95b6d118d5baad25f5d13d9002a8dcfe4aba099af7b9c1eb72835eb3baa9e4deaedd2754e99687b5967 SHA512 06205287addabfb343ccd9af997b693ed221fe564355d3629d4dee6c003e768b3f65f2b34eb04ef29807a15c5fa34b04c664212b7e0d15b09ad9a4e4be10a560
+DIST yuzu-dynarmic-0_p20220725.tar.gz 2668960 BLAKE2B 5089f2d536664f5b38ee54eb17c37721a8dc8ffb80712f69461a94ddfd3cb2cd1a26df84720d2574b0156571ec6a9daf3861092de0669e195d6e49283c24fc11 SHA512 1915b0c8d06cf25f074b457e6e6a6944a01f4e3273e8979e71649d7b273484cff344c87a9da7115862a7c8c1f75c8b2ff5110e3079935d1212173fdc00a71a77
+DIST yuzu-xbyak-0_p20220725.tar.gz 227168 BLAKE2B 6d03000be6a37704b86948ac58b9f2fd3809a892e59018be7e109eb6ce866727e83cb775307ae049b9aa5048028b3390e14b131f6cbda10e346be2acd866a20b SHA512 792146aefc2e3af9f412db383b4fcbd5e945f9814bde25cc18ea76a6f276c3bd6c38edb581074a2b48d11176a398cc6873556b5e2986449fe0417b7e46c09d95
diff --git a/games-emulation/yuzu/files/yuzu-0_p20220725.patch b/games-emulation/yuzu/files/yuzu-0_p20220725.patch
new file mode 100644
index 000000000..ad0b53f96
--- /dev/null
+++ b/games-emulation/yuzu/files/yuzu-0_p20220725.patch
@@ -0,0 +1,175 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 40ca8b1..c0f07e2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -553,3 +553,4 @@ if(ENABLE_QT AND UNIX AND NOT APPLE)
+ install(FILES "dist/org.yuzu_emu.yuzu.metainfo.xml"
+ DESTINATION "share/metainfo")
+ endif()
++find_package(Threads REQUIRED)
+diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt
+index bd01f4c..a29dd5d 100644
+--- a/externals/CMakeLists.txt
++++ b/externals/CMakeLists.txt
+@@ -4,14 +4,6 @@ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMakeModules")
+ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/externals/find-modules")
+ include(DownloadExternals)
+
+-# xbyak
+-if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64)
+- add_library(xbyak INTERFACE)
+- file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/xbyak/include)
+- file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/xbyak/xbyak DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/xbyak/include)
+- target_include_directories(xbyak SYSTEM INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/xbyak/include)
+- target_compile_definitions(xbyak INTERFACE XBYAK_NO_OP_NAMES)
+-endif()
+
+ # Dynarmic
+ if (ARCHITECTURE_x86_64)
+@@ -29,12 +21,7 @@ endif()
+ # Glad
+ add_subdirectory(glad)
+
+-# inih
+-add_subdirectory(inih)
+
+-# mbedtls
+-add_subdirectory(mbedtls EXCLUDE_FROM_ALL)
+-target_include_directories(mbedtls PUBLIC ./mbedtls/include)
+
+ # MicroProfile
+ add_library(microprofile INTERFACE)
+@@ -76,7 +63,6 @@ endif()
+ # Cubeb
+ if(ENABLE_CUBEB)
+ set(BUILD_TESTS OFF CACHE BOOL "")
+- add_subdirectory(cubeb EXCLUDE_FROM_ALL)
+ endif()
+
+ # DiscordRPC
+@@ -86,7 +72,6 @@ if (USE_DISCORD_PRESENCE)
+ endif()
+
+ # Sirit
+-add_subdirectory(sirit)
+
+ if (ENABLE_WEB_SERVICE)
+ find_package(OpenSSL 1.1)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 39ae573..e1e1277 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -107,7 +107,6 @@ else()
+ -Werror=switch
+ -Werror=uninitialized
+ -Werror=unused-function
+- -Werror=unused-result
+ -Werror=unused-variable
+ -Wextra
+ -Wmissing-declarations
+diff --git a/src/common/scm_rev.cpp.in b/src/common/scm_rev.cpp.in
+index cc88994..61d5bd8 100644
+--- a/src/common/scm_rev.cpp.in
++++ b/src/common/scm_rev.cpp.in
+@@ -4,9 +4,9 @@
+
+ #include "common/scm_rev.h"
+
+-#define GIT_REV "@GIT_REV@"
+-#define GIT_BRANCH "@GIT_BRANCH@"
+-#define GIT_DESC "@GIT_DESC@"
++#define GIT_REV "dfaab8f"
++#define GIT_BRANCH "master"
++#define GIT_DESC "dfaab8f"
+ #define BUILD_NAME "@REPO_NAME@"
+ #define BUILD_DATE "@BUILD_DATE@"
+ #define BUILD_FULLNAME "@BUILD_FULLNAME@"
+diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
+index 32cc2f3..4c490a3 100644
+--- a/src/core/CMakeLists.txt
++++ b/src/core/CMakeLists.txt
+@@ -1,3 +1,7 @@
++find_path(MBEDTLS_INCLUDE_DIR NAMES mbedtls/ssl.h)
++find_library(MBEDTLS_LIB NAMES mbedtls)
++find_library(MBEDX509_LIB NAMES mbedx509)
++find_library(MBEDCRYPTO_LIB NAMES mbedcrypto)
+ add_library(core STATIC
+ arm/arm_interface.h
+ arm/arm_interface.cpp
+@@ -781,7 +785,7 @@ endif()
+ create_target_directory_groups(core)
+
+ target_link_libraries(core PUBLIC common PRIVATE audio_core 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()
+diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt
+index 14de7bc..e52caa0 100644
+--- a/src/video_core/CMakeLists.txt
++++ b/src/video_core/CMakeLists.txt
+@@ -240,7 +240,7 @@ target_link_options(video_core PRIVATE ${FFmpeg_LDFLAGS})
+
+ add_dependencies(video_core host_shaders)
+ target_include_directories(video_core PRIVATE ${HOST_SHADERS_INCLUDE})
+-target_include_directories(video_core PRIVATE sirit ../../externals/Vulkan-Headers/include)
++target_include_directories(video_core PRIVATE sirit /usr/include/vulkan/)
+ target_link_libraries(video_core PRIVATE sirit)
+
+ if (ENABLE_NSIGHT_AFTERMATH)
+diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt
+index 57e0e70..657db12 100644
+--- a/src/yuzu/CMakeLists.txt
++++ b/src/yuzu/CMakeLists.txt
+@@ -260,7 +260,7 @@ target_link_libraries(yuzu PRIVATE common core input_common video_core)
+ target_link_libraries(yuzu PRIVATE Boost::boost glad Qt::Widgets Qt::Multimedia)
+ target_link_libraries(yuzu PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
+
+-target_include_directories(yuzu PRIVATE ../../externals/Vulkan-Headers/include)
++target_include_directories(yuzu PRIVATE /usr/include/vulkan/)
+ if (NOT WIN32)
+ target_include_directories(yuzu PRIVATE ${Qt5Gui_PRIVATE_INCLUDE_DIRS})
+ endif()
+diff --git a/src/yuzu_cmd/CMakeLists.txt b/src/yuzu_cmd/CMakeLists.txt
+index c8901f2..2a45006 100644
+--- a/src/yuzu_cmd/CMakeLists.txt
++++ b/src/yuzu_cmd/CMakeLists.txt
+@@ -1,4 +1,6 @@
+ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMakeModules)
++find_package(PkgConfig REQUIRED)
++pkg_check_modules(INIH REQUIRED INIReader)
+
+ # Credits to Samantas5855 and others for this function.
+ function(create_resource file output filename)
+@@ -28,7 +30,7 @@ add_executable(yuzu-cmd
+ create_target_directory_groups(yuzu-cmd)
+
+ target_link_libraries(yuzu-cmd PRIVATE common core input_common)
+-target_link_libraries(yuzu-cmd PRIVATE inih glad)
++target_link_libraries(yuzu-cmd PRIVATE ${INIH_LIBRARIES} glad)
+ if (MSVC)
+ target_link_libraries(yuzu-cmd PRIVATE getopt)
+ endif()
+@@ -37,7 +39,7 @@ target_link_libraries(yuzu-cmd PRIVATE ${PLATFORM_LIBRARIES} SDL2 Threads::Threa
+ create_resource("../../dist/yuzu.bmp" "yuzu_cmd/yuzu_icon.h" "yuzu_icon")
+ target_include_directories(yuzu-cmd PRIVATE ${RESOURCES_DIR})
+
+-target_include_directories(yuzu-cmd PRIVATE ../../externals/Vulkan-Headers/include)
++target_include_directories(yuzu-cmd PRIVATE /usr/include/vulkan/)
+
+ if (YUZU_USE_EXTERNAL_SDL2)
+ target_compile_definitions(yuzu-cmd PRIVATE -DYUZU_USE_EXTERNAL_SDL2)
+diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp
+index ad7f9d2..60f8a47 100644
+--- a/src/yuzu_cmd/config.cpp
++++ b/src/yuzu_cmd/config.cpp
+@@ -16,7 +16,7 @@
+ #pragma clang diagnostic pop
+ #endif
+
+-#include <inih/cpp/INIReader.h>
++#include <INIReader.h>
+ #include "common/fs/file.h"
+ #include "common/fs/fs.h"
+ #include "common/fs/path_util.h"
diff --git a/games-emulation/yuzu/yuzu-0_p20220725.ebuild b/games-emulation/yuzu/yuzu-0_p20220725.ebuild
new file mode 100644
index 000000000..14d30fe5a
--- /dev/null
+++ b/games-emulation/yuzu/yuzu-0_p20220725.ebuild
@@ -0,0 +1,117 @@
+# Copyright 2022 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/dfaab8f6571856ec3c75cfad303a50503d213665.tar.gz -> ${P}.tar.gz
+ https://github.com/merryhime/dynarmic/archive/91d1f944e3870e0f3c505b48f5ec00ca9a82b95d.tar.gz -> ${PN}-dynarmic-${PV}.tar.gz
+ https://github.com/herumi/xbyak/archive/c306b8e5786eeeb87b8925a8af5c3bf057ff5a90.tar.gz -> ${PN}-xbyak-${PV}.tar.gz
+ compatibility-list? ( yuzu-0_p20220725-compatibility_list.json )
+ discord? ( https://github.com/discord/discord-rpc/archive/963aa9f3e5ce81a4682c6ca3d136cddda614db33.tar.gz -> ${PN}-discord-${PV}.tar.gz )"
+# Dynarmic is not intended to be generic, it is tweaked to fit emulated processor
+# xbyak >= 5.96 still not in portage. sent version bump on gentoo BT, can't be in guru as package already exists
+# discord-rpc: help appreciated to make ebuild, as I never use it I surely will stick to snapshot download
+# TODO host compatibility_list.json
+
+LICENSE="|| ( Apache-2.0 GPL-2+ ) 0BSD BSD GPL-2+ ISC MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+compatibility-list +cubeb discord +qt5 sdl webengine +webservice"
+
+RDEPEND="
+ <net-libs/mbedtls-3.1[cmac]
+ >=app-arch/zstd-1.5
+ >=dev-libs/libfmt-8:=
+ >=dev-libs/openssl-1.1:=
+ >=media-video/ffmpeg-4.3:=
+ app-arch/lz4:=
+ dev-libs/boost:=[context]
+ dev-libs/sirit
+ 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/qtwidgets-5.15:5
+ )
+ sdl? (
+ >=media-libs/libsdl2-2.0.18
+ >=dev-libs/inih-52
+ )
+"
+DEPEND="${RDEPEND}
+ dev-libs/cpp-httplib
+ >=dev-util/vulkan-headers-1.3.216
+"
+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 )
+"
+S="${WORKDIR}"/yuzu-mainline-dfaab8f6571856ec3c75cfad303a50503d213665
+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}"/xbyak* ${S}/externals/xbyak/xbyak || die
+ mv "${WORKDIR}"/dynarmic*/* ${S}/externals/dynarmic || die
+ if use discord; then
+ mv "${WORKDIR}"/discord*/* ${S}/externals/discord-rpc || die
+ fi
+}
+
+src_prepare() {
+ # Allow skip submodule downloading
+ rm .gitmodules || 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=(
+ # Libraries are private and rely on circular dependency resolution.
+ -DBUILD_SHARED_LIBS=OFF # dynarmic
+ -DDYNARMIC_NO_BUNDLED_ROBIN_MAP=ON
+ -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=$(usex compatibility-list)
+ -DENABLE_CUBEB=$(usex cubeb)
+ -DENABLE_QT=$(usex qt5)
+ -DENABLE_QT_TRANSLATION=$(usex qt5)
+ -DENABLE_SDL2=$(usex sdl)
+ -DENABLE_WEB_SERVICE=$(usex webservice)
+ -DUSE_DISCORD_PRESENCE=$(usex discord)
+ -DYUZU_USE_BUNDLED_OPUS=OFF
+ -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
+}