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

Balló György bgyorgy at archlinux.org
Sat Apr 17 13:55:29 UTC 2021


    Date: Saturday, April 17, 2021 @ 13:55:29
  Author: bgyorgy
Revision: 919774

upgpkg: pidgin-libnotify 0.14-13: Fix crash (FS#69653), add metainfo file

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

-----------------------------------+
 PKGBUILD                          |   26 +++++++++++++-------------
 pidgin-libnotify-notify-osd.patch |   34 +++++++++-------------------------
 pidgin-libnotify.metainfo.xml     |   14 ++++++++++++++
 3 files changed, 36 insertions(+), 38 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-04-17 13:32:22 UTC (rev 919773)
+++ PKGBUILD	2021-04-17 13:55:29 UTC (rev 919774)
@@ -5,25 +5,27 @@
 
 pkgname=pidgin-libnotify
 pkgver=0.14
-pkgrel=12
+pkgrel=13
 arch=('x86_64')
-pkgdesc="Pidgin plugin that enables popups when someone logs in or messages you"
-url="http://gaim-libnotify.sourceforge.net/"
+pkgdesc='Pidgin plugin that enables popups when someone logs in or messages you'
+url='http://gaim-libnotify.sourceforge.net/'
 license=('GPL')
 depends=('pidgin' 'libnotify')
 makedepends=('intltool')
-source=(https://downloads.sourceforge.net/gaim-libnotify/$pkgname-$pkgver.tar.gz
-        language_fixes.patch
-        pidgin-libnotify-0.14-libnotify-0.7.patch
-        pidgin-libnotify-showbutton.patch
-        pidgin-libnotify-getfocus.patch
-        pidgin-libnotify-notify-osd.patch)
+source=("https://downloads.sourceforge.net/gaim-libnotify/$pkgname-$pkgver.tar.gz"
+        'language_fixes.patch'
+        'pidgin-libnotify-0.14-libnotify-0.7.patch'
+        'pidgin-libnotify-showbutton.patch'
+        'pidgin-libnotify-getfocus.patch'
+        'pidgin-libnotify-notify-osd.patch'
+        'pidgin-libnotify.metainfo.xml')
 sha256sums=('74f4a9f20e0a483df39974178f1f2380786176189512bcd438e4ada280ec3abe'
             '11f24523acd0dd740e17f98b360fc2f4679536a8dd79d19e247bc0e90a65045d'
             'e9c8d71b74985e11ef2939033fc2feeac037eb6553272a11ddc8417a79baafda'
             '897a1f99255476110dd3d5e888134f255e60e9539f65e8c3c516640a0790838b'
             '1712c96e0cea68c21a909981246e06ea2d60ad41f77da1e399503443867e2186'
-            'bb101a9d24c0dc94df56bf4b38026a6ec89a83b97d473909727166de751588cf')
+            'f8996bba9e3b169ac606499d6cbffd971ed5dc3c57097fbfb2582ad0cdf6fd7f'
+            'a4c2a983eeffe9146a6e3d8349c12bdc3a5b7fb622980db164ea7c8426a90723')
 
 prepare() {
   cd $pkgname-$pkgver
@@ -37,10 +39,7 @@
 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
 }
 
@@ -47,4 +46,5 @@
 package() {
   cd $pkgname-$pkgver
   make DESTDIR="$pkgdir" install
+  install -Dm644 ../pidgin-libnotify.metainfo.xml "$pkgdir/usr/share/metainfo/pidgin-libnotify.metainfo.xml"
 }

Modified: pidgin-libnotify-notify-osd.patch
===================================================================
--- pidgin-libnotify-notify-osd.patch	2021-04-17 13:32:22 UTC (rev 919773)
+++ pidgin-libnotify-notify-osd.patch	2021-04-17 13:55:29 UTC (rev 919774)
@@ -1,34 +1,18 @@
 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 @@
+@@ -287,6 +287,16 @@
  	return purple_status_is_online (status) && purple_status_is_available (status);
  }
  
-+static gboolean
-+notify_supports_actions ()
++gboolean
++server_has_caps(const char *id)
 +{
-+	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;
++	GList *caps = notify_get_server_caps();
++	gboolean result;
++	result = (g_list_find_custom(caps, id, (GCompareFunc)g_strcmp0) != NULL);
++	g_list_free_full(caps, g_free);
++	return result;
 +}
 +
  static void
@@ -40,7 +24,7 @@
  
 -	notify_notification_add_action (notification, "show", _("Show"), action_cb, NULL, NULL);
 +	/* Check if notification server can use actions */
-+	if (notify_supports_actions ())
++	if (server_has_caps("actions"))
 +	{
 +		notify_notification_add_action (notification, "show", _("Show"), action_cb, NULL, NULL);
 +	}

Added: pidgin-libnotify.metainfo.xml
===================================================================
--- pidgin-libnotify.metainfo.xml	                        (rev 0)
+++ pidgin-libnotify.metainfo.xml	2021-04-17 13:55:29 UTC (rev 919774)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright 2015 Jiri Eischmann <eischmann at redhat.com> 
+-->
+<component type="addon">
+<id>pidgin-libnotify</id>
+<extends>pidgin.desktop</extends>
+<name>Libnotify Plugin</name>
+<summary>Plugin that uses libnotify to display graphic notifications of new messages and other events such as a buddy signing on or off</summary>
+<url type="homepage">https://sourceforge.net/projects/gaim-libnotify/</url>
+<url type="bugtracker">https://sourceforge.net/p/gaim-libnotify/bugs/</url>
+<metadata_license>GFDL-1.3</metadata_license>
+<project_license>GPL-2.0+</project_license>
+<updatecontact>eischmann_at_redhat.com</updatecontact>
+​</component>
\ No newline at end of file



More information about the arch-commits mailing list