public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: gnome-extra/cinnamon/, gnome-extra/cinnamon/files/
Date: Fri, 18 Feb 2022 02:44:30 +0000 (UTC)	[thread overview]
Message-ID: <1645152153.0063b97357619e166fe4be06257b257c60d07e2d.sam@gentoo> (raw)

commit:     0063b97357619e166fe4be06257b257c60d07e2d
Author:     Matthew S. Turnbull <sparky <AT> bluefang-logic <DOT> com>
AuthorDate: Tue Feb  1 04:39:55 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb 18 02:42:33 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0063b973

gnome-extra/cinnamon: Replace optional eds patch with upstream commit

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Matthew S. Turnbull <sparky <AT> bluefang-logic.com>
Closes: https://github.com/gentoo/gentoo/pull/24060
Signed-off-by: Sam James <sam <AT> gentoo.org>

 gnome-extra/cinnamon/cinnamon-5.2.7-r1.ebuild      |   4 +-
 .../files/cinnamon-5.2.7-eds-detection.patch       | 114 +++++++++++++++++++++
 .../files/cinnamon-5.2.7-optional-eds.patch        |  85 ---------------
 3 files changed, 115 insertions(+), 88 deletions(-)

diff --git a/gnome-extra/cinnamon/cinnamon-5.2.7-r1.ebuild b/gnome-extra/cinnamon/cinnamon-5.2.7-r1.ebuild
index cf265bb33cc7..6ce4247d38e4 100644
--- a/gnome-extra/cinnamon/cinnamon-5.2.7-r1.ebuild
+++ b/gnome-extra/cinnamon/cinnamon-5.2.7-r1.ebuild
@@ -113,8 +113,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-3.6.6-wheel-sudo.patch
 
 	# Make evolution-data-server integration optional
