Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

curl: update to v7.87 and add optional features #5543

Merged
merged 20 commits into from
Jan 19, 2023
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 64 additions & 6 deletions cross/curl/Makefile
Original file line number Diff line number Diff line change
@@ -1,32 +1,90 @@
PKG_NAME = curl
PKG_VERS = 7.86.0
PKG_VERS = 7.87.0
PKG_EXT = tar.xz
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://curl.se/download
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

DEPENDS = cross/zlib cross/openssl cross/gnutls cross/libssh2 cross/zstd cross/libwebsockets
DEPENDS = cross/zlib cross/openssl cross/c-ares
# optional features (see BUILD_CURL_WITH below)
OPTIONAL_DEPENDS = cross/libssh2 cross/gnutls cross/mbedtls cross/libidn2 cross/libpsl cross/nghttp2 cross/gsasl cross/gss cross/openldap

HOMEPAGE = https://curl.haxx.se
COMMENT = Command line tool and library for transferring data with URLs
COMMENT = Command line tool and library for transferring data with URLs.
LICENSE = https://curl.haxx.se/docs/copyright.html

GNU_CONFIGURE = 1
CONFIGURE_ARGS = --enable-ipv6
CONFIGURE_ARGS += --with-libssh2
CONFIGURE_ARGS += --with-gnutls
CONFIGURE_ARGS = --disable-static
CONFIGURE_ARGS += --enable-ipv6
CONFIGURE_ARGS += --with-openssl
CONFIGURE_ARGS += --enable-ares
CONFIGURE_ARGS += --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt
CONFIGURE_ARGS += --with-ca-path=/usr/share/ca-certificates/mozilla

ifneq ($(strip $(CURL_INCLUDE_EXECUTABLE)),1)
PLIST_TRANSFORM = sed -e '/bin:bin/d'
endif

# optional dependencies to build curl with
ifneq ($(strip $(BUILD_CURL_WITH)),)

ifeq ($(findstring libssh2,$(BUILD_CURL_WITH)),libssh2)
DEPENDS += cross/libssh2
CONFIGURE_ARGS += --with-libssh2
endif

ifeq ($(findstring gnutls,$(BUILD_CURL_WITH)),gnutls)
DEPENDS += cross/gnutls
CONFIGURE_ARGS += --with-gnutls
endif

ifeq ($(findstring mbedtls,$(BUILD_CURL_WITH)),mbedtls)
DEPENDS += cross/mbedtls
CONFIGURE_ARGS += --with-mbedtls
endif

ifeq ($(findstring libidn2,$(BUILD_CURL_WITH)),libidn2)
DEPENDS += cross/libidn2
CONFIGURE_ARGS += --with-libidn2
endif

ifeq ($(findstring libpsl,$(BUILD_CURL_WITH)),libpsl)
DEPENDS += cross/libpsl
CONFIGURE_ARGS += --with-libpsl
endif

ifeq ($(findstring nghttp2,$(BUILD_CURL_WITH)),nghttp2)
DEPENDS += cross/nghttp2
CONFIGURE_ARGS += --with-nghttp2
endif

ifeq ($(findstring gsasl,$(BUILD_CURL_WITH)),gsasl)
DEPENDS += cross/gsasl
endif

ifeq ($(findstring gss,$(BUILD_CURL_WITH)),gss)
DEPENDS += cross/gss
CONFIGURE_ARGS += --with-gssapi=$(STAGING_INSTALL_PREFIX)
endif

ifeq ($(findstring ldap,$(BUILD_CURL_WITH)),ldap)
DEPENDS += cross/openldap
CONFIGURE_ARGS += --enable-ldap
CONFIGURE_ARGS += --enable-ldaps
endif

ifeq ($(findstring websockets,$(BUILD_CURL_WITH)),websockets)
CONFIGURE_ARGS += --enable-websockets
$(warning "Websockets enabled but marked EXPERIMENTAL. Use with caution!")
endif

