[arch-commits] Commit in purple-facebook/repos/community-x86_64 (3 files)

Balló György bgyorgy at archlinux.org
Wed May 5 17:20:59 UTC 2021


    Date: Wednesday, May 5, 2021 @ 17:20:59
  Author: bgyorgy
Revision: 927809

archrelease: copy trunk to community-x86_64

Added:
  purple-facebook/repos/community-x86_64/PKGBUILD
    (from rev 927808, purple-facebook/trunk/PKGBUILD)
  purple-facebook/repos/community-x86_64/fix-taNewMessage-bug.patch
    (from rev 927808, purple-facebook/trunk/fix-taNewMessage-bug.patch)
Deleted:
  purple-facebook/repos/community-x86_64/PKGBUILD

----------------------------+
 PKGBUILD                   |   63 ++++++++++++++++++++++--------------------
 fix-taNewMessage-bug.patch |   64 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 97 insertions(+), 30 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2021-05-05 17:20:48 UTC (rev 927808)
+++ PKGBUILD	2021-05-05 17:20:59 UTC (rev 927809)
@@ -1,30 +0,0 @@
-# Maintainer: Balló György <ballogyor+arch at gmail dot com>
-
-pkgname=purple-facebook
-pkgver=0.9.6
-pkgrel=3
-pkgdesc="Facebook protocol plugin for libpurple"
-arch=('x86_64')
-url="https://github.com/dequis/purple-facebook"
-license=('GPL')
-depends=('json-glib' 'libpurple')
-source=("https://github.com/dequis/$pkgname/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz")
-sha256sums=('1db6ed9e8f81cbd4ae10d75c04f5393e5cd4ca11ced74408ca6d07c7b888f3f7')
-
-prepare() {
-  cd $pkgname-$pkgver
-  # Bump the FB_ORCA_AGENT version
-  # https://github.com/dequis/purple-facebook/commit/3f4e9500bed9c1a7f9bb6c5381823a4facde6602
-  sed -i 's/192.0.0.31.101/537.0.0.31.101/' pidgin/libpurple/protocols/facebook/api.h
-}
-
-build() {
-  cd $pkgname-$pkgver
-  ./configure --prefix=/usr
-  make
-}
-
-package() {
-  cd $pkgname-$pkgver
-  make DESTDIR="$pkgdir" install
-}

Copied: purple-facebook/repos/community-x86_64/PKGBUILD (from rev 927808, purple-facebook/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2021-05-05 17:20:59 UTC (rev 927809)
@@ -0,0 +1,33 @@
+# Maintainer: Balló György <ballogyor+arch at gmail dot com>
+
+pkgname=purple-facebook
+pkgver=0.9.6
+pkgrel=4
+pkgdesc='Facebook protocol plugin for libpurple'
+arch=('x86_64')
+url='https://github.com/dequis/purple-facebook'
+license=('GPL')
+depends=('json-glib' 'libpurple')
+source=("https://github.com/dequis/$pkgname/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz"
+        'fix-taNewMessage-bug.patch')
+sha256sums=('1db6ed9e8f81cbd4ae10d75c04f5393e5cd4ca11ced74408ca6d07c7b888f3f7'
+            '404ebdf6d47991a00ddf24acc433db024e9c5e7cece52ba36e20ea620b09fb07')
+
+prepare() {
+  cd $pkgname-$pkgver/pidgin
+  # Upstream fixes
+  patch -Np1 -i ../../fix-taNewMessage-bug.patch
+  sed -i 's/192.0.0.31.101/537.0.0.31.101/
+          /FB_API_TCHK(id == 2);/d' libpurple/protocols/facebook/api.h
+}
+
+build() {
+  cd $pkgname-$pkgver
+  ./configure --prefix=/usr
+  make
+}
+
+package() {
+  cd $pkgname-$pkgver
+  make DESTDIR="$pkgdir" install
+}

Copied: purple-facebook/repos/community-x86_64/fix-taNewMessage-bug.patch (from rev 927808, purple-facebook/trunk/fix-taNewMessage-bug.patch)
===================================================================
--- fix-taNewMessage-bug.patch	                        (rev 0)
+++ fix-taNewMessage-bug.patch	2021-05-05 17:20:59 UTC (rev 927809)
@@ -0,0 +1,64 @@
+--- a/libpurple/protocols/facebook/api.c
++++ b/libpurple/protocols/facebook/api.c
+@@ -1502,6 +1502,23 @@
+ fb_api_cb_publish_ms_event(FbApi *api, JsonNode *root, GSList *events, FbApiEventType type, GError **error);
+ 
+ static void
++fb_api_cb_publish_mst(FbThrift *thft, GError **error)
++{
++	if (fb_thrift_read_isstop(thft)) {
++		FB_API_TCHK(fb_thrift_read_stop(thft));
++	} else {
++		FbThriftType type;
++		gint16 id;
++
++		FB_API_TCHK(fb_thrift_read_field(thft, &type, &id, 0));
++		FB_API_TCHK(type == FB_THRIFT_TYPE_STRING);
++		FB_API_TCHK(id == 2);
++		FB_API_TCHK(fb_thrift_read_str(thft, NULL));
++		FB_API_TCHK(fb_thrift_read_stop(thft));
++	}
++}
++
++static void
+ fb_api_cb_publish_ms(FbApi *api, GByteArray *pload)
+ {
+ 	const gchar *data;
+@@ -1531,10 +1548,14 @@
+ 
+ 	/* Read identifier string (for Facebook employees) */
+ 	thft = fb_thrift_new(pload, 0);
+-	fb_thrift_read_str(thft, NULL);
++	fb_api_cb_publish_mst(thft, &err);
+ 	size = fb_thrift_get_pos(thft);
+ 	g_object_unref(thft);
+ 
++	FB_API_ERROR_EMIT(api, err,
++		return;
++	);
++
+ 	g_return_if_fail(size < pload->len);
+ 	data = (gchar *) pload->data + size;
+ 	size = pload->len - size;
+@@ -1844,8 +1865,8 @@
+ 		pres->active = i32 != 0;
+ 		*press = g_slist_prepend(*press, pres);
+ 
+-		fb_util_debug_info("Presence: %" FB_ID_FORMAT " (%d)",
+-		                   i64, i32 != 0);
++		fb_util_debug_info("Presence: %" FB_ID_FORMAT " (%d) id: %d",
++		                   i64, i32 != 0, id);
+ 
+ 		while (id <= 6) {
+ 			if (fb_thrift_read_isstop(thft)) {
+@@ -1894,7 +1915,9 @@
+ 	}
+ 
+ 	/* Read the field stop */
+-	FB_API_TCHK(fb_thrift_read_stop(thft));
++	if (fb_thrift_read_isstop(thft)) {
++		FB_API_TCHK(fb_thrift_read_stop(thft));
++	}
+ }
+ 
+ static void



More information about the arch-commits mailing list