summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-05-22 03:22:18 +0100
committerSam James <sam@gentoo.org>2022-05-22 03:30:11 +0100
commit389cb12ff05492875fcadfdbfb393735d9034131 (patch)
treef8baf64a1c882395e82f5d2961f4873eec8f4408 /dev-libs/libfido2
parentsys-auth/ssh-ldap-pubkey: add 1.4.0 (diff)
downloadgentoo-389cb12ff05492875fcadfdbfb393735d9034131.tar.gz
gentoo-389cb12ff05492875fcadfdbfb393735d9034131.tar.bz2
gentoo-389cb12ff05492875fcadfdbfb393735d9034131.zip
dev-libs/libfido2: add 1.11.0
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs/libfido2')
-rw-r--r--dev-libs/libfido2/Manifest1
-rw-r--r--dev-libs/libfido2/files/libfido2-1.11.0-regress-tests.patch81
-rw-r--r--dev-libs/libfido2/libfido2-1.11.0.ebuild52
3 files changed, 134 insertions, 0 deletions
diff --git a/dev-libs/libfido2/Manifest b/dev-libs/libfido2/Manifest
index 096e128e593e..e991ca5f15e5 100644
--- a/dev-libs/libfido2/Manifest
+++ b/dev-libs/libfido2/Manifest
@@ -1,3 +1,4 @@
DIST libfido2-1.10.0.tar.gz 591372 BLAKE2B a4144ede774b90700f4cb1371b2acdba9d3ca8e6e0d68c5670986a1825635ebeb75f03c930da14a4539a9e075bcc5f7cfde7fbcc05e1fa383902ac6739225789 SHA512 ba03e25d3f42f11cec74dee48c853ae35d03600f24ca06d2b751840408a132290fe22461372ae42ae31419061a63d9908c20a2c0cf3c0c9c8dbc46c34916784f
+DIST libfido2-1.11.0.tar.gz 624148 BLAKE2B ac123145f22260922e1d83653ba5781c5f41b410760f2c26b7cab7cb0871079aed66a8d9747393843738e4c2ed7ba8ba0292075516ef0354fd4328df967b7a6d SHA512 d9644453d67b84ec8385dfb63796adb3eae2d7f7cb47fbb1bcf9ca7f5cce400623738cc3317d629c2f0af630424cb2788217f8c7f20d1b52b7369c729052d572
DIST libfido2-1.8.0.tar.gz 535947 BLAKE2B 48ca29fc1b582b4c915ce3dac2b3c24b1c71b144681f77f13059a599eb5e38b263442abecacad495e28a6fea63fc98c142a32939bb49a521b6a6a8d4ad0f1ff0 SHA512 dbea52a80068323e9945ef7a6e93ab1438bc4347390fc91694a94669900d4ce4abe95e1b6df90fe8b6b2dde6b5d28d9dc0c6b022c24ccb661f28c30c33417999
DIST libfido2-1.9.0.tar.gz 576088 BLAKE2B 19d2933178011aebf11b44e12550518937b204a40b781ade565bd2852de6d1bbb88dda90f612e852e4561b7a9db6927df9d0a9f0b4c511208f3ab648b2cf1a9f SHA512 99edf9c52a871ed5dc3ab41ac07ca8a22670e7527c48ed69c096f001651e1e714bc3f1f55e22003cb66670fa4e851095834c2acd0e5b31887fad46bfb9f4b089
diff --git a/dev-libs/libfido2/files/libfido2-1.11.0-regress-tests.patch b/dev-libs/libfido2/files/libfido2-1.11.0-regress-tests.patch
new file mode 100644
index 000000000000..391aae014661
--- /dev/null
+++ b/dev-libs/libfido2/files/libfido2-1.11.0-regress-tests.patch
@@ -0,0 +1,81 @@
+https://github.com/Yubico/libfido2/pull/579
+
+From c359e5dba24ae7b44cc0d61fb7c00e652465853b Mon Sep 17 00:00:00 2001
+From: Silke Hofstra <silke@slxh.eu>
+Date: Fri, 6 May 2022 15:36:02 +0200
+Subject: [PATCH 1/3] regress: link against chosen library
+
+Compile `regress` against `${_FIDO2_LIBRARY}` so it links against
+the shared library when building with `BUILD_STATIC_LIBS=OFF`.
+--- a/regress/CMakeLists.txt
++++ b/regress/CMakeLists.txt
+@@ -6,7 +6,7 @@ add_custom_target(regress)
+
+ macro(add_regress_test NAME SOURCES)
+ add_executable(${NAME} ${SOURCES})
+- target_link_libraries(${NAME} fido2)
++ target_link_libraries(${NAME} ${_FIDO2_LIBRARY})
+ add_test(${NAME} ${NAME})
+ add_dependencies(regress ${NAME})
+ endmacro()
+@@ -17,6 +17,7 @@ if(MSVC AND BUILD_SHARED_LIBS)
+ "${CBOR_BIN_DIRS}/${CBOR_LIBRARIES}.dll"
+ "${CRYPTO_BIN_DIRS}/${CRYPTO_LIBRARIES}.dll"
+ "${ZLIB_BIN_DIRS}/${ZLIB_LIBRARIES}.dll"
++ "$<TARGET_FILE:${_FIDO2_LIBRARY}>"
+ "${CMAKE_CURRENT_BINARY_DIR}")
+ endif()
+
+
+From a5413255cb0dd4579faf0dda0ce1b3e45db398e9 Mon Sep 17 00:00:00 2001
+From: Silke Hofstra <silke@slxh.eu>
+Date: Mon, 9 May 2022 10:56:29 +0200
+Subject: [PATCH 3/3] regress: run compression test against static lib only
+
+--- a/regress/CMakeLists.txt
++++ b/regress/CMakeLists.txt
+@@ -4,13 +4,22 @@
+
+ add_custom_target(regress)
+
+-macro(add_regress_test NAME SOURCES)
++macro(add_regress_test_common NAME SOURCES)
+ add_executable(${NAME} ${SOURCES})
+- target_link_libraries(${NAME} ${_FIDO2_LIBRARY})
+ add_test(${NAME} ${NAME})
+ add_dependencies(regress ${NAME})
+ endmacro()
+
++macro(add_regress_test NAME SOURCES)
++ add_regress_test_common(${NAME} ${SOURCES})
++ target_link_libraries(${NAME} ${_FIDO2_LIBRARY})
++endmacro()
++
++macro(add_regress_static_test NAME SOURCES)
++ add_regress_test_common(${NAME} ${SOURCES})
++ target_link_libraries(${NAME} fido2)
++endmacro()
++
+ if(MSVC AND BUILD_SHARED_LIBS)
+ add_custom_command(TARGET regress POST_BUILD
+ COMMAND "${CMAKE_COMMAND}" -E copy
+@@ -33,13 +42,17 @@ else()
+ endif()
+
+ add_regress_test(regress_assert assert.c)
+-add_regress_test(regress_compress compress.c)
+ add_regress_test(regress_cred cred.c)
+ add_regress_test(regress_dev dev.c)
+ add_regress_test(regress_eddsa eddsa.c)
+ add_regress_test(regress_es256 es256.c)
+ add_regress_test(regress_rs256 rs256.c)
+
++# Run these tests only against the static library
++if(BUILD_STATIC_LIBS)
++ add_regress_static_test(regress_compress compress.c)
++endif()
++
+ if(MINGW)
+ # needed for nanosleep() in mingw
+ target_link_libraries(regress_dev winpthread)
+
diff --git a/dev-libs/libfido2/libfido2-1.11.0.ebuild b/dev-libs/libfido2/libfido2-1.11.0.ebuild
new file mode 100644
index 000000000000..2f930f13714a
--- /dev/null
+++ b/dev-libs/libfido2/libfido2-1.11.0.ebuild
@@ -0,0 +1,52 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake udev linux-info
+
+DESCRIPTION="Provides library functionality for FIDO 2.0"
+HOMEPAGE="https://github.com/Yubico/libfido2"
+SRC_URI="https://github.com/Yubico/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0/1"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="nfc static-libs"
+
+DEPEND="dev-libs/libcbor:=
+ dev-libs/openssl:=
+ sys-libs/zlib:=
+ virtual/libudev:="
+RDEPEND="${DEPEND}
+ acct-group/plugdev"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.7.0-cmakelists.patch
+ "${FILESDIR}"/${PN}-1.11.0-regress-tests.patch
+)
+
+pkg_pretend() {
+ CONFIG_CHECK="
+ ~USB_HID
+ ~HIDRAW
+ "
+
+ check_extra_config
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_EXAMPLES=OFF
+ -DBUILD_STATIC_LIBS=$(usex static-libs ON OFF)
+ -DNFC_LINUX=$(usex nfc ON OFF)
+ )
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ udev_newrules udev/70-u2f.rules 70-libfido2-u2f.rules
+}