summaryrefslogtreecommitdiff
path: root/app-crypt/libu2f-host
diff options
context:
space:
mode:
Diffstat (limited to 'app-crypt/libu2f-host')
-rw-r--r--app-crypt/libu2f-host/Manifest3
-rw-r--r--app-crypt/libu2f-host/files/libu2f-host-1.1.10-json-boolean.patch34
-rw-r--r--app-crypt/libu2f-host/libu2f-host-1.1.10.ebuild4
3 files changed, 39 insertions, 2 deletions
diff --git a/app-crypt/libu2f-host/Manifest b/app-crypt/libu2f-host/Manifest
index cfabcf0eab1a..a0c39aceb143 100644
--- a/app-crypt/libu2f-host/Manifest
+++ b/app-crypt/libu2f-host/Manifest
@@ -1,3 +1,4 @@
+AUX libu2f-host-1.1.10-json-boolean.patch 1101 BLAKE2B c603290ae3f34ac9c6eccbee080ac83d7fcea2dfad69f1088de39cc35165fe7333acafee0aac53c9d973fd0b266bb822a1a68f48e64a492dbb5440976c2ecaf3 SHA512 e8b516d797bbb136fe51c367248be6d1035de409156a35ce55c9e871b236178c610e36f5859121e7fddae28e17c44db9bfa21ce4584acb3c45c6f68fbaba46e2
DIST libu2f-host-1.1.10.tar.xz 471676 BLAKE2B 5066eaaaeda3b8c015afa8946f0af3b1b90a34488d4c71811c0d8f57a3ed2e4c8cb3d82d2df147dcf13ac3c384522d22f25894ac3a2d994a75b288891a67640a SHA512 91c5bf3994f1d3c9bd144f54b14b0404d839c15bef3c318619decdf1bd37214bcff33927af78a9826ff7d0bc9907c912a0e31104ae68d3a727a8436f2a1dbf7a
-EBUILD libu2f-host-1.1.10.ebuild 965 BLAKE2B c9a6946736301a3cffc70d778d4a5e00ec04bca1cc06cbf1b0e18bc7d2c4af781384a48e77f21d4633cfb417716d437c19ee03d8ec2091af089f0574eb8fb3e2 SHA512 47999e6554bcab1d7115631918f321f6aa843284746b8e6167eff195be8547775d955be1730f144cd5620d7c80c50f734ea477fc625855313676236e044b064d
+EBUILD libu2f-host-1.1.10.ebuild 1016 BLAKE2B bbcaa944397cacbb294b213199de2242b1b0288cfa1dd1b3d2527893fc6d7101f8250a11173d5d7abad061d070ef9e5886bf623bf269baeff5008ad6084bd520 SHA512 1cff390fd989f9d960108b79a66eb9b196ef355122f759ab6d4ae9ce4a8a424afb66a7bc4702d6dbbdf7a31508cdcccbe2e05cd504f203be6bb1f07b15756319
MISC metadata.xml 561 BLAKE2B 5c5f06eedf51575a587ed9c191dcc6f0e84793ef095ae14741ac9fff4fcebe759cd12fe71456d120004f40037e3827a500852ff0eb1383dc860251df59c9cb8f SHA512 a3da7b20b8c880100dfb6518f58fe372ef64b095b4ae22072d1546a43713be5b5ab84f469abf1cad8d507ab85c37be33178983ab58e2973f2ad607e3c021c1e2
diff --git a/app-crypt/libu2f-host/files/libu2f-host-1.1.10-json-boolean.patch b/app-crypt/libu2f-host/files/libu2f-host-1.1.10-json-boolean.patch
new file mode 100644
index 000000000000..cee17d5b0b04
--- /dev/null
+++ b/app-crypt/libu2f-host/files/libu2f-host-1.1.10-json-boolean.patch
@@ -0,0 +1,34 @@
+From 840f01135d2892f45e71b9e90405de587991bd03 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
+Date: Mon, 13 Apr 2020 14:12:25 +0200
+Subject: [PATCH] Add support for upcoming json-c 0.14.0.
+
+TRUE/FALSE are not defined anymore. 1 and 0 are used instead.
+---
+ u2f-host/u2fmisc.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/u2f-host/u2fmisc.c b/u2f-host/u2fmisc.c
+index e40ca3d..5a032ce 100644
+--- a/u2f-host/u2fmisc.c
++++ b/u2f-host/u2fmisc.c
+@@ -33,6 +33,19 @@ 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
+ #endif
+
++/* json-c 0.13.99 does not define TRUE/FALSE anymore
++ * the json-c maintainers replaced them with pure 1/0
++ * https://github.com/json-c/json-c/commit/0992aac61f8b
++ */
++#if defined JSON_C_VERSION_NUM && JSON_C_VERSION_NUM >= ((13 << 8) | 99)
++#ifndef FALSE
++#define FALSE 0
++#endif
++#ifndef TRUE
++#define TRUE 1
++#endif
++#endif
++
+ static void
+ dumpHex (unsigned char *data, int offs, int len)
+ {
diff --git a/app-crypt/libu2f-host/libu2f-host-1.1.10.ebuild b/app-crypt/libu2f-host/libu2f-host-1.1.10.ebuild
index 0c27d050b295..3355f7bcc195 100644
--- a/app-crypt/libu2f-host/libu2f-host-1.1.10.ebuild
+++ b/app-crypt/libu2f-host/libu2f-host-1.1.10.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -25,6 +25,8 @@ BDEPEND="virtual/pkgconfig"
CONFIG_CHECK="~HIDRAW"
+PATCHES=( "${FILESDIR}/${P}-json-boolean.patch" )
+
src_install() {
default
if use kernel_linux; then