aboutsummaryrefslogtreecommitdiffstats
path: root/community/libu2f-host
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2020-04-22 23:32:49 -0300
committerLeo <thinkabit.ukim@gmail.com>2020-04-23 11:12:12 -0300
commitc8b901951b27f8d62c1523752b1c359f1400071b (patch)
tree4c6d614e25e4e4317ca50ebc8fd4bd876a772efd /community/libu2f-host
parentb58d5d56b2d68027588cd200bdaf294d8cab6765 (diff)
downloadaports-c8b901951b27f8d62c1523752b1c359f1400071b.tar.bz2
aports-c8b901951b27f8d62c1523752b1c359f1400071b.tar.xz
community/libu2f-host: rebuild against json-c-0.14
Diffstat (limited to 'community/libu2f-host')
-rw-r--r--community/libu2f-host/APKBUILD9
-rw-r--r--community/libu2f-host/json-c-0.14.patch32
2 files changed, 38 insertions, 3 deletions
diff --git a/community/libu2f-host/APKBUILD b/community/libu2f-host/APKBUILD
index 8c8d3675d4..168a5361bd 100644
--- a/community/libu2f-host/APKBUILD
+++ b/community/libu2f-host/APKBUILD
@@ -2,14 +2,16 @@
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=libu2f-host
pkgver=1.1.10
-pkgrel=1
+pkgrel=2
pkgdesc="Yubico Universal 2nd Factor (U2F) Host C Library"
url="https://developers.yubico.com/libu2f-host/"
arch="all"
license="LGPL-2.1-or-later"
makedepends="hidapi-dev json-c-dev linux-headers eudev-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
-source="https://developers.yubico.com/libu2f-host/Releases/libu2f-host-$pkgver.tar.xz"
+source="https://developers.yubico.com/libu2f-host/Releases/libu2f-host-$pkgver.tar.xz
+ json-c-0.14.patch
+ "
build() {
./configure \
@@ -32,4 +34,5 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="91c5bf3994f1d3c9bd144f54b14b0404d839c15bef3c318619decdf1bd37214bcff33927af78a9826ff7d0bc9907c912a0e31104ae68d3a727a8436f2a1dbf7a libu2f-host-1.1.10.tar.xz"
+sha512sums="91c5bf3994f1d3c9bd144f54b14b0404d839c15bef3c318619decdf1bd37214bcff33927af78a9826ff7d0bc9907c912a0e31104ae68d3a727a8436f2a1dbf7a libu2f-host-1.1.10.tar.xz
+5221305e8474303a9b7db88b1a906d3d596251da412fc1b19cd6e9d8ec0ecbb8d93f91d3437c73c6b4226c4b7f0e80d4e37456d742e54ac5324bb0d36619ea67 json-c-0.14.patch"
diff --git a/community/libu2f-host/json-c-0.14.patch b/community/libu2f-host/json-c-0.14.patch
new file mode 100644
index 0000000000..e701d2c911
--- /dev/null
+++ b/community/libu2f-host/json-c-0.14.patch
@@ -0,0 +1,32 @@
+diff --git a/u2f-host/u2fmisc.c b/u2f-host/u2fmisc.c
+index e40ca3d..3c948af 100644
+--- a/u2f-host/u2fmisc.c
++++ b/u2f-host/u2fmisc.c
+@@ -30,7 +30,7 @@
+ #define u2fh_json_object_object_get(obj, key, value) json_object_object_get_ex(obj, key, &value)
+ #else
+ typedef int json_bool;
+-#define u2fh_json_object_object_get(obj, key, value) (value = json_object_object_get(obj, key)) == NULL ? (json_bool)FALSE : (json_bool)TRUE
++#define u2fh_json_object_object_get(obj, key, value) (value = json_object_object_get(obj, key)) == NULL ? (json_bool)0 : (json_bool)1
+ #endif
+
+ static void
+@@ -114,7 +114,7 @@ prepare_origin (const char *jsonstr, unsigned char *p)
+ if (debug)
+ fprintf (stderr, "JSON: %s\n", json_object_to_json_string (jo));
+
+- if (u2fh_json_object_object_get (jo, "appId", k) == FALSE)
++ if (u2fh_json_object_object_get (jo, "appId", k) == 0)
+ return U2FH_JSON_ERROR;
+
+ app_id = json_object_get_string (k);
+@@ -390,7 +390,7 @@ get_fixed_json_data (const char *jsonstr, const char *key, char *p,
+ if (debug)
+ fprintf (stderr, "JSON: %s\n", json_object_to_json_string (jo));
+
+- if (u2fh_json_object_object_get (jo, key, k) == FALSE)
++ if (u2fh_json_object_object_get (jo, key, k) == 0)
+ return U2FH_JSON_ERROR;
+
+ urlb64 = json_object_get_string (k);
+