1*4882a593SmuzhiyunSUMMARY = "Command line tool and library for client-side URL transfers" 2*4882a593SmuzhiyunDESCRIPTION = "It uses URL syntax to transfer data to and from servers. \ 3*4882a593Smuzhiyuncurl is a widely used because of its ability to be flexible and complete \ 4*4882a593Smuzhiyuncomplex tasks. For example, you can use curl for things like user authentication, \ 5*4882a593SmuzhiyunHTTP post, SSL connections, proxy support, FTP uploads, and more!" 6*4882a593SmuzhiyunHOMEPAGE = "https://curl.se/" 7*4882a593SmuzhiyunBUGTRACKER = "https://github.com/curl/curl/issues" 8*4882a593SmuzhiyunSECTION = "console/network" 9*4882a593SmuzhiyunLICENSE = "curl" 10*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://COPYING;md5=190c514872597083303371684954f238" 11*4882a593Smuzhiyun 12*4882a593SmuzhiyunSRC_URI = "https://curl.se/download/${BP}.tar.xz \ 13*4882a593Smuzhiyun file://CVE-2022-22576.patch \ 14*4882a593Smuzhiyun file://CVE-2022-27775.patch \ 15*4882a593Smuzhiyun file://CVE-2022-27776.patch \ 16*4882a593Smuzhiyun file://CVE-2022-27774-1.patch \ 17*4882a593Smuzhiyun file://CVE-2022-27774-2.patch \ 18*4882a593Smuzhiyun file://CVE-2022-27774-3.patch \ 19*4882a593Smuzhiyun file://CVE-2022-27774-4.patch \ 20*4882a593Smuzhiyun file://CVE-2022-30115.patch \ 21*4882a593Smuzhiyun file://CVE-2022-27780.patch \ 22*4882a593Smuzhiyun file://CVE-2022-27781.patch \ 23*4882a593Smuzhiyun file://CVE-2022-27779.patch \ 24*4882a593Smuzhiyun file://CVE-2022-27782-1.patch \ 25*4882a593Smuzhiyun file://CVE-2022-27782-2.patch \ 26*4882a593Smuzhiyun file://0001-openssl-fix-CN-check-error-code.patch \ 27*4882a593Smuzhiyun file://CVE-2022-32205.patch \ 28*4882a593Smuzhiyun file://CVE-2022-32206.patch \ 29*4882a593Smuzhiyun file://CVE-2022-32207.patch \ 30*4882a593Smuzhiyun file://CVE-2022-32208.patch \ 31*4882a593Smuzhiyun file://CVE-2022-35252.patch \ 32*4882a593Smuzhiyun file://CVE-2022-32221.patch \ 33*4882a593Smuzhiyun file://CVE-2022-42916.patch \ 34*4882a593Smuzhiyun file://CVE-2022-42915.patch \ 35*4882a593Smuzhiyun file://CVE-2022-43551.patch \ 36*4882a593Smuzhiyun file://CVE-2022-43552.patch \ 37*4882a593Smuzhiyun file://CVE-2023-23914_5-1.patch \ 38*4882a593Smuzhiyun file://CVE-2023-23914_5-2.patch \ 39*4882a593Smuzhiyun file://CVE-2023-23914_5-3.patch \ 40*4882a593Smuzhiyun file://CVE-2023-23914_5-4.patch \ 41*4882a593Smuzhiyun file://CVE-2023-23914_5-5.patch \ 42*4882a593Smuzhiyun file://CVE-2023-23916.patch \ 43*4882a593Smuzhiyun " 44*4882a593SmuzhiyunSRC_URI[sha256sum] = "0aaa12d7bd04b0966254f2703ce80dd5c38dbbd76af0297d3d690cdce58a583c" 45*4882a593Smuzhiyun 46*4882a593Smuzhiyun# Curl has used many names over the years... 47*4882a593SmuzhiyunCVE_PRODUCT = "haxx:curl haxx:libcurl curl:curl curl:libcurl libcurl:libcurl daniel_stenberg:curl" 48*4882a593Smuzhiyun 49*4882a593Smuzhiyuninherit autotools pkgconfig binconfig multilib_header 50*4882a593Smuzhiyun 51*4882a593Smuzhiyun# Entropy source for random PACKAGECONFIG option 52*4882a593SmuzhiyunRANDOM ?= "/dev/urandom" 53*4882a593Smuzhiyun 54*4882a593SmuzhiyunPACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} libidn openssl proxy random threaded-resolver verbose zlib" 55*4882a593SmuzhiyunPACKAGECONFIG:class-native = "ipv6 openssl proxy random threaded-resolver verbose zlib" 56*4882a593SmuzhiyunPACKAGECONFIG:class-nativesdk = "ipv6 openssl proxy random threaded-resolver verbose zlib" 57*4882a593Smuzhiyun 58*4882a593Smuzhiyun# 'ares' and 'threaded-resolver' are mutually exclusive 59*4882a593SmuzhiyunPACKAGECONFIG[ares] = "--enable-ares,--disable-ares,c-ares,,,threaded-resolver" 60*4882a593SmuzhiyunPACKAGECONFIG[brotli] = "--with-brotli,--without-brotli,brotli" 61*4882a593SmuzhiyunPACKAGECONFIG[builtinmanual] = "--enable-manual,--disable-manual" 62*4882a593SmuzhiyunPACKAGECONFIG[dict] = "--enable-dict,--disable-dict," 63*4882a593SmuzhiyunPACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls" 64*4882a593SmuzhiyunPACKAGECONFIG[gopher] = "--enable-gopher,--disable-gopher," 65*4882a593SmuzhiyunPACKAGECONFIG[imap] = "--enable-imap,--disable-imap," 66*4882a593SmuzhiyunPACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," 67*4882a593SmuzhiyunPACKAGECONFIG[krb5] = "--with-gssapi,--without-gssapi,krb5" 68*4882a593SmuzhiyunPACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,openldap" 69*4882a593SmuzhiyunPACKAGECONFIG[ldaps] = "--enable-ldaps,--disable-ldaps,openldap" 70*4882a593SmuzhiyunPACKAGECONFIG[libgsasl] = "--with-libgsasl,--without-libgsasl,libgsasl" 71*4882a593SmuzhiyunPACKAGECONFIG[libidn] = "--with-libidn2,--without-libidn2,libidn2" 72*4882a593SmuzhiyunPACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2" 73*4882a593SmuzhiyunPACKAGECONFIG[mbedtls] = "--with-mbedtls=${STAGING_DIR_TARGET},--without-mbedtls,mbedtls" 74*4882a593SmuzhiyunPACKAGECONFIG[mqtt] = "--enable-mqtt,--disable-mqtt," 75*4882a593SmuzhiyunPACKAGECONFIG[nghttp2] = "--with-nghttp2,--without-nghttp2,nghttp2" 76*4882a593SmuzhiyunPACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl" 77*4882a593SmuzhiyunPACKAGECONFIG[pop3] = "--enable-pop3,--disable-pop3," 78*4882a593SmuzhiyunPACKAGECONFIG[proxy] = "--enable-proxy,--disable-proxy," 79*4882a593SmuzhiyunPACKAGECONFIG[random] = "--with-random=${RANDOM},--without-random" 80*4882a593SmuzhiyunPACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump" 81*4882a593SmuzhiyunPACKAGECONFIG[rtsp] = "--enable-rtsp,--disable-rtsp," 82*4882a593SmuzhiyunPACKAGECONFIG[smb] = "--enable-smb,--disable-smb," 83*4882a593SmuzhiyunPACKAGECONFIG[smtp] = "--enable-smtp,--disable-smtp," 84*4882a593SmuzhiyunPACKAGECONFIG[nss] = "--with-nss,--without-nss,nss" 85*4882a593SmuzhiyunPACKAGECONFIG[telnet] = "--enable-telnet,--disable-telnet," 86*4882a593SmuzhiyunPACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp," 87*4882a593SmuzhiyunPACKAGECONFIG[threaded-resolver] = "--enable-threaded-resolver,--disable-threaded-resolver,,,,ares" 88*4882a593SmuzhiyunPACKAGECONFIG[verbose] = "--enable-verbose,--disable-verbose" 89*4882a593SmuzhiyunPACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib" 90*4882a593SmuzhiyunPACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd" 91*4882a593Smuzhiyun 92*4882a593SmuzhiyunEXTRA_OECONF = " \ 93*4882a593Smuzhiyun --disable-libcurl-option \ 94*4882a593Smuzhiyun --disable-ntlm-wb \ 95*4882a593Smuzhiyun --enable-crypto-auth \ 96*4882a593Smuzhiyun --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \ 97*4882a593Smuzhiyun --without-libpsl \ 98*4882a593Smuzhiyun --enable-debug \ 99*4882a593Smuzhiyun --enable-optimize \ 100*4882a593Smuzhiyun --disable-curldebug \ 101*4882a593Smuzhiyun ${@'--without-ssl' if (bb.utils.filter('PACKAGECONFIG', 'gnutls mbedtls nss openssl', d) == '') else ''} \ 102*4882a593Smuzhiyun" 103*4882a593Smuzhiyun 104*4882a593Smuzhiyundo_install:append:class-target() { 105*4882a593Smuzhiyun # cleanup buildpaths from curl-config 106*4882a593Smuzhiyun sed -i \ 107*4882a593Smuzhiyun -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ 108*4882a593Smuzhiyun -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \ 109*4882a593Smuzhiyun -e 's|${DEBUG_PREFIX_MAP}||g' \ 110*4882a593Smuzhiyun -e 's|${@" ".join(d.getVar("DEBUG_PREFIX_MAP").split())}||g' \ 111*4882a593Smuzhiyun ${D}${bindir}/curl-config 112*4882a593Smuzhiyun} 113*4882a593Smuzhiyun 114*4882a593SmuzhiyunPACKAGES =+ "lib${BPN}" 115*4882a593Smuzhiyun 116*4882a593SmuzhiyunFILES:lib${BPN} = "${libdir}/lib*.so.*" 117*4882a593SmuzhiyunRRECOMMENDS:lib${BPN} += "ca-certificates" 118*4882a593Smuzhiyun 119*4882a593SmuzhiyunFILES:${PN} += "${datadir}/zsh" 120*4882a593Smuzhiyun 121*4882a593Smuzhiyuninherit multilib_script 122*4882a593SmuzhiyunMULTILIB_SCRIPTS = "${PN}-dev:${bindir}/curl-config" 123*4882a593Smuzhiyun 124*4882a593SmuzhiyunBBCLASSEXTEND = "native nativesdk" 125