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
|
|
|
|
2021-03-31 23:47:05 +02:00
|
|
|
GNUTLS_VERSION_MAJOR = 3.7
|
|
|
|
GNUTLS_VERSION = $(GNUTLS_VERSION_MAJOR).1
|
2012-12-28 10:47:17 +01:00
|
|
|
GNUTLS_SOURCE = gnutls-$(GNUTLS_VERSION).tar.xz
|
2017-06-14 20:18:35 +02:00
|
|
|
GNUTLS_SITE = https://www.gnupg.org/ftp/gcrypt/gnutls/v$(GNUTLS_VERSION_MAJOR)
|
2019-08-16 00:19:33 +02:00
|
|
|
GNUTLS_LICENSE = LGPL-2.1+ (core library)
|
|
|
|
GNUTLS_LICENSE_FILES = doc/COPYING.LESSER
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_GNUTLS_OPENSSL),y)
|
2019-10-26 10:45:54 +02:00
|
|
|
GNUTLS_LICENSE += , GPL-3.0+ (gnutls-openssl library)
|
2019-08-16 00:19:33 +02:00
|
|
|
GNUTLS_LICENSE_FILES += doc/COPYING
|
|
|
|
endif
|
|
|
|
|
2018-06-15 10:48:38 +02:00
|
|
|
GNUTLS_DEPENDENCIES = host-pkgconf libtasn1 nettle pcre
|
2020-12-04 16:46:01 +01:00
|
|
|
GNUTLS_CPE_ID_VENDOR = gnu
|
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 \
|
2021-06-03 18:10:42 +02:00
|
|
|
--disable-tests \
|
2015-11-30 14:16:35 +01:00
|
|
|
--enable-local-libopts \
|
2015-12-07 14:40:59 +01:00
|
|
|
--enable-openssl-compatibility \
|
2015-11-30 14:16:35 +01:00
|
|
|
--with-librt-prefix=$(STAGING_DIR) \
|
2015-12-14 19:41:38 +01:00
|
|
|
--without-tpm \
|
2019-08-16 00:19:33 +02:00
|
|
|
$(if $(BR2_PACKAGE_GNUTLS_OPENSSL),--enable,--disable)-openssl-compatibility \
|
2015-12-14 19:41:38 +01:00
|
|
|
$(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
|
|
|
|
|
2019-01-16 19:59:02 +01:00
|
|
|
# libpthread 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)
|
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-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
|
|
|
|
|
2018-05-01 22:40:35 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBIDN2),y)
|
2019-01-16 19:59:02 +01:00
|
|
|
GNUTLS_CONF_OPTS += --with-idn
|
2018-05-01 22:40:35 +02:00
|
|
|
GNUTLS_DEPENDENCIES += libidn2
|
|
|
|
else
|
2019-01-16 19:59:02 +01:00
|
|
|
GNUTLS_CONF_OPTS += --without-idn
|
2018-05-01 22:40:35 +02:00
|
|
|
endif
|
|
|
|
|
2015-11-30 14:16:35 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_P11_KIT),y)
|
|
|
|
GNUTLS_CONF_OPTS += --with-p11-kit
|
|
|
|
GNUTLS_DEPENDENCIES += p11-kit
|
|
|
|
else
|
|
|
|
GNUTLS_CONF_OPTS += --without-p11-kit
|
|
|
|
endif
|
|
|
|
|
2018-06-15 10:48:38 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBUNISTRING),y)
|
|
|
|
GNUTLS_CONF_OPTS += --with-libunistring-prefix=$(STAGING_DIR)/usr
|
|
|
|
GNUTLS_DEPENDENCIES += libunistring
|
|
|
|
else
|
|
|
|
GNUTLS_CONF_OPTS += --with-included-unistring
|
|
|
|
endif
|
|
|
|
|
2018-11-16 21:17:32 +01:00
|
|
|
# Provide a default CA cert location
|
|
|
|
ifeq ($(BR2_PACKAGE_P11_KIT),y)
|
|
|
|
GNUTLS_CONF_OPTS += --with-default-trust-store-pkcs11=pkcs11:model=p11-kit-trust
|
|
|
|
else ifeq ($(BR2_PACKAGE_CA_CERTIFICATES),y)
|
|
|
|
GNUTLS_CONF_OPTS += --with-default-trust-store-file=/etc/ssl/certs/ca-certificates.crt
|
|
|
|
endif
|
|
|
|
|
2019-07-15 18:36:08 +02:00
|
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
|
|
|
|
GNUTLS_LIBS += -latomic
|
|
|
|
endif
|
|
|
|
|
|
|
|
GNUTLS_CONF_ENV += LIBS="$(GNUTLS_LIBS)"
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|