diff options
author | Gonçalo Negrier Duarte <gonegrier.duarte@gmail.com> | 2024-04-02 16:41:52 +0100 |
---|---|---|
committer | Bernard Cafarelli <voyageur@gentoo.org> | 2024-04-09 09:24:36 +0200 |
commit | 1890d689a91c1c480bbd817c19990db09946def4 (patch) | |
tree | 8c98004673b5604776ead9d06debc2fd6f5f6db3 /games-util | |
parent | games-util/heroic-bin: add 2.13.0-r1 drop 2.13.0 (diff) | |
download | gentoo-1890d689a91c1c480bbd817c19990db09946def4.tar.gz gentoo-1890d689a91c1c480bbd817c19990db09946def4.tar.bz2 gentoo-1890d689a91c1c480bbd817c19990db09946def4.zip |
games-util/heroic-bin: add 2.14.1-r1 drop 2.14.1
* add gamescope useflag
* Launch Heroic with gamescope (desktop file)
* https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/wiki/How-To:-Other-Tools-and-Wrappers-(gamescope)#gamescoped-heroic---as-seperate-app
Signed-off-by: Gonçalo Negrier Duarte <gonegrier.duarte@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/36168
Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org>
Diffstat (limited to 'games-util')
-rw-r--r-- | games-util/heroic-bin/heroic-bin-2.14.1-r1.ebuild (renamed from games-util/heroic-bin/heroic-bin-2.14.1.ebuild) | 19 | ||||
-rw-r--r-- | games-util/heroic-bin/metadata.xml | 3 |
2 files changed, 21 insertions, 1 deletions
diff --git a/games-util/heroic-bin/heroic-bin-2.14.1.ebuild b/games-util/heroic-bin/heroic-bin-2.14.1-r1.ebuild index 28c41dfca7d8..4710be3359f5 100644 --- a/games-util/heroic-bin/heroic-bin-2.14.1.ebuild +++ b/games-util/heroic-bin/heroic-bin-2.14.1-r1.ebuild @@ -28,6 +28,7 @@ S="${WORKDIR}/${P/-bin}" LICENSE="GPL-3+" SLOT="0" KEYWORDS="~amd64" +IUSE="gamescope" REQUIRED_USE="${PYTHON_REQUIRED_USE}" RDEPEND=" @@ -82,6 +83,7 @@ RDEPEND=" x11-libs/libxkbcommon x11-libs/pango x11-libs/pixman + gamescope? ( gui-wm/gamescope ) " QA_PREBUILT=".*" @@ -97,6 +99,17 @@ src_prepare() { cd locales || die chromium_remove_language_paks + + # Create gamescope desktop file + if use gamescope; then + cp "${DISTDIR}"/com.heroicgameslauncher.hgl.${PV}.desktop \ + "${WORKDIR}"/com.heroicgameslauncher.hgl.gamescope.${PV}.desktop || die + + sed -i 's/Name=Heroic Games Launcher/Name=Heroic Games Launcher (Gamescope)/g' \ + "${WORKDIR}"/com.heroicgameslauncher.hgl.gamescope.${PV}.desktop || die + sed -i 's/Exec=heroic-run %u/Exec=env GDK_BACKEND=wayland gamescope -w 1920 -h 1080 -f -R --RT --force-grab-cursor --prefer-vk-device --adaptive-sync --nested-unfocused-refresh 30 -- heroic-run --ozone-platform=x11 --enable-features=UseOzonePlatform,WaylandWindowDecorations/g' \ + "${WORKDIR}"/com.heroicgameslauncher.hgl.gamescope.${PV}.desktop || die + fi } src_install() { @@ -119,6 +132,10 @@ src_install() { # Install resources: desktop file and icon. newmenu "${DISTDIR}"/com.heroicgameslauncher.hgl.${PV}.desktop \ com.heroicgameslauncher.hgl.desktop - newicon "${DISTDIR}"/com.heroicgameslauncher.hgl.${PV}.png \ + if use gamescope; then + newmenu "${WORKDIR}"/com.heroicgameslauncher.hgl.gamescope.${PV}.desktop \ + com.heroicgameslauncher.hgl.gamescope.desktop + fi + newicon "${DISTDIR}"/com.heroicgameslauncher.hgl.${PV}.png \ com.heroicgameslauncher.hgl.png } diff --git a/games-util/heroic-bin/metadata.xml b/games-util/heroic-bin/metadata.xml index ff0fda634043..9f6e069b9dda 100644 --- a/games-util/heroic-bin/metadata.xml +++ b/games-util/heroic-bin/metadata.xml @@ -14,6 +14,9 @@ <email>proxy-maint@gentoo.org</email> <name>Gentoo Proxy Maintainers</name> </maintainer> + <use> + <flag name="gamescope">Run Heroic Launcher inside gamescope</flag> + </use> <longdescription> Heroic is an Open Source Game Launcher for Linux, Windows and macOS. Right now it supports launching games from the Epic Games Store using Legendary |