public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-im/discord/, net-im/discord/files/
@ 2024-07-01  1:04 Nick Sarnie
  0 siblings, 0 replies; 3+ messages in thread
From: Nick Sarnie @ 2024-07-01  1:04 UTC (permalink / raw
  To: gentoo-commits

commit:     6368a566a8b05f09e5edfad5d4f7577a83c6334b
Author:     Thibaud CANALE <thican <AT> thican <DOT> net>
AuthorDate: Tue Jun 25 06:56:11 2024 +0000
Commit:     Nick Sarnie <sarnex <AT> gentoo <DOT> org>
CommitDate: Mon Jul  1 01:03:53 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6368a566

net-im/discord: enable wayland at runtime

Closes: https://bugs.gentoo.org/934886
Signed-off-by: Thibaud CANALE <thican <AT> thican.net>
Closes: https://github.com/gentoo/gentoo/pull/37287
Signed-off-by: Nick Sarnie <sarnex <AT> gentoo.org>

 ...d-0.0.58-r1.ebuild => discord-0.0.58-r2.ebuild} | 28 +++++++++++-----------
 net-im/discord/files/launcher.sh                   | 17 +++++++++++++
 2 files changed, 31 insertions(+), 14 deletions(-)

diff --git a/net-im/discord/discord-0.0.58-r1.ebuild b/net-im/discord/discord-0.0.58-r2.ebuild
similarity index 84%
rename from net-im/discord/discord-0.0.58-r1.ebuild
rename to net-im/discord/discord-0.0.58-r2.ebuild
index 1ce7e078123a..2f44019d1175 100644
--- a/net-im/discord/discord-0.0.58-r1.ebuild
+++ b/net-im/discord/discord-0.0.58-r2.ebuild
@@ -15,7 +15,7 @@ CHROMIUM_LANGS="
 inherit chromium-2 desktop linux-info optfeature unpacker xdg
 
 DESCRIPTION="All-in-one voice and text chat for gamers"
-HOMEPAGE="https://discordapp.com"
+HOMEPAGE="https://discord.com/"
 SRC_URI="https://dl.discordapp.net/apps/linux/${MY_PV}/${MY_PN}-${MY_PV}.tar.gz"
 S="${WORKDIR}/${MY_PN^}"
 
@@ -81,21 +81,20 @@ src_prepare() {
 	pushd "locales/" >/dev/null || die "location change for language cleanup failed"
 	chromium_remove_language_paks
 	popd >/dev/null || die "location reset for language cleanup failed"
+
 	# fix .desktop exec location
-	sed -i "/Exec/s:/usr/share/discord/Discord:${DESTDIR}/${MY_PN^}:" \
+	sed --in-place --expression "/^Exec=/s:/usr/share/discord/Discord:/usr/bin/${MY_PN}:" \
 		"${MY_PN}.desktop" ||
 		die "fixing of exec location on .desktop failed"
-	# USE wayland
-	if use wayland; then
-		sed -i '/Exec/s/Discord/Discord --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime/' \
-			"${MY_PN}.desktop" ||
-			die "sed failed for wayland"
-	fi
-	# USE seccomp
-	if ! use seccomp; then
-		sed -i '/Exec/s/Discord/Discord --disable-seccomp-filter-sandbox/' \
-			"${MY_PN}.desktop" ||
-			die "sed failed for seccomp"
+
+	# Update exec location in launcher
+	sed --expression "s:@@DESTDIR@@:${DESTDIR}:" \
+		"${FILESDIR}/launcher.sh" > "${T}/launcher.sh" || die "updating of exec location in launcher failed"
+
+	# USE seccomp in launcher
+	if use seccomp; then
+		sed --in-place --expression '/^SECCOMP=/s/false/true/' \
+			"${T}/launcher.sh" || die "sed failed for seccomp"
 	fi
 }
 
