1 |
commit: 574fbc1efb046ed72d9bedf6bbdb511d76e31bc8 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 2 14:56:41 2020 +0000 |
4 |
Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 6 00:39:08 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=574fbc1e |
7 |
|
8 |
app-crypt/libu2f-server: Fixed build with dev-libs/json-c-0.14 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/720442 |
11 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
12 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
13 |
Signed-off-by: Göktürk Yüksek <gokturk <AT> gentoo.org> |
14 |
|
15 |
.../files/libu2f-server-1.1.0-jsonc014.patch | 34 ++++++++++++++++++++++ |
16 |
app-crypt/libu2f-server/libu2f-server-1.1.0.ebuild | 3 +- |
17 |
2 files changed, 36 insertions(+), 1 deletion(-) |
18 |
|
19 |
diff --git a/app-crypt/libu2f-server/files/libu2f-server-1.1.0-jsonc014.patch b/app-crypt/libu2f-server/files/libu2f-server-1.1.0-jsonc014.patch |
20 |
new file mode 100644 |
21 |
index 00000000000..823dd15abca |
22 |
--- /dev/null |
23 |
+++ b/app-crypt/libu2f-server/files/libu2f-server-1.1.0-jsonc014.patch |
24 |
@@ -0,0 +1,34 @@ |
25 |
+From f7c4983b31909299c47bf9b2627c84b6bfe225de Mon Sep 17 00:00:00 2001 |
26 |
+From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@×××××××××××××.org> |
27 |
+Date: Mon, 13 Apr 2020 14:16:20 +0200 |
28 |
+Subject: [PATCH] Add support for upcoming json-c 0.14.0. |
29 |
+ |
30 |
+TRUE/FALSE are not defined anymore. 1 and 0 are used instead. |
31 |
+--- |
32 |
+ u2f-server/core.c | 13 +++++++++++++ |
33 |
+ 1 file changed, 13 insertions(+) |
34 |
+ |
35 |
+diff --git a/u2f-server/core.c b/u2f-server/core.c |
36 |
+index 2fb325e..895c004 100644 |
37 |
+--- a/u2f-server/core.c |
38 |
++++ b/u2f-server/core.c |
39 |
+@@ -44,6 +44,19 @@ typedef int json_bool; |
40 |
+ #define u2fs_json_object_object_get(obj, key, value) (value = json_object_object_get(obj, key)) == NULL ? (json_bool)FALSE : (json_bool)TRUE |
41 |
+ #endif |
42 |
+ |
43 |
++/* json-c 0.13.99 does not define TRUE/FALSE anymore |
44 |
++ * the json-c maintainers replaced them with pure 1/0 |
45 |
++ * https://github.com/json-c/json-c/commit/0992aac61f8b |
46 |
++ */ |
47 |
++#if defined JSON_C_VERSION_NUM && JSON_C_VERSION_NUM >= ((13 << 8) | 99) |
48 |
++#ifndef FALSE |
49 |
++#define FALSE 0 |
50 |
++#endif |
51 |
++#ifndef TRUE |
52 |
++#define TRUE 1 |
53 |
++#endif |
54 |
++#endif |
55 |
++ |
56 |
+ static u2fs_rc encode_b64u(const char *data, size_t data_len, char *output) |
57 |
+ { |
58 |
+ base64_encodestate b64; |
59 |
|
60 |
diff --git a/app-crypt/libu2f-server/libu2f-server-1.1.0.ebuild b/app-crypt/libu2f-server/libu2f-server-1.1.0.ebuild |
61 |
index 15c7230119c..a16820c036e 100644 |
62 |
--- a/app-crypt/libu2f-server/libu2f-server-1.1.0.ebuild |
63 |
+++ b/app-crypt/libu2f-server/libu2f-server-1.1.0.ebuild |
64 |
@@ -1,4 +1,4 @@ |
65 |
-# Copyright 1999-2019 Gentoo Authors |
66 |
+# Copyright 1999-2020 Gentoo Authors |
67 |
# Distributed under the terms of the GNU General Public License v2 |
68 |
|
69 |
EAPI=6 |
70 |
@@ -28,6 +28,7 @@ DEPEND="${RDEPEND} |
71 |
|
72 |
PATCHES=( |
73 |
"${FILESDIR}/${PN}-1.1.0-disable-help2man-gengetopt-checks.patch" |
74 |
+ "${FILESDIR}/${PN}-1.1.0-jsonc014.patch" |
75 |
) |
76 |
|
77 |
src_prepare() { |