endif

POST_INSTALL_TARGET = curl_post_install

include ../../mk/spksrc.cross-cc.mk

.PHONY: curl_post_install
curl_post_install: $(EXTRA_POST_INSTALL)
@$(MSG) Adjust prefix in curl-config
sed -i.orig 's#prefix=/#prefix=$(INSTALL_DIR)/#' $(STAGING_INSTALL_PREFIX)/bin/curl-config
6 changes: 3 additions & 3 deletions cross/curl/digests
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
curl-7.86.0.tar.xz SHA1 289a3aaec47f98a52474cd34243d6b7f51f8e525
curl-7.86.0.tar.xz SHA256 2d61116e5f485581f6d59865377df4463f2e788677ac43222b496d4e49fb627b
curl-7.86.0.tar.xz MD5 19a2165f37941a6f412afc924e750568
curl-7.87.0.tar.xz SHA1 cc61d854fc1dbb769052839829f9412d41879674
curl-7.87.0.tar.xz SHA256 ee5f1a1955b0ed413435ef79db28b834ea5f0fb7c8cfb1ce47175cc3bee08fff
curl-7.87.0.tar.xz MD5 0b0f5de173afd303229e5272689578d7
29 changes: 29 additions & 0 deletions cross/curl/patches/001-fix-md4-for-build-with-gnutls.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# fixed in curl > 0.87.0
# apply fix https://github.com/curl/curl/pull/10142/files
#
--- lib/md4.c.orig 2022-12-19 07:48:23.000000000 +0000
+++ lib/md4.c 2022-12-30 10:44:53.907765322 +0000
@@ -86,11 +86,7 @@
#include "memdebug.h"


-#if defined(USE_WOLFSSL) && !defined(WOLFSSL_NO_MD4)
-
-#elif defined(USE_OPENSSL) && !defined(OPENSSL_NO_MD4)
-
-#elif defined(USE_GNUTLS)
+#if defined(USE_GNUTLS)

typedef struct md4_ctx MD4_CTX;

@@ -109,6 +105,10 @@
md4_digest(ctx, MD4_DIGEST_SIZE, result);
}

+#elif defined(USE_WOLFSSL) && !defined(WOLFSSL_NO_MD4)
+
+#elif defined(USE_OPENSSL) && !defined(OPENSSL_NO_MD4)
+
#elif defined(AN_APPLE_OS)
typedef CC_MD4_CTX MD4_CTX;

5 changes: 4 additions & 1 deletion cross/gnutls/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ HOMEPAGE = https://gnutls.org/
COMMENT = GnuTLS is a secure communications library implementing the SSL, TLS and DTLS protocols and technologies around them.
LICENSE = LGPL

ifneq ($(strip $(GNUTLS_INCLUDE_EXECUTABLES)),1)
PLIST_TRANSFORM = sed -e '/bin:bin/d'
endif

GNU_CONFIGURE = 1
CONFIGURE_ARGS = --disable-doc
CONFIGURE_ARGS += --without-p11-kit
CONFIGURE_ARGS += --disable-nls
CONFIGURE_ARGS += --enable-local-libopts
CONFIGURE_ARGS += gl_cv_func_gettimeofday_clobber=no
CONFIGURE_ARGS += gl_cv_func_signbit_gcc=no

Expand Down
38 changes: 38 additions & 0 deletions cross/gnutls/patches/001-remove-pragma-gcc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# remove #pragma GCC diagnostic for older gcc compilers
#
--- src/common.c.orig 2022-09-27 12:42:22.000000000 +0000
+++ src/common.c 2022-12-31 04:31:26.892529262 +0000
@@ -303,10 +303,6 @@
return 0;
}

