git: c9befd7a40c5 - main - security/rhonabwy: New port: JOSE library

From: Dan Langille <dvl_at_FreeBSD.org>
Date: Fri, 08 Jul 2022 22:00:58 UTC
The branch main has been updated by dvl:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c9befd7a40c568474b1ff4d6b5b2a3da89a81435

commit c9befd7a40c568474b1ff4d6b5b2a3da89a81435
Author:     Dan Langille <dvl@FreeBSD.org>
AuthorDate: 2022-07-08 21:44:00 +0000
Commit:     Dan Langille <dvl@FreeBSD.org>
CommitDate: 2022-07-08 21:57:00 +0000

    security/rhonabwy: New port: JOSE library
    
    Javascript Object Signing and Encryption (JOSE) library
    - JWK, JWKS, JWS, JWE and JWT
---
 security/Makefile                                  |  1 +
 security/rhonabwy/Makefile                         | 31 ++++++++++++++++++++++
 security/rhonabwy/distinfo                         |  3 +++
 security/rhonabwy/files/patch-CMakeLists.txt       | 11 ++++++++
 .../files/patch-cmake-modules_FindNettle.cmake     | 20 ++++++++++++++
 security/rhonabwy/pkg-descr                        | 20 ++++++++++++++
 security/rhonabwy/pkg-plist                        |  8 ++++++
 7 files changed, 94 insertions(+)

diff --git a/security/Makefile b/security/Makefile
index e14d8c87039d..3250fdf9b357 100644
--- a/security/Makefile
+++ b/security/Makefile
@@ -1009,6 +1009,7 @@
     SUBDIR += rcracki_mt
     SUBDIR += reop
     SUBDIR += rhash
+    SUBDIR += rhonabwy
     SUBDIR += ridl
     SUBDIR += rifiuti2
     SUBDIR += rkhunter
diff --git a/security/rhonabwy/Makefile b/security/rhonabwy/Makefile
new file mode 100644
index 000000000000..1139e6af296c
--- /dev/null
+++ b/security/rhonabwy/Makefile
@@ -0,0 +1,31 @@
+PORTNAME=	rhonabwy
+DISTVERSIONPREFIX=	v
+DISTVERSION=	1.1.6
+CATEGORIES=	security
+
+MAINTAINER=	dvl@FreeBSD.org
+COMMENT=	Javascript Object Signing and Encryption (JOSE) library
+
+LICENSE=	LGPL21
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	yder>1.4.14:devel/yder \
+		orcania>2.2.1:devel/orcania \
+		gnutls>0:security/gnutls
+
+LIB_DEPENDS=	libcurl.so:ftp/curl \
+		libgmp.so:math/gmp \
+		libnettle.so:security/nettle \
+		libjansson.so:devel/jansson \
+		libgnutls.so:security/gnutls \
+		liborcania.so:devel/orcania \
+		libyder.so:devel/yder
+
+USES=		cmake
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	babelouest
+
+CMAKE_ARGS=	-DWITH_JOURNALD=off
+
+.include <bsd.port.mk>
diff --git a/security/rhonabwy/distinfo b/security/rhonabwy/distinfo
new file mode 100644
index 000000000000..e17bc19ee36f
--- /dev/null
+++ b/security/rhonabwy/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1657299018
+SHA256 (babelouest-rhonabwy-v1.1.6_GH0.tar.gz) = 45620a9532104687d7c778b0c8b2390b8c0e5c82c8d8d491937d43063a1dec77
+SIZE (babelouest-rhonabwy-v1.1.6_GH0.tar.gz) = 379922
diff --git a/security/rhonabwy/files/patch-CMakeLists.txt b/security/rhonabwy/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..81ac445f6200
--- /dev/null
+++ b/security/rhonabwy/files/patch-CMakeLists.txt
@@ -0,0 +1,11 @@
+--- CMakeLists.txt.orig	2022-07-08 18:38:40 UTC
++++ CMakeLists.txt
+@@ -171,7 +171,7 @@ set_target_properties(rhonabwy PROPERTIES
+         PUBLIC_HEADER "${INC_DIR}/rhonabwy.h;${PROJECT_BINARY_DIR}/rhonabwy-cfg.h"
+         VERSION "${LIBRARY_VERSION}"
+         SOVERSION "${LIBRARY_SOVERSION}")
+-target_link_libraries(rhonabwy ${LIBS})
++target_link_libraries(rhonabwy ${LIBS} -L${CMAKE_INSTALL_PREFIX}/lib -lgmp)
+ 
+ set(SEARCH_ORCANIA OFF CACHE BOOL "Force to false") # Avoid to search and download orcania during yder search and download
+ set(SEARCH_ORCANIA_U OFF CACHE BOOL "Force to false") # Avoid to search and download orcania during ulfius search and download
diff --git a/security/rhonabwy/files/patch-cmake-modules_FindNettle.cmake b/security/rhonabwy/files/patch-cmake-modules_FindNettle.cmake
new file mode 100644
index 000000000000..33c156878dea
--- /dev/null
+++ b/security/rhonabwy/files/patch-cmake-modules_FindNettle.cmake
@@ -0,0 +1,20 @@
+--- cmake-modules/FindNettle.cmake.orig	2022-07-08 18:30:56 UTC
++++ cmake-modules/FindNettle.cmake
+@@ -40,12 +40,16 @@ find_library(NETTLE_LIBRARY
+         NAMES nettle libnettle
+         HINTS ${PC_NETTLE_LIBDIR} ${PC_NETTLE_LIBRARY_DIRS})
+ 
++find_library(HOGWEED_LIBRARY
++        NAMES hogweed libhogweed
++        HINTS ${PC_NETTLE_LIBDIR} ${PC_NETTLE_LIBRARY_DIRS})
++
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(Nettle
+         REQUIRED_VARS NETTLE_LIBRARY NETTLE_INCLUDE_DIR)
+ 
+ if (NETTLE_FOUND)
+-    set(NETTLE_LIBRARIES ${NETTLE_LIBRARY})
++    set(NETTLE_LIBRARIES ${NETTLE_LIBRARY} ${HOGWEED_LIBRARY})
+     set(NETTLE_INCLUDE_DIRS ${NETTLE_INCLUDE_DIR})
+ endif ()
+ 
diff --git a/security/rhonabwy/pkg-descr b/security/rhonabwy/pkg-descr
new file mode 100644
index 000000000000..babf5073afe9
--- /dev/null
+++ b/security/rhonabwy/pkg-descr
@@ -0,0 +1,20 @@
+Single-Sign-On (SSO) server with multiple factor authentication.
+
+Authentication processes supported:
+
+* OAuth2
+* OpenID Connect
+* Allows users to authenticate via multiple factors:
+
+Password
+* One-time password (TOTP/HOTP)
+* Webauthn (Yubikey, Android devices)
+* One-time password sent via e-mail
+* TLS Certificate
+* Users and clients can be stored and managed from various backends:
+
+Database
+* LDAP service
+* HTTP Backend service providing Basic Authentication
+
+WWW: https://github.com/babelouest/glewlwyd
diff --git a/security/rhonabwy/pkg-plist b/security/rhonabwy/pkg-plist
new file mode 100644
index 000000000000..b68d879e9149
--- /dev/null
+++ b/security/rhonabwy/pkg-plist
@@ -0,0 +1,8 @@
+bin/rnbyc
+include/rhonabwy-cfg.h
+include/rhonabwy.h
+lib/librhonabwy.so
+lib/librhonabwy.so.1.1
+lib/librhonabwy.so.1.1.6
+libdata/pkgconfig/librhonabwy.pc
+share/man/man1/rnbyc.1.gz