public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Bernard Cafarelli" <voyageur@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: games-util/heroic-bin/
Date: Tue,  9 Apr 2024 07:24:48 +0000 (UTC)	[thread overview]
Message-ID: <1712647476.1890d689a91c1c480bbd817c19990db09946def4.voyageur@gentoo> (raw)

commit:     1890d689a91c1c480bbd817c19990db09946def4
Author:     Gonçalo Negrier Duarte <gonegrier.duarte <AT> gmail <DOT> com>
AuthorDate: Tue Apr  2 15:41:52 2024 +0000
Commit:     Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
CommitDate: Tue Apr  9 07:24:36 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1890d689

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 <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/36168
Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org>

 ...-bin-2.14.1.ebuild => heroic-bin-2.14.1-r1.ebuild} | 19 ++++++++++++++++++-
 games-util/heroic-bin/metadata.xml                    |  3 +++
 2 files changed, 21 insertions(+), 1 deletion(-)

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
similarity index 74%
rename from games-util/heroic-bin/heroic-bin-2.14.1.ebuild
rename to 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


             reply	other threads:[~2024-04-09  7:24 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-09  7:24 Bernard Cafarelli [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-03-12 12:47 [gentoo-commits] repo/gentoo:master commit in: games-util/heroic-bin/ Bernard Cafarelli
2025-03-03 21:31 Bernard Cafarelli
2025-03-03 21:31 Bernard Cafarelli
2024-09-25  8:02 Bernard Cafarelli
2024-09-25  8:02 Bernard Cafarelli
2024-08-13  9:38 Bernard Cafarelli
2024-04-11 21:50 Bernard Cafarelli
2024-04-09  7:24 Bernard Cafarelli
2024-04-09  7:24 Bernard Cafarelli
2024-04-08 11:24 Bernard Cafarelli
2024-04-03  8:14 Bernard Cafarelli
2024-04-03  8:14 Bernard Cafarelli
2024-03-11 11:21 Maciej Barć
2024-03-11 11:21 Maciej Barć
2024-02-19 15:30 Maciej Barć
2024-02-19 15:30 Maciej Barć
2024-02-03 13:00 Maciej Barć
2024-02-03 13:00 Maciej Barć
2024-01-08 19:22 Maciej Barć
2023-12-27  1:20 Maciej Barć
2023-12-04  8:43 Maciej Barć
2023-11-07 18:50 Maciej Barć
2023-10-18 17:00 Maciej Barć
2023-07-01 16:13 Maciej Barć
2023-07-01 13:57 Maciej Barć

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1712647476.1890d689a91c1c480bbd817c19990db09946def4.voyageur@gentoo \
    --to=voyageur@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox