diff --git a/DEVELOPERS b/DEVELOPERS index 78ea65205d..16f63bdc0e 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -465,6 +465,7 @@ F: package/mjpg-streamer/ F: package/mpg123/ F: package/ntp/ F: package/nut/ +F: package/openconnect/ F: package/openvpn/ F: package/opus/ F: package/pciutils/ diff --git a/package/Config.in b/package/Config.in index 90f1ecc877..3e51ddd707 100644 --- a/package/Config.in +++ b/package/Config.in @@ -2555,6 +2555,7 @@ endif source "package/open-iscsi/Config.in" source "package/open-lldp/Config.in" source "package/open-plc-utils/Config.in" + source "package/openconnect/Config.in" source "package/openntpd/Config.in" source "package/openobex/Config.in" source "package/openresolv/Config.in" diff --git a/package/openconnect/0001-Fix-implicit-declaration-of-function-malloc.patch b/package/openconnect/0001-Fix-implicit-declaration-of-function-malloc.patch new file mode 100644 index 0000000000..4732c4fb5e --- /dev/null +++ b/package/openconnect/0001-Fix-implicit-declaration-of-function-malloc.patch @@ -0,0 +1,40 @@ +From 5185f640045df2b4f8ee7f028fc59e6f02fdf367 Mon Sep 17 00:00:00 2001 +From: Brahmajit Das +Date: Mon, 29 Jan 2024 23:28:53 +0530 +Subject: [PATCH] Fix implicit declaration of function 'malloc' + +First observed on Gentoo Linux with GCC 14. This is due to GCC 14 +enabling -Werror=implicit-function-declaration by default. +Thus resulting in errors such as: + +openconnect-internal.h: In function 'alloc_pkt': +openconnect-internal.h:911:27: error: implicit declaration of function 'malloc' [-Werror=implicit-function-declaration] + 911 | struct pkt *pkt = malloc(alloc_len); + | ^~~~~~ + +Plese refer gentoo bug: https://bugs.gentoo.org/923173 +Signed-off-by: Brahmajit Das + +Upstream: https://gitlab.com/openconnect/openconnect/-/commit/5185f640045df2b4f8ee7f028fc59e6f02fdf367 + +Signed-off-by: Bernd Kuhls +[rebased for 9.12] +--- + openconnect-internal.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/openconnect-internal.h b/openconnect-internal.h +index 21460adf6..2830d693f 100644 +--- a/openconnect-internal.h ++++ b/openconnect-internal.h +@@ -87,6 +87,7 @@ + + #include + #include ++#include + + #ifdef _WIN32 + #ifndef _Out_cap_c_ +-- +GitLab + diff --git a/package/openconnect/Config.in b/package/openconnect/Config.in new file mode 100644 index 0000000000..cacf617fb9 --- /dev/null +++ b/package/openconnect/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_OPENCONNECT + bool "openconnect" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_GNUTLS + # configure: error: LibreSSL does not support Cisco DTLS. + select BR2_PACKAGE_OPENSSL_FORCE_LIBOPENSSL if !BR2_PACKAGE_GNUTLS + select BR2_PACKAGE_LIBOPENSSL_ENABLE_RC4 if !BR2_PACKAGE_GNUTLS + select BR2_PACKAGE_LIBOPENSSL_ENABLE_DES if !BR2_PACKAGE_GNUTLS + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_ZLIB + help + OpenConnect is an SSL VPN client initially created to support + Cisco's AnyConnect SSL VPN. + It has since been ported to support the Juniper SSL VPN (which + is now known as Pulse Connect Secure), the Palo Alto Networks + GlobalProtect SSL VPN the F5 Big-IP SSL VPN, and the Fortinet + FortiGate SSL VPN. + + https://www.infradead.org/openconnect/ diff --git a/package/openconnect/openconnect.hash b/package/openconnect/openconnect.hash new file mode 100644 index 0000000000..86bdaa5d4e --- /dev/null +++ b/package/openconnect/openconnect.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 a2bedce3aa4dfe75e36e407e48e8e8bc91d46def5335ac9564fbf91bd4b2413e openconnect-9.12.tar.gz +sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING.LGPL diff --git a/package/openconnect/openconnect.mk b/package/openconnect/openconnect.mk new file mode 100644 index 0000000000..3fd9f990b0 --- /dev/null +++ b/package/openconnect/openconnect.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# openconnect +# +################################################################################ + +OPENCONNECT_VERSION = 9.12 +OPENCONNECT_SITE = https://www.infradead.org/openconnect/download +OPENCONNECT_DEPENDENCIES = host-pkgconf libxml2 zlib +OPENCONNECT_LICENSE = LGPL-2.1 +OPENCONNECT_LICENSE_FILES = COPYING.LGPL +OPENCONNECT_CONF_OPTS = \ + --disable-dsa-tests \ + --with-vpnc-script=/etc/vpnc/vpnc-script \ + --without-java + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +OPENCONNECT_DEPENDENCIES += openssl +OPENCONNECT_CONF_OPTS += --without-gnutls --with-openssl +else ifeq ($(BR2_PACKAGE_GNUTLS),y) +OPENCONNECT_DEPENDENCIES += gnutls +OPENCONNECT_CONF_OPTS += --with-gnutls --without-openssl +endif + +ifeq ($(BR2_PACKAGE_LZ4),y) +OPENCONNECT_DEPENDENCIES += lz4 +OPENCONNECT_CONF_OPTS += --with-lz4 +else +OPENCONNECT_CONF_OPTS += --without-lz4 +endif + +$(eval $(autotools-package))