aboutsummaryrefslogtreecommitdiffstats
path: root/games-emulation
diff options
context:
space:
mode:
Diffstat (limited to 'games-emulation')
-rw-r--r--games-emulation/cemu/Manifest7
-rw-r--r--games-emulation/cemu/cemu-2.0_p20240315.ebuild91
-rw-r--r--games-emulation/cemu/files/cemu-0002-remove-default-from-system-g.patch39
-rw-r--r--games-emulation/cemu/livecheck.json1
-rw-r--r--games-emulation/cemu/metadata.xml16
5 files changed, 154 insertions, 0 deletions
diff --git a/games-emulation/cemu/Manifest b/games-emulation/cemu/Manifest
new file mode 100644
index 0000000..dc8714b
--- /dev/null
+++ b/games-emulation/cemu/Manifest
@@ -0,0 +1,7 @@
+AUX cemu-0002-remove-default-from-system-g.patch 1732 BLAKE2B e4cec5aa4deb71ced3153e6a715b7fd554baf71f8152334039ee6de1047f1e88d55229494c9adeddbb5fd41e4cd82365f8eaaccc0be57856002cfb7e4820071f SHA512 975b9c30b2089471432fc15e277aaffc3d61ad3d999ef1bcd2b6cf53f093c44aee6ff5adbfa3afb97e8ebc69d0335c5c7bf0871b27de27d8640d250ecb106951
+DIST cemu-2.0_p20240315.tar.gz 23076505 BLAKE2B ceed41ef05ed8ae43be28db15b86212cfbec783ca949ad2daa854b58cef1cf33aa59ac798c3f272016a31c97ab1793ef492f8ef9314e26d5efb9393e6ff040c1 SHA512 661998de2bd4821aca4bfb5c9a88b1db66b9436d3c0c2579fdf02376552d1ac5035e63864fcd2326f97a0689935b14869680f28174d3a7b8e2a3ebed9a8d9664
+DIST cemu-imgui-1.88.tar.gz 1488062 BLAKE2B 1c7b05dc6862f1a9bb597e97f9205fad0c4c39052731e27437f475547c7439773b55384ba7764ba38b63a74040acc308e2982bf166bdf76cbe58183dd4d6451d SHA512 bfb7381334f1493d64386321401086e4136129b3cc57bf57505ec6183008dddab1a2056b0af2610bc3286c606bafdf9b6e3ebc103131e0504bab2336662bc2c1
+DIST glslang-36d08c0.tar.gz 3769785 BLAKE2B 923bfada8484a3bb91dd92a242d7096017b77fd399a90052af121658221069215e277d51fb4b9b95821b9272e44618f91883c2dc49bfb671c52a941d54aec182 SHA512 184baa0bc22d5e79bf8424692b5c8bb51676ca20819551cf406a4fd898dd1ad5ca7296e26ce7b99878e627dcafc4cd435933dd939c91753c5050022052e1dbe5
+EBUILD cemu-2.0_p20240315.ebuild 2530 BLAKE2B 7b92801a7f8f111fb08c68ab07e2bc09d2ba1a7bebba9cfbb39b42c1b198500d1dcc1f21e297545f01f604b80ee64ef42ca5cdb171bb0ccdc9812f668605ca62 SHA512 828d720a82710df70d7fb16f6244309fb397d06880a3eab03b81803ab0019feae07c03f9352d7d1b589ea3107b10300f8593c6caf6b4a5b9b0c9c321b6500929
+MISC livecheck.json 21 BLAKE2B 1de70d2f5294408ee9b12a1b7de8e269e3235e364057b1990639ed44e1fb321b332f8d2f7dbee7d7a5e9cee7d7715a7cfc648a70f5712a50469dbe42b692c9f6 SHA512 2c88382dcef11ddac7290ceea8b608e969bc3bea609bab020cbcfbf08e67b7dc3fed6c648bde9a319ff9273e80cf13b2dedd2c6d743e9c941eca7ebd249e5bd5
+MISC metadata.xml 517 BLAKE2B f9ce035853a48e0c099999f87a98e0b25a18e13e3941a2e308ddd8f038693452b85bf7572f751544b6791b2ca3d628a2564dbd68e993335060a5fe6f1f725d41 SHA512 eb48f05416c6b089d2b03ed144b335b472a96db85ab5606bdf0bcd4a04c3e8790b8a5de918cf416e0795fa546e3817338f99d30dd9dd7b6537a0485017401fc6
diff --git a/games-emulation/cemu/cemu-2.0_p20240315.ebuild b/games-emulation/cemu/cemu-2.0_p20240315.ebuild
new file mode 100644
index 0000000..b5defc3
--- /dev/null
+++ b/games-emulation/cemu/cemu-2.0_p20240315.ebuild
@@ -0,0 +1,91 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake desktop xdg
+
+DESCRIPTION="Wii U emulator."
+HOMEPAGE="https://cemu.info/ https://github.com/cemu-project/Cemu"
+SHA="eaa82817dd235b5067002df76b06e66a550ac1d3"
+MY_PN="Cemu"
+GLSLANG_SHA="36d08c0d940cf307a23928299ef52c7970d8cee6"
+IMGUI_PV="1.88"
+SRC_URI="https://github.com/cemu-project/${MY_PN}/archive/${SHA}.tar.gz -> ${P}.tar.gz
+ https://github.com/ocornut/imgui/archive/refs/tags/v${IMGUI_PV}.tar.gz -> ${PN}-imgui-${IMGUI_PV}.tar.gz
+ https://github.com/KhronosGroup/glslang/archive/${GLSLANG_SHA}.tar.gz -> glslang-${GLSLANG_SHA:0:7}.tar.gz"
+
+LICENSE="MPL-2.0 ISC"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+cubeb discord +sdl +vulkan"
+
+DEPEND="app-arch/zarchive
+ app-arch/zstd
+ cubeb? ( media-libs/cubeb )
+ dev-libs/boost
+ dev-libs/glib
+ dev-libs/hidapi
+ >=dev-libs/libfmt-9.1.0:=
+ dev-libs/libzip
+ dev-libs/openssl
+ dev-libs/pugixml
+ dev-libs/rapidjson
+ dev-libs/wayland
+ media-libs/libglvnd
+ media-libs/libsdl2[haptic,joystick,threads]
+ net-misc/curl
+ sys-libs/zlib
+ vulkan? ( dev-util/vulkan-headers )
+ x11-libs/gtk+:3[wayland]
+ x11-libs/libX11
+ x11-libs/wxGTK:3.2-gtk3[opengl,X]
+ virtual/libusb"
+RDEPEND="${DEPEND}"
+BDEPEND="media-libs/glm"
+
+S="${WORKDIR}/${MY_PN}-${SHA}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0002-remove-default-from-system-g.patch"
+)
+
+src_prepare() {
+ sed -re \
+ 's/^target_link_libraries\(CemuBin.*/target_link_libraries(CemuBin PRIVATE wayland-client/' \
+ -i src/CMakeLists.txt || die
+ mv "${WORKDIR}/glslang-${GLSLANG_SHA}" "${S}/glslang" || die
+ sed -re 's/find_package\(glslang.*/add_subdirectory(glslang)/' -i CMakeLists.txt || die
+ cmake_src_prepare
+ rmdir dependencies/imgui || die
+ mv "${WORKDIR}/imgui-${IMGUI_PV}" dependencies/imgui || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_SHARED_LIBS=OFF
+ "-DENABLE_CUBEB=$(usex cubeb)"
+ "-DENABLE_DISCORD_RPC=$(usex discord)"
+ -DENABLE_OPENGL=ON
+ "-DENABLE_SDL=$(usex sdl)"
+ -DENABLE_VCPKG=OFF
+ "-DENABLE_VULKAN=$(usex vulkan)"
+ -DENABLE_WXWIDGETS=ON
+ -DPORTABLE=OFF
+ -DCMAKE_DISABLE_PRECOMPILE_HEADERS=OFF
+ -DALLOW_EXTERNAL_SPIRV_TOOLS=ON
+ -Wno-dev
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ newbin "bin/${MY_PN}_relwithdebinfo" "$MY_PN"
+ insinto "/usr/share/${PN}/gameProfiles"
+ doins -r bin/gameProfiles/default/*
+ insinto "/usr/share/${PN}"
+ doins -r bin/resources bin/shaderCache
+ einstalldocs
+ newicon -s 128 src/resource/logo_icon.png "info.${PN}.${MY_PN}.png"
+ domenu "dist/linux/info.${PN}.${MY_PN}.desktop"
+}
diff --git a/games-emulation/cemu/files/cemu-0002-remove-default-from-system-g.patch b/games-emulation/cemu/files/cemu-0002-remove-default-from-system-g.patch
new file mode 100644
index 0000000..ee05b94
--- /dev/null
+++ b/games-emulation/cemu/files/cemu-0002-remove-default-from-system-g.patch
@@ -0,0 +1,39 @@
+From 64707c83cd3e060606781b87813ff6b73566d342 Mon Sep 17 00:00:00 2001
+From: Andrew Udvare <audvare@gmail.com>
+Date: Fri, 2 Sep 2022 00:19:59 -0400
+Subject: [PATCH 2/3] Remove /default/ from system gameProfiles path
+
+---
+ src/Cafe/CafeSystem.cpp | 2 +-
+ src/Cafe/GameProfile/GameProfile.cpp | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/Cafe/CafeSystem.cpp b/src/Cafe/CafeSystem.cpp
+index 19b6c49..f00c469 100644
+--- a/src/Cafe/CafeSystem.cpp
++++ b/src/Cafe/CafeSystem.cpp
+@@ -216,7 +216,7 @@ void InfoLog_TitleLoaded()
+ // game profile info
+ std::string gameProfilePath;
+ if(g_current_game_profile->IsDefaultProfile())
+- gameProfilePath = fmt::format("gameProfiles/default/{:016x}.ini", titleId);
++ gameProfilePath = fmt::format("gameProfiles/{:016x}.ini", titleId);
+ else
+ gameProfilePath = fmt::format("gameProfiles/{:016x}.ini", titleId);
+ cemuLog_log(LogType::Force, "gameprofile path: {}", g_current_game_profile->IsLoaded() ? gameProfilePath : std::string(" (not present)"));
+diff --git a/src/Cafe/GameProfile/GameProfile.cpp b/src/Cafe/GameProfile/GameProfile.cpp
+index 24aee64..06f233b 100644
+--- a/src/Cafe/GameProfile/GameProfile.cpp
++++ b/src/Cafe/GameProfile/GameProfile.cpp
+@@ -185,7 +185,7 @@ bool GameProfile::Load(uint64_t title_id)
+ std::optional<std::vector<uint8>> profileContents = FileStream::LoadIntoMemory(gameProfilePath);
+ if (!profileContents)
+ {
+- gameProfilePath = ActiveSettings::GetDataPath("gameProfiles/default/{:016x}.ini", title_id);
++ gameProfilePath = ActiveSettings::GetDataPath("gameProfiles/{:016x}.ini", title_id);
+ profileContents = FileStream::LoadIntoMemory(gameProfilePath);
+ if (!profileContents)
+ return false;
+--
+2.37.3
+
diff --git a/games-emulation/cemu/livecheck.json b/games-emulation/cemu/livecheck.json
new file mode 100644
index 0000000..0317f26
--- /dev/null
+++ b/games-emulation/cemu/livecheck.json
@@ -0,0 +1 @@
+{ "branch": "main" }
diff --git a/games-emulation/cemu/metadata.xml b/games-emulation/cemu/metadata.xml
new file mode 100644
index 0000000..b9f38a6
--- /dev/null
+++ b/games-emulation/cemu/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>audvare@gmail.com</email>
+ <name>Andrew Udvare</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">cemu-project/Cemu</remote-id>
+ </upstream>
+ <use>
+ <flag name="cubeb">Enable cubeb audio support</flag>
+ <flag name="discord">Enable rich Discord presence</flag>
+ <flag name="vulkan">Enable Vulkan graphics support</flag>
+ </use>
+</pkgmetadata>