tdf#140726 Change func func(<?>) to func <?>(<?>) in Math
[LibreOffice.git] / external / postgresql / postgres-msvc-build.patch.1
blobc217a755918b08efe99c1b2a31b6d4ead424442b
1 Cygwin perl calls /bin/sh which can't resolve to .exe
3 Also Cygwin perl has $Config{osname} different from MSWin32, and why even check that?
5 --- postgresql/src/tools/msvc/build.pl.orig     2021-01-19 17:36:09.801463500 +0100
6 +++ postgresql/src/tools/msvc/build.pl  2021-01-19 17:36:20.426821300 +0100
7 @@ -55,13 +55,13 @@
8  if ($buildwhat)
9  {
10         system(
11 -               "msbuild $buildwhat.vcxproj /verbosity:normal $msbflags /p:Configuration=$bconf"
12 +               "msbuild.exe $buildwhat.vcxproj /verbosity:normal $msbflags /p:Configuration=$bconf"
13         );
14  }
15  else
16  {
17         system(
18 -               "msbuild pgsql.sln /verbosity:normal $msbflags /p:Configuration=$bconf"
19 +               "msbuild.exe pgsql.sln /verbosity:normal $msbflags /p:Configuration=$bconf"
20         );
21  }
23 --- postgresql/src/tools/msvc/Project.pm.orig   2021-01-19 17:59:18.799237700 +0100
24 +++ postgresql/src/tools/msvc/Project.pm        2021-01-19 17:59:48.487711700 +0100
25 @@ -22,7 +22,7 @@
26         my $self = {
27                 name                  => $name,
28                 type                  => $type,
29 -               guid                  => $^O eq "MSWin32" ? Win32::GuidGen() : 'FAKE',
30 +               guid                  => Win32::GuidGen(),
31                 files                 => {},
32                 references            => [],
33                 libraries             => [],
34 --- postgresql/src/tools/msvc/Solution.pm.orig  2021-01-19 18:03:04.594229100 +0100
35 +++ postgresql/src/tools/msvc/Solution.pm       2021-01-19 18:04:13.677610100 +0100
36 @@ -59,7 +59,7 @@
37  {
38         my $self = shift;
40 -       if ($^O eq "MSWin32")
41 +       if (1) #($^O eq "MSWin32")
42         {
43                 # Examine CL help output to determine if we are in 32 or 64-bit mode.
44                 my $output = `cl /? 2>&1`;
45 @@ -1081,7 +1081,7 @@
46                 }
47                 if ($fld ne "")
48                 {
49 -                       $flduid{$fld} = $^O eq "MSWin32" ? Win32::GuidGen() : 'FAKE';
50 +                       $flduid{$fld} = Win32::GuidGen();
51                         print $sln <<EOF;
52  Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "$fld", "$fld", "$flduid{$fld}"
53  EndProject
54 --- postgresql/src/tools/msvc/VSObjectFactory.pm.orig   2021-01-19 18:06:42.633421700 +0100
55 +++ postgresql/src/tools/msvc/VSObjectFactory.pm        2021-01-19 18:06:28.663523200 +0100
56 @@ -111,7 +111,7 @@
58  sub DetermineVisualStudioVersion
59  {
60 -       if ($^O eq "MSWin32")
61 +       if (1) # ($^O eq "MSWin32")
62         {
63                 # To determine version of Visual Studio we use nmake as it has
64                 # existed for a long time and still exists in current Visual
65 --- postgresql/src/tools/msvc/Mkvcbuild.pm.orig 2021-01-19 18:23:59.830153900 +0100
66 +++ postgresql/src/tools/msvc/Mkvcbuild.pm      2021-01-19 18:24:04.095411300 +0100
67 @@ -9,7 +9,7 @@
68  use warnings;
70  use Carp;
71 -use if ($^O eq "MSWin32"), 'Win32';
72 +use Win32;
73  use Project;
74  use Solution;
75  use Cwd;
76 --- postgresql/src/tools/msvc/Solution.pm.orig  2021-01-19 20:27:21.366237600 +0100
77 +++ postgresql/src/tools/msvc/Solution.pm       2021-01-19 20:28:17.773662900 +0100
78 @@ -126,7 +126,8 @@
79         # openssl.exe is in the specified directory.
80         # Quote the .exe name in case it has spaces
81         my $opensslcmd =
82 -         qq("$self->{options}->{openssl}\\bin\\openssl.exe" version 2>&1);
83 +         qq("$self->{options}->{openssl}\\apps\\openssl.exe" version 2>&1);
84 + print "$opensslcmd";
85         my $sslout = `$opensslcmd`;
87         $? >> 8 == 0
88 @@ -964,8 +964,8 @@
89                                 # On both Win32 and Win64 the same library
90                                 # names are used without a debugging context.
91                                 $dbgsuffix     = 0;
92 -                               $libsslpath    = '\lib\libssl.lib';
93 -                               $libcryptopath = '\lib\libcrypto.lib';
94 +                               $libsslpath    = '\libssl.lib';
95 +                               $libcryptopath = '\libcrypto.lib';
96                         }
98                         $proj->AddLibrary($self->{options}->{openssl} . $libsslpath,
99 @@ -990,9 +990,9 @@
100                                 # to be here, so don't ask for it in last
101                                 # parameter.
102                                 $proj->AddLibrary(
103 -                                       $self->{options}->{openssl} . '\lib\ssleay32.lib', 0);
104 +                                       $self->{options}->{openssl} . '\ssleay32.lib', 0);
105                                 $proj->AddLibrary(
106 -                                       $self->{options}->{openssl} . '\lib\libeay32.lib', 0);
107 +                                       $self->{options}->{openssl} . '\libeay32.lib', 0);
108                         }
109                 }
110         }