blob: 7666c7b6080ab670309a027feccb61430361ab52 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "Command line tool and library for client-side URL transfers"
Andrew Geissler90fd73c2021-03-05 15:25:55 -06002DESCRIPTION = "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!"
Andrew Geissler82c905d2020-04-13 13:39:40 -05006HOMEPAGE = "http://curl.haxx.se/"
7BUGTRACKER = "http://curl.haxx.se/mail/list.cgi?list=curl-tracker"
8SECTION = "console/network"
9LICENSE = "MIT"
Andrew Geissler9b4d8b02021-02-19 12:26:16 -060010LIC_FILES_CHKSUM = "file://COPYING;md5=425f6fdc767cc067518eef9bbdf4ab7b"
Andrew Geissler82c905d2020-04-13 13:39:40 -050011
Andrew Geisslerc3d88e42020-10-02 09:45:00 -050012SRC_URI = "https://curl.haxx.se/download/curl-${PV}.tar.bz2 \
Andrew Geissler82c905d2020-04-13 13:39:40 -050013 file://0001-replace-krb5-config-with-pkg-config.patch \
14"
15
Andrew Geissler9b4d8b02021-02-19 12:26:16 -060016SRC_URI[sha256sum] = "50552d4501c178e4cc68baaecc487f466a3d6d19bbf4e50a01869effb316d026"
Andrew Geissler82c905d2020-04-13 13:39:40 -050017
Andrew Geisslerc9f78652020-09-18 14:11:35 -050018# Curl has used many names over the years...
19CVE_PRODUCT = "haxx:curl haxx:libcurl curl:curl curl:libcurl libcurl:libcurl daniel_stenberg:curl"
20
Andrew Geissler82c905d2020-04-13 13:39:40 -050021inherit autotools pkgconfig binconfig multilib_header
22
23PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} gnutls libidn proxy threaded-resolver verbose zlib"
24PACKAGECONFIG_class-native = "ipv6 proxy ssl threaded-resolver verbose zlib"
25PACKAGECONFIG_class-nativesdk = "ipv6 proxy ssl 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[libidn] = "--with-libidn2,--without-libidn2,libidn2"
40PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2"
41PACKAGECONFIG[mbedtls] = "--with-mbedtls=${STAGING_DIR_TARGET},--without-mbedtls,mbedtls"
Andrew Geissler4b740dc2020-05-05 08:54:39 -050042PACKAGECONFIG[mqtt] = "--enable-mqtt,--disable-mqtt,"
Andrew Geissler82c905d2020-04-13 13:39:40 -050043PACKAGECONFIG[nghttp2] = "--with-nghttp2,--without-nghttp2,nghttp2"
44PACKAGECONFIG[pop3] = "--enable-pop3,--disable-pop3,"
45PACKAGECONFIG[proxy] = "--enable-proxy,--disable-proxy,"
46PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump"
47PACKAGECONFIG[rtsp] = "--enable-rtsp,--disable-rtsp,"
48PACKAGECONFIG[smb] = "--enable-smb,--disable-smb,"
49PACKAGECONFIG[smtp] = "--enable-smtp,--disable-smtp,"
50PACKAGECONFIG[ssl] = "--with-ssl --with-random=/dev/urandom,--without-ssl,openssl"
51PACKAGECONFIG[nss] = "--with-nss,--without-nss,nss"
52PACKAGECONFIG[telnet] = "--enable-telnet,--disable-telnet,"
53PACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp,"
54PACKAGECONFIG[threaded-resolver] = "--enable-threaded-resolver,--disable-threaded-resolver,,,,ares"
55PACKAGECONFIG[verbose] = "--enable-verbose,--disable-verbose"
56PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib"
57
58EXTRA_OECONF = " \
59 --disable-libcurl-option \
60 --disable-ntlm-wb \
61 --enable-crypto-auth \
62 --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
63 --without-libmetalink \
64 --without-libpsl \
Andrew Geisslerd25ed322020-06-27 00:28:28 -050065 --enable-debug \
66 --enable-optimize \
67 --disable-curldebug \
Andrew Geissler82c905d2020-04-13 13:39:40 -050068"
69
70do_install_append_class-target() {
71 # cleanup buildpaths from curl-config
72 sed -i \
73 -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
74 -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \
75 -e 's|${DEBUG_PREFIX_MAP}||g' \
76 ${D}${bindir}/curl-config
77}
78
79PACKAGES =+ "lib${BPN}"
80
81FILES_lib${BPN} = "${libdir}/lib*.so.*"
82RRECOMMENDS_lib${BPN} += "ca-certificates"
83
84FILES_${PN} += "${datadir}/zsh"
85
86inherit multilib_script
87MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/curl-config"
88
89BBCLASSEXTEND = "native nativesdk"