Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 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" |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame^] | 10 | LIC_FILES_CHKSUM = "file://COPYING;md5=db8448a1e43eb2125f7740fc397db1f6" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 11 | |
| 12 | SRC_URI = " \ |
| 13 | https://curl.se/download/${BP}.tar.xz \ |
| 14 | file://run-ptest \ |
| 15 | file://disable-tests \ |
| 16 | " |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame^] | 17 | SRC_URI[sha256sum] = "1dae31b2a7c1fe269de99c0c31bb488346aab3459b5ffca909d6938249ae415f" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 18 | |
| 19 | # Curl has used many names over the years... |
| 20 | CVE_PRODUCT = "haxx:curl haxx:libcurl curl:curl curl:libcurl libcurl:libcurl daniel_stenberg:curl" |
| 21 | |
| 22 | inherit autotools pkgconfig binconfig multilib_header ptest |
| 23 | |
| 24 | # Entropy source for random PACKAGECONFIG option |
| 25 | RANDOM ?= "/dev/urandom" |
| 26 | |
| 27 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} libidn openssl proxy random threaded-resolver verbose zlib" |
| 28 | PACKAGECONFIG:class-native = "ipv6 openssl proxy random threaded-resolver verbose zlib" |
| 29 | PACKAGECONFIG:class-nativesdk = "ipv6 openssl proxy random threaded-resolver verbose zlib" |
| 30 | |
| 31 | # 'ares' and 'threaded-resolver' are mutually exclusive |
| 32 | PACKAGECONFIG[ares] = "--enable-ares,--disable-ares,c-ares,,,threaded-resolver" |
| 33 | PACKAGECONFIG[brotli] = "--with-brotli,--without-brotli,brotli" |
| 34 | PACKAGECONFIG[builtinmanual] = "--enable-manual,--disable-manual" |
| 35 | # Don't use this in production |
| 36 | PACKAGECONFIG[debug] = "--enable-debug,--disable-debug" |
| 37 | PACKAGECONFIG[dict] = "--enable-dict,--disable-dict," |
| 38 | PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls" |
| 39 | PACKAGECONFIG[gopher] = "--enable-gopher,--disable-gopher," |
| 40 | PACKAGECONFIG[imap] = "--enable-imap,--disable-imap," |
| 41 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," |
| 42 | PACKAGECONFIG[krb5] = "--with-gssapi,--without-gssapi,krb5" |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame^] | 43 | PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,openldap" |
| 44 | PACKAGECONFIG[ldaps] = "--enable-ldaps,--disable-ldaps,openldap" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 45 | PACKAGECONFIG[libgsasl] = "--with-libgsasl,--without-libgsasl,libgsasl" |
| 46 | PACKAGECONFIG[libidn] = "--with-libidn2,--without-libidn2,libidn2" |
| 47 | PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2" |
| 48 | PACKAGECONFIG[mbedtls] = "--with-mbedtls=${STAGING_DIR_TARGET},--without-mbedtls,mbedtls" |
| 49 | PACKAGECONFIG[mqtt] = "--enable-mqtt,--disable-mqtt," |
| 50 | PACKAGECONFIG[nghttp2] = "--with-nghttp2,--without-nghttp2,nghttp2" |
| 51 | PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl" |
| 52 | PACKAGECONFIG[pop3] = "--enable-pop3,--disable-pop3," |
| 53 | PACKAGECONFIG[proxy] = "--enable-proxy,--disable-proxy," |
| 54 | PACKAGECONFIG[random] = "--with-random=${RANDOM},--without-random" |
| 55 | PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump" |
| 56 | PACKAGECONFIG[rtsp] = "--enable-rtsp,--disable-rtsp," |
| 57 | PACKAGECONFIG[smb] = "--enable-smb,--disable-smb," |
| 58 | PACKAGECONFIG[smtp] = "--enable-smtp,--disable-smtp," |
| 59 | PACKAGECONFIG[nss] = "--with-nss,--without-nss,nss" |
| 60 | PACKAGECONFIG[telnet] = "--enable-telnet,--disable-telnet," |
| 61 | PACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp," |
| 62 | PACKAGECONFIG[threaded-resolver] = "--enable-threaded-resolver,--disable-threaded-resolver,,,,ares" |
| 63 | PACKAGECONFIG[verbose] = "--enable-verbose,--disable-verbose" |
| 64 | PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib" |
| 65 | PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd" |
| 66 | |
| 67 | EXTRA_OECONF = " \ |
| 68 | --disable-libcurl-option \ |
| 69 | --disable-ntlm-wb \ |
| 70 | --enable-crypto-auth \ |
| 71 | --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \ |
| 72 | --without-libpsl \ |
| 73 | --enable-optimize \ |
| 74 | ${@'--without-ssl' if (bb.utils.filter('PACKAGECONFIG', 'gnutls mbedtls nss openssl', d) == '') else ''} \ |
| 75 | " |
| 76 | |
| 77 | do_install:append:class-target() { |
| 78 | # cleanup buildpaths from curl-config |
| 79 | sed -i \ |
| 80 | -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ |
| 81 | -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \ |
| 82 | -e 's|${DEBUG_PREFIX_MAP}||g' \ |
| 83 | -e 's|${@" ".join(d.getVar("DEBUG_PREFIX_MAP").split())}||g' \ |
| 84 | ${D}${bindir}/curl-config |
| 85 | } |
| 86 | |
| 87 | do_compile_ptest() { |
| 88 | oe_runmake test |
| 89 | oe_runmake -C ${B}/tests/server |
| 90 | } |
| 91 | |
| 92 | do_install_ptest() { |
| 93 | cat ${WORKDIR}/disable-tests >> ${S}/tests/data/DISABLED |
| 94 | rm -f ${B}/tests/configurehelp.pm |
| 95 | cp -rf ${B}/tests ${D}${PTEST_PATH} |
| 96 | cp -rf ${S}/tests ${D}${PTEST_PATH} |
| 97 | find ${D}${PTEST_PATH}/ -type f -name Makefile.am -o -name Makefile.in -o -name Makefile -delete |
| 98 | install -d ${D}${PTEST_PATH}/src |
| 99 | ln -sf ${bindir}/curl ${D}${PTEST_PATH}/src/curl |
| 100 | cp -rf ${D}${bindir}/curl-config ${D}${PTEST_PATH} |
| 101 | } |
| 102 | |
| 103 | RDEPENDS:${PN}-ptest += "bash perl-modules perl-module-time-hires perl-module-digest-md5 \ |
| 104 | perl-module-digest perl-module-ipc-open2" |
| 105 | |
| 106 | PACKAGES =+ "lib${BPN}" |
| 107 | |
| 108 | FILES:lib${BPN} = "${libdir}/lib*.so.*" |
| 109 | RRECOMMENDS:lib${BPN} += "ca-certificates" |
| 110 | |
| 111 | FILES:${PN} += "${datadir}/zsh" |
| 112 | |
| 113 | inherit multilib_script |
| 114 | MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/curl-config" |
| 115 | |
| 116 | BBCLASSEXTEND = "native nativesdk" |