@@ -123,7 +122,8 @@ src_install() {
 	# See #903616 and #890595
 	[[ -x chrome_crashpad_handler ]] && doins chrome_crashpad_handler
 
-	dosym "${DESTDIR}/${MY_PN^}" "/usr/bin/${MY_PN}"
+	exeinto "/usr/bin"
+	newexe "${T}/launcher.sh" "discord" || die "failing to install launcher"
 
 	# https://bugs.gentoo.org/898912
 	if use appindicator; then

diff --git a/net-im/discord/files/launcher.sh b/net-im/discord/files/launcher.sh
new file mode 100644
index 000000000000..032524ae68e9
--- /dev/null
+++ b/net-im/discord/files/launcher.sh
@@ -0,0 +1,17 @@
+#!/bin/env bash
+# coding: UTF-8
+
+
+declare -a discord_parameters
+
+SECCOMP=false
+
+[[ ! "${SECCOMP}" ]] && discord_parameters+=( --disable-seccomp-filter-sandbox )
+
+[[ -n "${WAYLAND_DISPLAY}" ]] && discord_parameters+=(
+	--enable-features=UseOzonePlatform
+	--ozone-platform=wayland
+	--enable-wayland-ime
+)
+
+@@DESTDIR@@/Discord "${discord_parameters[@]}" "$@"


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-im/discord/, net-im/discord/files/
@ 2024-07-01 17:51 Nick Sarnie
  0 siblings, 0 replies; 3+ messages in thread
From: Nick Sarnie @ 2024-07-01 17:51 UTC (permalink / raw
  To: gentoo-commits

commit:     62fa660ba6b2d50f754bd203357e8fd6c2f6bd0f
Author:     Thibaud CANALE <thican <AT> thican <DOT> net>
AuthorDate: Mon Jul  1 04:26:25 2024 +0000
Commit:     Nick Sarnie <sarnex <AT> gentoo <DOT> org>
CommitDate: Mon Jul  1 17:50:16 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62fa660b

net-im/discord: enable explicit wayland support

Signed-off-by: Thibaud CANALE <thican <AT> thican.net>
Closes: https://github.com/gentoo/gentoo/pull/37381
Signed-off-by: Nick Sarnie <sarnex <AT> gentoo.org>

 net-im/discord/discord-0.0.58-r2.ebuild | 8 +++++++-
 net-im/discord/files/launcher.sh        | 7 +++++--
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/net-im/discord/discord-0.0.58-r2.ebuild b/net-im/discord/discord-0.0.58-r2.ebuild
index 2f44019d1175..9c133ac136e6 100644
--- a/net-im/discord/discord-0.0.58-r2.ebuild
+++ b/net-im/discord/discord-0.0.58-r2.ebuild
@@ -93,9 +93,15 @@ src_prepare() {
 
 	# USE seccomp in launcher
 	if use seccomp; then
-		sed --in-place --expression '/^SECCOMP=/s/false/true/' \
+		sed --in-place --expression '/^EBUILD_SECCOMP=/s/false/true/' \
 			"${T}/launcher.sh" || die "sed failed for seccomp"
 	fi
+
+	# USE wayland in launcher
+	if use wayland; then
+		sed --in-place --expression '/^EBUILD_WAYLAND=/s/false/true/' \
+			"${T}/launcher.sh" || die "sed failed for wayland"
+	fi
 }
 
 src_install() {

diff --git a/net-im/discord/files/launcher.sh b/net-im/discord/files/launcher.sh
index 597974d43e0e..2afc0caa50fd 100644
--- a/net-im/discord/files/launcher.sh
+++ b/net-im/discord/files/launcher.sh
@@ -4,10 +4,13 @@
 
 declare -a discord_parameters
 
-SECCOMP=false
+# Variables set during ebuild configuration
+EBUILD_SECCOMP=false
+EBUILD_WAYLAND=false
 
-"${SECCOMP}" || discord_parameters+=( --disable-seccomp-filter-sandbox )
+"${EBUILD_SECCOMP}" || discord_parameters+=( --disable-seccomp-filter-sandbox )
 
+"${EBUILD_WAYLAND}" && \
 [[ -n "${WAYLAND_DISPLAY}" ]] && discord_parameters+=(
 	--enable-features=UseOzonePlatform
 	--ozone-platform=wayland


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-im/discord/, net-im/discord/files/
@ 2024-08-01 19:21 Nick Sarnie
  0 siblings, 0 replies; 3+ messages in thread
From: Nick Sarnie @ 2024-08-01 19:21 UTC (permalink / raw
  To: gentoo-commits

commit:     4481bb358ca845b914b3d6fdd9ea16ef1ad46ecb
Author:     Nick Sarnie <sarnex <AT> gentoo <DOT> org>
AuthorDate: Thu Aug  1 19:19:23 2024 +0000
Commit:     Nick Sarnie <sarnex <AT> gentoo <DOT> org>
CommitDate: Thu Aug  1 19:20:25 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4481bb35

net-im/discord: Fix launcher script

Closes: https://bugs.gentoo.org/935791

Signed-off-by: Nick Sarnie <sarnex <AT> gentoo.org>

 net-im/discord/{discord-0.0.62.ebuild => discord-0.0.62-r1.ebuild} | 0
 net-im/discord/files/launcher.sh                                   | 2 +-
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/net-im/discord/discord-0.0.62.ebuild b/net-im/discord/discord-0.0.62-r1.ebuild
similarity index 100%
rename from net-im/discord/discord-0.0.62.ebuild
rename to net-im/discord/discord-0.0.62-r1.ebuild

diff --git a/net-im/discord/files/launcher.sh b/net-im/discord/files/launcher.sh
index 2afc0caa50fd..31c2cc3bf2ca 100644
--- a/net-im/discord/files/launcher.sh
+++ b/net-im/discord/files/launcher.sh
@@ -1,4 +1,4 @@
-#!/bin/env bash
+#!/usr/bin/env bash
 # coding: UTF-8
 
 


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-08-01 19:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-01 17:51 [gentoo-commits] repo/gentoo:master commit in: net-im/discord/, net-im/discord/files/ Nick Sarnie
  -- strict thread matches above, loose matches on Subject: below --
2024-08-01 19:21 Nick Sarnie
2024-07-01  1:04 Nick Sarnie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox