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>
This commit is contained in:
Gonçalo Negrier Duarte
2024-04-02 16:41:52 +01:00
committed by Bernard Cafarelli
parent c7e89b16f2
commit 1890d689a9
2 changed files with 21 additions and 1 deletions

View File

@@ -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
}

View File

@@ -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