This commit is contained in:
TriForceX
2019-09-25 20:51:37 -03:00
commit 6203ff3e7c
11215 changed files with 428258 additions and 0 deletions

35
package/gnutls/Config.in Normal file
View File

@@ -0,0 +1,35 @@
config BR2_PACKAGE_GNUTLS
bool "gnutls"
# https://gitlab.com/gnutls/gnutls/issues/203
depends on !BR2_STATIC_LIBS
# gnulib requires a library that implements wctomb().
# This is noticed only when linking with libgnutls.so.
depends on BR2_USE_WCHAR
select BR2_PACKAGE_LIBTASN1
select BR2_PACKAGE_NETTLE
select BR2_PACKAGE_PCRE
help
GnuTLS is a secure communications library implementing the SSL
and TLS protocols and technologies around them.
http://www.gnutls.org
if BR2_PACKAGE_GNUTLS
config BR2_PACKAGE_GNUTLS_OPENSSL
bool "OpenSSL compatibility library"
help
Install OpenSSL compatibility library.
config BR2_PACKAGE_GNUTLS_TOOLS
bool "install tools"
select BR2_PACKAGE_ARGP_STANDALONE \
if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL
help
Install GnuTLS command line tools for various cryptographic
tasks.
endif
comment "gnutls needs a toolchain w/ wchar, dynamic library"
depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS

View File

@@ -0,0 +1,6 @@
# Locally calculated after checking pgp signature
# https://www.gnupg.org/ftp/gcrypt/gnutls/v3.6/gnutls-3.6.8.tar.xz.sig
sha256 aa81944e5635de981171772857e72be231a7e0f559ae0292d2737de475383e83 gnutls-3.6.8.tar.xz
# Locally calculated
sha256 e79e9c8a0c85d735ff98185918ec94ed7d175efc377012787aebcf3b80f0d90b doc/COPYING
sha256 6095e9ffa777dd22839f7801aa845b31c9ed07f3d6bf8a26dc5d2dec8ccc0ef3 doc/COPYING.LESSER

102
package/gnutls/gnutls.mk Normal file
View File

@@ -0,0 +1,102 @@
################################################################################
#
# gnutls
#
################################################################################
GNUTLS_VERSION_MAJOR = 3.6
GNUTLS_VERSION = $(GNUTLS_VERSION_MAJOR).8
GNUTLS_SOURCE = gnutls-$(GNUTLS_VERSION).tar.xz
GNUTLS_SITE = https://www.gnupg.org/ftp/gcrypt/gnutls/v$(GNUTLS_VERSION_MAJOR)
GNUTLS_LICENSE = LGPL-2.1+ (core library)
GNUTLS_LICENSE_FILES = doc/COPYING.LESSER
ifeq ($(BR2_PACKAGE_GNUTLS_OPENSSL),y)
GNUTLS_LICENSE := $(GNUTLS_LICENSE), GPL-3.0+ (gnutls-openssl library)
GNUTLS_LICENSE_FILES += doc/COPYING
endif
GNUTLS_DEPENDENCIES = host-pkgconf libtasn1 nettle pcre
GNUTLS_CONF_OPTS = \
--disable-doc \
--disable-guile \
--disable-libdane \
--disable-rpath \
--enable-local-libopts \
--enable-openssl-compatibility \
--with-librt-prefix=$(STAGING_DIR) \
--without-tpm \
$(if $(BR2_PACKAGE_GNUTLS_OPENSSL),--enable,--disable)-openssl-compatibility \
$(if $(BR2_PACKAGE_GNUTLS_TOOLS),--enable-tools,--disable-tools)
GNUTLS_CONF_ENV = gl_cv_socket_ipv6=yes \
ac_cv_header_wchar_h=$(if $(BR2_USE_WCHAR),yes,no) \
gt_cv_c_wchar_t=$(if $(BR2_USE_WCHAR),yes,no) \
gt_cv_c_wint_t=$(if $(BR2_USE_WCHAR),yes,no) \
gl_cv_func_gettimeofday_clobber=no
GNUTLS_INSTALL_STAGING = YES
# libpthread autodetection poison the linkpath
GNUTLS_CONF_OPTS += $(if $(BR2_TOOLCHAIN_HAS_THREADS),--with-libpthread-prefix=$(STAGING_DIR)/usr)
# gnutls needs libregex, but pcre can be used too
# The check isn't cross-compile friendly
GNUTLS_CONF_ENV += libopts_cv_with_libregex=yes
GNUTLS_CONF_OPTS += \
--with-regex-header=pcreposix.h \
--with-libregex-cflags="`$(PKG_CONFIG_HOST_BINARY) libpcreposix --cflags`" \
--with-libregex-libs="`$(PKG_CONFIG_HOST_BINARY) libpcreposix --libs`"
# Consider crywrap as part of tools because it needs WCHAR, and it's so too
ifeq ($(BR2_PACKAGE_GNUTLS_TOOLS),)
GNUTLS_CONF_OPTS += --disable-crywrap
endif
# Prerequisite for crywrap
ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
GNUTLS_LIBS += -largp
GNUTLS_DEPENDENCIES += argp-standalone
endif
# libidn support for nommu must exclude the crywrap wrapper (uses fork)
GNUTLS_CONF_OPTS += $(if $(BR2_USE_MMU),,--disable-crywrap)
ifeq ($(BR2_PACKAGE_CRYPTODEV_LINUX),y)
GNUTLS_CONF_OPTS += --enable-cryptodev
GNUTLS_DEPENDENCIES += cryptodev-linux
endif
ifeq ($(BR2_PACKAGE_LIBIDN2),y)
GNUTLS_CONF_OPTS += --with-idn
GNUTLS_DEPENDENCIES += libidn2
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_LIBUNISTRING),y)
GNUTLS_CONF_OPTS += --with-libunistring-prefix=$(STAGING_DIR)/usr
GNUTLS_DEPENDENCIES += libunistring
else
GNUTLS_CONF_OPTS += --with-included-unistring
endif
# 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
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
GNUTLS_LIBS += -latomic
endif
GNUTLS_CONF_ENV += LIBS="$(GNUTLS_LIBS)"
$(eval $(autotools-package))