summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMart Raudsepp <leio@gentoo.org>2019-02-23 19:11:35 +0200
committerMart Raudsepp <leio@gentoo.org>2019-02-23 19:14:29 +0200
commit6f612045b3f93a75bdf4c99fe00bf25639e1174d (patch)
tree6eb544f941ebf76057e09b872387492cfb8d41f4 /gnome-base/gnome-control-center
parentapp-vim/brainfuck-syntax: EAPI 6 bump. (diff)
downloadgentoo-6f612045b3f93a75bdf4c99fe00bf25639e1174d.tar.gz
gentoo-6f612045b3f93a75bdf4c99fe00bf25639e1174d.tar.bz2
gentoo-6f612045b3f93a75bdf4c99fe00bf25639e1174d.zip
gnome-base/gnome-control-center-3.26: add revision compatible with newer gnome-desktop
Bumping g-c-c to 3.28 will take a bit longer, so add backported patch for gnome-desktop-3.28+ compatibility to be able to unleash that set of packages earlier. Also adds an extra patch from upstream 3.26 branch related to GOA object lifetimes handling, which should fix some potential control panel crashes. Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Mart Raudsepp <leio@gentoo.org>
Diffstat (limited to 'gnome-base/gnome-control-center')
-rw-r--r--gnome-base/gnome-control-center/files/3.26.2-gnome-desktop-3-28-compat.patch78
-rw-r--r--gnome-base/gnome-control-center/files/3.26.2-goa-lifecycle.patch95
-rw-r--r--gnome-base/gnome-control-center/gnome-control-center-3.26.2-r2.ebuild159
3 files changed, 332 insertions, 0 deletions
diff --git a/gnome-base/gnome-control-center/files/3.26.2-gnome-desktop-3-28-compat.patch b/gnome-base/gnome-control-center/files/3.26.2-gnome-desktop-3-28-compat.patch
new file mode 100644
index 000000000000..f90e0514dd7c
--- /dev/null
+++ b/gnome-base/gnome-control-center/files/3.26.2-gnome-desktop-3-28-compat.patch
@@ -0,0 +1,78 @@
+From 6c98cbb514b2a455dd27f3a32a48e43a65cd29a2 Mon Sep 17 00:00:00 2001
+From: Robert Ancell <robert.ancell@canonical.com>
+Date: Tue, 26 Sep 2017 14:12:13 -0400
+Subject: [PATCH 2/2] background: Remove GdkColor deprecation warnings
+
+https://bugzilla.gnome.org/show_bug.cgi?id=788205
+(cherry picked from commit ed03e9c49faafba132ab4077daeaf213b541aed7)
+---
+ configure.ac | 2 +-
+ panels/background/cc-background-item.c | 19 ++++++++++---------
+ 2 files changed, 11 insertions(+), 10 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 90579ac9f..f810bfb1f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -97,7 +97,7 @@ NETWORK_MANAGER_REQUIRED_VERSION=1.2.0
+ NETWORK_MANAGER_APPLET_REQUIRED_VERSION=1.2.0
+ MODEM_MANAGER_REQUIRED_VERSION=0.7
+ LIBNOTIFY_REQUIRED_VERSION=0.7.3
+-GNOME_DESKTOP_REQUIRED_VERSION=3.21.2
++GNOME_DESKTOP_REQUIRED_VERSION=3.27.3
+ SCHEMAS_REQUIRED_VERSION=3.21.4
+ LIBWACOM_REQUIRED_VERSION=0.7
+ CLUTTER_REQUIRED_VERSION=1.11.3
+diff --git a/panels/background/cc-background-item.c b/panels/background/cc-background-item.c
+index 92220f823..8f8759bd0 100644
+--- a/panels/background/cc-background-item.c
++++ b/panels/background/cc-background-item.c
+@@ -150,8 +150,9 @@ get_emblemed_pixbuf (CcBackgroundItem *item, GdkPixbuf *pixbuf, gint scale_facto
+ static void
+ set_bg_properties (CcBackgroundItem *item)
+ {
+- GdkColor pcolor = { 0, 0, 0, 0 };
+- GdkColor scolor = { 0, 0, 0, 0 };
++ GdkRGBA pcolor = { 0, 0, 0, 0 };
++ GdkRGBA scolor = { 0, 0, 0, 0 };
++ GdkColor p, s;
+
+ if (item->priv->uri) {
+ GFile *file;
+@@ -166,13 +167,13 @@ set_bg_properties (CcBackgroundItem *item)
+ }
+
+ if (item->priv->primary_color != NULL) {
+- gdk_color_parse (item->priv->primary_color, &pcolor);
++ gdk_rgba_parse (&pcolor, item->priv->primary_color);
+ }
+ if (item->priv->secondary_color != NULL) {
+- gdk_color_parse (item->priv->secondary_color, &scolor);
++ gdk_rgba_parse (&scolor, item->priv->secondary_color);
+ }
+
+- gnome_bg_set_color (item->priv->bg, item->priv->shading, &pcolor, &scolor);
++ gnome_bg_set_rgba (item->priv->bg, item->priv->shading, &pcolor, &scolor);
+ gnome_bg_set_placement (item->priv->bg, item->priv->placement);
+ }
+
+@@ -996,12 +997,12 @@ static gboolean
+ colors_equal (const char *a,
+ const char *b)
+ {
+- GdkColor color1, color2;
++ GdkRGBA color1, color2;
+
+- gdk_color_parse (a, &color1);
+- gdk_color_parse (b, &color2);
++ gdk_rgba_parse (&color1, a);
++ gdk_rgba_parse (&color2, b);
+
+- return gdk_color_equal (&color1, &color2);
++ return gdk_rgba_equal (&color1, &color2);
+ }
+
+ gboolean
+--
+2.17.0
+
diff --git a/gnome-base/gnome-control-center/files/3.26.2-goa-lifecycle.patch b/gnome-base/gnome-control-center/files/3.26.2-goa-lifecycle.patch
new file mode 100644
index 000000000000..bbc8befdf280
--- /dev/null
+++ b/gnome-base/gnome-control-center/files/3.26.2-goa-lifecycle.patch
@@ -0,0 +1,95 @@
+From a1bc1ae54d2330e32eac7b4df7c07393df87e7da Mon Sep 17 00:00:00 2001
+From: Debarshi Ray <debarshir@gnome.org>
+Date: Thu, 4 Oct 2018 11:28:15 +0200
+Subject: [PATCH 1/2] online-accounts: Track the lifecycle of CcGoaPanel across
+ async calls
+
+Due to an API bug in GNOME Online Accounts, the asynchronous
+goa_provider_get_all method doesn't accept a GCancellable argument.
+This makes it difficult to cancel an ongoing call when the CcGoaPanel
+gets destroyed.
+
+Prior to commit c26f8ae018900a55, this was hacked around by taking a
+reference on the panel for the duration of the call. Instead of
+cancelling a pending call on destruction, it would keep the panel alive
+until the call was over. However, that was lost during commit
+c26f8ae018900a55.
+
+One thing to bear in mind is that GtkWidgets, CcGoaPanel is one, can
+be destroyed by a gtk_widget_destroy call, which is subtly different
+than a simple sequence of g_object_unref calls. When gtk_widget_destroy
+is used, it invokes the GObject::dispose virtual method of the widget.
+It is expected this will cause anything holding a reference to this
+widget to drop their references, leading to GObject::finalize being
+called. However, there is no guarantee that this will happen in the
+same iteration of the GMainLoop. Therefore, it is possible that when
+the goa_provider_get_all call finishes, the CcGoaPanel might be in a
+disposed, but not yet finalized state.
+
+When a GObject is in a disposed-but-not-finalized state, only a very
+limited number of operations can be performed on it. Its reference
+count can be altered, the memory used by the instance struct can be
+accessed, but none of the member GObjects can be assumed to be valid.
+eg., it's definitely illegal to add new rows to the member GtkListBox.
+Hence a boolean flag is used to mark the destroyed state of the panel.
+
+This second part is a small improvement over the earlier hack.
+
+https://gitlab.gnome.org/GNOME/gnome-control-center/issues/208
+(cherry picked from commit 83558429b3f98a4bf4ada17b64f09f073a6b8c38)
+---
+ panels/online-accounts/cc-online-accounts-panel.c | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/panels/online-accounts/cc-online-accounts-panel.c b/panels/online-accounts/cc-online-accounts-panel.c
+index edd140e4b..1640c74c4 100644
+--- a/panels/online-accounts/cc-online-accounts-panel.c
++++ b/panels/online-accounts/cc-online-accounts-panel.c
+@@ -56,6 +56,7 @@ struct _CcGoaPanel
+ GtkWidget *stack;
+ GtkWidget *accounts_vbox;
+
++ gboolean destroyed;
+ guint remove_account_timeout_id;
+ };
+
+@@ -401,6 +402,8 @@ cc_goa_panel_dispose (GObject *object)
+ /* Must be destroyed in dispose, not finalize. */
+ g_clear_pointer (&panel->edit_account_dialog, gtk_widget_destroy);
+
++ panel->destroyed = TRUE;
++
+ G_OBJECT_CLASS (cc_goa_panel_parent_class)->dispose (object);
+ }
+
+@@ -480,7 +483,7 @@ cc_goa_panel_init (CcGoaPanel *panel)
+ panel);
+
+ fill_accounts_listbox (panel);
+- goa_provider_get_all (get_all_providers_cb, panel);
++ goa_provider_get_all (get_all_providers_cb, g_object_ref_sink (panel));
+
+ gtk_widget_show (GTK_WIDGET (panel));
+ }
+@@ -843,7 +846,7 @@ get_all_providers_cb (GObject *source,
+ GAsyncResult *res,
+ gpointer user_data)
+ {
+- CcGoaPanel *self = user_data;
++ g_autoptr (CcGoaPanel) self = user_data;
+ GList *providers;
+ GList *l;
+
+@@ -851,6 +854,9 @@ get_all_providers_cb (GObject *source,
+ if (!goa_provider_get_all_finish (&providers, res, NULL))
+ return;
+
++ if (self->destroyed)
++ return;
++
+ for (l = providers; l != NULL; l = l->next)
+ {
+ GoaProvider *provider;
+--
+2.17.0
+
diff --git a/gnome-base/gnome-control-center/gnome-control-center-3.26.2-r2.ebuild b/gnome-base/gnome-control-center/gnome-control-center-3.26.2-r2.ebuild
new file mode 100644
index 000000000000..148131fa7cc7
--- /dev/null
+++ b/gnome-base/gnome-control-center/gnome-control-center-3.26.2-r2.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+GNOME2_LA_PUNT="yes"
+GNOME2_EAUTORECONF="yes"
+
+inherit bash-completion-r1 gnome2
+
+DESCRIPTION="GNOME's main interface to configure various aspects of the desktop"
+HOMEPAGE="https://git.gnome.org/browse/gnome-control-center/"
+SRC_URI+=" https://dev.gentoo.org/~leio/distfiles/${P}-patchset.tar.xz"
+
+LICENSE="GPL-2+"
+SLOT="2"
+IUSE="+bluetooth +colord +cups debug +gnome-online-accounts +ibus input_devices_wacom kerberos networkmanager v4l wayland"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sh ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris"
+
+# gnome-session-2.91.6-r1 is needed so that 10-user-dirs-update is run at login
+# g-s-d[policykit] needed for bug #403527
+# kerberos unfortunately means mit-krb5; build fails with heimdal
+# udev could be made optional, only conditions gsd-device-panel
+# (mouse, keyboards, touchscreen, etc)
+# display panel requires colord and gnome-settings-daemon[colord]
+# printer panel requires cups and smbclient (the latter is not patch yet to be separately optional)
+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?]
+ >=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]
+ >=x11-misc/colord-0.1.34:0=
+
+ >=dev-libs/libpwquality-1.2.2
+ dev-libs/libxml2:2
+ gnome-base/libgtop:2=
+ media-libs/fontconfig
+ >=sys-apps/accountsservice-0.6.39
+
+ >=media-libs/libcanberra-0.13[gtk3]
+ >=media-sound/pulseaudio-2[glib]
+ >=sys-auth/polkit-0.97
+ >=sys-power/upower-0.99:=
+
+ virtual/libgudev
+ x11-apps/xmodmap
+ x11-libs/cairo
+ x11-libs/libX11
+ x11-libs/libXxf86misc
+ >=x11-libs/libXi-1.2
+
+ bluetooth? ( >=net-wireless/gnome-bluetooth-3.18.2:= )
+ colord? (
+ net-libs/libsoup:2.4
+ >=x11-misc/colord-0.1.34:0=
+ >=x11-libs/colord-gtk-0.1.24 )
+ cups? (
+ >=net-print/cups-1.7[dbus]
+ >=net-fs/samba-4.0.0[client]
+ )
+ gnome-online-accounts? (
+ >=media-libs/grilo-0.3.0:0.3=
+ >=net-libs/gnome-online-accounts-3.25.3:= )
+ ibus? ( >=app-i18n/ibus-1.5.2 )
+ kerberos? ( app-crypt/mit-krb5 )
+ networkmanager? (
+ >=gnome-extra/nm-applet-1.2.0
+ >=net-misc/networkmanager-1.2.0:=[modemmanager]
+ >=net-misc/modemmanager-0.7.990 )
+ v4l? (
+ media-libs/clutter-gtk:1.0
+ >=media-video/cheese-3.5.91 )
+ input_devices_wacom? (
+ >=dev-libs/libwacom-0.7
+ >=media-libs/clutter-1.11.3:1.0
+ media-libs/clutter-gtk:1.0
+ >=x11-libs/libXi-1.2 )
+"
+# <gnome-color-manager-3.1.2 has file collisions with g-c-c-3.1.x
+# libgnomekbd needed only for gkbd-keyboard-display tool
+#
+# mouse panel needs a concrete set of X11 drivers at runtime, bug #580474
+# Also we need newer driver versions to allow wacom and libinput drivers to
+# not collide
+#
+# system-config-printer provides org.fedoraproject.Config.Printing service and interface
+# cups-pk-helper provides org.opensuse.cupspkhelper.mechanism.all-edit policykit helper policy
+RDEPEND="${COMMON_DEPEND}
+ || ( >=sys-apps/systemd-31 ( app-admin/openrc-settingsd sys-auth/consolekit ) )
+ x11-themes/adwaita-icon-theme
+ colord? ( >=gnome-extra/gnome-color-manager-3 )
+ cups? (
+ app-admin/system-config-printer
+ net-print/cups-pk-helper )
+ input_devices_wacom? ( gnome-base/gnome-settings-daemon[input_devices_wacom] )
+ >=gnome-base/libgnomekbd-3
+ wayland? ( dev-libs/libinput )
+ !wayland? (
+ >=x11-drivers/xf86-input-libinput-0.19.0
+ input_devices_wacom? ( >=x11-drivers/xf86-input-wacom-0.33.0 ) )
+
+ !<gnome-base/gdm-2.91.94
+ !<gnome-extra/gnome-color-manager-3.1.2
+ !gnome-extra/gnome-media[pulseaudio]
+ !<gnome-extra/gnome-media-2.32.0-r300
+ !<net-wireless/gnome-bluetooth-3.3.2
+"
+# PDEPEND to avoid circular dependency
+PDEPEND=">=gnome-base/gnome-session-2.91.6-r1"
+
+DEPEND="${COMMON_DEPEND}
+ x11-base/xorg-proto
+
+ dev-libs/libxml2:2
+ dev-libs/libxslt
+ dev-util/glib-utils
+ >=dev-util/intltool-0.40.1
+ >=sys-devel/gettext-0.17
+ virtual/pkgconfig
+
+ gnome-base/gnome-common
+ sys-devel/autoconf-archive
+"
+# Needed for autoreconf
+# gnome-base/gnome-common
+# sys-devel/autoconf-archive
+
+PATCHES=(
+ # Lots of patches from gnome-3-26 branch on top of 3.26.2
+ # Makes some panels and dependencies optional; requires eautoreconf
+ # https://bugzilla.gnome.org/686840, 697478, 700145
+ # Fix some absolute paths to be appropriate for Gentoo
+ "${WORKDIR}"/patches/
+ "${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
+)
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-update-mimedb \
+ --disable-static \
+ --enable-documentation \
+ $(use_enable bluetooth) \
+ $(use_enable colord color) \
+ $(use_enable cups) \
+ $(usex debug --enable-debug=yes ' ') \
+ $(use_enable gnome-online-accounts goa) \
+ $(use_enable ibus) \
+ $(use_enable kerberos) \
+ $(use_enable networkmanager) \
+ $(use_with v4l cheese) \
+ $(use_enable input_devices_wacom wacom) \
+ $(use_enable wayland)
+}
+
+src_install() {
+ gnome2_src_install completiondir="$(get_bashcompdir)"
+}