This is an automated email from the ASF dual-hosted git repository.
ardovm pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/trunk by this push:
new bb956dfd85 Link to bundled OpenSSL if requested
bb956dfd85 is described below
commit bb956dfd85428dd08d991a01ee6a6c4e966bf431
Author: Arrigo Marchiori <[email protected]>
AuthorDate: Thu May 5 19:12:12 2022 +0200
Link to bundled OpenSSL if requested
---
main/curl/curl-bundled_openssl.patch | 28 ++++++++++++++++++++++++++++
main/curl/makefile.mk | 9 ++++++++-
2 files changed, 36 insertions(+), 1 deletion(-)
diff --git a/main/curl/curl-bundled_openssl.patch
b/main/curl/curl-bundled_openssl.patch
new file mode 100644
index 0000000000..a3599097ac
--- /dev/null
+++ b/main/curl/curl-bundled_openssl.patch
@@ -0,0 +1,28 @@
+--- misc/curl-7.72.0/configure 2020-08-17 00:34:29.000000000 +0200
++++ misc/build/curl-7.72.0/configure 2022-05-05 19:03:39.766880970 +0200
+@@ -23617,14 +23617,14 @@
+ { $as_echo "$as_me:${as_lineno-$LINENO}: PKG_CONFIG_LIBDIR will be set
to \"$OPENSSL_PCDIR\"" >&5
+ $as_echo "$as_me: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&6;}
+ PKGTEST="yes"
+- elif test ! -f "$PREFIX_OPENSSL/include/openssl/ssl.h"; then
++ elif test ! -f "$PREFIX_OPENSSL/inc/external/openssl/ssl.h"; then
+ as_fn_error $? "$PREFIX_OPENSSL is a bad --with-ssl prefix!" "$LINENO" 5
+ fi
+
+ LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
+ if test "$PREFIX_OPENSSL" != "/usr" ; then
+ SSL_LDFLAGS="-L$LIB_OPENSSL"
+- SSL_CPPFLAGS="-I$PREFIX_OPENSSL/include"
++ SSL_CPPFLAGS="-I$PREFIX_OPENSSL/inc/external"
+ fi
+ SSL_CPPFLAGS="$SSL_CPPFLAGS -I$PREFIX_OPENSSL/include/openssl"
+ ;;
+@@ -23841,7 +23841,7 @@
+ LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
+ if test "$PKGCONFIG" = "no" ; then
+ # only set this if pkg-config wasn't used
+- CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl
-I$PREFIX_OPENSSL/include"
++ CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/inc/external/openssl
-I$PREFIX_OPENSSL/inc/external"
+ fi
+ # Linking previously failed, try extra paths from --with-ssl or
pkg-config.
+ # Use a different function name to avoid reusing the earlier cached
result.
diff --git a/main/curl/makefile.mk b/main/curl/makefile.mk
index dafa4a6b30..044bf4d8c9 100644
--- a/main/curl/makefile.mk
+++ b/main/curl/makefile.mk
@@ -55,10 +55,17 @@ curl_CFLAGS+:=$(ARCH_FLAGS)
curl_LDFLAGS+:=$(ARCH_FLAGS)
.ENDIF
+.IF "$(SYSTEM_OPENSSL)"=="YES"
+ssl_param=--with-ssl
+.ELSE
+ssl_param=--with-ssl=$(OUTDIR)
+PATCH_FILES+= curl-bundled_openssl.patch
+.ENDIF
+
CONFIGURE_DIR=.$/
#relative to CONFIGURE_DIR
CONFIGURE_ACTION=.$/configure
-CONFIGURE_FLAGS= --with-ssl --without-libidn --enable-ftp --enable-ipv6
--enable-http --disable-gopher --disable-file --disable-ldap --disable-telnet
--disable-dict --disable-static CPPFLAGS="$(curl_CFLAGS)"
LDFLAGS="$(curl_LDFLAGS)"
+CONFIGURE_FLAGS= $(ssl_param) --without-libidn --enable-ftp --enable-ipv6
--enable-http --disable-gopher --disable-file --disable-ldap --disable-telnet
--disable-dict --disable-static CPPFLAGS="$(curl_CFLAGS)"
LDFLAGS="$(curl_LDFLAGS)"
BUILD_DIR=$(CONFIGURE_DIR)$/lib
BUILD_ACTION=$(GNUMAKE)