diff options
Diffstat (limited to 'meta/recipes-support/curl')
7 files changed, 291 insertions, 129 deletions
diff --git a/meta/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch b/meta/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch deleted file mode 100644 index a7db1b3c9e..0000000000 --- a/meta/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | From ed70f0623708b8a6c1f58a5d243d87c5ff45b24d Mon Sep 17 00:00:00 2001 | ||
2 | From: Roy Li <rongqing.li@windriver.com> | ||
3 | Date: Tue, 26 Apr 2016 13:13:01 +0800 | ||
4 | Subject: [PATCH] replace krb5-config with pkg-config | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
9 | |||
10 | --- | ||
11 | configure.ac | 6 +++--- | ||
12 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
13 | |||
14 | diff --git a/configure.ac b/configure.ac | ||
15 | index 5569a26..56b0380 100755 | ||
16 | --- a/configure.ac | ||
17 | +++ b/configure.ac | ||
18 | @@ -1290,7 +1290,7 @@ AC_ARG_WITH(gssapi, | ||
19 | fi | ||
20 | ]) | ||
21 | |||
22 | -: ${KRB5CONFIG:="$GSSAPI_ROOT/bin/krb5-config"} | ||
23 | +KRB5CONFIG=`which pkg-config` | ||
24 | |||
25 | save_CPPFLAGS="$CPPFLAGS" | ||
26 | AC_MSG_CHECKING([if GSS-API support is requested]) | ||
27 | @@ -1301,7 +1301,7 @@ if test x"$want_gss" = xyes; then | ||
28 | if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then | ||
29 | GSSAPI_INCS=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --cflags gssapi` | ||
30 | elif test -f "$KRB5CONFIG"; then | ||
31 | - GSSAPI_INCS=`$KRB5CONFIG --cflags gssapi` | ||
32 | + GSSAPI_INCS=`$KRB5CONFIG --cflags mit-krb5-gssapi` | ||
33 | elif test "$GSSAPI_ROOT" != "yes"; then | ||
34 | GSSAPI_INCS="-I$GSSAPI_ROOT/include" | ||
35 | fi | ||
36 | @@ -1394,7 +1394,7 @@ if test x"$want_gss" = xyes; then | ||
37 | elif test -f "$KRB5CONFIG"; then | ||
38 | dnl krb5-config doesn't have --libs-only-L or similar, put everything | ||
39 | dnl into LIBS | ||
40 | - gss_libs=`$KRB5CONFIG --libs gssapi` | ||
41 | + gss_libs=`$KRB5CONFIG --libs mit-krb5-gssapi` | ||
42 | LIBS="$gss_libs $LIBS" | ||
43 | else | ||
44 | case $host in | ||
diff --git a/meta/recipes-support/curl/curl/721941aadf4adf4f6aeb3f4c0ab489bb89610c36.patch b/meta/recipes-support/curl/curl/721941aadf4adf4f6aeb3f4c0ab489bb89610c36.patch new file mode 100644 index 0000000000..98f7db93e8 --- /dev/null +++ b/meta/recipes-support/curl/curl/721941aadf4adf4f6aeb3f4c0ab489bb89610c36.patch | |||
@@ -0,0 +1,64 @@ | |||
1 | From 721941aadf4adf4f6aeb3f4c0ab489bb89610c36 Mon Sep 17 00:00:00 2001 | ||
2 | From: Stefan Eissing <stefan@eissing.org> | ||
3 | Date: Mon, 1 Apr 2024 15:41:18 +0200 | ||
4 | Subject: [PATCH] http: with chunked POST forced, disable length check on read | ||
5 | callback | ||
6 | |||
7 | - when an application forces HTTP/1.1 chunked transfer encoding | ||
8 | by setting the corresponding header and instructs curl to use | ||
9 | the CURLOPT_READFUNCTION, disregard any POST length information. | ||
10 | - this establishes backward compatibility with previous curl versions | ||
11 | |||
12 | Applications are encouraged to not force "chunked", but rather | ||
13 | set length information for a POST. By setting -1, curl will | ||
14 | auto-select chunked on HTTP/1.1 and work properly on other HTTP | ||
15 | versions. | ||
16 | |||
17 | Reported-by: Jeff King | ||
18 | Fixes #13229 | ||
19 | Closes #13257 | ||
20 | Upstream-Status: Backport | ||
21 | --- | ||
22 | lib/http.c | 22 ++++++++++++++++++++-- | ||
23 | 1 file changed, 20 insertions(+), 2 deletions(-) | ||
24 | |||
25 | diff --git a/lib/http.c b/lib/http.c | ||
26 | index 92c04e69cd8373..a764d3c4403c39 100644 | ||
27 | --- a/lib/http.c | ||
28 | +++ b/lib/http.c | ||
29 | @@ -2046,8 +2046,19 @@ static CURLcode set_reader(struct Curl_easy *data, Curl_HttpReq httpreq) | ||
30 | else | ||
31 | result = Curl_creader_set_null(data); | ||
32 | } | ||
33 | - else { /* we read the bytes from the callback */ | ||
34 | - result = Curl_creader_set_fread(data, postsize); | ||
35 | + else { | ||
36 | + /* we read the bytes from the callback. In case "chunked" encoding | ||
37 | + * is forced by the application, we disregard `postsize`. This is | ||
38 | + * a backward compatibility decision to earlier versions where | ||
39 | + * chunking disregarded this. See issue #13229. */ | ||
40 | + bool chunked = FALSE; | ||
41 | + char *ptr = Curl_checkheaders(data, STRCONST("Transfer-Encoding")); | ||
42 | + if(ptr) { | ||
43 | + /* Some kind of TE is requested, check if 'chunked' is chosen */ | ||
44 | + chunked = Curl_compareheader(ptr, STRCONST("Transfer-Encoding:"), | ||
45 | + STRCONST("chunked")); | ||
46 | + } | ||
47 | + result = Curl_creader_set_fread(data, chunked? -1 : postsize); | ||
48 | } | ||
49 | return result; | ||
50 | |||
51 | @@ -2115,6 +2126,13 @@ CURLcode Curl_http_req_set_reader(struct Curl_easy *data, | ||
52 | data->req.upload_chunky = | ||
53 | Curl_compareheader(ptr, | ||
54 | STRCONST("Transfer-Encoding:"), STRCONST("chunked")); | ||
55 | + if(data->req.upload_chunky && | ||
56 | + Curl_use_http_1_1plus(data, data->conn) && | ||
57 | + (data->conn->httpversion >= 20)) { | ||
58 | + infof(data, "suppressing chunked transfer encoding on connection " | ||
59 | + "using HTTP version 2 or higher"); | ||
60 | + data->req.upload_chunky = FALSE; | ||
61 | + } | ||
62 | } | ||
63 | else { | ||
64 | curl_off_t req_clen = Curl_creader_total_length(data); | ||
diff --git a/meta/recipes-support/curl/curl/disable-tests b/meta/recipes-support/curl/curl/disable-tests new file mode 100644 index 0000000000..259576fd01 --- /dev/null +++ b/meta/recipes-support/curl/curl/disable-tests | |||
@@ -0,0 +1,41 @@ | |||
1 | # Intermittently fails e.g. https://autobuilder.yocto.io/pub/non-release/20231220-28/testresults/qemux86-64-ptest/curl.log | ||
2 | # https://autobuilder.yocto.io/pub/non-release/20231220-27/testresults/qemux86-64-ptest/curl.log | ||
3 | 337 | ||
4 | # These CRL test (alt-avc) are failing | ||
5 | 356 | ||
6 | 412 | ||
7 | 413 | ||
8 | # These CRL tests are scanning docs | ||
9 | 971 | ||
10 | # Intermittently hangs e.g http://autobuilder.yocto.io/pub/non-release/20231228-18/testresults/qemux86-64-ptest/curl.log | ||
11 | 1091 | ||
12 | # Intermittently hangs e.g https://autobuilder.yocto.io/pub/non-release/20231220-27/testresults/qemux86-64-ptest/curl.log | ||
13 | 1096 | ||
14 | # These CRL tests are scanning docs | ||
15 | 1119 | ||
16 | 1132 | ||
17 | 1135 | ||
18 | 1478 | ||
19 | # These CRL tests are scanning headers | ||
20 | 1167 | ||
21 | 1477 | ||
22 | # These CRL tests are scanning man pages | ||
23 | 1139 | ||
24 | 1140 | ||
25 | 1173 | ||
26 | 1177 | ||
27 | # This CRL test is looking for m4 files | ||
28 | 1165 | ||
29 | # This CRL test is looking for src files | ||
30 | 1185 | ||
31 | # This test is scanning the source tree | ||
32 | 1222 | ||
33 | # These CRL tests need --libcurl option to be enabled | ||
34 | 1279 | ||
35 | 1400 | ||
36 | 1401 | ||
37 | 1402 | ||
38 | 1403 | ||
39 | 1404 | ||
40 | 1405 | ||
41 | 1465 | ||
diff --git a/meta/recipes-support/curl/curl/no-test-timeout.patch b/meta/recipes-support/curl/curl/no-test-timeout.patch new file mode 100644 index 0000000000..7122b6f043 --- /dev/null +++ b/meta/recipes-support/curl/curl/no-test-timeout.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | From 42cddb52e821cfc2f09f1974742714e5f2f1856e Mon Sep 17 00:00:00 2001 | ||
2 | From: Ross Burton <ross.burton@arm.com> | ||
3 | Date: Fri, 15 Mar 2024 14:37:37 +0000 | ||
4 | Subject: [PATCH] Set the max-time timeout to 600 so the timeout is 10 minutes | ||
5 | instead of 13 seconds. | ||
6 | |||
7 | Upstream-Status: Inappropriate | ||
8 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
9 | --- | ||
10 | tests/servers.pm | 2 +- | ||
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/tests/servers.pm b/tests/servers.pm | ||
14 | index d4472d5..9999938 100644 | ||
15 | --- a/tests/servers.pm | ||
16 | +++ b/tests/servers.pm | ||
17 | @@ -120,7 +120,7 @@ my $sshdverstr; # for socks server, ssh daemon version string | ||
18 | my $sshderror; # for socks server, ssh daemon version error | ||
19 | my %doesntrun; # servers that don't work, identified by pidfile | ||
20 | my %PORT = (nolisten => 47); # port we use for a local non-listening service | ||
21 | -my $server_response_maxtime=13; | ||
22 | +my $server_response_maxtime=600; | ||
23 | my $httptlssrv = find_httptlssrv(); | ||
24 | my %run; # running server | ||
25 | my %runcert; # cert file currently in use by an ssl running server | ||
diff --git a/meta/recipes-support/curl/curl/run-ptest b/meta/recipes-support/curl/curl/run-ptest new file mode 100644 index 0000000000..3d25f3d90b --- /dev/null +++ b/meta/recipes-support/curl/curl/run-ptest | |||
@@ -0,0 +1,11 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | cd tests | ||
4 | |||
5 | # Run all tests, don't stop on first failure | ||
6 | # Don't use valgrind if it is found | ||
7 | # Use automake-style output | ||
8 | # Run four tests in parallel | ||
9 | # Print log output on failure | ||
10 | # Don't run the flaky or timing dependent tests | ||
11 | ./runtests.pl -a -n -am -j4 -p !flaky !timing-dependent | ||
diff --git a/meta/recipes-support/curl/curl_7.75.0.bb b/meta/recipes-support/curl/curl_7.75.0.bb deleted file mode 100644 index 5bbc56085a..0000000000 --- a/meta/recipes-support/curl/curl_7.75.0.bb +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | SUMMARY = "Command line tool and library for client-side URL transfers" | ||
2 | HOMEPAGE = "http://curl.haxx.se/" | ||
3 | BUGTRACKER = "http://curl.haxx.se/mail/list.cgi?list=curl-tracker" | ||
4 | SECTION = "console/network" | ||
5 | LICENSE = "MIT" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=425f6fdc767cc067518eef9bbdf4ab7b" | ||
7 | |||
8 | SRC_URI = "https://curl.haxx.se/download/curl-${PV}.tar.bz2 \ | ||
9 | file://0001-replace-krb5-config-with-pkg-config.patch \ | ||
10 | " | ||
11 | |||
12 | SRC_URI[sha256sum] = "50552d4501c178e4cc68baaecc487f466a3d6d19bbf4e50a01869effb316d026" | ||
13 | |||
14 | # Curl has used many names over the years... | ||
15 | CVE_PRODUCT = "haxx:curl haxx:libcurl curl:curl curl:libcurl libcurl:libcurl daniel_stenberg:curl" | ||
16 | |||
17 | inherit autotools pkgconfig binconfig multilib_header | ||
18 | |||
19 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} gnutls libidn proxy threaded-resolver verbose zlib" | ||
20 | PACKAGECONFIG_class-native = "ipv6 proxy ssl threaded-resolver verbose zlib" | ||
21 | PACKAGECONFIG_class-nativesdk = "ipv6 proxy ssl threaded-resolver verbose zlib" | ||
22 | |||
23 | # 'ares' and 'threaded-resolver' are mutually exclusive | ||
24 | PACKAGECONFIG[ares] = "--enable-ares,--disable-ares,c-ares,,,threaded-resolver" | ||
25 | PACKAGECONFIG[brotli] = "--with-brotli,--without-brotli,brotli" | ||
26 | PACKAGECONFIG[builtinmanual] = "--enable-manual,--disable-manual" | ||
27 | PACKAGECONFIG[dict] = "--enable-dict,--disable-dict," | ||
28 | PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls" | ||
29 | PACKAGECONFIG[gopher] = "--enable-gopher,--disable-gopher," | ||
30 | PACKAGECONFIG[imap] = "--enable-imap,--disable-imap," | ||
31 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," | ||
32 | PACKAGECONFIG[krb5] = "--with-gssapi,--without-gssapi,krb5" | ||
33 | PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap," | ||
34 | PACKAGECONFIG[ldaps] = "--enable-ldaps,--disable-ldaps," | ||
35 | PACKAGECONFIG[libidn] = "--with-libidn2,--without-libidn2,libidn2" | ||
36 | PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2" | ||
37 | PACKAGECONFIG[mbedtls] = "--with-mbedtls=${STAGING_DIR_TARGET},--without-mbedtls,mbedtls" | ||
38 | PACKAGECONFIG[mqtt] = "--enable-mqtt,--disable-mqtt," | ||
39 | PACKAGECONFIG[nghttp2] = "--with-nghttp2,--without-nghttp2,nghttp2" | ||
40 | PACKAGECONFIG[pop3] = "--enable-pop3,--disable-pop3," | ||
41 | PACKAGECONFIG[proxy] = "--enable-proxy,--disable-proxy," | ||
42 | PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump" | ||
43 | PACKAGECONFIG[rtsp] = "--enable-rtsp,--disable-rtsp," | ||
44 | PACKAGECONFIG[smb] = "--enable-smb,--disable-smb," | ||
45 | PACKAGECONFIG[smtp] = "--enable-smtp,--disable-smtp," | ||
46 | PACKAGECONFIG[ssl] = "--with-ssl --with-random=/dev/urandom,--without-ssl,openssl" | ||
47 | PACKAGECONFIG[nss] = "--with-nss,--without-nss,nss" | ||
48 | PACKAGECONFIG[telnet] = "--enable-telnet,--disable-telnet," | ||
49 | PACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp," | ||
50 | PACKAGECONFIG[threaded-resolver] = "--enable-threaded-resolver,--disable-threaded-resolver,,,,ares" | ||
51 | PACKAGECONFIG[verbose] = "--enable-verbose,--disable-verbose" | ||
52 | PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib" | ||
53 | |||
54 | EXTRA_OECONF = " \ | ||
55 | --disable-libcurl-option \ | ||
56 | --disable-ntlm-wb \ | ||
57 | --enable-crypto-auth \ | ||
58 | --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \ | ||
59 | --without-libmetalink \ | ||
60 | --without-libpsl \ | ||
61 | --enable-debug \ | ||
62 | --enable-optimize \ | ||
63 | --disable-curldebug \ | ||
64 | " | ||
65 | |||
66 | do_install_append_class-target() { | ||
67 | # cleanup buildpaths from curl-config | ||
68 | sed -i \ | ||
69 | -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ | ||
70 | -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \ | ||
71 | -e 's|${DEBUG_PREFIX_MAP}||g' \ | ||
72 | ${D}${bindir}/curl-config | ||
73 | } | ||
74 | |||
75 | PACKAGES =+ "lib${BPN}" | ||
76 | |||
77 | FILES_lib${BPN} = "${libdir}/lib*.so.*" | ||
78 | RRECOMMENDS_lib${BPN} += "ca-certificates" | ||
79 | |||
80 | FILES_${PN} += "${datadir}/zsh" | ||
81 | |||
82 | inherit multilib_script | ||
83 | MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/curl-config" | ||
84 | |||
85 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta/recipes-support/curl/curl_8.7.1.bb b/meta/recipes-support/curl/curl_8.7.1.bb new file mode 100644 index 0000000000..c74416d7e9 --- /dev/null +++ b/meta/recipes-support/curl/curl_8.7.1.bb | |||
@@ -0,0 +1,150 @@ | |||
1 | SUMMARY = "Command line tool and library for client-side URL transfers" | ||
2 | DESCRIPTION = "It uses URL syntax to transfer data to and from servers. \ | ||
3 | curl is a widely used because of its ability to be flexible and complete \ | ||
4 | complex tasks. For example, you can use curl for things like user authentication, \ | ||
5 | HTTP post, SSL connections, proxy support, FTP uploads, and more!" | ||
6 | HOMEPAGE = "https://curl.se/" | ||
7 | BUGTRACKER = "https://github.com/curl/curl/issues" | ||
8 | SECTION = "console/network" | ||
9 | LICENSE = "curl" | ||
10 | LIC_FILES_CHKSUM = "file://COPYING;md5=eed2e5088e1ac619c9a1c747da291d75" | ||
11 | |||
12 | SRC_URI = " \ | ||
13 | https://curl.se/download/${BP}.tar.xz \ | ||
14 | file://721941aadf4adf4f6aeb3f4c0ab489bb89610c36.patch \ | ||
15 | file://run-ptest \ | ||
16 | file://disable-tests \ | ||
17 | file://no-test-timeout.patch \ | ||
18 | " | ||
19 | SRC_URI[sha256sum] = "6fea2aac6a4610fbd0400afb0bcddbe7258a64c63f1f68e5855ebc0c659710cd" | ||
20 | |||
21 | # Curl has used many names over the years... | ||
22 | CVE_PRODUCT = "haxx:curl haxx:libcurl curl:curl curl:libcurl libcurl:libcurl daniel_stenberg:curl" | ||
23 | |||
24 | inherit autotools pkgconfig binconfig multilib_header ptest | ||
25 | |||
26 | # Entropy source for random PACKAGECONFIG option | ||
27 | RANDOM ?= "/dev/urandom" | ||
28 | |||
29 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} aws basic-auth bearer-auth digest-auth negotiate-auth libidn openssl proxy random threaded-resolver verbose zlib" | ||
30 | PACKAGECONFIG:class-native = "ipv6 openssl proxy random threaded-resolver verbose zlib" | ||
31 | PACKAGECONFIG:class-nativesdk = "ipv6 openssl proxy random threaded-resolver verbose zlib" | ||
32 | |||
33 | # 'ares' and 'threaded-resolver' are mutually exclusive | ||
34 | PACKAGECONFIG[ares] = "--enable-ares,--disable-ares,c-ares,,,threaded-resolver" | ||
35 | PACKAGECONFIG[aws] = "--enable-aws,--disable-aws" | ||
36 | PACKAGECONFIG[basic-auth] = "--enable-basic-auth,--disable-basic-auth" | ||
37 | PACKAGECONFIG[bearer-auth] = "--enable-bearer-auth,--disable-bearer-auth" | ||
38 | PACKAGECONFIG[brotli] = "--with-brotli,--without-brotli,brotli" | ||
39 | PACKAGECONFIG[builtinmanual] = "--enable-manual,--disable-manual" | ||
40 | # Don't use this in production | ||
41 | PACKAGECONFIG[debug] = "--enable-debug,--disable-debug" | ||
42 | PACKAGECONFIG[dict] = "--enable-dict,--disable-dict," | ||
43 | PACKAGECONFIG[digest-auth] = "--enable-digest-auth,--disable-digest-auth" | ||
44 | PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls" | ||
45 | PACKAGECONFIG[gopher] = "--enable-gopher,--disable-gopher," | ||
46 | PACKAGECONFIG[imap] = "--enable-imap,--disable-imap," | ||
47 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," | ||
48 | PACKAGECONFIG[kerberos-auth] = "--enable-kerberos-auth,--disable-kerberos-auth" | ||
49 | PACKAGECONFIG[krb5] = "--with-gssapi,--without-gssapi,krb5" | ||
50 | PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,openldap" | ||
51 | PACKAGECONFIG[ldaps] = "--enable-ldaps,--disable-ldaps,openldap" | ||
52 | PACKAGECONFIG[libgsasl] = "--with-libgsasl,--without-libgsasl,libgsasl" | ||
53 | PACKAGECONFIG[libidn] = "--with-libidn2,--without-libidn2,libidn2" | ||
54 | PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2" | ||
55 | PACKAGECONFIG[mbedtls] = "--with-mbedtls=${STAGING_DIR_TARGET},--without-mbedtls,mbedtls" | ||
56 | PACKAGECONFIG[mqtt] = "--enable-mqtt,--disable-mqtt," | ||
57 | PACKAGECONFIG[negotiate-auth] = "--enable-negotiate-auth,--disable-negotiate-auth" | ||
58 | PACKAGECONFIG[nghttp2] = "--with-nghttp2,--without-nghttp2,nghttp2" | ||
59 | PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl" | ||
60 | PACKAGECONFIG[pop3] = "--enable-pop3,--disable-pop3," | ||
61 | PACKAGECONFIG[proxy] = "--enable-proxy,--disable-proxy," | ||
62 | PACKAGECONFIG[random] = "--with-random=${RANDOM},--without-random" | ||
63 | PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump" | ||
64 | PACKAGECONFIG[rtsp] = "--enable-rtsp,--disable-rtsp," | ||
65 | PACKAGECONFIG[smb] = "--enable-smb,--disable-smb," | ||
66 | PACKAGECONFIG[smtp] = "--enable-smtp,--disable-smtp," | ||
67 | PACKAGECONFIG[telnet] = "--enable-telnet,--disable-telnet," | ||
68 | PACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp," | ||
69 | PACKAGECONFIG[threaded-resolver] = "--enable-threaded-resolver,--disable-threaded-resolver,,,,ares" | ||
70 | PACKAGECONFIG[verbose] = "--enable-verbose,--disable-verbose" | ||
71 | PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib" | ||
72 | PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd" | ||
73 | |||
74 | EXTRA_OECONF = " \ | ||
75 | --disable-libcurl-option \ | ||
76 | --disable-ntlm-wb \ | ||
77 | --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \ | ||
78 | --without-libpsl \ | ||
79 | --enable-optimize \ | ||
80 | ${@'--without-ssl' if (bb.utils.filter('PACKAGECONFIG', 'gnutls mbedtls openssl', d) == '') else ''} \ | ||
81 | " | ||
82 | |||
83 | fix_absolute_paths () { | ||
84 | # cleanup buildpaths from curl-config | ||
85 | sed -i \ | ||
86 | -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ | ||
87 | -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \ | ||
88 | -e 's|${DEBUG_PREFIX_MAP}||g' \ | ||
89 | -e 's|${@" ".join(d.getVar("DEBUG_PREFIX_MAP").split())}||g' \ | ||
90 | ${D}${bindir}/curl-config | ||
91 | } | ||
92 | |||
93 | do_install:append:class-target() { | ||
94 | fix_absolute_paths | ||
95 | } | ||
96 | |||
97 | do_install:append:class-nativesdk() { | ||
98 | fix_absolute_paths | ||
99 | } | ||
100 | |||
101 | do_compile_ptest() { | ||
102 | oe_runmake -C ${B}/tests | ||
103 | } | ||
104 | |||
105 | do_install_ptest() { | ||
106 | cat ${WORKDIR}/disable-tests >> ${S}/tests/data/DISABLED | ||
107 | rm -f ${B}/tests/configurehelp.pm | ||
108 | cp -rf ${B}/tests ${D}${PTEST_PATH} | ||
109 | rm -f ${D}${PTEST_PATH}/tests/libtest/.libs/libhostname.la | ||
110 | rm -f ${D}${PTEST_PATH}/tests/libtest/libhostname.la | ||
111 | mv ${D}${PTEST_PATH}/tests/libtest/.libs/* ${D}${PTEST_PATH}/tests/libtest/ | ||
112 | mv ${D}${PTEST_PATH}/tests/libtest/libhostname.so ${D}${PTEST_PATH}/tests/libtest/.libs/ | ||
113 | mv ${D}${PTEST_PATH}/tests/http/clients/.libs/* ${D}${PTEST_PATH}/tests/http/clients/ | ||
114 | cp -rf ${S}/tests ${D}${PTEST_PATH} | ||
115 | find ${D}${PTEST_PATH}/ -type f -name Makefile.am -o -name Makefile.in -o -name Makefile -delete | ||
116 | install -d ${D}${PTEST_PATH}/src | ||
117 | ln -sf ${bindir}/curl ${D}${PTEST_PATH}/src/curl | ||
118 | cp -rf ${D}${bindir}/curl-config ${D}${PTEST_PATH} | ||
119 | } | ||
120 | |||
121 | RDEPENDS:${PN}-ptest += " \ | ||
122 | bash \ | ||
123 | perl-module-b \ | ||
124 | perl-module-base \ | ||
125 | perl-module-cwd \ | ||
126 | perl-module-digest \ | ||
127 | perl-module-digest-md5 \ | ||
128 | perl-module-file-basename \ | ||
129 | perl-module-file-spec \ | ||
130 | perl-module-file-temp \ | ||
131 | perl-module-io-socket \ | ||
132 | perl-module-ipc-open2 \ | ||
133 | perl-module-list-util \ | ||
134 | perl-module-memoize \ | ||
135 | perl-module-storable \ | ||
136 | perl-module-time-hires \ | ||
137 | " | ||
138 | RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-en-us" | ||
139 | |||
140 | PACKAGES =+ "lib${BPN}" | ||
141 | |||
142 | FILES:lib${BPN} = "${libdir}/lib*.so.*" | ||
143 | RRECOMMENDS:lib${BPN} += "ca-certificates" | ||
144 | |||
145 | FILES:${PN} += "${datadir}/zsh" | ||
146 | |||
147 | inherit multilib_script | ||
148 | MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/curl-config" | ||
149 | |||
150 | BBCLASSEXTEND = "native nativesdk" | ||