[arch-commits] Commit in bti/trunk (2 files)
Jelle van der Waa
jelle at archlinux.org
Wed Dec 27 10:32:45 UTC 2017
Date: Wednesday, December 27, 2017 @ 10:32:44
Author: jelle
Revision: 276205
upgpkg: bti 034-2
json-c 0.13
Added:
bti/trunk/0001-Replace-removed-is_error-macro.patch
Modified:
bti/trunk/PKGBUILD
-------------------------------------------+
0001-Replace-removed-is_error-macro.patch | 45 ++++++++++++++++++++++++++++
PKGBUILD | 13 ++++++--
2 files changed, 55 insertions(+), 3 deletions(-)
Added: 0001-Replace-removed-is_error-macro.patch
===================================================================
--- 0001-Replace-removed-is_error-macro.patch (rev 0)
+++ 0001-Replace-removed-is_error-macro.patch 2017-12-27 10:32:44 UTC (rev 276205)
@@ -0,0 +1,45 @@
+From 0db8dc6022f67a4e1f49397b8bf519b2a34f74c9 Mon Sep 17 00:00:00 2001
+From: Jelle van der Waa <jelle at vdwaa.nl>
+Date: Wed, 27 Dec 2017 11:05:45 +0100
+Subject: [PATCH] Replace removed is_error macro
+
+The json-c library removed the is_error macro in 0.13, replaced the
+macro calls with a != NULL statement.
+---
+ bti.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/bti.c b/bti.c
+index 7f485a8..9b68e17 100644
+--- a/bti.c
++++ b/bti.c
+@@ -451,7 +451,7 @@ static void parse_timeline(char *document, struct session *session)
+ struct json_object *val; \
+ struct lh_entry *entry; \
+ for (entry = json_object_get_object(obj)->head; \
+- ({ if(entry && !is_error(entry)) { \
++ ({ if(entry && entry != NULL) { \
+ key = (char*)entry->k; \
+ val = (struct json_object*)entry->v; \
+ } ; entry; }); \
+@@ -667,7 +667,7 @@ static int parse_response_json(char *document, struct session *session)
+
+ /* make global for now */
+ store_session = session;
+- if (!is_error(jobj)) {
++ if (jobj != NULL) {
+ /* guards against a json pre 0.10 bug */
+ json_parse(jobj,0);
+ }
+@@ -692,7 +692,7 @@ static void parse_timeline_json(char *document, struct session *session)
+
+ /* make global for now */
+ store_session = session;
+- if (!is_error(jobj)) {
++ if (jobj != NULL) {
+ /* guards against a json pre 0.10 bug */
+ if (json_object_get_type(jobj)==json_type_array) {
+ json_parse_array(jobj, NULL, 0);
+--
+2.15.1
+
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2017-12-27 10:24:50 UTC (rev 276204)
+++ PKGBUILD 2017-12-27 10:32:44 UTC (rev 276205)
@@ -6,15 +6,22 @@
pkgname=bti
pkgver=034
-pkgrel=1
+pkgrel=2
pkgdesc='Console client for Twitter and identi.ca'
arch=('x86_64')
url='http://gregkh.github.com/bti/'
license=('GPL')
depends=('pcre' 'libxml2' 'curl' 'liboauth' 'json-c')
-source=(http://www.kernel.org/pub/software/web/$pkgname/$pkgname-$pkgver.tar.xz)
-sha256sums=('8b4a1a11f529f83956468acadaea9d11db4f03e82afe07fecb84b2d00e9eae83')
+source=(http://www.kernel.org/pub/software/web/$pkgname/$pkgname-$pkgver.tar.xz
+ 0001-Replace-removed-is_error-macro.patch)
+sha256sums=('8b4a1a11f529f83956468acadaea9d11db4f03e82afe07fecb84b2d00e9eae83'
+ 'df18ac4ad58b3ed17ce3ad7150a60375305f25641a791b6c4c4b69c631093a0e')
+prepare() {
+ cd "${srcdir}"/$pkgname-$pkgver
+ patch -Np1 -i $srcdir/0001-Replace-removed-is_error-macro.patch
+}
+
build() {
cd "${srcdir}"/$pkgname-$pkgver
./configure --prefix=/usr
More information about the arch-commits
mailing list