public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "David Seifert" <soap@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/shotwell/, media-gfx/shotwell/files/
Date: Wed, 13 Jul 2022 07:37:04 +0000 (UTC)	[thread overview]
Message-ID: <1657697814.89dbc7aa060fd1480f0160c87f74ca154b13b582.soap@gentoo> (raw)

commit:     89dbc7aa060fd1480f0160c87f74ca154b13b582
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 13 07:36:54 2022 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Wed Jul 13 07:36:54 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89dbc7aa

media-gfx/shotwell: make wayland optional

Bug: https://bugs.gentoo.org/836831
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../shotwell/files/0.30.16-optional-wayland.patch  | 59 ++++++++++++++++++++++
 media-gfx/shotwell/shotwell-0.30.16.ebuild         |  7 ++-
 2 files changed, 64 insertions(+), 2 deletions(-)

diff --git a/media-gfx/shotwell/files/0.30.16-optional-wayland.patch b/media-gfx/shotwell/files/0.30.16-optional-wayland.patch
new file mode 100644
index 000000000000..5cc82e67dc7d
--- /dev/null
+++ b/media-gfx/shotwell/files/0.30.16-optional-wayland.patch
@@ -0,0 +1,59 @@
+Make wayland backend optional
+
+* Unfortunately, upstream is hostile to making wayland optional:
+  https://gitlab.gnome.org/GNOME/shotwell/-/merge_requests/57#note_1500284
+
+See: https://bugs.gentoo.org/836831
+
+--- a/meson.build
++++ b/meson.build
+@@ -64,7 +64,14 @@
+ libraw = dependency('libraw', version : '>= 0.13.2')
+ libexif = dependency('libexif', version : '>= 0.6.16')
+ unity = dependency('unity', required : false)
+-gdk = [ dependency('gdk-x11-3.0'), dependency('gdk-wayland-3.0') ]
++gdk = [ dependency('gdk-x11-3.0') ]
++add_global_arguments(['--define=HAVE_X11_BACKEND'],
++                     language : 'vala')
++if get_option('wayland')
++  gdk += [dependency('gdk-wayland-3.0')]
++  add_global_arguments(['--define=HAVE_WAYLAND_BACKEND'],
++                       language : 'vala')
++endif
+ 
+ unity_available = false
+ if unity.found() and get_option('unity-support')
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -8,3 +8,4 @@
+ option('install-apport-hook', type : 'boolean', value : 'true', description: 'Enable Ubuntu apport hook')
+ option('face-detection', type:'boolean', value:false, description: 'Enable face detection and recognition features')
+ option('fatal_warnings', type:'boolean', value:false)
++option('wayland', type: 'boolean', value: true, description: 'Enable Wayland support')
+--- a/src/Portal.vala
++++ b/src/Portal.vala
+@@ -53,6 +53,7 @@
+     private static async string get_parent_window () {
+         var window = AppWindow.get_instance().get_window ();
+ 
++#if HAVE_WAYLAND_BACKEND
+         if (window is Gdk.Wayland.Window) {
+             var handle = "wayland:";
+             ((Gdk.Wayland.Window) window).export_handle ((w, h) => {
+@@ -61,9 +62,14 @@
+             });
+             yield;
+             return handle;
+-        } else if (window is Gdk.X11.Window) {
++        } else
++#endif
++#if HAVE_X11_BACKEND
++        if (window is Gdk.X11.Window) {
+             return "x11:%x".printf ((uint) ((Gdk.X11.Window) window).get_xid ());
+-        } else {
++        } else
++#endif
++        {
+             warning ("Could not get parent window");
+             return "";
+         }

diff --git a/media-gfx/shotwell/shotwell-0.30.16.ebuild b/media-gfx/shotwell/shotwell-0.30.16.ebuild
index cd09860b7b42..e5ed861303a2 100644
--- a/media-gfx/shotwell/shotwell-0.30.16.ebuild
+++ b/media-gfx/shotwell/shotwell-0.30.16.ebuild
@@ -13,10 +13,10 @@ HOMEPAGE="https://wiki.gnome.org/Apps/Shotwell"
 LICENSE="LGPL-2.1"
 SLOT="0"
 KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~sparc ~x86"
-IUSE="opencv udev"
+IUSE="opencv udev wayland"
 
 DEPEND="
-	>=x11-libs/gtk+-3.22.0:3
+	>=x11-libs/gtk+-3.22.0:3[wayland?]
 	>=dev-libs/glib-2.40.0:2
 	>=dev-libs/libgee-0.8.5:0.8
 	>=net-libs/webkit-gtk-2.26:4
@@ -52,6 +52,8 @@ BDEPEND="
 	app-crypt/gcr[vala]
 "
 
+PATCHES=( "${FILESDIR}"/0.30.16-optional-wayland.patch )
+
 src_prepare() {
 	default
 	vala_setup
@@ -70,6 +72,7 @@ src_configure() {
 		-Dinstall-apport-hook=false
 		$(meson_use opencv face-detection)
 		-Dfatal_warnings=false
+		$(meson_use wayland)
 	)
 	meson_src_configure
 }


             reply	other threads:[~2022-07-13  7:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-13  7:37 David Seifert [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-07-02 17:12 [gentoo-commits] repo/gentoo:master commit in: media-gfx/shotwell/, media-gfx/shotwell/files/ Pacho Ramos

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=1657697814.89dbc7aa060fd1480f0160c87f74ca154b13b582.soap@gentoo \
    --to=soap@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