[arch-commits] Commit in pidgin-libnotify/trunk (2 files)

Balló György bgyorgy at archlinux.org
Sun Jun 7 12:27:42 UTC 2020


    Date: Sunday, June 7, 2020 @ 12:27:41
  Author: bgyorgy
Revision: 639969

upgpkg: pidgin-libnotify 0.14-12: Add support for notify-osd

Added:
  pidgin-libnotify/trunk/pidgin-libnotify-notify-osd.patch
Modified:
  pidgin-libnotify/trunk/PKGBUILD

-----------------------------------+
 PKGBUILD                          |   21 ++++++++++-----
 pidgin-libnotify-notify-osd.patch |   49 ++++++++++++++++++++++++++++++++++++
 2 files changed, 63 insertions(+), 7 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-06-07 12:19:23 UTC (rev 639968)
+++ PKGBUILD	2020-06-07 12:27:41 UTC (rev 639969)
@@ -5,7 +5,7 @@
 
 pkgname=pidgin-libnotify
 pkgver=0.14
-pkgrel=11
+pkgrel=12
 arch=('x86_64')
 pkgdesc="Pidgin plugin that enables popups when someone logs in or messages you"
 url="http://gaim-libnotify.sourceforge.net/"
@@ -16,12 +16,14 @@
         language_fixes.patch
         pidgin-libnotify-0.14-libnotify-0.7.patch
         pidgin-libnotify-showbutton.patch
-        pidgin-libnotify-getfocus.patch)
-md5sums=('bfb5368b69c02d429b2b17c00a6673c0'
-         'c89e3cdc5db3525e37be4687f1e17d0a'
-         '05538625f14d9f2c12adae5fa6a1fa26'
-         'efe1e86aa1e0bc9f7d20efe7f34ad4a7'
-         'e624998744d1c2fb8e2c6be94b04c38a')
+        pidgin-libnotify-getfocus.patch
+        pidgin-libnotify-notify-osd.patch)
+sha256sums=('74f4a9f20e0a483df39974178f1f2380786176189512bcd438e4ada280ec3abe'
+            '11f24523acd0dd740e17f98b360fc2f4679536a8dd79d19e247bc0e90a65045d'
+            'e9c8d71b74985e11ef2939033fc2feeac037eb6553272a11ddc8417a79baafda'
+            '897a1f99255476110dd3d5e888134f255e60e9539f65e8c3c516640a0790838b'
+            '1712c96e0cea68c21a909981246e06ea2d60ad41f77da1e399503443867e2186'
+            'bb101a9d24c0dc94df56bf4b38026a6ec89a83b97d473909727166de751588cf')
 
 prepare() {
   cd $pkgname-$pkgver
@@ -29,11 +31,16 @@
   patch -Np0 -i ../pidgin-libnotify-0.14-libnotify-0.7.patch
   patch -Np0 -i ../pidgin-libnotify-showbutton.patch
   patch -Np0 -i ../pidgin-libnotify-getfocus.patch
+  patch -Np1 -i ../pidgin-libnotify-notify-osd.patch
 }
 
 build() {
   cd $pkgname-$pkgver
   ./configure --prefix=/usr --disable-deprecated
+
+  # https://bugzilla.gnome.org/show_bug.cgi?id=656231
+  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
+
   make
 }
 

Added: pidgin-libnotify-notify-osd.patch
===================================================================
--- pidgin-libnotify-notify-osd.patch	                        (rev 0)
+++ pidgin-libnotify-notify-osd.patch	2020-06-07 12:27:41 UTC (rev 639969)
@@ -0,0 +1,49 @@
+diff -aur pidgin-libnotify-0.14/src/pidgin-libnotify.c pidgin-libnotify-0.14.new/src/pidgin-libnotify.c
+--- pidgin-libnotify-0.14/src/pidgin-libnotify.c
++++ pidgin-libnotify-0.14.new/src/pidgin-libnotify.c
+@@ -287,6 +287,32 @@
+ 	return purple_status_is_online (status) && purple_status_is_available (status);
+ }
+ 
++static gboolean
++notify_supports_actions ()
++{
++	GList *caps;
++	gint i = 0;
++	
++	caps = notify_get_server_caps ();
++	
++	do
++	{
++		if (g_strcmp0 (caps->data, "actions") == 0)
++		{
++			g_list_free (caps);
++			return TRUE;
++		}
++		
++		if (caps->next != NULL)
++			caps = g_list_next (caps);
++
++	} while (caps->next != NULL);
++	
++	g_list_free (caps);
++	
++	return FALSE;
++}
++
+ static void
+ notify (const gchar *title,
+ 		const gchar *body,
+@@ -389,7 +415,11 @@
+ 
+ 	notify_notification_set_urgency (notification, NOTIFY_URGENCY_NORMAL);
+ 
+-	notify_notification_add_action (notification, "show", _("Show"), action_cb, NULL, NULL);
++	/* Check if notification server can use actions */
++	if (notify_supports_actions ())
++	{
++		notify_notification_add_action (notification, "show", _("Show"), action_cb, NULL, NULL);
++	}
+ 
+ 	notify_notification_set_timeout(notification, purple_prefs_get_int("/plugins/gtk/libnotify/timeout"));
+ 	if (!notify_notification_show (notification, NULL)) {



More information about the arch-commits mailing list