curl_8.12.1.bb 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  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"
  10. LIC_FILES_CHKSUM = "file://COPYING;md5=72f4e9890e99e68d77b7e40703d789b8"
  11. SRC_URI = " \
  12. https://curl.se/download/${BP}.tar.xz \
  13. file://run-ptest \
  14. file://disable-tests \
  15. file://no-test-timeout.patch \
  16. "
  17. SRC_URI:append:class-nativesdk = " \
  18. file://environment.d-curl.sh \
  19. "
  20. SRC_URI[sha256sum] = "0341f1ed97a26c811abaebd37d62b833956792b7607ea3f15d001613c76de202"
  21. # Curl has used many names over the years...
  22. CVE_PRODUCT = "haxx:curl haxx:libcurl curl:curl curl:libcurl libcurl:libcurl daniel_stenberg:curl"
  23. CVE_STATUS[CVE-2024-32928] = "ignored: CURLOPT_SSL_VERIFYPEER was disabled on google cloud services causing a potential man in the middle attack"
  24. inherit autotools pkgconfig binconfig multilib_header ptest
  25. COMMON_PACKAGECONFIG = "basic-auth bearer-auth digest-auth ipfs negotiate-auth openssl proxy threaded-resolver verbose zlib"
  26. PACKAGECONFIG ??= "${COMMON_PACKAGECONFIG} ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} aws libidn"
  27. PACKAGECONFIG:class-native = "${COMMON_PACKAGECONFIG} ipv6"
  28. PACKAGECONFIG:class-nativesdk = "${COMMON_PACKAGECONFIG} ipv6"
  29. # 'ares' and 'threaded-resolver' are mutually exclusive
  30. PACKAGECONFIG[ares] = "--enable-ares,--disable-ares,c-ares,,,threaded-resolver"
  31. PACKAGECONFIG[aws] = "--enable-aws,--disable-aws"
  32. PACKAGECONFIG[basic-auth] = "--enable-basic-auth,--disable-basic-auth"
  33. PACKAGECONFIG[bearer-auth] = "--enable-bearer-auth,--disable-bearer-auth"
  34. PACKAGECONFIG[brotli] = "--with-brotli,--without-brotli,brotli"
  35. PACKAGECONFIG[builtinmanual] = "--enable-manual,--disable-manual"
  36. # Don't use this in production
  37. PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
  38. PACKAGECONFIG[dict] = "--enable-dict,--disable-dict,"
  39. PACKAGECONFIG[digest-auth] = "--enable-digest-auth,--disable-digest-auth"
  40. PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
  41. PACKAGECONFIG[gopher] = "--enable-gopher,--disable-gopher,"
  42. PACKAGECONFIG[imap] = "--enable-imap,--disable-imap,"
  43. PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
  44. PACKAGECONFIG[ipfs] = "--enable-ipfs,--disable-ipfs,"
  45. PACKAGECONFIG[kerberos-auth] = "--enable-kerberos-auth,--disable-kerberos-auth"
  46. PACKAGECONFIG[krb5] = "--with-gssapi,--without-gssapi,krb5"
  47. PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,openldap"
  48. PACKAGECONFIG[ldaps] = "--enable-ldaps,--disable-ldaps,openldap"
  49. PACKAGECONFIG[libgsasl] = "--with-libgsasl,--without-libgsasl,libgsasl"
  50. PACKAGECONFIG[libidn] = "--with-libidn2,--without-libidn2,libidn2"
  51. PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2"
  52. PACKAGECONFIG[mbedtls] = "--with-mbedtls=${STAGING_DIR_TARGET},--without-mbedtls,mbedtls"
  53. PACKAGECONFIG[mqtt] = "--enable-mqtt,--disable-mqtt,"
  54. PACKAGECONFIG[negotiate-auth] = "--enable-negotiate-auth,--disable-negotiate-auth"
  55. PACKAGECONFIG[nghttp2] = "--with-nghttp2,--without-nghttp2,nghttp2"
  56. PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl"
  57. PACKAGECONFIG[pop3] = "--enable-pop3,--disable-pop3,"
  58. PACKAGECONFIG[proxy] = "--enable-proxy,--disable-proxy,"
  59. PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump"
  60. PACKAGECONFIG[rtsp] = "--enable-rtsp,--disable-rtsp,"
  61. PACKAGECONFIG[smb] = "--enable-smb,--disable-smb,"
  62. PACKAGECONFIG[smtp] = "--enable-smtp,--disable-smtp,"
  63. PACKAGECONFIG[telnet] = "--enable-telnet,--disable-telnet,"
  64. PACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp,"
  65. PACKAGECONFIG[threaded-resolver] = "--enable-threaded-resolver,--disable-threaded-resolver,,,,ares"
  66. PACKAGECONFIG[verbose] = "--enable-verbose,--disable-verbose"
  67. PACKAGECONFIG[websockets] = "--enable-websockets,--disable-websockets"
  68. PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib"
  69. PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd"
  70. EXTRA_OECONF = " \
  71. --disable-libcurl-option \
  72. --without-libpsl \
  73. --enable-optimize \
  74. ${@'--without-ssl' if (bb.utils.filter('PACKAGECONFIG', 'gnutls mbedtls openssl', d) == '') else ''} \
  75. WATT_ROOT=${STAGING_DIR_TARGET}${prefix} \
  76. "
  77. EXTRA_OECONF:append:class-target = " \
  78. --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
  79. "
  80. fix_absolute_paths () {
  81. # cleanup buildpaths from curl-config
  82. sed -i \
  83. -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
  84. -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \
  85. -e 's|${DEBUG_PREFIX_MAP}||g' \
  86. -e 's|${@" ".join(d.getVar("DEBUG_PREFIX_MAP").split())}||g' \
  87. ${D}${bindir}/curl-config
  88. }
  89. do_install:append:class-target() {
  90. fix_absolute_paths
  91. }
  92. do_install:append:class-nativesdk() {
  93. fix_absolute_paths
  94. mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d
  95. install -m 644 ${UNPACKDIR}/environment.d-curl.sh ${D}${SDKPATHNATIVE}/environment-setup.d/curl.sh
  96. }
  97. do_compile_ptest() {
  98. oe_runmake -C ${B}/tests
  99. }
  100. do_install_ptest() {
  101. install -d ${D}${PTEST_PATH}/tests
  102. cp ${S}/tests/*.p[lmy] ${D}${PTEST_PATH}/tests/
  103. install -d ${D}${PTEST_PATH}/tests/libtest
  104. for name in $(makefile-getvar ${B}/tests/libtest/Makefile noinst_PROGRAMS noinst_LTLIBRARIES); do
  105. ${B}/libtool --mode=install install ${B}/tests/libtest/$name ${D}${PTEST_PATH}/tests/libtest
  106. done
  107. rm -f ${D}${PTEST_PATH}/tests/libtest/libhostname.la
  108. install -d ${D}${PTEST_PATH}/tests/server
  109. for name in $(makefile-getvar ${B}/tests/server/Makefile noinst_PROGRAMS); do
  110. ${B}/libtool --mode=install install ${B}/tests/server/$name ${D}${PTEST_PATH}/tests/server
  111. done
  112. cp -r ${S}/tests/data ${D}${PTEST_PATH}/tests/
  113. # More tests that we disable for automated QA as they're not reliable
  114. cat ${UNPACKDIR}/disable-tests >>${D}${PTEST_PATH}/tests/data/DISABLED
  115. }
  116. RDEPENDS:${PN}-ptest += " \
  117. locale-base-en-us \
  118. perl-module-b \
  119. perl-module-base \
  120. perl-module-cwd \
  121. perl-module-digest \
  122. perl-module-digest-md5 \
  123. perl-module-digest-sha \
  124. perl-module-file-basename \
  125. perl-module-file-spec \
  126. perl-module-file-temp \
  127. perl-module-i18n-langinfo \
  128. perl-module-io-socket \
  129. perl-module-ipc-open2 \
  130. perl-module-list-util \
  131. perl-module-memoize \
  132. perl-module-storable \
  133. perl-module-time-hires \
  134. "
  135. PACKAGES =+ "lib${BPN}"
  136. FILES:lib${BPN} = "${libdir}/lib*.so.*"
  137. RRECOMMENDS:lib${BPN} += "ca-certificates"
  138. FILES:${PN} += "${datadir}/zsh"
  139. FILES:${PN}:append:class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/curl.sh"
  140. inherit multilib_script
  141. MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/curl-config"
  142. BBCLASSEXTEND = "native nativesdk"