-/* GCC analyzer in 11.2 mishandles reallocarray/free */
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wanalyzer-mismatching-deallocation"
-
methods = reallocarray(NULL, n_strings, sizeof(*methods));
if (!methods) {
fprintf(stderr, "Could not set certificate compression methods: %s\n",
@@ -333,8 +329,6 @@
cleanup:
free(methods);

-#pragma GCC diagnostic pop
-
return ret;
}

@@ -1339,8 +1333,6 @@
logfile = file;
}

-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-y2k"
/* This is very similar to ctime() but it does not force a newline.
*/
char *simple_ctime(const time_t *t, char out[SIMPLE_CTIME_BUF_SIZE])
@@ -1359,4 +1351,3 @@
snprintf(out, SIMPLE_CTIME_BUF_SIZE, "[error]");
return out;
}
-#pragma GCC diagnostic pop
9 changes: 5 additions & 4 deletions cross/gsasl/Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
PKG_NAME = gsasl
PKG_VERS = 1.8.0
PKG_VERS = 2.2.0
PKG_EXT = tar.gz
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://ftp.gnu.org/gnu/gsasl/
PKG_DIST_SITE = https://ftp.gnu.org/gnu/gsasl
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

DEPENDS =
DEPENDS =

HOMEPAGE = https://www.gnu.org/software/gsasl/
COMMENT = GNU SASL an implementation of the Simple Authentication and Security Layer (SASL) framework.
COMMENT = GNU SASL is an implementation of the Simple Authentication and Security Layer (SASL) framework.
LICENSE = LGPL

GNU_CONFIGURE = 1
CONFIGURE_ARGS = --disable-static

include ../../mk/spksrc.cross-cc.mk
4 changes: 2 additions & 2 deletions cross/gsasl/PLIST
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bin:bin/gsasl
lnk:lib/libgsasl.so
lnk:lib/libgsasl.so.7
lib:lib/libgsasl.so.7.9.6
lnk:lib/libgsasl.so.18
lib:lib/libgsasl.so.18.0.0
6 changes: 3 additions & 3 deletions cross/gsasl/digests
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
gsasl-1.8.0.tar.gz SHA1 343fd97ae924dc406986c02fb9b889f4114239ae
gsasl-1.8.0.tar.gz SHA256 310262d1ded082d1ceefc52d6dad265c1decae8d84e12b5947d9b1dd193191e5
gsasl-1.8.0.tar.gz MD5 982fe54a20016aa46a871c084c990c36
gsasl-2.2.0.tar.gz SHA1 903b70ecb4eef304521add85310c2df0a7675bd1
gsasl-2.2.0.tar.gz SHA256 79b868e3b9976dc484d59b29ca0ae8897be96ce4d36d32aed5d935a7a3307759
gsasl-2.2.0.tar.gz MD5 cbebbb80961439e5218bc9d6f01f2a75
17 changes: 17 additions & 0 deletions cross/gss/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
PKG_NAME = gss
PKG_VERS = 1.0.4
PKG_EXT = tar.gz
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://ftp.gnu.org/gnu/gss
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

DEPENDS =

HOMEPAGE = https://www.gnu.org/software/gss/
COMMENT = GNU Generic Security Service (GSS), a free implementation of RFC 2743/2744.
LICENSE = LGPL

GNU_CONFIGURE = 1
CONFIGURE_ARGS = --disable-static

