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.c7e89b16f21dc6b1681ad3e1fc5e08e20ee33610.voyageur@gentoo> (raw)

commit:     c7e89b16f21dc6b1681ad3e1fc5e08e20ee33610
Author:     Gonçalo Negrier Duarte <gonegrier.duarte <AT> gmail <DOT> com>
AuthorDate: Mon Apr  8 20:27:42 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=c7e89b16

games-util/heroic-bin: add 2.13.0-r1 drop 2.13.0

* 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>
Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org>

 games-util/heroic-bin/Manifest                     |  4 +-
 ...n-2.13.0.ebuild => heroic-bin-2.13.0-r1.ebuild} | 49 ++++++++++++----------
 2 files changed, 30 insertions(+), 23 deletions(-)

diff --git a/games-util/heroic-bin/Manifest b/games-util/heroic-bin/Manifest
index e9ff7d33bc6d..b43fbfd0a078 100644
--- a/games-util/heroic-bin/Manifest
+++ b/games-util/heroic-bin/Manifest
@@ -1,6 +1,6 @@
+DIST com.heroicgameslauncher.hgl.2.13.0.desktop 317 BLAKE2B e4c7cc834bc8688703b982897b13542543a3d28c50f7fe3f8e680c233762d612c0b24f7036919571451b96002f493cb55fb6d75241e124879ae486c5b4053f96 SHA512 314c7449ee7b83c77eda117536d0c2da1c5d3882a3f08f5fe0381451de734ed388e8941de8440521dad2f2fc335d214345e7301a2929b8fefa4f64a7a2ff804e
+DIST com.heroicgameslauncher.hgl.2.13.0.png 9797 BLAKE2B c6f76df4ec2fd25323f5c37e03605647ede8f8c2ed48cfbb8af11aad22ae90182d3678b943633b46a2d8dfb0c1cbd1a275b6c62dde238b9b0f68cbafb4bf3697 SHA512 68e9881fb4f123008398409825aa8cf70cec34365a23adb1234f7c054a14f40d159e7d8912cfedac0bb2b12f1d3c3c980469c2fca9735d4bc06bd4074aecc7e3
 DIST com.heroicgameslauncher.hgl.2.14.1.desktop 317 BLAKE2B e4c7cc834bc8688703b982897b13542543a3d28c50f7fe3f8e680c233762d612c0b24f7036919571451b96002f493cb55fb6d75241e124879ae486c5b4053f96 SHA512 314c7449ee7b83c77eda117536d0c2da1c5d3882a3f08f5fe0381451de734ed388e8941de8440521dad2f2fc335d214345e7301a2929b8fefa4f64a7a2ff804e
 DIST com.heroicgameslauncher.hgl.2.14.1.png 9797 BLAKE2B c6f76df4ec2fd25323f5c37e03605647ede8f8c2ed48cfbb8af11aad22ae90182d3678b943633b46a2d8dfb0c1cbd1a275b6c62dde238b9b0f68cbafb4bf3697 SHA512 68e9881fb4f123008398409825aa8cf70cec34365a23adb1234f7c054a14f40d159e7d8912cfedac0bb2b12f1d3c3c980469c2fca9735d4bc06bd4074aecc7e3
-DIST com.heroicgameslauncher.hgl.desktop-6dfb2758e531af693f0baffa15240f152aadd68b 317 BLAKE2B e4c7cc834bc8688703b982897b13542543a3d28c50f7fe3f8e680c233762d612c0b24f7036919571451b96002f493cb55fb6d75241e124879ae486c5b4053f96 SHA512 314c7449ee7b83c77eda117536d0c2da1c5d3882a3f08f5fe0381451de734ed388e8941de8440521dad2f2fc335d214345e7301a2929b8fefa4f64a7a2ff804e
-DIST com.heroicgameslauncher.hgl.png-6dfb2758e531af693f0baffa15240f152aadd68b 9797 BLAKE2B c6f76df4ec2fd25323f5c37e03605647ede8f8c2ed48cfbb8af11aad22ae90182d3678b943633b46a2d8dfb0c1cbd1a275b6c62dde238b9b0f68cbafb4bf3697 SHA512 68e9881fb4f123008398409825aa8cf70cec34365a23adb1234f7c054a14f40d159e7d8912cfedac0bb2b12f1d3c3c980469c2fca9735d4bc06bd4074aecc7e3
 DIST heroic-bin-2.13.0.tar.xz 105883932 BLAKE2B 93161f87fc734540338914bf63b2231b7bd7bb4a265092a831043fa6d771cff2211395f0cf92dacff12eebb369e8c5d8687b7662c559dc72635f91f858341122 SHA512 59466b2516b4e42fb3ea7dc9f96834ee8598e2424a9615acbd9de65d4035634f82181a4b5e6664eb186173b7199b191418c3eab7e582450a489295e60ed39d1d
 DIST heroic-bin-2.14.1.tar.xz 106272512 BLAKE2B 2bacc905a5ec71df0051e5ea5c1b34a1596fb6d7c4530ee0d81b8984b53bfcc097210d63ca133e6cae608a6d44ee92c108ff9f114e4a159e95c6e420a7ae5474 SHA512 564089f606f309cc7faddc0ee8afc2303d4c729492a3be14acbf773e38cc2fece0ebea34f6294dbdeacd6fdcf7a28e1608115e27bdcf0618c7950a5b024f0e1c

