blob: dece0babb2fe5cfbf0b33e8b0389cf179afe221b [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
Patrick Williams213cb262021-08-07 19:21:33 -050016SRC_URI[sha256sum] = "98530b317dc95ccb324bbe4f834f07bb642fbc393b794ddf3434f246a71ea44a"
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
Andrew Geisslerc926e172021-05-07 16:11:35 -050023PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} ssl libidn proxy threaded-resolver verbose zlib"
Patrick Williams213cb262021-08-07 19:21:33 -050024PACKAGECONFIG:class-native = "ipv6 proxy ssl threaded-resolver verbose zlib"
25PACKAGECONFIG:class-nativesdk = "ipv6 proxy ssl threaded-resolver verbose zlib"
Andrew Geissler82c905d2020-04-13 13:39:40 -050026
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,"
Andrew Geisslerc926e172021-05-07 16:11:35 -050039PACKAGECONFIG[libgsasl] = "--with-libgsasl,--without-libgsasl,libgsasl"
Andrew Geissler82c905d2020-04-13 13:39:40 -050040PACKAGECONFIG[libidn] = "--with-libidn2,--without-libidn2,libidn2"
41PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2"
42PACKAGECONFIG[mbedtls] = "--with-mbedtls=${STAGING_DIR_TARGET},--without-mbedtls,mbedtls"
Andrew Geissler4b740dc2020-05-05 08:54:39 -050043PACKAGECONFIG[mqtt] = "--enable-mqtt,--disable-mqtt,"
Andrew Geissler82c905d2020-04-13 13:39:40 -050044PACKAGECONFIG[nghttp2] = "--with-nghttp2,--without-nghttp2,nghttp2"
45PACKAGECONFIG[pop3] = "--enable-pop3,--disable-pop3,"
46PACKAGECONFIG[proxy] = "--enable-proxy,--disable-proxy,"
47PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump"
48PACKAGECONFIG[rtsp] = "--enable-rtsp,--disable-rtsp,"
49PACKAGECONFIG[smb] = "--enable-smb,--disable-smb,"
50PACKAGECONFIG[smtp] = "--enable-smtp,--disable-smtp,"
51PACKAGECONFIG[ssl] = "--with-ssl --with-random=/dev/urandom,--without-ssl,openssl"
52PACKAGECONFIG[nss] = "--with-nss,--without-nss,nss"
53PACKAGECONFIG[telnet] = "--enable-telnet,--disable-telnet,"
54PACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp,"
55PACKAGECONFIG[threaded-resolver] = "--enable-threaded-resolver,--disable-threaded-resolver,,,,ares"
56PACKAGECONFIG[verbose] = "--enable-verbose,--disable-verbose"
57PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib"
58
59EXTRA_OECONF = " \
60 --disable-libcurl-option \
61 --disable-ntlm-wb \
62 --enable-crypto-auth \
63 --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
Andrew Geissler82c905d2020-04-13 13:39:40 -050064 --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
Patrick Williams213cb262021-08-07 19:21:33 -050070do_install:append:class-target() {
Andrew Geissler82c905d2020-04-13 13:39:40 -050071 # 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' \
Patrick Williams0ca19cc2021-08-16 14:03:13 -050076 -e 's|${@" ".join(d.getVar("DEBUG_PREFIX_MAP").split())}||g' \
Andrew Geissler82c905d2020-04-13 13:39:40 -050077 ${D}${bindir}/curl-config
78}
79
80PACKAGES =+ "lib${BPN}"
81
Patrick Williams213cb262021-08-07 19:21:33 -050082FILES:lib${BPN} = "${libdir}/lib*.so.*"
83RRECOMMENDS:lib${BPN} += "ca-certificates"
Andrew Geissler82c905d2020-04-13 13:39:40 -050084
Patrick Williams213cb262021-08-07 19:21:33 -050085FILES:${PN} += "${datadir}/zsh"
Andrew Geissler82c905d2020-04-13 13:39:40 -050086
87inherit multilib_script
88MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/curl-config"
89
90BBCLASSEXTEND = "native nativesdk"