include ../../mk/spksrc.cross-cc.mk
3 changes: 3 additions & 0 deletions cross/gss/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
lnk:lib/libgss.so
lnk:lib/libgss.so.3
lib:lib/libgss.so.3.0.3
3 changes: 3 additions & 0 deletions cross/gss/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
gss-1.0.4.tar.gz SHA1 d53fc821d2ef6fd783e24395a2c32edd5370af52
gss-1.0.4.tar.gz SHA256 ecceabdef4cae3fce7218b2ecb83eb4227dba44b53b61b8c2b2e88ae02419c73
gss-1.0.4.tar.gz MD5 2906b202fd5d955767a1f136006615f5
13 changes: 13 additions & 0 deletions cross/gss/patches/001-fix-generation-of-stdint.h.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# without GNULIBHEADERS_OVERRIDE_WINT_T = 0 the generated stdint.h
# contains invalid #if
#
--- src/gl/Makefile.in.orig 2022-08-06 13:19:46.000000000 +0000
+++ src/gl/Makefile.in 2022-12-30 20:30:01.896373187 +0000
@@ -1002,6 +1002,7 @@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
+GNULIBHEADERS_OVERRIDE_WINT_T = 0
GREP = @GREP@
GTKDOC_CHECK = @GTKDOC_CHECK@
GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@
20 changes: 20 additions & 0 deletions cross/libidn2/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
PKG_NAME = libidn2
PKG_VERS = 2.3.4
PKG_EXT = tar.gz
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://ftp.gnu.org/gnu/libidn
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

DEPENDS = cross/libunistring

HOMEPAGE = https://www.gnu.org/software/libidn/#libidn2
COMMENT = Libidn2 is a free software implementation of IDNA2008, Punycode and Unicode TR46. Its purpose is to encode and decode internationalized domain names.
LICENSE = The installed C library libidn2 is dual-licensed under LGPLv3+|GPLv2+, while the rest of the package is GPLv3+

GNU_CONFIGURE = 1

CONFIGURE_ARGS = --disable-static
CONFIGURE_ARGS += --disable-doc
ADDITIONAL_CFLAGS = -O2

include ../../mk/spksrc.cross-cc.mk
3 changes: 3 additions & 0 deletions cross/libidn2/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
lnk:lib/libidn2.so
lnk:lib/libidn2.so.0
lib:lib/libidn2.so.0.3.8
3 changes: 3 additions & 0 deletions cross/libidn2/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
libidn2-2.3.4.tar.gz SHA1 096e2f170fabdfd7011a1848a43e0fca49e3f2e5
libidn2-2.3.4.tar.gz SHA256 93caba72b4e051d1f8d4f5a076ab63c99b77faee019b72b9783b267986dbb45f
libidn2-2.3.4.tar.gz MD5 a12109804fc9c5d7fb31f068c66655b8
14 changes: 14 additions & 0 deletions cross/libpsl/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
PKG_NAME = libpsl
PKG_VERS = 0.21.2
PKG_EXT = tar.lz
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/rockdaboot/libpsl/releases/download/$(PKG_VERS)
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

DEPENDS = cross/libidn2

HOMEPAGE = https://github.com/rockdaboot/libpsl
COMMENT = C library for the Public Suffix List.
LICENSE = MIT

include ../../mk/spksrc.cross-meson.mk
3 changes: 3 additions & 0 deletions cross/libpsl/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
lnk:lib/libpsl.so
lnk:lib/libpsl.so.5
lib:lib/libpsl.so.5.3.4
3 changes: 3 additions & 0 deletions cross/libpsl/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
libpsl-0.21.2.tar.lz SHA1 c26471efee1ca3299d341db864c99e380c2ee423
libpsl-0.21.2.tar.lz SHA256 aa3d706c452786d1345e094dae201cd36d81f03cf81d636d5cfc10d365907f17
libpsl-0.21.2.tar.lz MD5 074379959be1bfe5355db6c331f10829
11 changes: 7 additions & 4 deletions cross/libunistring/Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
PKG_NAME = libunistring
PKG_VERS = 0.9.10
PKG_EXT = tar.gz
PKG_VERS = 1.1
PKG_EXT = tar.xz
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://ftp.gnu.org/gnu/$(PKG_NAME)
PKG_DIST_SITE = https://ftp.gnu.org/gnu/libunistring
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

DEPENDS =

HOMEPAGE = https://www.gnu.org/software/libunistring/
COMMENT = This library provides functions for manipulating Unicode strings and for manipulating C strings according to the Unicode standard
COMMENT = This library provides functions for manipulating Unicode strings and for manipulating C strings according to the Unicode standard.
LICENSE = LGPLv3