-	# https://github.com/linuxmint/cinnamon/pull/10567
-	"${FILESDIR}"/${PN}-5.2.7-optional-eds.patch
+	"${FILESDIR}"/${PN}-5.2.7-eds-detection.patch
 )
 
 src_prepare() {
@@ -133,7 +132,6 @@ src_prepare() {
 
 src_configure() {
 	local emesonargs=(
-		$(meson_use eds build_calendar_server)
 		$(meson_use gstreamer build_recorder)
 		$(meson_use gtk-doc docs)
 		-Ddisable_networkmanager=$(usex networkmanager false true)

diff --git a/gnome-extra/cinnamon/files/cinnamon-5.2.7-eds-detection.patch b/gnome-extra/cinnamon/files/cinnamon-5.2.7-eds-detection.patch
new file mode 100644
index 000000000000..bda0feedceb7
--- /dev/null
+++ b/gnome-extra/cinnamon/files/cinnamon-5.2.7-eds-detection.patch
@@ -0,0 +1,114 @@
+https://github.com/linuxmint/cinnamon/commit/ef463cc0aaedd714f2956daab227aeda1d87897e
+
+From ef463cc0aaedd714f2956daab227aeda1d87897e Mon Sep 17 00:00:00 2001
+From: Michael Webster <miketwebster@gmail.com>
+Date: Wed, 12 Jan 2022 14:50:47 -0500
+Subject: [PATCH] calendar events: Check if evolution-data-server is running
+ before enabling events.
+
+None of the e-d-s libraries actually depend on evolution-data-server
+(which is what provides the backend to these libraries). Also, not
+everyone may want this sort of thing in the first place.
+
+So, check if the e-d-s service we require is active before trying
+to enable event support.
+
+ref: #10597, #10567
+---
+ .../applets/calendar@cinnamon.org/calendar.js |  2 +-
+ .../calendar@cinnamon.org/eventView.js        | 43 +++++++++++++++----
+ js/misc/interfaces.js                         |  4 ++
+ 3 files changed, 39 insertions(+), 10 deletions(-)
+
+diff --git a/files/usr/share/cinnamon/applets/calendar@cinnamon.org/calendar.js b/files/usr/share/cinnamon/applets/calendar@cinnamon.org/calendar.js
+index 460883c063..5078a201ed 100644
+--- a/files/usr/share/cinnamon/applets/calendar@cinnamon.org/calendar.js
++++ b/files/usr/share/cinnamon/applets/calendar@cinnamon.org/calendar.js
+@@ -159,7 +159,7 @@ class Calendar {
+         this.desktop_settings = new Gio.Settings({ schema_id: DESKTOP_SCHEMA });
+         this.desktop_settings.connect("changed::" + FIRST_WEEKDAY_KEY, Lang.bind(this, this._onSettingsChange));
+ 
+-        this.events_enabled = true;
++        this.events_enabled = false;
+         this.events_manager.connect("events-updated", this._events_updated.bind(this));
+         this.events_manager.connect("events-manager-ready", this._update_events_enabled.bind(this));
+         this.events_manager.connect("has-calendars-changed", this._update_events_enabled.bind(this));
+diff --git a/files/usr/share/cinnamon/applets/calendar@cinnamon.org/eventView.js b/files/usr/share/cinnamon/applets/calendar@cinnamon.org/eventView.js
+index 1d1035c605..2e73363fb7 100644
+--- a/files/usr/share/cinnamon/applets/calendar@cinnamon.org/eventView.js
++++ b/files/usr/share/cinnamon/applets/calendar@cinnamon.org/eventView.js
+@@ -17,6 +17,7 @@ const Main = imports.ui.main;
+ const Util = imports.misc.util;
+ const Mainloop = imports.mainloop;
+ const Tweener = imports.ui.tweener;
++const Interfaces = imports.misc.interfaces;
+ 
+ const STATUS_UNKNOWN = 0;
+ const STATUS_NO_CALENDARS = 1;
+@@ -302,18 +303,42 @@ class EventsManager {
+ 
+     start_events() {
+         if (this._calendar_server == null) {
+-            Cinnamon.CalendarServerProxy.new_for_bus(
+-                Gio.BusType.SESSION,
+-                // Gio.DBusProxyFlags.NONE,
+-                Gio.DBusProxyFlags.DO_NOT_AUTO_START_AT_CONSTRUCTION,
+-                "org.cinnamon.CalendarServer",
+-                "/org/cinnamon/CalendarServer",
+-                null,
+-                this._calendar_server_ready.bind(this)
+-            );
++            Interfaces.getDBusAsync((proxy, error) => {
++                if (error) {
++                    this.log_dbus_error(error);
++                    return;
++                }
++
++                proxy.NameHasOwnerRemote("org.gnome.evolution.dataserver.Calendar8", (has_owner, error) => {
++                    if (error) {
++                        this.log_dbus_error(error);
++                        return;
++                    }
++
++                    if (has_owner[0]) {
++                        log("calendar@cinnamon.org: Calendar events supported.")
++
++                        Cinnamon.CalendarServerProxy.new_for_bus(
++                            Gio.BusType.SESSION,
++                            Gio.DBusProxyFlags.DO_NOT_AUTO_START_AT_CONSTRUCTION,
++                            "org.cinnamon.CalendarServer",
++                            "/org/cinnamon/CalendarServer",
++                            null,
++                            this._calendar_server_ready.bind(this)
++                        );
++                    } else {
++                        log("calendar@cinnamon.org: No calendar event support (needs evolution-data-server)")
++
++                    }
++                });
++            })
+         }
+     }
+ 
++    log_dbus_error(e) {
++        global.logError(`calendar@cinnamon.org: Could not check for calendar event support: ${e.toString()}`);
++    }
++
+     _calendar_server_ready(obj, res) {
+         try {
+             this._calendar_server = Cinnamon.CalendarServerProxy.new_for_bus_finish(res);
+diff --git a/js/misc/interfaces.js b/js/misc/interfaces.js
+index 8bc6e717d4..6bdb7b78c2 100644
+--- a/js/misc/interfaces.js
++++ b/js/misc/interfaces.js
+@@ -13,6 +13,10 @@ const DBusIface = '\
+             <arg type="s" direction="in" /> \
+             <arg type="s" direction="out" /> \
+         </method> \
++        <method name="NameHasOwner"> \
++            <arg type="s" direction="in" /> \
++            <arg type="b" direction="out" /> \
++        </method> \
+         <method name="ListNames"> \
+             <arg type="as" direction="out" /> \
+         </method> \

diff --git a/gnome-extra/cinnamon/files/cinnamon-5.2.7-optional-eds.patch b/gnome-extra/cinnamon/files/cinnamon-5.2.7-optional-eds.patch
deleted file mode 100644
index c0646359552b..000000000000
--- a/gnome-extra/cinnamon/files/cinnamon-5.2.7-optional-eds.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-diff --git a/files/usr/share/cinnamon/applets/calendar@cinnamon.org/eventView.js b/files/usr/share/cinnamon/applets/calendar@cinnamon.org/eventView.js
-index 1d1035c60..ebfd5a3a4 100644
---- a/files/usr/share/cinnamon/applets/calendar@cinnamon.org/eventView.js
-+++ b/files/usr/share/cinnamon/applets/calendar@cinnamon.org/eventView.js
-@@ -301,7 +301,7 @@ class EventsManager {
-     }
- 
-     start_events() {
--        if (this._calendar_server == null) {
-+        if (this._calendar_server == null && Cinnamon.CalendarServerProxy) {
-             Cinnamon.CalendarServerProxy.new_for_bus(
-                 Gio.BusType.SESSION,
-                 // Gio.DBusProxyFlags.NONE,
-diff --git a/meson.build b/meson.build
-index 2c1baf47d..aba5d5a30 100644
---- a/meson.build
-+++ b/meson.build
-@@ -179,6 +179,9 @@ install_subdir(
-     strip_directory: true,
- )
- 
--subdir('calendar-server')
-+
-+if get_option('build_calendar_server')
-+    subdir('calendar-server')
-+endif
- subdir('python3')
- subdir('install-scripts')
-diff --git a/meson_options.txt b/meson_options.txt
-index 82422246b..752f7904e 100644
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -13,6 +13,11 @@ option('build_recorder',
-     value: true,
-     description: 'Build the cinnamon recorder into source'
- )
-+option('build_calendar_server',
-+    type: 'boolean',
-+    value: true,
-+    description: 'Build the cinnamon EDS calendar server'
-+)
- option('disable_networkmanager',
-     type: 'boolean',
-     value: false,
-diff --git a/src/meson.build b/src/meson.build
-index 7999c0a67..1b22aa279 100644
---- a/src/meson.build
-+++ b/src/meson.build
-@@ -3,12 +3,6 @@ subdir('hotplug-sniffer')
- 
- include_src = include_directories('.')
- 
--calendar_generated = gnome.gdbus_codegen('cinnamon-calendar',
--  sources: 'org.cinnamon.CalendarServer.xml',
--  interface_prefix: 'org.cinnamon.',
--  namespace: 'Cinnamon'
--)
--
- cinnamon_headers = [
-     'cinnamon-app.h',
-     'cinnamon-app-system.h',
-@@ -59,10 +53,21 @@ cinnamon_sources = [
-     'cinnamon-window-tracker.c',
-     'cinnamon-wm.c',
-     'cinnamon-xfixes-cursor.c',
--    cinnamon_headers,
--    calendar_generated
-+    cinnamon_headers
- ]
- 
-+if get_option('build_calendar_server')
-+    calendar_generated = gnome.gdbus_codegen('cinnamon-calendar',
-+      sources: 'org.cinnamon.CalendarServer.xml',
-+      interface_prefix: 'org.cinnamon.',
-+      namespace: 'Cinnamon'
-+    )
-+
-+    cinnamon_sources += [
-+        calendar_generated
-+    ]
-+endif
-+
- cinnamon_enum_types = gnome.mkenums_simple(
-     'cinnamon-enum-types',
-     sources: cinnamon_headers,


             reply	other threads:[~2022-02-18  2:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-18  2:44 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-08-05  3:36 [gentoo-commits] repo/gentoo:master commit in: gnome-extra/cinnamon/, gnome-extra/cinnamon/files/ Eli Schwartz
2022-02-27 23:50 Sam James
2022-01-21 17:15 Sam James
2022-01-21 17:15 Sam James
2020-05-31 19:05 Matt Turner
2019-05-27 13:15 Kristian Fiskerstrand
2018-07-31  8:38 Kristian Fiskerstrand
2017-11-27 22:15 Kristian Fiskerstrand
2015-09-06 21:56 Alexandre Rostovtsev

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=1645152153.0063b97357619e166fe4be06257b257c60d07e2d.sam@gentoo \
    --to=sam@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