2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2011-07-11 15:34:27 +02:00
|
|
|
#
|
|
|
|
# gnutls
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2011-07-11 15:34:27 +02:00
|
|
|
|
2015-11-30 14:16:35 +01:00
|
|
|
GNUTLS_VERSION_MAJOR = 3.4
|
2016-09-08 14:40:29 +02:00
|
|
|
GNUTLS_VERSION = $(GNUTLS_VERSION_MAJOR).15
|
2012-12-28 10:47:17 +01:00
|
|
|
GNUTLS_SOURCE = gnutls-$(GNUTLS_VERSION).tar.xz
|
2013-12-18 19:20:02 +01:00
|
|
|
GNUTLS_SITE = ftp://ftp.gnutls.org/gcrypt/gnutls/v$(GNUTLS_VERSION_MAJOR)
|
2016-07-04 14:46:21 +02:00
|
|
|
# README says that the core library is under LGPLv2.1+, but a few
|
|
|
|
# files in libdane specify LGPLv3+. It seems to be a mistake, and we
|
|
|
|
# therefore trust the README file here. A bug was reported upstream at
|
|
|
|
# https://gitlab.com/gnutls/gnutls/issues/109.
|
|
|
|
GNUTLS_LICENSE = LGPLv2.1+ (core library), GPLv3+ (gnutls-openssl library)
|
|
|
|
GNUTLS_LICENSE_FILES = COPYING COPYING.LESSER README
|
2015-11-30 14:16:35 +01:00
|
|
|
GNUTLS_DEPENDENCIES = host-pkgconf libtasn1 nettle pcre
|
2014-09-27 21:32:44 +02:00
|
|
|
GNUTLS_CONF_OPTS = \
|
2013-12-25 17:14:44 +01:00
|
|
|
--disable-doc \
|
|
|
|
--disable-guile \
|
2015-11-30 14:16:35 +01:00
|
|
|
--disable-libdane \
|
|
|
|
--disable-rpath \
|
|
|
|
--enable-local-libopts \
|
2015-12-07 14:40:59 +01:00
|
|
|
--enable-openssl-compatibility \
|
2015-11-30 14:16:35 +01:00
|
|
|
--with-libnettle-prefix=$(STAGING_DIR)/usr \
|
|
|
|
--with-librt-prefix=$(STAGING_DIR) \
|
2015-12-14 19:41:38 +01:00
|
|
|
--without-tpm \
|
|
|
|
$(if $(BR2_PACKAGE_GNUTLS_TOOLS),--enable-tools,--disable-tools)
|
2015-04-19 14:40:00 +02:00
|
|
|
GNUTLS_CONF_ENV = gl_cv_socket_ipv6=yes \
|
2012-12-26 04:55:48 +01:00
|
|
|
ac_cv_header_wchar_h=$(if $(BR2_USE_WCHAR),yes,no) \
|
|
|
|
gt_cv_c_wchar_t=$(if $(BR2_USE_WCHAR),yes,no) \
|
2013-06-02 16:50:53 +02:00
|
|
|
gt_cv_c_wint_t=$(if $(BR2_USE_WCHAR),yes,no) \
|
|
|
|
gl_cv_func_gettimeofday_clobber=no
|
2011-07-11 15:34:27 +02:00
|
|
|
GNUTLS_INSTALL_STAGING = YES
|
|
|
|
|
2014-02-04 15:57:43 +01:00
|
|
|
# libpthread and libz autodetection poison the linkpath
|
2014-09-27 21:32:44 +02:00
|
|
|
GNUTLS_CONF_OPTS += $(if $(BR2_TOOLCHAIN_HAS_THREADS),--with-libpthread-prefix=$(STAGING_DIR)/usr)
|
|
|
|
GNUTLS_CONF_OPTS += $(if $(BR2_PACKAGE_ZLIB),--with-libz-prefix=$(STAGING_DIR)/usr)
|
2013-01-02 05:50:09 +01:00
|
|
|
|
2013-06-02 16:50:53 +02:00
|
|
|
# gnutls needs libregex, but pcre can be used too
|
|
|
|
# The check isn't cross-compile friendly
|
2014-01-31 00:15:48 +01:00
|
|
|
GNUTLS_CONF_ENV += libopts_cv_with_libregex=yes
|
2015-03-31 09:21:57 +02:00
|
|
|
GNUTLS_CONF_OPTS += \
|
|
|
|
--with-regex-header=pcreposix.h \
|
2013-06-02 16:50:53 +02:00
|
|
|
--with-libregex-cflags="`$(PKG_CONFIG_HOST_BINARY) libpcreposix --cflags`" \
|
|
|
|
--with-libregex-libs="`$(PKG_CONFIG_HOST_BINARY) libpcreposix --libs`"
|
|
|
|
|
2013-06-05 06:58:17 +02:00
|
|
|
# Consider crywrap as part of tools because it needs WCHAR, and it's so too
|
|
|
|
ifeq ($(BR2_PACKAGE_GNUTLS_TOOLS),)
|
2015-03-31 09:21:57 +02:00
|
|
|
GNUTLS_CONF_OPTS += --disable-crywrap
|
2013-06-05 06:58:17 +02:00
|
|
|
endif
|
|
|
|
|
2015-12-04 18:01:39 +01:00
|
|
|
# Prerequisite for crywrap
|
|
|
|
ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
|
|
|
|
GNUTLS_CONF_ENV += LIBS="-largp"
|
|
|
|
GNUTLS_DEPENDENCIES += argp-standalone
|
|
|
|
endif
|
|
|
|
|
2013-01-02 05:50:10 +01:00
|
|
|
# libidn support for nommu must exclude the crywrap wrapper (uses fork)
|
2014-09-27 21:32:44 +02:00
|
|
|
GNUTLS_CONF_OPTS += $(if $(BR2_USE_MMU),,--disable-crywrap)
|
2013-01-02 05:50:10 +01:00
|
|
|
|
2013-04-27 12:09:48 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_CRYPTODEV_LINUX),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GNUTLS_CONF_OPTS += --enable-cryptodev
|
|
|
|
GNUTLS_DEPENDENCIES += cryptodev-linux
|
2013-04-27 12:09:48 +02:00
|
|
|
endif
|
|
|
|
|
2015-11-30 14:16:35 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBIDN),y)
|
|
|
|
GNUTLS_CONF_OPTS += --with-idn
|
|
|
|
GNUTLS_DEPENDENCIES += libidn
|
|
|
|
else
|
|
|
|
GNUTLS_CONF_OPTS += --without-idn
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_P11_KIT),y)
|
|
|
|
GNUTLS_CONF_OPTS += --with-p11-kit
|
|
|
|
GNUTLS_DEPENDENCIES += p11-kit
|
|
|
|
else
|
|
|
|
GNUTLS_CONF_OPTS += --without-p11-kit
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
|
|
|
GNUTLS_CONF_OPTS += --with-zlib
|
|
|
|
GNUTLS_DEPENDENCIES += zlib
|
|
|
|
else
|
|
|
|
GNUTLS_CONF_OPTS += --without-zlib
|
|
|
|
endif
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|