GNU_CONFIGURE = 1

CONFIGURE_ARGS = --disable-static
ADDITIONAL_CFLAGS = -O2

include ../../mk/spksrc.cross-cc.mk
4 changes: 2 additions & 2 deletions cross/libunistring/PLIST
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
lnk:lib/libunistring.so
lnk:lib/libunistring.so.2
lib:lib/libunistring.so.2.1.0
lnk:lib/libunistring.so.5
lib:lib/libunistring.so.5.0.0
6 changes: 3 additions & 3 deletions cross/libunistring/digests
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
libunistring-0.9.10.tar.gz SHA1 1e7493a3ad8c4a1e514600b768c7229576fe5125
libunistring-0.9.10.tar.gz SHA256 a82e5b333339a88ea4608e4635479a1cfb2e01aafb925e1290b65710d43f610b
libunistring-0.9.10.tar.gz MD5 0d3274e9838396b12200f8b54ddaf43b
libunistring-1.1.tar.xz SHA1 89ee408ce7b4c36321721fc41c5c90f63edb8076
libunistring-1.1.tar.xz SHA256 827c1eb9cb6e7c738b171745dac0888aa58c5924df2e59239318383de0729b98
libunistring-1.1.tar.xz MD5 0dfba19989ae06b8e7a49a7cd18472a1
13 changes: 7 additions & 6 deletions cross/mbedtls/Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
PKG_NAME = mbedtls
PKG_VERS = 2.28.0
PKG_VERS = 2.28.2
PKG_EXT = tar.gz
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/ARMmbed/mbedtls/archive
PKG_DIR = $(PKG_NAME)-$(PKG_NAME)-$(PKG_VERS)

DEPENDS =
DEPENDS = cross/zlib

HOMEPAGE = https://tls.mbed.org
COMMENT = mbed TLS (formerly known as PolarSSL) makes it trivially easy for developers to include cryptographic and SSL/TLS capabilities in their (embedded) products, facilitating this functionality with a minimal coding footprint.
HOMEPAGE = https://www.trustedfirmware.org/projects/mbed-tls/
COMMENT = A C library implementing cryptographic primitives, X.509 certificate manipulation and the SSL/TLS and DTLS protocols. Its small code footprint makes it suitable for embedded systems.
LICENSE = Apache 2.0

CMAKE_ARGS = -DUSE_SHARED_MBEDTLS_LIBRARY=On
CMAKE_ARGS = -DENABLE_ZLIB_SUPPORT=On
CMAKE_ARGS += -DUSE_SHARED_MBEDTLS_LIBRARY=On
CMAKE_ARGS += -DENABLE_TESTING=Off
CMAKE_ARGS += -DENABLE_PROGRAMS=Off

include ../../mk/spksrc.cross-cmake.mk

# Flags to be added to CMake toolchain file
ifeq ($(call version_lt, ${TC_GCC}, 5),1)
ifeq ($(call version_lt, ${TC_GCC}, 5)$(call version_ge, ${TC_GCC}, 3),11)
ADDITIONAL_CFLAGS += -std=gnu99
endif
6 changes: 3 additions & 3 deletions cross/mbedtls/PLIST
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
lnk:lib/libmbedcrypto.so
lib:lib/libmbedcrypto.so.2.28.0
lib:lib/libmbedcrypto.so.2.28.2
lnk:lib/libmbedcrypto.so.7
lnk:lib/libmbedtls.so
lnk:lib/libmbedtls.so.14
lib:lib/libmbedtls.so.2.28.0
lib:lib/libmbedtls.so.2.28.2
lnk:lib/libmbedx509.so
lib:lib/libmbedx509.so.1
lib:lib/libmbedx509.so.2.28.0
lib:lib/libmbedx509.so.2.28.2
Loading