public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:master commit in: net-im/nheko/, net-im/nheko/files/
@ 2024-07-08 16:36 David Roman
  0 siblings, 0 replies; only message in thread
From: David Roman @ 2024-07-08 16:36 UTC (permalink / raw
  To: gentoo-commits

commit:     429788ad79e7ed72ba7703f4dd738641d74324c5
Author:     tea <gentoo <AT> tastytea <DOT> de>
AuthorDate: Fri Jul  5 16:54:20 2024 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Fri Jul  5 16:59:25 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=429788ad

net-im/nheko: remove forced wayland dependency

backported the fix from upstream

Bug: https://bugs.gentoo.org/934414
Signed-off-by: tea <gentoo <AT> tastytea.de>

 .../nheko-0.12.0-remove-wayland-dep-on-x11.patch   | 39 ++++++++++++++++++++++
 net-im/nheko/nheko-0.12.0.ebuild                   |  4 ++-
 2 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/net-im/nheko/files/nheko-0.12.0-remove-wayland-dep-on-x11.patch b/net-im/nheko/files/nheko-0.12.0-remove-wayland-dep-on-x11.patch
new file mode 100644
index 000000000..ce32492e2
--- /dev/null
+++ b/net-im/nheko/files/nheko-0.12.0-remove-wayland-dep-on-x11.patch
@@ -0,0 +1,39 @@
+# adapted from upstream commit:
+# <https://github.com/Nheko-Reborn/nheko/commit/941f7f5>
+
+From 3bc8117be9964af95210c865880bd2db8dc76a27 Mon Sep 17 00:00:00 2001
+From: tea <tea@tastytea.de>
+Date: Fri, 5 Jul 2024 17:32:59 +0200
+Subject: [PATCH] remove wayland dep on X11
+
+---
+ src/main.cpp | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/main.cpp b/src/main.cpp
+index 8ea15901..392867bb 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -21,7 +21,7 @@
+ 
+ // in theory we can enable this everywhere, but the header is missing on some of our CI systems and
+ // it is too much effort to install.
+-#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
++#if __has_include(<QtGui/qpa/qplatformwindow_p.h>)
+ #include <QtGui/qpa/qplatformwindow_p.h>
+ #endif
+ 
+@@ -248,7 +248,9 @@ main(int argc, char *argv[])
+     if (!singleapp.isPrimaryInstance()) {
+         auto token = qgetenv("XDG_ACTIVATION_TOKEN");
+ 
+-#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
++#if __has_include(<QtGui/qpa/qplatformwindow_p.h>) && \
++        ((QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) &&  QT_CONFIG(wayland)) || \
++         (QT_VERSION < QT_VERSION_CHECK(6, 7, 0) && defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)))
+         // getting a valid activation token on wayland is a bit of a pain, it works most reliably
+         // when you have an actual window, that has the focus...
+         auto waylandApp = app.nativeInterface<QNativeInterface::QWaylandApplication>();
+-- 
+2.44.2
+

diff --git a/net-im/nheko/nheko-0.12.0.ebuild b/net-im/nheko/nheko-0.12.0.ebuild
index d68d32446..e22f303cc 100644
--- a/net-im/nheko/nheko-0.12.0.ebuild
+++ b/net-im/nheko/nheko-0.12.0.ebuild
@@ -34,7 +34,7 @@ RDEPEND="
 	>=dev-libs/re2-0.2022.04.01:=
 	dev-libs/spdlog:=
 	>=dev-qt/kdsingleapplication-1.1.0:=[qt6]
-	dev-qt/qtbase:6[concurrent,dbus,gui,wayland,widgets]
+	dev-qt/qtbase:6[concurrent,dbus,gui,widgets]
 	dev-qt/qtdeclarative:6[widgets]
 	dev-qt/qtimageformats:6
 	dev-qt/qtmultimedia:6[gstreamer]
@@ -76,6 +76,8 @@ BDEPEND="
 	)
 "
 
+PATCHES=( "${FILESDIR}"/${P}-remove-wayland-dep-on-x11.patch )
+
 src_configure() {
 	local -a mycmakeargs=(
 		-DUSE_BUNDLED_CPPHTTPLIB=no


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-07-08 16:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-08 16:36 [gentoo-commits] repo/proj/guru:master commit in: net-im/nheko/, net-im/nheko/files/ David Roman

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