aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOctiabrina Terrien-Puig <octiabrina@myrvogna.net>2021-04-09 09:00:47 +0200
committerOctiabrina Terrien-Puig <octiabrina@myrvogna.net>2021-04-09 09:00:47 +0200
commit4164c7276ed07dc9496ae8d606b7700714172db8 (patch)
tree3d3a9890d5b424033ce707560696048cfb61643b /games-emulation
parentmedia-gfx/sic: add NASM build dep, close #781107 (diff)
downloadguru-4164c7276ed07dc9496ae8d606b7700714172db8.tar.gz
guru-4164c7276ed07dc9496ae8d606b7700714172db8.tar.bz2
guru-4164c7276ed07dc9496ae8d606b7700714172db8.zip
games-emulation/duckstation: new package
Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Octiabrina Terrien-Puig <octiabrina@myrvogna.net>
Diffstat (limited to 'games-emulation')
-rw-r--r--games-emulation/duckstation/duckstation-9999.ebuild103
-rw-r--r--games-emulation/duckstation/files/duckstation-nogui.desktop10
-rw-r--r--games-emulation/duckstation/files/duckstation-qt.desktop10
-rw-r--r--games-emulation/duckstation/metadata.xml26
4 files changed, 149 insertions, 0 deletions
diff --git a/games-emulation/duckstation/duckstation-9999.ebuild b/games-emulation/duckstation/duckstation-9999.ebuild
new file mode 100644
index 000000000..42bf022bc
--- /dev/null
+++ b/games-emulation/duckstation/duckstation-9999.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake desktop git-r3 xdg-utils
+
+DESCRIPTION="Fast Sony PlayStation (PSX) emulator"
+HOMEPAGE="https://github.com/stenzek/duckstation"
+EGIT_REPO_URI="https://github.com/stenzek/duckstation.git"
+EGIT_CHECKOUT_DIR="${WORKDIR}/${PN}"
+EGIT_SUBMODULES=()
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="discord egl evdev fbdev +gamepad gbm +nogui qt5 retroachievements wayland X"
+
+# Either or both frontends must be built
+REQUIRED_USE="
+ ?? ( fbdev gbm )
+ gbm? ( egl )
+ wayland? ( egl )
+"
+
+BDEPEND="
+ virtual/pkgconfig
+ wayland? ( kde-frameworks/extra-cmake-modules )
+"
+DEPEND="
+ evdev? ( dev-libs/libevdev )
+ gamepad? ( media-libs/libsdl2 )
+ gbm? ( x11-libs/libdrm )
+ qt5? (
+ dev-qt/qtcore
+ dev-qt/qtgui
+ dev-qt/qtnetwork
+ )
+ retroachievements? ( net-misc/curl[curl_ssl_gnutls] )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXrandr
+ )
+"
+RDEPEND="${DEPEND}"
+
+# Set working directory to checkout directory
+S="${WORKDIR}/${PN}"
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_NOGUI_FRONTEND=$(usex nogui)
+ -DBUILD_QT_FRONTEND=$(usex qt5)
+ -DENABLE_CHEEVOS=$(usex retroachievements)
+ –DENABLE_DISCORD_PRESENCE=$(usex discord)
+ -DUSE_DRMKMS=$(usex gbm)
+ -DUSE_EGL=$(usex egl)
+ -DUSE_EVDEV=$(usex evdev)
+ -DUSE_FBDEV=$(usex fbdev)
+ -DUSE_SDL2=$(usex gamepad)
+ -DUSE_WAYLAND=$(usex wayland)
+ -DUSE_X11=$(usex X)
+
+ -DBUILD_SHARED_LIBS=OFF
+ )
+
+ cmake_src_configure
+}
+
+src_install() {
+ dodoc README.md
+
+ # Binary and resources files must be in same directory – installing in /opt
+ insinto /opt/${PN}
+ doins -r "${BUILD_DIR}"/bin/{database,inputprofiles,resources,shaders}
+
+ if use nogui; then
+ newicon -s 16 appimage/icon-16px.png duckstation-nogui
+ newicon -s 32 appimage/icon-32px.png duckstation-nogui
+ newicon -s 48 appimage/icon-48px.png duckstation-nogui
+ newicon -s 64 appimage/icon-64px.png duckstation-nogui
+ domenu "${FILESDIR}"/duckstation-nogui.desktop
+ doins "${BUILD_DIR}"/bin/duckstation-nogui
+ fperms +x /opt/${PN}/duckstation-nogui
+ fi
+
+ if use qt5; then
+ newicon -s 16 appimage/icon-16px.png duckstation-qt
+ newicon -s 32 appimage/icon-32px.png duckstation-qt
+ newicon -s 48 appimage/icon-48px.png duckstation-qt
+ newicon -s 64 appimage/icon-64px.png duckstation-qt
+ domenu "${FILESDIR}"/duckstation-qt.desktop
+ doins "${BUILD_DIR}"/bin/duckstation-qt
+ fperms +x /opt/${PN}/duckstation-qt
+ fi
+}
+
+pkg_postinst() {
+ xdg_icon_cache_update
+}
+
+pkg_postrm() {
+ xdg_icon_cache_update
+}
diff --git a/games-emulation/duckstation/files/duckstation-nogui.desktop b/games-emulation/duckstation/files/duckstation-nogui.desktop
new file mode 100644
index 000000000..dccebffdc
--- /dev/null
+++ b/games-emulation/duckstation/files/duckstation-nogui.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Type=Application
+Name=DuckStation NoGUI
+GenericName=PlayStation 1 Emulator
+Comment=Fast-ish PlayStation 1 emulator
+Icon=duckstation-nogui
+TryExec=/opt/duckstation/duckstation-nogui
+Exec=/opt/duckstation/duckstation-nogui %f
+Terminal=false
+Categories=Game;Emulator;
diff --git a/games-emulation/duckstation/files/duckstation-qt.desktop b/games-emulation/duckstation/files/duckstation-qt.desktop
new file mode 100644
index 000000000..26e02be15
--- /dev/null
+++ b/games-emulation/duckstation/files/duckstation-qt.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Type=Application
+Name=DuckStation Qt
+GenericName=PlayStation 1 Emulator
+Comment=Fast-ish PlayStation 1 emulator
+Icon=duckstation-qt
+TryExec=/opt/duckstation/duckstation-qt
+Exec=/opt/duckstation/duckstation-qt %f
+Terminal=false
+Categories=Game;Emulator;Qt;
diff --git a/games-emulation/duckstation/metadata.xml b/games-emulation/duckstation/metadata.xml
new file mode 100644
index 000000000..836f45531
--- /dev/null
+++ b/games-emulation/duckstation/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>octiabrina@myrvogna.net</email>
+ <name>Octiabrina Terrien-Puig</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">stenzek/duckstation</remote-id>
+ </upstream>
+ <longdescription>
+ DuckStation is a fast emulator of the Sony PlayStation (PSX),
+ focused on playability, speed, and long-term maintainability.
+ </longdescription>
+ <use>
+ <flag name="discord">Enable Discord Rich Presence to show the current game on Discord</flag>
+ <flag name="egl">Enable EGL support</flag>
+ <flag name="evdev">Support EVDev controller interface</flag>
+ <flag name="fbdev">Support FBDev OpenGL contexts</flag>
+ <flag name="gamepad">Link with SDL2 for controller support</flag>
+ <flag name="gbm">Support DRM/KMS OpenGL contexts</flag>
+ <flag name="nogui">Build the NoGUI frontend</flag>
+ <flag name="qt5">Build the QT frontend</flag>
+ <flag name="retroachievements">Build with RetroAchievements supports</flag>
+ </use>
+</pkgmetadata>