[arch-commits] Commit in libu2f-server/repos (3 files)
Evangelos Foutras
foutrelis at archlinux.org
Sat Apr 25 15:02:21 UTC 2020
Date: Saturday, April 25, 2020 @ 15:02:20
Author: foutrelis
Revision: 620838
archrelease: copy trunk to community-staging-x86_64
Added:
libu2f-server/repos/community-staging-x86_64/
libu2f-server/repos/community-staging-x86_64/PKGBUILD
(from rev 620837, libu2f-server/trunk/PKGBUILD)
libu2f-server/repos/community-staging-x86_64/json-c-0.14.patch
(from rev 620837, libu2f-server/trunk/json-c-0.14.patch)
-------------------+
PKGBUILD | 46 ++++++++++++++++++++++++++++++++++++++++++++++
json-c-0.14.patch | 34 ++++++++++++++++++++++++++++++++++
2 files changed, 80 insertions(+)
Copied: libu2f-server/repos/community-staging-x86_64/PKGBUILD (from rev 620837, libu2f-server/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2020-04-25 15:02:20 UTC (rev 620838)
@@ -0,0 +1,46 @@
+# Maintainer: Maxim Baz <$pkgname at maximbaz dot com>
+# Contributor: Maxime de Roucy <maxime.deroucy at gmail.com>
+
+pkgname=libu2f-server
+pkgver=1.1.0
+pkgrel=4
+pkgdesc='Yubico Universal 2nd Factor (U2F) Server C Library'
+arch=('x86_64')
+url='https://developers.yubico.com/libu2f-server'
+license=('BSD')
+depends=('openssl' 'json-c')
+makedepends=('check' 'gengetopt' 'help2man')
+source=("${url}/Releases/${pkgname}-${pkgver}.tar.xz"{,.sig}
+ json-c-0.14.patch)
+sha256sums=('8dcd3caeacebef6e36a42462039fd035e45fa85653dcb2013f45e15aad49a277'
+ 'SKIP'
+ 'cdeaf6387e8f4b49a32e272e9aa8c7f86305b6911e8d09084125f608af72492b')
+validpgpkeys=('B70D62AA6A31AD6B9E4F9F4BDC8888925D25CA7A') # Alessio Di Mauro <alessio at yubico.com>
+
+prepare() {
+ cd "${pkgname}-${pkgver}"
+ patch -Np1 -i ../json-c-0.14.patch
+}
+
+build() {
+ cd "${pkgname}-${pkgver}"
+
+ ./configure --prefix=/usr
+ make
+}
+
+check() {
+ cd "${pkgname}-${pkgver}"
+
+ make check
+}
+
+package() {
+ cd "${pkgname}-${pkgver}"
+
+ make DESTDIR="${pkgdir}" install
+
+ install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" COPYING
+}
+
+# vim:set ts=4 sw=4 et:
Copied: libu2f-server/repos/community-staging-x86_64/json-c-0.14.patch (from rev 620837, libu2f-server/trunk/json-c-0.14.patch)
===================================================================
--- community-staging-x86_64/json-c-0.14.patch (rev 0)
+++ community-staging-x86_64/json-c-0.14.patch 2020-04-25 15:02:20 UTC (rev 620838)
@@ -0,0 +1,34 @@
+From f7c4983b31909299c47bf9b2627c84b6bfe225de Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82 at fedoraproject.org>
+Date: Mon, 13 Apr 2020 14:16:20 +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-server/core.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/u2f-server/core.c b/u2f-server/core.c
+index 2fb325e..895c004 100644
+--- a/u2f-server/core.c
++++ b/u2f-server/core.c
+@@ -44,6 +44,19 @@ typedef int json_bool;
+ #define u2fs_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 u2fs_rc encode_b64u(const char *data, size_t data_len, char *output)
+ {
+ base64_encodestate b64;
More information about the arch-commits
mailing list