You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ar...@apache.org on 2021/11/23 19:46:35 UTC
[openoffice] branch serf updated: Allow compilation of OpenSSL under Windows
This is an automated email from the ASF dual-hosted git repository.
ardovm pushed a commit to branch serf
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/serf by this push:
new 247a226 Allow compilation of OpenSSL under Windows
247a226 is described below
commit 247a22618b3f2820a175a0dd85b6c9beaab92706
Author: Arrigo Marchiori <ar...@yahoo.it>
AuthorDate: Tue Nov 23 20:45:59 2021 +0100
Allow compilation of OpenSSL under Windows
---
main/openssl/makefile.mk | 26 ++++++----------------
main/openssl/opensslwnt.patch | 51 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 58 insertions(+), 19 deletions(-)
diff --git a/main/openssl/makefile.mk b/main/openssl/makefile.mk
index e195bdd..92add0b 100644
--- a/main/openssl/makefile.mk
+++ b/main/openssl/makefile.mk
@@ -116,6 +116,7 @@ UNAME=$(shell uname)
.ENDIF
.IF "$(OS)" == "WNT"
+PATCH_FILES+=opensslwnt.patch
.IF "$(COM)"=="GCC"
PATCH_FILES=opensslmingw.patch
@@ -127,8 +128,6 @@ OUT2LIB = libcrypto_static.*
OUT2LIB += libssl_static.*
OUT2LIB += libcrypto.*
OUT2LIB += libssl.*
-OUT2BIN = ssleay32.dll
-OUT2BIN += libeay32.dll
.ELSE
CONFIGURE_ACTION=
BUILD_ACTION=cmd /c "ms\mingw32"
@@ -136,12 +135,9 @@ OUT2LIB = out/libcrypto_static.*
OUT2LIB += out/libssl_static.*
OUT2LIB += out/libcrypto.*
OUT2LIB += out/libssl.*
-OUT2BIN = out/ssleay32.dll
-OUT2BIN += out/libeay32.dll
.ENDIF
.ELSE
- PATCH_FILES=openssl.patch
.IF "$(MAKETARGETS)" == ""
# The env. vars CC and PERL are used by nmake, and nmake insists on '\'s
# If WRAPCMD is set it is prepended before the compiler, don't touch that.
@@ -156,25 +152,17 @@ OUT2BIN += out/libeay32.dll
.ENDIF
#CONFIGURE_ACTION=cmd /c $(PERL:s!\!/!) configure
+ # We must set the env variable CONFIGURE_INSIST
+ # so that Configurations/windows-checker.pm does not
+ # complain about our Perl using unix-like paths
.IF "$(CPUNAME)"=="INTEL"
- CONFIGURE_ACTION=$(PERL) configure $(NO_ASM)
+ CONFIGURE_ACTION=CONFIGURE_INSIST=1 $(PERL) configure $(NO_ASM)
CONFIGURE_FLAGS=VC-WIN32
- .IF "$(NASM_PATH)"=="NO_NASM_HOME"
- BUILD_ACTION=cmd /c "ms$(EMQ)\do_ms.bat $(subst,/,\ $(normpath,1 $(PERL)))" && nmake -f ms/ntdll.mak
- .ELSE
- BUILD_ACTION=cmd /c "ms$(EMQ)\do_nasm.bat $(subst,/,\ $(normpath,1 $(PERL)))" && nmake -f ms/ntdll.mak
- .ENDIF
.ELIF "$(CPUNAME)"=="X86_64"
- CONFIGURE_ACTION=$(PERL) configure $(NO_ASM)
+ CONFIGURE_ACTION=CONFIGURE_INSIST=1 $(PERL) configure $(NO_ASM)
CONFIGURE_FLAGS=VC-WIN64A
- BUILD_ACTION=cmd /c "ms$(EMQ)\do_win64a.bat $(subst,/,\ $(normpath,1 $(PERL)))" && cmd /c "nmake -f ms/ntdll.mak"
.ENDIF
-
- OUT2LIB = out32dll$/ssleay32.lib
- OUT2LIB += out32dll$/libeay32.lib
- OUT2BIN = out32dll$/ssleay32.dll
- OUT2BIN += out32dll$/libeay32.dll
- OUT2INC = inc32$/openssl$/*
+ BUILD_ACTION=nmake
.ENDIF
.ENDIF
diff --git a/main/openssl/opensslwnt.patch b/main/openssl/opensslwnt.patch
new file mode 100644
index 0000000..7402d36
--- /dev/null
+++ b/main/openssl/opensslwnt.patch
@@ -0,0 +1,51 @@
+--- misc/openssl-1.1.1l/Configurations/windows-makefile.tmpl 2021-11-20 13:57:05.680575200 +0100
++++ misc/build/openssl-1.1.1l/Configurations/windows-makefile.tmpl 2021-11-20 15:54:39.030601100 +0100
+@@ -175,7 +175,7 @@
+ LDFLAGS={- join(' ', @{$config{LDFLAGS}}) -}
+ EX_LIBS={- join(' ', @{$config{LDLIBS}}) -}
+
+-PERL={- $config{PERL} -}
++PERL={- $config{PERL_WINPATH} -}
+
+ AR={- $config{AR} -}
+ ARFLAGS= {- join(' ', @{$config{ARFLAGS}}) -}
+Only in wntmsci12.pro/misc/build/openssl-1.1.1l/Configurations: windows-makefile.tmpl~
+diff -ru wntmsci12.pro/misc/openssl-1.1.1l/Configure wntmsci12.pro/misc/build/openssl-1.1.1l/Configure
+--- misc/openssl-1.1.1l/Configure 2021-11-20 13:57:05.514359400 +0100
++++ misc/build/openssl-1.1.1l/Configure 2021-11-20 15:55:21.051561800 +0100
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env perl
++#!/usr/bin/env perl
+ # -*- mode: perl; -*-
+ # Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved.
+ #
+@@ -568,13 +568,14 @@
+ CPPDEFINES => [], # Alternative for -D
+ CPPINCLUDES => [], # Alternative for -I
+ CROSS_COMPILE => env('CROSS_COMPILE'),
+- HASHBANGPERL=> env('HASHBANGPERL') || env('PERL'),
++ HASHBANGPERL=> env('HASHBANGPERL') || cygpath(env('PERL')),
+ LD => undef,
+ LDFLAGS => [ env('LDFLAGS') || () ], # -L, -Wl,
+ LDLIBS => [ env('LDLIBS') || () ], # -l
+ MT => undef,
+ MTFLAGS => [],
+- PERL => env('PERL') || ($^O ne "VMS" ? $^X : "perl"),
++ PERL => cygpath(env('PERL')) || ($^O ne "VMS" ? $^X : "perl"),
++ PERL_WINPATH => env('PERL'),
+ RANLIB => env('RANLIB'),
+ RC => env('RC') || env('WINDRES'),
+ RCFLAGS => [ env('RCFLAGS') || () ],
+@@ -3610,3 +3611,12 @@
+ }
+ return @result;
+ }
++
++sub cygpath {
++ my $escapedPath = $_[0];
++ $escapedPath =~ s/\\/\\\\/g;
++ open(my $output, "-|", "cygpath", "-u", $escapedPath);
++ my $retval = <$output>;
++ chomp($retval);
++ return $retval;
++}