gnome-base/gnome-control-center: fix runtime crash on wayland from build fix
authorMart Raudsepp <leio@gentoo.org>
Thu, 28 Feb 2019 20:26:54 +0000 (22:26 +0200)
committerMart Raudsepp <leio@gentoo.org>
Thu, 28 Feb 2019 20:28:24 +0000 (22:28 +0200)
Unfortunately we will need to lock USE=wayland between gtk+ and here for now.
If gtk+ supports wayland, it will run gnome-control-center with native
wayland, and when g-c-c doesn't have the code to match, it'll try to iterate
devices with X11 methods, which will crash just like it did on full wayland
(USE=wayland on both) before the fix in this commit.
One option could be to restrict gdk allowed backends to not include wayland
if wayland support isn't included, but that's something to tackle on top of
3.32 in the future.

Closes: https://bugs.gentoo.org/679042
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Mart Raudsepp <leio@gentoo.org>
gnome-base/gnome-control-center/files/3.26.2-without-wayland-fix.patch
gnome-base/gnome-control-center/gnome-control-center-3.26.2-r28.ebuild [moved from gnome-base/gnome-control-center/gnome-control-center-3.26.2-r2.ebuild with 96% similarity]
gnome-base/gnome-control-center/gnome-control-center-3.26.2-r3.ebuild [moved from gnome-base/gnome-control-center/gnome-control-center-3.26.2-r1.ebuild with 95% similarity]

index 92f4d4bdaee6653e24969e776ae37c82cc516679..d045790d6c7e24c819833ae4f07461a5c6a19891 100644 (file)
@@ -1,4 +1,4 @@
-From 62f07b2c6d8a28378e1f2c9f5d0c3241332ee8cf Mon Sep 17 00:00:00 2001
+From 75dc553f10df3cf48227ec69b9465009eebf7b8b Mon Sep 17 00:00:00 2001
 From: Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
 Date: Wed, 17 Jan 2018 20:05:03 -0200
 Subject: [PATCH] common: Don't unconditionally define HAVE_WAYLAND
@@ -8,10 +8,26 @@ is built with Wayland support. This breaks the build when
 building with Wayland disabled.
 
 https://bugzilla.gnome.org/show_bug.cgi?id=785414
+(cherry picked from commit 62f07b2c6d8a28378e1f2c9f5d0c3241332ee8cf)
+[Added HAVE_WAYLAND config.h definition for autotools to fix runtime]
+Signed-off-by: Mart Raudsepp <leio@gentoo.org>
 ---
+ configure.ac                       | 1 +
  panels/common/gnome-settings-bus.h | 2 --
1 file changed, 2 deletions(-)
2 files changed, 1 insertion(+), 2 deletions(-)
 
+diff --git a/configure.ac b/configure.ac
+index f810bfb1f..24940a798 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -291,6 +291,7 @@ AS_IF([test "$enable_wayland" != "no"],
+               [AC_DEFINE(HAVE_UDEV, 1, [System has udev])])
+         PKG_CHECK_MODULES(WAYLAND, gdk-wayland-3.0)
++        AC_DEFINE(HAVE_WAYLAND, 1, [Compile with Wayland support])
+ ])
+ AM_CONDITIONAL(HAVE_WAYLAND, [test "x$enable_wayland" != "xno"])
 diff --git a/panels/common/gnome-settings-bus.h b/panels/common/gnome-settings-bus.h
 index ce58f5805..763a9cca7 100644
 --- a/panels/common/gnome-settings-bus.h
similarity index 96%
rename from gnome-base/gnome-control-center/gnome-control-center-3.26.2-r2.ebuild
rename to gnome-base/gnome-control-center/gnome-control-center-3.26.2-r28.ebuild
index edf0afe1e5e21989c4a5dc8006f8a92810525af3..616a44779d212658d8e87d326ead109e236e9357 100644 (file)
@@ -26,7 +26,7 @@ KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sh ~x86 ~x86-fbsd ~amd64-linux ~
 COMMON_DEPEND="
        >=dev-libs/glib-2.53.0:2[dbus]
        >=x11-libs/gdk-pixbuf-2.23.0:2
-       >=x11-libs/gtk+-3.22.0:3[X,wayland?]
+       >=x11-libs/gtk+-3.22.0:3[X,wayland=]
        >=gnome-base/gsettings-desktop-schemas-3.21.4
        >=gnome-base/gnome-desktop-3.27.3:3=
        >=gnome-base/gnome-settings-daemon-3.25.90[colord,policykit]
@@ -134,7 +134,7 @@ PATCHES=(
        "${WORKDIR}"/patches/
        "${FILESDIR}"/${PV}-without-wayland-fix.patch # Fixes USE=-wayland build against gtk+[wayland]
        "${FILESDIR}"/${PV}-goa-lifecycle.patch # extra patch from gnome-3-26
-       "${FILESDIR}"/${PV}-gnome-desktop-3-28-compat.patch # backport of porting to gnome-desktop-3.28 API changes
+       "${FILESDIR}"/${PV}-gnome-desktop-3-28-compat.patch # backport of porting to gnome-desktop-3.28 API changes; but due to runtime issues we ended up still needing to lock the wayland flags between gtk+ and g-c-c (TODO)
 )
 
 src_configure() {
similarity index 95%
rename from gnome-base/gnome-control-center/gnome-control-center-3.26.2-r1.ebuild
rename to gnome-base/gnome-control-center/gnome-control-center-3.26.2-r3.ebuild
index 5e554968fdb1ae26bade07f074e0eee65223e9fe..9078a9e5204576a0999a7b776aee464382c3e09b 100644 (file)
@@ -27,7 +27,7 @@ KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sh ~x86 ~x86-fbsd ~amd64-linux ~
 COMMON_DEPEND="
        >=dev-libs/glib-2.53.0:2[dbus]
        >=x11-libs/gdk-pixbuf-2.23.0:2
-       >=x11-libs/gtk+-3.22.0:3[X,wayland?]
+       >=x11-libs/gtk+-3.22.0:3[X,wayland=]
        >=gnome-base/gsettings-desktop-schemas-3.21.4
        >=gnome-base/gnome-desktop-3.21.2:3=
        <gnome-base/gnome-desktop-3.27.90:3
@@ -134,7 +134,8 @@ PATCHES=(
        # https://bugzilla.gnome.org/686840, 697478, 700145
        # Fix some absolute paths to be appropriate for Gentoo
        "${WORKDIR}"/patches/
-       "${FILESDIR}"/${PV}-without-wayland-fix.patch # Fixes USE=-wayland build against gtk+[wayland]
+       "${FILESDIR}"/${PV}-goa-lifecycle.patch # extra patch from gnome-3-26
+       "${FILESDIR}"/${PV}-without-wayland-fix.patch # Fixes USE=-wayland build against gtk+[wayland]; but due to runtime issues we ended up still needing to lock the wayland flags between gtk+ and g-c-c (TODO)
 )
 
 src_configure() {