diff --git a/games-util/heroic-bin/heroic-bin-2.13.0.ebuild b/games-util/heroic-bin/heroic-bin-2.13.0-r1.ebuild
similarity index 57%
rename from games-util/heroic-bin/heroic-bin-2.13.0.ebuild
rename to games-util/heroic-bin/heroic-bin-2.13.0-r1.ebuild
index 658baf2dc193..4710be3359f5 100644
--- a/games-util/heroic-bin/heroic-bin-2.13.0.ebuild
+++ b/games-util/heroic-bin/heroic-bin-2.13.0-r1.ebuild
@@ -3,10 +3,6 @@
 
 EAPI=8
 
-APP_NAME="${P/-bin/}"
-APP_URI="https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher"
-APP_RESOURCES_COMMIT=6dfb2758e531af693f0baffa15240f152aadd68b
-
 CHROMIUM_LANGS="
 	af am ar bg bn ca cs da de el en-GB en-US es es-419 et fa fi fil fr gu he hi
 	hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr sv
@@ -20,20 +16,19 @@ DESCRIPTION="GOG and Epic Games Launcher for Linux"
 HOMEPAGE="https://heroicgameslauncher.com/
 	https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/"
 SRC_URI="
-	${APP_URI}/releases/download/v${PV}/heroic-${PV}.tar.xz
+	https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/releases/download/v${PV}/heroic-${PV}.tar.xz
 		-> ${P}.tar.xz
-
-	${APP_URI}/raw/${APP_RESOURCES_COMMIT}/flatpak/com.heroicgameslauncher.hgl.desktop
-		-> com.heroicgameslauncher.hgl.desktop-${APP_RESOURCES_COMMIT}
-
-	${APP_URI}/raw/${APP_RESOURCES_COMMIT}/flatpak/com.heroicgameslauncher.hgl.png
-		-> com.heroicgameslauncher.hgl.png-${APP_RESOURCES_COMMIT}
+	https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/raw/v${PV}/flatpak/com.heroicgameslauncher.hgl.desktop
+		-> com.heroicgameslauncher.hgl.${PV}.desktop
+	https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/raw/v${PV}/flatpak/com.heroicgameslauncher.hgl.png
+		-> com.heroicgameslauncher.hgl.${PV}.png
 "
-S="${WORKDIR}/${APP_NAME}"
+S="${WORKDIR}/${P/-bin}"
 
 LICENSE="GPL-3+"
 SLOT="0"
 KEYWORDS="~amd64"
+IUSE="gamescope"
 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 
 RDEPEND="
@@ -88,14 +83,11 @@ RDEPEND="
 	x11-libs/libxkbcommon
 	x11-libs/pango
 	x11-libs/pixman
+	gamescope? ( gui-wm/gamescope )
 "
 
 QA_PREBUILT=".*"
 
-src_unpack() {
-	unpack "${P}.tar.xz"
-}
-
 src_configure() {
 	default
 
@@ -107,10 +99,21 @@ 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() {
-	local app_root=/opt/${APP_NAME}
+	local app_root=/opt/${P/-bin}
 	local app_dest="${ED}"/${app_root}
 
 	dodoc LICENSE.*
@@ -119,16 +122,20 @@ src_install() {
 	dodir "${app_root%/*}"
 	cp -r "${S}" "${app_dest}" || die
 
-	dosym -r "${PYTHON}"	\
-		  "${app_root}"/resources/app.asar.unpacked/node_modules/register-scheme/build/node_gyp_bins/python3
+	dosym -r "${PYTHON}" \
+		"${app_root}"/resources/app.asar.unpacked/node_modules/register-scheme/build/node_gyp_bins/python3
 
 	find "${app_dest}" -type f -name "*.a" -exec rm {} + || die
 
 	dosym -r "${app_root}"/heroic /usr/bin/heroic-run
 
 	# Install resources: desktop file and icon.
-	newmenu "${DISTDIR}"/com.heroicgameslauncher.hgl.desktop-${APP_RESOURCES_COMMIT}	\
+	newmenu "${DISTDIR}"/com.heroicgameslauncher.hgl.${PV}.desktop \
 			com.heroicgameslauncher.hgl.desktop
-	newicon "${DISTDIR}"/com.heroicgameslauncher.hgl.png-${APP_RESOURCES_COMMIT}	\
+	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
 }


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

Thread overview: 23+ 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 --
2024-09-25  8:02 [gentoo-commits] repo/gentoo:master commit in: games-util/heroic-bin/ 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.c7e89b16f21dc6b1681ad3e1fc5e08e20ee33610.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