Date: Monday, November 2, 2020 @ 14:45:33 Author: eworm Revision: 739796
archrelease: copy trunk to community-testing-x86_64 Added: libu2f-host/repos/community-testing-x86_64/ libu2f-host/repos/community-testing-x86_64/PKGBUILD (from rev 739795, libu2f-host/trunk/PKGBUILD) libu2f-host/repos/community-testing-x86_64/json-c-0.14.patch (from rev 739795, libu2f-host/trunk/json-c-0.14.patch) -------------------+ PKGBUILD | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ json-c-0.14.patch | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) Copied: libu2f-host/repos/community-testing-x86_64/PKGBUILD (from rev 739795, libu2f-host/trunk/PKGBUILD) =================================================================== --- community-testing-x86_64/PKGBUILD (rev 0) +++ community-testing-x86_64/PKGBUILD 2020-11-02 14:45:33 UTC (rev 739796) @@ -0,0 +1,51 @@ +# Maintainer: Christian Hesse <m...@eworm.de> + +pkgname=libu2f-host +pkgver=1.1.10 +pkgrel=4 +pkgdesc="Yubico Universal 2nd Factor (U2F) Host C Library" +arch=('x86_64') +url='https://github.com/Yubico/libu2f-host' +license=('BSD') +depends=('json-c' 'hidapi' 'libudev.so') +makedepends=('git' 'help2man' 'gengetopt') +validpgpkeys=('0A3B0262BCA1705307D5FF06BCA00FD4B2168C0A') # Klas Lindfors <k...@yubico.com> +source=("https://developers.yubico.com/${pkgname}/Releases/${pkgname}-${pkgver}.tar.xz"{,.sig} + 'json-c-0.14.patch') +sha256sums=('4265789ec59555a1f383ea2d75da085f78ee4cf1cd7c44a2b38662de02dd316f' + 'SKIP' + '47a662c1a2bc33232bda68059025fc17e33db06107495a7e9067777c39663387') + +prepare() { + cd "${pkgname}-${pkgver}" + + patch -Np1 -i ../json-c-0.14.patch + + sed -i 's/, GROUP="plugdev", MODE="0660"//' 70-u2f.rules +} + +build() { + cd "${pkgname}-${pkgver}" + + ./configure \ + --prefix=/usr \ + --disable-gtk-doc \ + --with-udevrulesdir=/usr/lib/udev/rules.d/ + make +} + + +check() { + cd "${pkgname}-${pkgver}" + + make check +} + +package() { + cd "${pkgname}-${pkgver}" + + make DESTDIR="${pkgdir}/" install + + install -D -m0644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" +} + Copied: libu2f-host/repos/community-testing-x86_64/json-c-0.14.patch (from rev 739795, libu2f-host/trunk/json-c-0.14.patch) =================================================================== --- community-testing-x86_64/json-c-0.14.patch (rev 0) +++ community-testing-x86_64/json-c-0.14.patch 2020-11-02 14:45:33 UTC (rev 739796) @@ -0,0 +1,34 @@ +From 840f01135d2892f45e71b9e90405de587991bd03 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besse...@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) + {