update libcurl

This commit is contained in:
Martijn Scheepers
2023-01-03 08:56:22 +01:00
parent f3e85cdf4d
commit 0a3fbcb9d9
3 changed files with 49 additions and 40 deletions

View File

@@ -5,7 +5,7 @@ config BR2_PACKAGE_LIBCURL
Telnet, and Dict servers, using any of the supported
protocols.
http://curl.haxx.se/
https://curl.se/
if BR2_PACKAGE_LIBCURL
@@ -45,12 +45,19 @@ config BR2_PACKAGE_LIBCURL_EXTRA_PROTOCOLS_FEATURES
- DICT
- Gopher
# Packages must select that if they require a SSL/TLS-enabled libcurl.
# Those packages must also select one crypto package that can be used
# as a backend below.
config BR2_PACKAGE_LIBCURL_FORCE_TLS
bool
choice
prompt "SSL/TLS library to use"
config BR2_PACKAGE_LIBCURL_OPENSSL
bool "OpenSSL"
depends on BR2_PACKAGE_OPENSSL
select BR2_PACKAGE_LIBOPENSSL_ENABLE_DES if BR2_PACKAGE_LIBOPENSSL
config BR2_PACKAGE_LIBCURL_BEARSSL
bool "BearSSL"
@@ -60,10 +67,6 @@ config BR2_PACKAGE_LIBCURL_GNUTLS
bool "GnuTLS"
depends on BR2_PACKAGE_GNUTLS
config BR2_PACKAGE_LIBCURL_LIBNSS
bool "NSS"
depends on BR2_PACKAGE_LIBNSS
config BR2_PACKAGE_LIBCURL_MBEDTLS
bool "mbed TLS"
depends on BR2_PACKAGE_MBEDTLS
@@ -71,9 +74,16 @@ config BR2_PACKAGE_LIBCURL_MBEDTLS
config BR2_PACKAGE_LIBCURL_WOLFSSL
bool "WolfSSL"
depends on BR2_PACKAGE_WOLFSSL
depends on !BR2_STATIC_LIBS # wolfssl-all
select BR2_PACKAGE_WOLFSSL_ALL
comment "WolfSSL needs a toolchain w/ dynamic library"
depends on BR2_PACKAGE_WOLFSSL
depends on BR2_STATIC_LIBS
config BR2_PACKAGE_LIBCURL_TLS_NONE
bool "None"
depends on !BR2_PACKAGE_LIBCURL_FORCE_TLS
endchoice

View File

@@ -1,5 +1,5 @@
# Locally calculated after checking pgp signature
# https://curl.haxx.se/download/curl-7.72.0.tar.xz.asc
# https://curl.se/download/curl-7.87.0.tar.xz.asc
# signed with key 27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2
sha256 0ded0808c4d85f2ee0db86980ae610cc9d165e9ca9da466196cc73c346513713 curl-7.72.0.tar.xz
sha256 db3c4a3b3695a0f317a0c5176acd2f656d18abc45b3ee78e50935a78eb1e132e COPYING
sha256 ee5f1a1955b0ed413435ef79db28b834ea5f0fb7c8cfb1ce47175cc3bee08fff curl-7.87.0.tar.xz
sha256 321b1a09ebc30410f2e837c072e5521cf7095b757193af4a7dae1086e36ed31a COPYING

View File

