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-01-19 15:08:19 +01:00
|
|
|
GNUTLS_VERSION_MAJOR = 3.3
|
2015-02-25 23:51:02 +01:00
|
|
|
GNUTLS_VERSION = $(GNUTLS_VERSION_MAJOR).13
|
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)
|
2013-06-02 16:50:53 +02:00
|
|
|
GNUTLS_LICENSE = GPLv3+ LGPLv2.1+
|
2012-12-29 02:52:36 +01:00
|
|
|
GNUTLS_LICENSE_FILES = COPYING COPYING.LESSER
|
2013-06-02 16:50:53 +02:00
|
|
|
GNUTLS_DEPENDENCIES = host-pkgconf nettle pcre \
|
|
|
|
$(if $(BR2_PACKAGE_P11_KIT),p11-kit) \
|
|
|
|
$(if $(BR2_PACKAGE_LIBIDN),libidn) \
|
|
|
|
$(if $(BR2_PACKAGE_LIBTASN1),libtasn1) \
|
|
|
|
$(if $(BR2_PACKAGE_ZLIB),zlib)
|
2014-09-27 21:32:44 +02:00
|
|
|
GNUTLS_CONF_OPTS = \
|
2013-12-25 17:14:44 +01:00
|
|
|
--with-libnettle-prefix=$(STAGING_DIR)/usr \
|
2015-02-14 22:18:51 +01:00
|
|
|
--with-librt-prefix=$(STAGING_DIR) \
|
2013-12-25 17:14:44 +01:00
|
|
|
--disable-rpath \
|
|
|
|
--disable-doc \
|
|
|
|
--disable-guile \
|
|
|
|
--enable-local-libopts
|
2012-12-28 10:47:17 +01:00
|
|
|
GNUTLS_CONF_ENV = gl_cv_socket_ipv6=$(if $(BR2_INET_IPV6),yes,no) \
|
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
|
2014-09-27 21:32:44 +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),)
|
2014-09-27 21:32:44 +02:00
|
|
|
GNUTLS_CONF_OPTS += --disable-crywrap
|
2013-06-05 06:58:17 +02:00
|
|
|
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)
|
2014-09-27 21:32:44 +02:00
|
|
|
GNUTLS_CONF_OPTS += --enable-cryptodev
|
2013-04-27 12:09:48 +02:00
|
|
|
GNUTLS_DEPENDENCIES += cryptodev-linux
|
|
|
|
endif
|
|
|
|
|
2012-12-28 10:47:17 +01:00
|
|
|
# Some examples in doc/examples use wchar
|
|
|
|
define GNUTLS_DISABLE_DOCS
|
|
|
|
$(SED) 's/ doc / /' $(@D)/Makefile.in
|
|
|
|
endef
|
|
|
|
|
|
|
|
define GNUTLS_DISABLE_TOOLS
|
|
|
|
$(SED) 's/\$$(PROGRAMS)//' $(@D)/src/Makefile.in
|
|
|
|
$(SED) 's/) install-exec-am/)/' $(@D)/src/Makefile.in
|
|
|
|
endef
|
|
|
|
|
|
|
|
GNUTLS_POST_PATCH_HOOKS += GNUTLS_DISABLE_DOCS
|
|
|
|
GNUTLS_POST_PATCH_HOOKS += $(if $(BR2_PACKAGE_GNUTLS_TOOLS),,GNUTLS_DISABLE_TOOLS)
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|