diff options
| -rw-r--r-- | meta-xfce/recipes-apps/xfce4-notifyd/files/0001-Add-a-configure-option-to-start-daemon-by-autostart-.patch | 105 | ||||
| -rw-r--r-- | meta-xfce/recipes-apps/xfce4-notifyd/xfce4-notifyd_0.4.0.bb | 5 |
2 files changed, 110 insertions, 0 deletions
diff --git a/meta-xfce/recipes-apps/xfce4-notifyd/files/0001-Add-a-configure-option-to-start-daemon-by-autostart-.patch b/meta-xfce/recipes-apps/xfce4-notifyd/files/0001-Add-a-configure-option-to-start-daemon-by-autostart-.patch new file mode 100644 index 0000000000..7be66f55b4 --- /dev/null +++ b/meta-xfce/recipes-apps/xfce4-notifyd/files/0001-Add-a-configure-option-to-start-daemon-by-autostart-.patch | |||
| @@ -0,0 +1,105 @@ | |||
| 1 | From 751ca1687edae351db7477b00b67a72b7fc55dee Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> | ||
| 3 | Date: Fri, 10 Nov 2017 10:29:28 +0100 | ||
| 4 | Subject: [PATCH] Add a configure option to start daemon by autostart instead | ||
| 5 | of dbus | ||
| 6 | MIME-Version: 1.0 | ||
| 7 | Content-Type: text/plain; charset=UTF-8 | ||
| 8 | Content-Transfer-Encoding: 8bit | ||
| 9 | |||
| 10 | On sytems with multiple desktops installed, dbus service | ||
| 11 | 'org.freedesktop.Notifications' may be defined by multiple instances. In my | ||
| 12 | case it is KDE-Plasma causing unpredictable results: On some environments | ||
| 13 | xfce4-notifyd is started on others not. | ||
| 14 | |||
| 15 | To help distros/packagers a new configure option '--enable-dbus-start-daemon' | ||
| 16 | is introduced. It is desabled by default so no unexpected impact is to expect. | ||
| 17 | |||
| 18 | It should be noted that the simplicity of this change is possible since recent | ||
| 19 | change: Daemon does not kill itself after being idle for certain time - see | ||
| 20 | commit d87a4a93b2ec4ab094f5a35ae818395f750f2891. | ||
| 21 | |||
| 22 | Upstream-Status: Submitted [1] | ||
| 23 | |||
| 24 | [1] https://bugzilla.xfce.org/show_bug.cgi?id=13989 | ||
| 25 | |||
| 26 | Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> | ||
| 27 | --- | ||
| 28 | Makefile.am | 13 +++++++++++++ | ||
| 29 | configure.ac | 8 ++++++++ | ||
| 30 | xfce4-notifyd/xfce4-notifyd.desktop.in | 6 ++++++ | ||
| 31 | 3 files changed, 27 insertions(+) | ||
| 32 | create mode 100644 xfce4-notifyd/xfce4-notifyd.desktop.in | ||
| 33 | |||
| 34 | diff --git a/Makefile.am b/Makefile.am | ||
| 35 | index c81bdaa..3bd2d46 100644 | ||
| 36 | --- a/Makefile.am | ||
| 37 | +++ b/Makefile.am | ||
| 38 | @@ -83,6 +83,7 @@ xfce4_notifyd_config_xfce4_notifyd_config_LDADD = \ | ||
| 39 | $(common_ldadd) \ | ||
| 40 | $(LIBNOTIFY_LIBS) | ||
| 41 | |||
| 42 | +if USE_DBUS_START_DAEMON | ||
| 43 | servicedir = $(datadir)/dbus-1/services | ||
| 44 | service_in_files = xfce4-notifyd/org.xfce.xfce4-notifyd.Notifications.service.in | ||
| 45 | service_DATA = $(service_in_files:.service.in=.service) | ||
| 46 | @@ -97,6 +98,15 @@ dist_service = \ | ||
| 47 | xfce4-notifyd/notify-dbus.xml \ | ||
| 48 | xfce4-notifyd/xfce-notify-marshal.list | ||
| 49 | distclean_service = $(service_DATA) $(systemd_user_DATA) | ||
| 50 | +else | ||
| 51 | +autostartdir = $(sysconfdir)/xdg/autostart | ||
| 52 | +autostart_in_files = xfce4-notifyd/xfce4-notifyd.desktop.in | ||
| 53 | +autostart_DATA = $(autostart_in_files:.desktop.in=.desktop) | ||
| 54 | + | ||
| 55 | +dist_autostart = \ | ||
| 56 | + $(autostart_in_files) | ||
| 57 | +distclean_autostart = $(autostart_DATA) | ||
| 58 | +endif | ||
| 59 | |||
| 60 | dist_man1_MANS = \ | ||
| 61 | xfce4-notifyd-config/xfce4-notifyd-config.1 | ||
| 62 | @@ -273,6 +283,9 @@ install-data-hook: | ||
| 63 | xfce4-notifyd/%.service: $(srcdir)/xfce4-notifyd/%.service.in Makefile | ||
| 64 | sed -e "s,\@notifydir\@,$(xfce4_notifyddir),g" < $< > $@ | ||
| 65 | |||
| 66 | +xfce4-notifyd/%.desktop: $(srcdir)/xfce4-notifyd/%.desktop.in Makefile | ||
| 67 | + sed -e "s,\@notifydir\@,$(xfce4_notifyddir),g" < $< > $@ | ||
| 68 | + | ||
| 69 | distclean-local: | ||
| 70 | -rm -rf *.cache *~ | ||
| 71 | |||
| 72 | diff --git a/configure.ac b/configure.ac | ||
| 73 | index 46a132c..a37da8c 100644 | ||
| 74 | --- a/configure.ac | ||
| 75 | +++ b/configure.ac | ||
| 76 | @@ -124,6 +124,14 @@ AS_IF([test "x$use_old_gsi_sig" = "xyes"], | ||
| 77 | AM_CONDITIONAL([USE_OLD_GET_SERVER_INFORMATION_SIGNATURE], | ||
| 78 | [test "x$use_old_gsi_sig" = "xyes"]) | ||
| 79 | |||
| 80 | +dnl dbus start daemon | ||
| 81 | +AC_ARG_ENABLE([dbus-start-daemon], | ||
| 82 | + [AS_HELP_STRING([--enable-dbus-start-daemon], | ||
| 83 | + [Start daemon by dbus - if not set by autostart. (default=yes)])], | ||
| 84 | + [use_dbus_start_daemon=$enableval], [use_dbus_start_daemon=yes]) | ||
| 85 | +AM_CONDITIONAL([USE_DBUS_START_DAEMON], | ||
| 86 | + [test "x$use_dbus_start_daemon" = "xyes"]) | ||
| 87 | + | ||
| 88 | dnl create #define for spec version | ||
| 89 | AC_DEFINE_UNQUOTED([NOTIFICATIONS_SPEC_VERSION], ["notifications_spec_version"], | ||
| 90 | [Set to the version of the freedesktop.org notifications spec we support]) | ||
| 91 | diff --git a/xfce4-notifyd/xfce4-notifyd.desktop.in b/xfce4-notifyd/xfce4-notifyd.desktop.in | ||
| 92 | new file mode 100644 | ||
| 93 | index 0000000..d1f76f9 | ||
| 94 | --- /dev/null | ||
| 95 | +++ b/xfce4-notifyd/xfce4-notifyd.desktop.in | ||
| 96 | @@ -0,0 +1,6 @@ | ||
| 97 | +[Desktop Entry] | ||
| 98 | +Type=Application | ||
| 99 | +Name=Xfce Notification Daemon | ||
| 100 | +Exec=@notifydir@/xfce4-notifyd | ||
| 101 | +Icon=xfce4-notifyd | ||
| 102 | +OnlyShowIn=XFCE; | ||
| 103 | -- | ||
| 104 | 2.9.5 | ||
| 105 | |||
diff --git a/meta-xfce/recipes-apps/xfce4-notifyd/xfce4-notifyd_0.4.0.bb b/meta-xfce/recipes-apps/xfce4-notifyd/xfce4-notifyd_0.4.0.bb index 0ec6b63045..a39396fa98 100644 --- a/meta-xfce/recipes-apps/xfce4-notifyd/xfce4-notifyd_0.4.0.bb +++ b/meta-xfce/recipes-apps/xfce4-notifyd/xfce4-notifyd_0.4.0.bb | |||
| @@ -15,9 +15,14 @@ DEPENDS = " \ | |||
| 15 | 15 | ||
| 16 | inherit xfce-app | 16 | inherit xfce-app |
| 17 | 17 | ||
| 18 | SRC_URI += "file://0001-Add-a-configure-option-to-start-daemon-by-autostart-.patch" | ||
| 18 | SRC_URI[md5sum] = "c2de09c30b06eaf2d3faaf3e509d656a" | 19 | SRC_URI[md5sum] = "c2de09c30b06eaf2d3faaf3e509d656a" |
| 19 | SRC_URI[sha256sum] = "2771871f67effc0bb80f656cf4aa3cd71fe0ea0f4c04b5d8e97bb1752faf36c9" | 20 | SRC_URI[sha256sum] = "2771871f67effc0bb80f656cf4aa3cd71fe0ea0f4c04b5d8e97bb1752faf36c9" |
| 20 | 21 | ||
| 22 | # Avoid trouble with other desktops e.g KDE which also ships dbus service named | ||
| 23 | # org.freedesktop.Notifications | ||
| 24 | EXTRA_OECONF = "--disable-dbus-start-daemon" | ||
| 25 | |||
| 21 | do_compile_prepend() { | 26 | do_compile_prepend() { |
| 22 | mkdir -p xfce4-notifyd | 27 | mkdir -p xfce4-notifyd |
| 23 | } | 28 | } |
