blob: 1d9de29a65e479ea5b1296066e06e98ee2f002f4 [file] [log] [blame]
Andrew Geissler9aee5002022-03-30 16:27:02 +00001SUMMARY = "Command line tool and library for client-side URL transfers"
2DESCRIPTION = "It uses URL syntax to transfer data to and from servers. \
3curl is a widely used because of its ability to be flexible and complete \
4complex tasks. For example, you can use curl for things like user authentication, \
5HTTP post, SSL connections, proxy support, FTP uploads, and more!"
6HOMEPAGE = "https://curl.se/"
7BUGTRACKER = "https://github.com/curl/curl/issues"
8SECTION = "console/network"
9LICENSE = "MIT-open-group"
10LIC_FILES_CHKSUM = "file://COPYING;md5=190c514872597083303371684954f238"
11
12SRC_URI = "https://curl.se/download/${BP}.tar.xz"
Andrew Geisslerd5838332022-05-27 11:33:10 -050013SRC_URI[sha256sum] = "2cb9c2356e7263a1272fd1435ef7cdebf2cd21400ec287b068396deb705c22c4"
Andrew Geissler9aee5002022-03-30 16:27:02 +000014
15# Curl has used many names over the years...
16CVE_PRODUCT = "haxx:curl haxx:libcurl curl:curl curl:libcurl libcurl:libcurl daniel_stenberg:curl"
17
18inherit autotools pkgconfig binconfig multilib_header
19
20# Entropy source for random PACKAGECONFIG option
21RANDOM ?= "/dev/urandom"
22
23PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} libidn openssl proxy random threaded-resolver verbose zlib"
24PACKAGECONFIG:class-native = "ipv6 openssl proxy random threaded-resolver verbose zlib"
25PACKAGECONFIG:class-nativesdk = "ipv6 openssl proxy random threaded-resolver verbose zlib"
26
27# 'ares' and 'threaded-resolver' are mutually exclusive
28PACKAGECONFIG[ares] = "--enable-ares,--disable-ares,c-ares,,,threaded-resolver"
29PACKAGECONFIG[brotli] = "--with-brotli,--without-brotli,brotli"
30PACKAGECONFIG[builtinmanual] = "--enable-manual,--disable-manual"
31PACKAGECONFIG[dict] = "--enable-dict,--disable-dict,"
32PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
33PACKAGECONFIG[gopher] = "--enable-gopher,--disable-gopher,"
34PACKAGECONFIG[imap] = "--enable-imap,--disable-imap,"
35PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
36PACKAGECONFIG[krb5] = "--with-gssapi,--without-gssapi,krb5"
37PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,"
38PACKAGECONFIG[ldaps] = "--enable-ldaps,--disable-ldaps,"
39PACKAGECONFIG[libgsasl] = "--with-libgsasl,--without-libgsasl,libgsasl"
40PACKAGECONFIG[libidn] = "--with-libidn2,--without-libidn2,libidn2"
41PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2"
42PACKAGECONFIG[mbedtls] = "--with-mbedtls=${STAGING_DIR_TARGET},--without-mbedtls,mbedtls"
43PACKAGECONFIG[mqtt] = "--enable-mqtt,--disable-mqtt,"
44PACKAGECONFIG[nghttp2] = "--with-nghttp2,--without-nghttp2,nghttp2"
45PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl"
46PACKAGECONFIG[pop3] = "--enable-pop3,--disable-pop3,"
47PACKAGECONFIG[proxy] = "--enable-proxy,--disable-proxy,"
48PACKAGECONFIG[random] = "--with-random=${RANDOM},--without-random"
49PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump"
50PACKAGECONFIG[rtsp] = "--enable-rtsp,--disable-rtsp,"
51PACKAGECONFIG[smb] = "--enable-smb,--disable-smb,"
52PACKAGECONFIG[smtp] = "--enable-smtp,--disable-smtp,"
53PACKAGECONFIG[nss] = "--with-nss,--without-nss,nss"
54PACKAGECONFIG[telnet] = "--enable-telnet,--disable-telnet,"
55PACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp,"
56PACKAGECONFIG[threaded-resolver] = "--enable-threaded-resolver,--disable-threaded-resolver,,,,ares"
57PACKAGECONFIG[verbose] = "--enable-verbose,--disable-verbose"
58PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib"
59PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd"
60
61EXTRA_OECONF = " \
62 --disable-libcurl-option \
63 --disable-ntlm-wb \
64 --enable-crypto-auth \
65 --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
66 --without-libpsl \
67 --enable-debug \
68 --enable-optimize \
69 --disable-curldebug \
70 ${@'--without-ssl' if (bb.utils.filter('PACKAGECONFIG', 'gnutls mbedtls nss openssl', d) == '') else ''} \
71"
72
73do_install:append:class-target() {
74 # cleanup buildpaths from curl-config
75 sed -i \
76 -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
77 -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \
78 -e 's|${DEBUG_PREFIX_MAP}||g' \
79 -e 's|${@" ".join(d.getVar("DEBUG_PREFIX_MAP").split())}||g' \
80 ${D}${bindir}/curl-config
81}
82
83PACKAGES =+ "lib${BPN}"
84
85FILES:lib${BPN} = "${libdir}/lib*.so.*"
86RRECOMMENDS:lib${BPN} += "ca-certificates"
87
88FILES:${PN} += "${datadir}/zsh"
89
90inherit multilib_script
91MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/curl-config"
92
93BBCLASSEXTEND = "native nativesdk"