gnutls: Made several parts of gnutls configurable and updated to 3.2.14.
authorFlorian Fainelli <florian@openwrt.org>
Thu, 8 May 2014 00:57:34 +0000 (00:57 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Thu, 8 May 2014 00:57:34 +0000 (00:57 +0000)
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
[florian: fix prefix, make cryptodev depend on BROKEN]
Signed-off-by: Florian Fainelli <florian@openwrt.org>
SVN-Revision: 40721

libs/gnutls/Config.in [new file with mode: 0644]
libs/gnutls/Makefile

diff --git a/libs/gnutls/Config.in b/libs/gnutls/Config.in
new file mode 100644 (file)
index 0000000..d55743f
--- /dev/null
@@ -0,0 +1,34 @@
+# gnutls avanced configuration
+
+menu "Configuration"
+       depends on PACKAGE_libgnutls
+
+config GNUTLS_DTLS_SRTP
+       bool "enable DTLS SRTP support"
+
+config GNUTLS_ALPN
+       bool "enable ALPN support"
+
+config GNUTLS_OCSP
+       bool "enable ocsp support"
+
+config GNUTLS_CRYPTODEV
+       bool "enable /dev/crypto support"
+       depends on BROKEN
+
+config GNUTLS_HEARTBEAT
+       bool "enable DTLS heartbeat support"
+
+config GNUTLS_OPENPGP
+       bool "enable OPENPGP authentication support"
+
+config GNUTLS_SRP
+       bool "enable SRP authentication support"
+
+config GNUTLS_PSK
+       bool "enable PSK authentication support"
+
+config GNUTLS_ANON
+       bool "enable anonymous authentication support"
+
+endmenu
index 349e492..c2a010a 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gnutls
-PKG_VERSION:=3.2.13
+PKG_VERSION:=3.2.14
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=ftp://ftp.gnutls.org/gcrypt/gnutls/v3.2
-PKG_MD5SUM:=300e5f413054e2f4719c1c3b5179a611
+PKG_MD5SUM:=807bbf14a5b6c81a9249fffab5c3982b
 PKG_MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
 
 PKG_INSTALL:=1
@@ -21,6 +21,7 @@ PKG_LIBTOOL_PATHS:=. lib
 
 include $(INCLUDE_DIR)/package.mk
 
+
 define Package/gnutls/Default
   SUBMENU:=SSL
   SECTION:=libs
@@ -67,6 +68,9 @@ $(call Package/gnutls/Default/description)
  and srptool utilities.
 endef
 
+define Package/libgnutls/config
+       source "$(SOURCE)/Config.in"
+endef
 
 define Package/libgnutls
 $(call Package/gnutls/Default)
@@ -94,7 +98,6 @@ endef
 CONFIGURE_ARGS+= \
        --enable-shared \
        --enable-static \
-       --disable-openpgp-authentication \
        --disable-libdane \
        --disable-guile \
        --disable-nls \
@@ -105,8 +108,43 @@ CONFIGURE_ARGS+= \
        --disable-tests \
        --disable-rsa-export \
        --disable-crywrap \
-       --without-p11-kit \
-       --disable-hardware-acceleration
+       --without-p11-kit
+
+ifneq ($(CONFIG_GNUTLS_DTLS_SRTP),y)
+CONFIGURE_ARGS += --disable-dtls-srtp-support
+endif
+
+ifneq ($(CONFIG_GNUTLS_ALPN),y)
+CONFIGURE_ARGS += --disable-alpn-support
+endif
+
+ifneq ($(CONFIG_GNUTLS_HEARTBEAT),y)
+CONFIGURE_ARGS += --disable-heartbeat-support
+endif
+
+ifneq ($(CONFIG_GNUTLS_SRP),y)
+CONFIGURE_ARGS += --disable-srp-authentication
+endif
+
+ifneq ($(CONFIG_GNUTLS_PSK),y)
+CONFIGURE_ARGS += --disable-psk-authentication
+endif
+
+ifneq ($(CONFIG_GNUTLS_OPENPGP),y)
+CONFIGURE_ARGS += --disable-openpgp-authentication
+endif
+
+ifneq ($(CONFIG_GNUTLS_ANON),y)
+CONFIGURE_ARGS += --disable-anon-authentication
+endif
+
+ifneq ($(CONFIG_GNUTLS_OCSP),y)
+CONFIGURE_ARGS += --disable-ocsp
+endif
+
+ifeq ($(CONFIG_GNUTLS_CRYPTODEV),y)
+CONFIGURE_ARGS += --enable-cryptodev
+endif
 
 # XXX: AM_CFLAGS duplicates with CFLAGS
 MAKE_FLAGS:= \
@@ -150,10 +188,22 @@ define Package/gnutls-utils/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(CP) \
                $(PKG_INSTALL_DIR)/usr/bin/gnutls-{cli,serv} \
-               $(PKG_INSTALL_DIR)/usr/bin/psktool \
+               $(1)/usr/bin/
+ifeq ($(CONFIG_GNUTLS_OCSP),y)
+       $(CP) \
                $(PKG_INSTALL_DIR)/usr/bin/ocsptool \
+               $(1)/usr/bin/
+endif
+ifeq ($(CONFIG_GNUTLS_SRP),y)
+       $(CP) \
                $(PKG_INSTALL_DIR)/usr/bin/srptool \
                $(1)/usr/bin/
+endif
+ifeq ($(CONFIG_GNUTLS_PSK),y)
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/bin/psktool \
+               $(1)/usr/bin/
+endif
 endef