From 62b8781542cb76c33f7e3eb1c0781dd1cef68ba4 Mon Sep 17 00:00:00 2001 From: Pavel Vinogradov Date: Thu, 2 Dec 2021 17:48:27 -0500 Subject: ftp/curl: use openssl from ngtcp2 when needed --- ftp/curl/HISTORY | 4 ++++ ftp/curl/PRE_BUILD | 6 +++++ ftp/curl/ngtcp2-openssl.patch | 53 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100755 ftp/curl/PRE_BUILD create mode 100644 ftp/curl/ngtcp2-openssl.patch (limited to 'ftp') diff --git a/ftp/curl/HISTORY b/ftp/curl/HISTORY index 0175624bfa..aa1ea332a4 100644 --- a/ftp/curl/HISTORY +++ b/ftp/curl/HISTORY @@ -1,3 +1,7 @@ +2021-12-02 Pavel Vinogradov + * PRE_BUILD, ngtcp2-openssl.patch: added patch to use ngtcp2's openssl + when needed + 2021-11-13 Pavel Vinogradov * DEPENDS: added optional depends on nghttp3 & ngtcp2 diff --git a/ftp/curl/PRE_BUILD b/ftp/curl/PRE_BUILD new file mode 100755 index 0000000000..df257be8cf --- /dev/null +++ b/ftp/curl/PRE_BUILD @@ -0,0 +1,6 @@ +default_pre_build && +cd "${SOURCE_DIRECTORY}" && + +if is_depends_enabled ${SPELL} nghttp3; then + patch -p1 < "${SPELL_DIRECTORY}/ngtcp2-openssl.patch" +fi diff --git a/ftp/curl/ngtcp2-openssl.patch b/ftp/curl/ngtcp2-openssl.patch new file mode 100644 index 0000000000..d19876c83e --- /dev/null +++ b/ftp/curl/ngtcp2-openssl.patch @@ -0,0 +1,53 @@ +diff --git a/configure b/configure +--- a/configure ++++ b/configure +@@ -25099,21 +25099,21 @@ printf "%s\n" "found" >&6; } + PKG_CONFIG_LIBDIR="$OPENSSL_PCDIR" + export PKG_CONFIG_LIBDIR + fi +- $PKGCONFIG --libs-only-l --libs-only-other openssl 2>/dev/null` ++ $PKGCONFIG --libs-only-l --libs-only-other libngtcp2_crypto_openssl 2>/dev/null` + + SSL_LDFLAGS=` + if test -n "$OPENSSL_PCDIR"; then + PKG_CONFIG_LIBDIR="$OPENSSL_PCDIR" + export PKG_CONFIG_LIBDIR + fi +- $PKGCONFIG --libs-only-L openssl 2>/dev/null` ++ $PKGCONFIG --libs-only-L libngtcp2_crypto_openssl 2>/dev/null` + + SSL_CPPFLAGS=` + if test -n "$OPENSSL_PCDIR"; then + PKG_CONFIG_LIBDIR="$OPENSSL_PCDIR" + export PKG_CONFIG_LIBDIR + fi +- $PKGCONFIG --cflags-only-I openssl 2>/dev/null` ++ $PKGCONFIG --cflags-only-I libngtcp2_crypto_openssl 2>/dev/null` + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: pkg-config: SSL_LIBS: \"$SSL_LIBS\"" >&5 +@@ -25132,14 +25132,13 @@ printf "%s\n" "$as_me: pkg-config: SSL_CPPFLAGS: \"$SSL_CPPFLAGS\"" >&6;} + CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS" + LDFLAGS="$LDFLAGS $SSL_LDFLAGS" + +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HMAC_Update in -lcrypto" >&5 +-printf %s "checking for HMAC_Update in -lcrypto... " >&6; } ++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HMAC_Update in -lngtcp2_crypto_openssl" >&5 ++printf %s "checking for HMAC_Update in -lngtcp2_crypto_openssl... " >&6; } + if test ${ac_cv_lib_crypto_HMAC_Update+y} + then : + printf %s "(cached) " >&6 + else $as_nop + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lcrypto $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -25171,7 +25170,6 @@ if test "x$ac_cv_lib_crypto_HMAC_Update" = xyes + then : + + HAVECRYPTO="yes" +- LIBS="-lcrypto $LIBS" + + else $as_nop + -- cgit v1.2.3