@@ -4,25 +4,27 @@
#
################################################################################
LIBCURL_VERSION = 7.72.0
LIBCURL_VERSION = 7.87.0
LIBCURL_SOURCE = curl-$(LIBCURL_VERSION).tar.xz
LIBCURL_SITE = https://curl.haxx.se/download
LIBCURL_SITE = https://curl.se/download
LIBCURL_DEPENDENCIES = host-pkgconf \
$(if $(BR2_PACKAGE_ZLIB),zlib) \
$(if $(BR2_PACKAGE_RTMPDUMP),rtmpdump)
LIBCURL_LICENSE = curl
LIBCURL_LICENSE_FILES = COPYING
LIBCURL_CPE_ID_VENDOR = haxx
LIBCURL_CPE_ID_PRODUCT = libcurl
LIBCURL_INSTALL_STAGING = YES
# We disable NTLM support because it uses fork(), which doesn't work
# on non-MMU platforms. Moreover, this authentication method is
# probably almost never used. See
# http://curl.haxx.se/docs/manpage.html#--ntlm.
# http://curl.se/docs/manpage.html#--ntlm.
# Likewise, there is no compiler on the target, so libcurl-option (to
# generate C code) isn't very useful
LIBCURL_CONF_OPTS = --disable-manual --disable-ntlm-wb \
--enable-hidden-symbols --with-random=/dev/urandom --disable-curldebug \
--disable-libcurl-option
--with-random=/dev/urandom --disable-curldebug \
--disable-libcurl-option --disable-ldap --disable-ldaps
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
LIBCURL_CONF_OPTS += --enable-threaded-resolver
@@ -30,6 +32,16 @@ else
LIBCURL_CONF_OPTS += --disable-threaded-resolver
endif
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
LIBCURL_CONF_OPTS += LIBS=-latomic
endif
ifeq ($(BR2_TOOLCHAIN_HAS_SYNC_1),)
# Even though stdatomic.h does exist, link fails for __atomic_exchange_1
# Work around this by pretending atomics aren't available.
LIBCURL_CONF_ENV += ac_cv_header_stdatomic_h=no
endif
ifeq ($(BR2_PACKAGE_LIBCURL_VERBOSE),y)
LIBCURL_CONF_OPTS += --enable-verbose
else
@@ -38,6 +50,10 @@ endif
LIBCURL_CONFIG_SCRIPTS = curl-config
ifeq ($(BR2_PACKAGE_LIBCURL_TLS_NONE),y)
LIBCURL_CONF_OPTS += --without-ssl
endif
ifeq ($(BR2_PACKAGE_LIBCURL_OPENSSL),y)
LIBCURL_DEPENDENCIES += openssl
# configure adds the cross openssl dir to LD_LIBRARY_PATH which screws up
@@ -45,10 +61,10 @@ LIBCURL_DEPENDENCIES += openssl
# Fix it by setting LD_LIBRARY_PATH to something sensible so those libs
# are found first.
LIBCURL_CONF_ENV += LD_LIBRARY_PATH=$(if $(LD_LIBRARY_PATH),$(LD_LIBRARY_PATH):)/lib:/usr/lib
LIBCURL_CONF_OPTS += --with-ssl=$(STAGING_DIR)/usr \
LIBCURL_CONF_OPTS += --with-openssl=$(STAGING_DIR)/usr \
--with-ca-path=/etc/ssl/certs
else
LIBCURL_CONF_OPTS += --without-ssl
LIBCURL_CONF_OPTS += --without-openssl
endif
ifeq ($(BR2_PACKAGE_LIBCURL_BEARSSL),y)
@@ -66,14 +82,6 @@ else
LIBCURL_CONF_OPTS += --without-gnutls
endif
ifeq ($(BR2_PACKAGE_LIBCURL_LIBNSS),y)
LIBCURL_CONF_OPTS += --with-nss=$(STAGING_DIR)/usr
LIBCURL_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) `$(PKG_CONFIG_HOST_BINARY) nspr nss --cflags`"
LIBCURL_DEPENDENCIES += libnss
else
LIBCURL_CONF_OPTS += --without-nss
endif
ifeq ($(BR2_PACKAGE_LIBCURL_MBEDTLS),y)
LIBCURL_CONF_OPTS += --with-mbedtls=$(STAGING_DIR)/usr
LIBCURL_DEPENDENCIES += mbedtls
@@ -83,6 +91,7 @@ endif
ifeq ($(BR2_PACKAGE_LIBCURL_WOLFSSL),y)
LIBCURL_CONF_OPTS += --with-wolfssl=$(STAGING_DIR)/usr
LIBCURL_CONF_OPTS += --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt
LIBCURL_DEPENDENCIES += wolfssl
else
LIBCURL_CONF_OPTS += --without-wolfssl
@@ -124,6 +133,13 @@ else
LIBCURL_CONF_OPTS += --without-nghttp2
endif
ifeq ($(BR2_PACKAGE_LIBGSASL),y)
LIBCURL_DEPENDENCIES += libgsasl
LIBCURL_CONF_OPTS += --with-libgsasl
else
LIBCURL_CONF_OPTS += --without-libgsasl
endif
ifeq ($(BR2_PACKAGE_LIBCURL_COOKIES_SUPPORT),y)
LIBCURL_CONF_OPTS += --enable-cookies
else
@@ -141,8 +157,6 @@ LIBCURL_CONF_OPTS += \
--enable-dict \
--enable-gopher \
--enable-imap \
--enable-ldap \
--enable-ldaps \
--enable-pop3 \
--enable-rtsp \
--enable-smb \
@@ -154,8 +168,6 @@ LIBCURL_CONF_OPTS += \
--disable-dict \
--disable-gopher \
--disable-imap \
--disable-ldap \
--disable-ldaps \
--disable-pop3 \
--disable-rtsp \
--disable-smb \
@@ -176,17 +188,4 @@ endef
LIBCURL_POST_INSTALL_TARGET_HOOKS += LIBCURL_TARGET_CLEANUP
endif
HOST_LIBCURL_DEPENDENCIES = host-openssl
HOST_LIBCURL_CONF_OPTS = \
--disable-manual \
--disable-ntlm-wb \
--disable-curldebug \
--with-ssl \
--without-gnutls \
--without-mbedtls \
--without-nss
HOST_LIBCURL_POST_PATCH_HOOKS += LIBCURL_FIX_DOT_PC
$(eval $(autotools-package))
$(eval $(host-autotools-package))