util-linux: attempt to fix host-util-linux build
[buildroot-gz.git] / package / gnutls / gnutls.mk
blobaf7621c724a2637e4c997218f810627f006eb5cc
1 ################################################################################
3 # gnutls
5 ################################################################################
7 GNUTLS_VERSION_MAJOR = 3.4
8 GNUTLS_VERSION = $(GNUTLS_VERSION_MAJOR).17
9 GNUTLS_SOURCE = gnutls-$(GNUTLS_VERSION).tar.xz
10 GNUTLS_SITE = ftp://ftp.gnutls.org/gcrypt/gnutls/v$(GNUTLS_VERSION_MAJOR)
11 # README says that the core library is under LGPLv2.1+, but a few
12 # files in libdane specify LGPLv3+. It seems to be a mistake, and we
13 # therefore trust the README file here. A bug was reported upstream at
14 # https://gitlab.com/gnutls/gnutls/issues/109.
15 GNUTLS_LICENSE = LGPLv2.1+ (core library), GPLv3+ (gnutls-openssl library)
16 GNUTLS_LICENSE_FILES = COPYING COPYING.LESSER README
17 GNUTLS_DEPENDENCIES = host-pkgconf libtasn1 nettle pcre
18 GNUTLS_CONF_OPTS = \
19 --disable-doc \
20 --disable-guile \
21 --disable-libdane \
22 --disable-rpath \
23 --enable-local-libopts \
24 --enable-openssl-compatibility \
25 --with-libnettle-prefix=$(STAGING_DIR)/usr \
26 --with-librt-prefix=$(STAGING_DIR) \
27 --without-tpm \
28 $(if $(BR2_PACKAGE_GNUTLS_TOOLS),--enable-tools,--disable-tools)
29 GNUTLS_CONF_ENV = gl_cv_socket_ipv6=yes \
30 ac_cv_header_wchar_h=$(if $(BR2_USE_WCHAR),yes,no) \
31 gt_cv_c_wchar_t=$(if $(BR2_USE_WCHAR),yes,no) \
32 gt_cv_c_wint_t=$(if $(BR2_USE_WCHAR),yes,no) \
33 gl_cv_func_gettimeofday_clobber=no
34 GNUTLS_INSTALL_STAGING = YES
36 # libpthread and libz autodetection poison the linkpath
37 GNUTLS_CONF_OPTS += $(if $(BR2_TOOLCHAIN_HAS_THREADS),--with-libpthread-prefix=$(STAGING_DIR)/usr)
38 GNUTLS_CONF_OPTS += $(if $(BR2_PACKAGE_ZLIB),--with-libz-prefix=$(STAGING_DIR)/usr)
40 # gnutls needs libregex, but pcre can be used too
41 # The check isn't cross-compile friendly
42 GNUTLS_CONF_ENV += libopts_cv_with_libregex=yes
43 GNUTLS_CONF_OPTS += \
44 --with-regex-header=pcreposix.h \
45 --with-libregex-cflags="`$(PKG_CONFIG_HOST_BINARY) libpcreposix --cflags`" \
46 --with-libregex-libs="`$(PKG_CONFIG_HOST_BINARY) libpcreposix --libs`"
48 # Consider crywrap as part of tools because it needs WCHAR, and it's so too
49 ifeq ($(BR2_PACKAGE_GNUTLS_TOOLS),)
50 GNUTLS_CONF_OPTS += --disable-crywrap
51 endif
53 # Prerequisite for crywrap
54 ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
55 GNUTLS_CONF_ENV += LIBS="-largp"
56 GNUTLS_DEPENDENCIES += argp-standalone
57 endif
59 # libidn support for nommu must exclude the crywrap wrapper (uses fork)
60 GNUTLS_CONF_OPTS += $(if $(BR2_USE_MMU),,--disable-crywrap)
62 ifeq ($(BR2_PACKAGE_CRYPTODEV_LINUX),y)
63 GNUTLS_CONF_OPTS += --enable-cryptodev
64 GNUTLS_DEPENDENCIES += cryptodev-linux
65 endif
67 ifeq ($(BR2_PACKAGE_LIBIDN),y)
68 GNUTLS_CONF_OPTS += --with-idn
69 GNUTLS_DEPENDENCIES += libidn
70 else
71 GNUTLS_CONF_OPTS += --without-idn
72 endif
74 ifeq ($(BR2_PACKAGE_P11_KIT),y)
75 GNUTLS_CONF_OPTS += --with-p11-kit
76 GNUTLS_DEPENDENCIES += p11-kit
77 else
78 GNUTLS_CONF_OPTS += --without-p11-kit
79 endif
81 ifeq ($(BR2_PACKAGE_ZLIB),y)
82 GNUTLS_CONF_OPTS += --with-zlib
83 GNUTLS_DEPENDENCIES += zlib
84 else
85 GNUTLS_CONF_OPTS += --without-zlib
86 endif
88 $(eval $(autotools-package))