1################################################################################ 2# 3# gnutls 4# 5################################################################################ 6 7GNUTLS_VERSION_MAJOR = 3.7 8GNUTLS_VERSION = $(GNUTLS_VERSION_MAJOR).2 9GNUTLS_SOURCE = gnutls-$(GNUTLS_VERSION).tar.xz 10GNUTLS_SITE = https://www.gnupg.org/ftp/gcrypt/gnutls/v$(GNUTLS_VERSION_MAJOR) 11GNUTLS_LICENSE = LGPL-2.1+ (core library) 12GNUTLS_LICENSE_FILES = doc/COPYING.LESSER 13 14ifeq ($(BR2_PACKAGE_GNUTLS_OPENSSL),y) 15GNUTLS_LICENSE += , GPL-3.0+ (gnutls-openssl library) 16GNUTLS_LICENSE_FILES += doc/COPYING 17endif 18 19GNUTLS_DEPENDENCIES = host-pkgconf libtasn1 nettle pcre 20GNUTLS_CPE_ID_VENDOR = gnu 21GNUTLS_CONF_OPTS = \ 22 --disable-doc \ 23 --disable-guile \ 24 --disable-libdane \ 25 --disable-rpath \ 26 --disable-tests \ 27 --enable-local-libopts \ 28 --enable-openssl-compatibility \ 29 --with-librt-prefix=$(STAGING_DIR) \ 30 --without-tpm \ 31 $(if $(BR2_PACKAGE_GNUTLS_OPENSSL),--enable,--disable)-openssl-compatibility \ 32 $(if $(BR2_PACKAGE_GNUTLS_TOOLS),--enable-tools,--disable-tools) 33GNUTLS_CONF_ENV = gl_cv_socket_ipv6=yes \ 34 ac_cv_header_wchar_h=$(if $(BR2_USE_WCHAR),yes,no) \ 35 gt_cv_c_wchar_t=$(if $(BR2_USE_WCHAR),yes,no) \ 36 gt_cv_c_wint_t=$(if $(BR2_USE_WCHAR),yes,no) \ 37 gl_cv_func_gettimeofday_clobber=no 38GNUTLS_INSTALL_STAGING = YES 39 40# libpthread autodetection poison the linkpath 41GNUTLS_CONF_OPTS += $(if $(BR2_TOOLCHAIN_HAS_THREADS),--with-libpthread-prefix=$(STAGING_DIR)/usr) 42 43# gnutls needs libregex, but pcre can be used too 44# The check isn't cross-compile friendly 45GNUTLS_CONF_ENV += libopts_cv_with_libregex=yes 46GNUTLS_CONF_OPTS += \ 47 --with-regex-header=pcreposix.h \ 48 --with-libregex-cflags="`$(PKG_CONFIG_HOST_BINARY) libpcreposix --cflags`" \ 49 --with-libregex-libs="`$(PKG_CONFIG_HOST_BINARY) libpcreposix --libs`" 50 51ifeq ($(BR2_PACKAGE_CRYPTODEV_LINUX),y) 52GNUTLS_CONF_OPTS += --enable-cryptodev 53GNUTLS_DEPENDENCIES += cryptodev-linux 54endif 55 56ifeq ($(BR2_PACKAGE_LIBIDN2),y) 57GNUTLS_CONF_OPTS += --with-idn 58GNUTLS_DEPENDENCIES += libidn2 59else 60GNUTLS_CONF_OPTS += --without-idn 61endif 62 63ifeq ($(BR2_PACKAGE_P11_KIT),y) 64GNUTLS_CONF_OPTS += --with-p11-kit 65GNUTLS_DEPENDENCIES += p11-kit 66else 67GNUTLS_CONF_OPTS += --without-p11-kit 68endif 69 70ifeq ($(BR2_PACKAGE_LIBUNISTRING),y) 71GNUTLS_CONF_OPTS += --with-libunistring-prefix=$(STAGING_DIR)/usr 72GNUTLS_DEPENDENCIES += libunistring 73else 74GNUTLS_CONF_OPTS += --with-included-unistring 75endif 76 77# Provide a default CA cert location 78ifeq ($(BR2_PACKAGE_P11_KIT),y) 79GNUTLS_CONF_OPTS += --with-default-trust-store-pkcs11=pkcs11:model=p11-kit-trust 80else ifeq ($(BR2_PACKAGE_CA_CERTIFICATES),y) 81GNUTLS_CONF_OPTS += --with-default-trust-store-file=/etc/ssl/certs/ca-certificates.crt 82endif 83 84ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) 85GNUTLS_LIBS += -latomic 86endif 87 88GNUTLS_CONF_ENV += LIBS="$(GNUTLS_LIBS)" 89 90$(eval $(autotools-package)) 91