aboutsummaryrefslogtreecommitdiff
path: root/ports/libpq/patches
diff options
context:
space:
mode:
authorAlexander Neumann <30894796+Neumann-A@users.noreply.github.com>2020-01-14 00:43:36 +0100
committerVictor Romero <romerosanchezv@gmail.com>2020-01-13 15:43:36 -0800
commitbdae0904c41a0ee2c5204d6449038d3b5d551726 (patch)
treeea710e1a326e02ed34a28afef72407d8855bb7bf /ports/libpq/patches
parent5c0b7b55771fe4b40d3f4b7a8069b1c71022490e (diff)
downloadvcpkg-bdae0904c41a0ee2c5204d6449038d3b5d551726.tar.gz
vcpkg-bdae0904c41a0ee2c5204d6449038d3b5d551726.zip
[libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d (#8566)
* [ports] Update openssl-unix to 1.1.1c * [ports] Update openssl-unix to 1.1.1d * [ports] openssl-unix platform 'AMD64' is called 'x86_64' on Linux * [ports] fix openssl platform * [ports] openssl-windows update openssl to 1.1.1d * [ports] Fix openssl post build * [ports] openssl add EnableUWPSupport.patch Reference: https://github.com/openssl/openssl/pull/8917 https://github.com/openssl/openssl/pull/9440 * [ports] openssl-uwp update openssl to 1.1.1d * Updated support for OpenSSL v1.1 With OpenSSL v1.1 we need an additional flag for ACE * update to 12.0 and change to vcpkg_configure_make * remove msys line * remove custom cmakelists * use --without-readline on linux * Update CONTROL Fix version * fix portfile * add all possible libpq features * create vcpkg_get_build_depends * create vcpkg_read_dependent_port_info * add vcpkg_write_port_info * fix a few bugs * libpq first succesful x86 build with core features. (files still must be moved) * always write the variable * Fix separate make and install execution error issue. * trigger CI system. * add openssl and win_bison win_flex patch * add configuration dependent patches * add bonjour as a dependency on macosx * apply patches and configure features * more patches to fix the windows build * more install fixes * remove unnecessary code * bit of code cleanup * remove unrelated files * remove unrelated function call. function was removed with last commit * removed hardcoded platform * fix patch * build only the interface libraries and nothing more * forgot to remove tool ecpg from install * seperate minimal install patch from normal install patch and introduce client feature * fix x86 Platform variable being x86 and not Win32 as required by the generated project * make linux build work * make more linux work * openssl return version number directly without calling openssl (should probably be done differently) * fix some more path and platform identification * comments to reduce install. currently libpq installs static and shared libraries and some tools on linux * patch arm * fix platform detection logic * make libpq osx buildable * Rename debug import library after build. (So that we don't affect external CMake users.) * revert debug naming and install a wrapper instead. * fix gdal regression due to name change * fix cutelyst regression due to qt5-base wrapper (why was it not using the target in the first place?) * correct wrapper install path * correct the arm patch. * trying to fix static gdal build * gdal still needs more work * update version of openssl in libpq openssl patch * nmap fix openssl * qt5 fix openssl * gdal fix openssl * librtmp migrate to openssl 1.1.1 * fail in patch since what is intended is not going to work in openssl 1.1.1 * fix static yara build * freedtds deactivate openssl feature until freetds decides to upgrade to 1.1 * fix libwebsockets cmakelists * fix the patch so that the generated targets also include crypt32 * xmlsec add threads dependency * bump control since I am unable to reproduce the regression * add pthread to openssl detection logic * fix freetds linkage missing crypt32 and fix the cmake checks. * fix the openssl wrapper to add the threads library * fix libmysql regression * add threads to openssl libraries. * upgrade libssh to 0.9 * fix nmap regression * fix mosquitto regression * fix openssl wrapper to make libarchive work * fix quickfix * changed patch a bit * improve freetds patch * fix case in librtmp * update control * bump control * fix case * make jasper a dependency of qt5-imageformats to fix flaky CI build. * add jasper libraries explicitly * jasper depends on freeglut so add it as a dependency. turbo_jpeg is also a dependency but that should already be handled in qt5-base * more glut names * bump control for macosx ci retry * fix slikenet regression * fix linebreak in qt5-base * update baseline * Update ci.baseline.txt those ports are not supported on UWP * [libevent] add dependency on libevent[threads] to openssl feature * [pdal,freerdp] Update CI baseline to fail * fix static pdal build * fix freerdp on linux * trying to revert some changes * revert changes in build make * revert x264 version bump Co-authored-by: Force Charlie <6904176+fcharlie@users.noreply.github.com> Co-authored-by: Johnny Willemsen <jwillemsen@remedy.nl> Co-authored-by: Lennart Trunk <lennart.trunk@outlook.de> Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> Co-authored-by: Victor Romero <romerosanchezv@gmail.com>
Diffstat (limited to 'ports/libpq/patches')
-rw-r--r--ports/libpq/patches/linux/configure.patch22
-rw-r--r--ports/libpq/patches/windows/MSBuildProject-static-crt.patch23
-rw-r--r--ports/libpq/patches/windows/MSBuildProject-static-lib.patch13
-rw-r--r--ports/libpq/patches/windows/Mkvcbuild-static-lib.patch13
-rw-r--r--ports/libpq/patches/windows/Solution.patch39
-rw-r--r--ports/libpq/patches/windows/Solution_Debug.patch157
-rw-r--r--ports/libpq/patches/windows/Solution_Release.patch157
-rw-r--r--ports/libpq/patches/windows/arm.patch39
-rw-r--r--ports/libpq/patches/windows/install.patch225
-rw-r--r--ports/libpq/patches/windows/minimize_install.patch35
-rw-r--r--ports/libpq/patches/windows/openssl_exe_path.patch34
-rw-r--r--ports/libpq/patches/windows/win_bison_flex.patch43
12 files changed, 800 insertions, 0 deletions
diff --git a/ports/libpq/patches/linux/configure.patch b/ports/libpq/patches/linux/configure.patch
new file mode 100644
index 000000000..84ebcbd21
--- /dev/null
+++ b/ports/libpq/patches/linux/configure.patch
@@ -0,0 +1,22 @@
+diff --git a/configure b/configure
+index 54c852aca..96e2c89ba 100644
+--- a/configure
++++ b/configure
+@@ -11923,7 +11923,7 @@ if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lcrypto $LIBS"
++LIBS="-lcrypto -pthread $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
+@@ -11958,7 +11958,7 @@ if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
+ #define HAVE_LIBCRYPTO 1
+ _ACEOF
+
+- LIBS="-lcrypto $LIBS"
++ LIBS="-lcrypto -pthread $LIBS"
+
+ else
+ as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
diff --git a/ports/libpq/patches/windows/MSBuildProject-static-crt.patch b/ports/libpq/patches/windows/MSBuildProject-static-crt.patch
new file mode 100644
index 000000000..03bd832f8
--- /dev/null
+++ b/ports/libpq/patches/windows/MSBuildProject-static-crt.patch
@@ -0,0 +1,23 @@
+diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm
+index 823357c02..faa3e336f 100644
+--- a/src/tools/msvc/MSBuildProject.pm
++++ b/src/tools/msvc/MSBuildProject.pm
+@@ -84,16 +84,16 @@ EOF
+ defs => "_DEBUG;DEBUG=1",
+ opt => 'Disabled',
+ strpool => 'false',
+- runtime => 'MultiThreadedDebugDLL'
++ runtime => 'MultiThreadedDebug'
+ });
+ $self->WriteItemDefinitionGroup(
+ $f,
+ 'Release',
+ {
+ defs => "",
+ opt => 'Full',
+ strpool => 'true',
+- runtime => 'MultiThreadedDLL'
++ runtime => 'MultiThreaded'
+ });
+ return;
+ }
diff --git a/ports/libpq/patches/windows/MSBuildProject-static-lib.patch b/ports/libpq/patches/windows/MSBuildProject-static-lib.patch
new file mode 100644
index 000000000..ba72a82bf
--- /dev/null
+++ b/ports/libpq/patches/windows/MSBuildProject-static-lib.patch
@@ -0,0 +1,13 @@
+diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm
+index 823357c02..e1dc59aa7 100644
+--- a/src/tools/msvc/MSBuildProject.pm
++++ b/src/tools/msvc/MSBuildProject.pm
+@@ -262,7 +262,7 @@ sub WriteConfigurationPropertyGroup
+ my $cfgtype =
+ ($self->{type} eq "exe")
+ ? 'Application'
+- : ($self->{type} eq "dll" ? 'DynamicLibrary' : 'StaticLibrary');
++ : ($self->{type} eq "dll" ? 'StaticLibrary' : 'StaticLibrary');
+
+ print $f <<EOF;
+ <PropertyGroup Condition="'\$(Configuration)|\$(Platform)'=='$cfgname|$self->{platform}'" Label="Configuration">
diff --git a/ports/libpq/patches/windows/Mkvcbuild-static-lib.patch b/ports/libpq/patches/windows/Mkvcbuild-static-lib.patch
new file mode 100644
index 000000000..818134f5c
--- /dev/null
+++ b/ports/libpq/patches/windows/Mkvcbuild-static-lib.patch
@@ -0,0 +1,13 @@
+diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
+index 99f39caa5..4f51c12f2 100644
+--- a/src/tools/msvc/Mkvcbuild.pm
++++ b/src/tools/msvc/Mkvcbuild.pm
+@@ -182,7 +182,7 @@ sub mkvcbuild
+ 'syncrep_gram.y');
+ $postgres->AddFiles('src/backend/utils/adt', 'jsonpath_scan.l',
+ 'jsonpath_gram.y');
+- $postgres->AddDefine('BUILDING_DLL');
++ # $postgres->AddDefine('BUILDING_DLL');
+ $postgres->AddLibrary('secur32.lib');
+ $postgres->AddLibrary('ws2_32.lib');
+ $postgres->AddLibrary('wldap32.lib') if ($solution->{options}->{ldap});
diff --git a/ports/libpq/patches/windows/Solution.patch b/ports/libpq/patches/windows/Solution.patch
new file mode 100644
index 000000000..2259e3e8a
--- /dev/null
+++ b/ports/libpq/patches/windows/Solution.patch
@@ -0,0 +1,39 @@
+diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm
+index 51711c2bf..d33fdc3b0 100644
+--- a/src/tools/msvc/Solution.pm
++++ b/src/tools/msvc/Solution.pm
+@@ -69,9 +69,15 @@ sub DeterminePlatform
+ my $self = shift;
+
+ # Examine CL help output to determine if we are in 32 or 64-bit mode.
+- my $output = `cl /? 2>&1`;
++ my $output = `cl 2>&1`;
+ $? >> 8 == 0 or die "cl command not found";
+- $self->{platform} = ($output =~ /^\/favor:<.+AMD64/m) ? 'x64' : 'Win32';
++ if ($output =~ m/x64\n/) { $self->{platform} = 'x64';
++ } elsif ($output =~ m/x86\n/) { $self->{platform} = 'Win32';
++ } elsif ($output =~ m/ARM64\n/) { $self->{platform} = 'ARM64';
++ } elsif ($output =~ m/ARM\n/) { $self->{platform} = 'ARM';
++ } else { $self->{platform} = 'Unknown'
++ }
++ print "cl output $output.";
+ print "Detected hardware platform: $self->{platform}\n";
+ return;
+ }
+@@ -526,14 +526,14 @@ EOF
+ || confess "Could not open pg_config_paths.h";
+ print $o <<EOF;
+ #define PGBINDIR "/bin"
+-#define PGSHAREDIR "/share"
++#define PGSHAREDIR "/share/libpq"
+ #define SYSCONFDIR "/etc"
+ #define INCLUDEDIR "/include"
+ #define PKGINCLUDEDIR "/include"
+ #define INCLUDEDIRSERVER "/include/server"
+ #define LIBDIR "/lib"
+ #define PKGLIBDIR "/lib"
+-#define LOCALEDIR "/share/locale"
++#define LOCALEDIR "/share/libpq/locale"
+ #define DOCDIR "/doc"
+ #define HTMLDIR "/doc"
+ #define MANDIR "/man"
diff --git a/ports/libpq/patches/windows/Solution_Debug.patch b/ports/libpq/patches/windows/Solution_Debug.patch
new file mode 100644
index 000000000..646c0407f
--- /dev/null
+++ b/ports/libpq/patches/windows/Solution_Debug.patch
@@ -0,0 +1,157 @@
+diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm
+index 51711c2bf..d33fdc3b0 100644
+--- a/src/tools/msvc/Solution.pm
++++ b/src/tools/msvc/Solution.pm
+@@ -650,7 +650,7 @@ sub AddProject
+ if ($self->{options}->{zlib})
+ {
+ $proj->AddIncludeDir($self->{options}->{zlib} . '\include');
+- $proj->AddLibrary($self->{options}->{zlib} . '\lib\zdll.lib');
++ $proj->AddLibrary($self->{options}->{zlib} . '\debug\lib\zlibd.lib'); # This must be updated
+ }
+ if ($self->{options}->{openssl})
+ {
+@@ -661,7 +661,7 @@ sub AddProject
+ # changed their library names from:
+ # - libeay to libcrypto
+ # - ssleay to libssl
+- if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0')
++ if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0') # This must be updated
+ {
+ my $dbgsuffix;
+ my $libsslpath;
+@@ -670,27 +670,27 @@ sub AddProject
+ # The format name of the libraries is slightly
+ # different between the Win32 and Win64 platform, so
+ # adapt.
+- if (-e "$self->{options}->{openssl}/lib/VC/sslcrypto32MD.lib")
++ if (-e "$self->{options}->{openssl}/lib/VC/sslcrypto32MD.lib") # This must be updated
+ {
+ # Win32 here, with a debugging library set.
+ $dbgsuffix = 1;
+- $libsslpath = '\lib\VC\libssl32.lib';
+- $libcryptopath = '\lib\VC\libcrypto32.lib';
++ $libsslpath = '\lib\VC\libssl32.lib'; # This must be updated
++ $libcryptopath = '\lib\VC\libcrypto32.lib'; # This must be updated
+ }
+- elsif (-e "$self->{options}->{openssl}/lib/VC/sslcrypto64MD.lib")
++ elsif (-e "$self->{options}->{openssl}/lib/VC/sslcrypto64MD.lib") # This must be updated
+ {
+ # Win64 here, with a debugging library set.
+ $dbgsuffix = 1;
+- $libsslpath = '\lib\VC\libssl64.lib';
+- $libcryptopath = '\lib\VC\libcrypto64.lib';
++ $libsslpath = '\lib\VC\libssl64.lib'; # This must be updated
++ $libcryptopath = '\lib\VC\libcrypto64.lib'; # This must be updated
+ }
+ else
+ {
+ # On both Win32 and Win64 the same library
+ # names are used without a debugging context.
+ $dbgsuffix = 0;
+- $libsslpath = '\lib\libssl.lib';
+- $libcryptopath = '\lib\libcrypto.lib';
++ $libsslpath = '\debug\lib\libssl.lib'; # This must be updated
++ $libcryptopath = '\debug\lib\libcrypto.lib'; # This must be updated
+ }
+
+ $proj->AddLibrary($self->{options}->{openssl} . $libsslpath,
+@@ -698,16 +698,16 @@ sub AddProject
+ $proj->AddLibrary($self->{options}->{openssl} . $libcryptopath,
+ $dbgsuffix);
+ }
+- else
++ else
+ {
+ # Choose which set of libraries to use depending on if
+ # debugging libraries are in place in the installer.
+- if (-e "$self->{options}->{openssl}/lib/VC/ssleay32MD.lib")
++ if (-e "$self->{options}->{openssl}/lib/VC/ssleay32MD.lib") # This must be updated
+ {
+ $proj->AddLibrary(
+- $self->{options}->{openssl} . '\lib\VC\ssleay32.lib', 1);
++ $self->{options}->{openssl} . '\lib\VC\ssleay32.lib', 1); # This must be updated
+ $proj->AddLibrary(
+- $self->{options}->{openssl} . '\lib\VC\libeay32.lib', 1);
++ $self->{options}->{openssl} . '\lib\VC\libeay32.lib', 1); # This must be updated
+ }
+ else
+ {
+@@ -715,60 +715,60 @@ sub AddProject
+ # to be here, so don't ask for it in last
+ # parameter.
+ $proj->AddLibrary(
+- $self->{options}->{openssl} . '\lib\ssleay32.lib', 0);
++ $self->{options}->{openssl} . '\debug\lib\ssleay32.lib', 0); # This must be updated
+ $proj->AddLibrary(
+- $self->{options}->{openssl} . '\lib\libeay32.lib', 0);
++ $self->{options}->{openssl} . '\debug\lib\libeay32.lib', 0); # This must be updated
+ }
+ }
+ }
+ if ($self->{options}->{nls})
+ {
+ $proj->AddIncludeDir($self->{options}->{nls} . '\include');
+- $proj->AddLibrary($self->{options}->{nls} . '\lib\libintl.lib');
++ $proj->AddLibrary($self->{options}->{nls} . '\debug\lib\libintl.lib'); # This must be updated
+ }
+ if ($self->{options}->{gss})
+ {
+- $proj->AddIncludeDir($self->{options}->{gss} . '\inc\krb5');
+- $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\krb5_32.lib');
+- $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\comerr32.lib');
+- $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\gssapi32.lib');
++ $proj->AddIncludeDir($self->{options}->{gss} . '\inc\krb5'); # This must be updated
++ $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\krb5_32.lib'); # This must be updated
++ $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\comerr32.lib');# This must be updated
++ $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\gssapi32.lib');# This must be updated
+ }
+ if ($self->{options}->{iconv})
+ {
+ $proj->AddIncludeDir($self->{options}->{iconv} . '\include');
+- $proj->AddLibrary($self->{options}->{iconv} . '\lib\iconv.lib');
++ $proj->AddLibrary($self->{options}->{iconv} . '\debug\lib\iconv.lib'); # This must be updated
+ }
+ if ($self->{options}->{icu})
+ {
+ $proj->AddIncludeDir($self->{options}->{icu} . '\include');
+ if ($self->{platform} eq 'Win32')
+ {
+- $proj->AddLibrary($self->{options}->{icu} . '\lib\icuin.lib');
+- $proj->AddLibrary($self->{options}->{icu} . '\lib\icuuc.lib');
+- $proj->AddLibrary($self->{options}->{icu} . '\lib\icudt.lib');
++ $proj->AddLibrary($self->{options}->{icu} . '\debug\lib\icuind.lib'); # This must be updated
++ $proj->AddLibrary($self->{options}->{icu} . '\debug\lib\icuucd.lib'); # This must be updated
++ $proj->AddLibrary($self->{options}->{icu} . '\debug\lib\icudtd.lib'); # This must be updated
+ }
+ else
+ {
+- $proj->AddLibrary($self->{options}->{icu} . '\lib64\icuin.lib');
+- $proj->AddLibrary($self->{options}->{icu} . '\lib64\icuuc.lib');
+- $proj->AddLibrary($self->{options}->{icu} . '\lib64\icudt.lib');
++ $proj->AddLibrary($self->{options}->{icu} . '\debug\lib\icuind.lib'); # This must be updated
++ $proj->AddLibrary($self->{options}->{icu} . '\debug\lib\icuucd.lib'); # This must be updated
++ $proj->AddLibrary($self->{options}->{icu} . '\debug\lib\icudtd.lib'); # This must be updated
+ }
+ }
+ if ($self->{options}->{xml})
+ {
+ $proj->AddIncludeDir($self->{options}->{xml} . '\include');
+ $proj->AddIncludeDir($self->{options}->{xml} . '\include\libxml2');
+- $proj->AddLibrary($self->{options}->{xml} . '\lib\libxml2.lib');
++ $proj->AddLibrary($self->{options}->{xml} . '\debug\lib\libxml2.lib'); # This must be updated
+ }
+ if ($self->{options}->{xslt})
+ {
+ $proj->AddIncludeDir($self->{options}->{xslt} . '\include');
+- $proj->AddLibrary($self->{options}->{xslt} . '\lib\libxslt.lib');
++ $proj->AddLibrary($self->{options}->{xslt} . '\debug\lib\libxslt.lib'); # This must be updated
+ }
+ if ($self->{options}->{uuid})
+ {
+ $proj->AddIncludeDir($self->{options}->{uuid} . '\include');
+- $proj->AddLibrary($self->{options}->{uuid} . '\lib\uuid.lib');
++ $proj->AddLibrary($self->{options}->{uuid} . '\debug\lib\uuid.lib'); # This must be updated
+ }
+ return $proj;
+ }
diff --git a/ports/libpq/patches/windows/Solution_Release.patch b/ports/libpq/patches/windows/Solution_Release.patch
new file mode 100644
index 000000000..442beb6c7
--- /dev/null
+++ b/ports/libpq/patches/windows/Solution_Release.patch
@@ -0,0 +1,157 @@
+diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm
+index 51711c2bf..d33fdc3b0 100644
+--- a/src/tools/msvc/Solution.pm
++++ b/src/tools/msvc/Solution.pm
+@@ -650,7 +650,7 @@ sub AddProject
+ if ($self->{options}->{zlib})
+ {
+ $proj->AddIncludeDir($self->{options}->{zlib} . '\include');
+- $proj->AddLibrary($self->{options}->{zlib} . '\lib\zdll.lib');
++ $proj->AddLibrary($self->{options}->{zlib} . '\lib\zlib.lib'); # This must be updated
+ }
+ if ($self->{options}->{openssl})
+ {
+@@ -661,7 +661,7 @@ sub AddProject
+ # changed their library names from:
+ # - libeay to libcrypto
+ # - ssleay to libssl
+- if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0')
++ if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0') # This must be updated
+ {
+ my $dbgsuffix;
+ my $libsslpath;
+@@ -670,27 +670,27 @@ sub AddProject
+ # The format name of the libraries is slightly
+ # different between the Win32 and Win64 platform, so
+ # adapt.
+- if (-e "$self->{options}->{openssl}/lib/VC/sslcrypto32MD.lib")
++ if (-e "$self->{options}->{openssl}/lib/VC/sslcrypto32MD.lib") # This must be updated
+ {
+ # Win32 here, with a debugging library set.
+ $dbgsuffix = 1;
+- $libsslpath = '\lib\VC\libssl32.lib';
+- $libcryptopath = '\lib\VC\libcrypto32.lib';
++ $libsslpath = '\lib\VC\libssl32.lib'; # This must be updated
++ $libcryptopath = '\lib\VC\libcrypto32.lib'; # This must be updated
+ }
+- elsif (-e "$self->{options}->{openssl}/lib/VC/sslcrypto64MD.lib")
++ elsif (-e "$self->{options}->{openssl}/lib/VC/sslcrypto64MD.lib") # This must be updated
+ {
+ # Win64 here, with a debugging library set.
+ $dbgsuffix = 1;
+- $libsslpath = '\lib\VC\libssl64.lib';
+- $libcryptopath = '\lib\VC\libcrypto64.lib';
++ $libsslpath = '\lib\VC\libssl64.lib'; # This must be updated
++ $libcryptopath = '\lib\VC\libcrypto64.lib'; # This must be updated
+ }
+ else
+ {
+ # On both Win32 and Win64 the same library
+ # names are used without a debugging context.
+ $dbgsuffix = 0;
+- $libsslpath = '\lib\libssl.lib';
+- $libcryptopath = '\lib\libcrypto.lib';
++ $libsslpath = '\lib\libssl.lib'; # This must be updated
++ $libcryptopath = '\lib\libcrypto.lib'; # This must be updated
+ }
+
+ $proj->AddLibrary($self->{options}->{openssl} . $libsslpath,
+@@ -698,16 +698,16 @@ sub AddProject
+ $proj->AddLibrary($self->{options}->{openssl} . $libcryptopath,
+ $dbgsuffix);
+ }
+- else
++ else
+ {
+ # Choose which set of libraries to use depending on if
+ # debugging libraries are in place in the installer.
+- if (-e "$self->{options}->{openssl}/lib/VC/ssleay32MD.lib")
++ if (-e "$self->{options}->{openssl}/lib/VC/ssleay32MD.lib") # This must be updated
+ {
+ $proj->AddLibrary(
+- $self->{options}->{openssl} . '\lib\VC\ssleay32.lib', 1);
++ $self->{options}->{openssl} . '\lib\VC\ssleay32.lib', 1); # This must be updated
+ $proj->AddLibrary(
+- $self->{options}->{openssl} . '\lib\VC\libeay32.lib', 1);
++ $self->{options}->{openssl} . '\lib\VC\libeay32.lib', 1); # This must be updated
+ }
+ else
+ {
+@@ -715,60 +715,60 @@ sub AddProject
+ # to be here, so don't ask for it in last
+ # parameter.
+ $proj->AddLibrary(
+- $self->{options}->{openssl} . '\lib\ssleay32.lib', 0);
++ $self->{options}->{openssl} . '\lib\ssleay32.lib', 0); # This must be updated
+ $proj->AddLibrary(
+- $self->{options}->{openssl} . '\lib\libeay32.lib', 0);
++ $self->{options}->{openssl} . '\lib\libeay32.lib', 0); # This must be updated
+ }
+ }
+ }
+ if ($self->{options}->{nls})
+ {
+ $proj->AddIncludeDir($self->{options}->{nls} . '\include');
+- $proj->AddLibrary($self->{options}->{nls} . '\lib\libintl.lib');
++ $proj->AddLibrary($self->{options}->{nls} . '\lib\libintl.lib'); # This must be updated
+ }
+ if ($self->{options}->{gss})
+ {
+- $proj->AddIncludeDir($self->{options}->{gss} . '\inc\krb5');
+- $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\krb5_32.lib');
+- $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\comerr32.lib');
+- $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\gssapi32.lib');
++ $proj->AddIncludeDir($self->{options}->{gss} . '\inc\krb5'); # This must be updated
++ $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\krb5_32.lib'); # This must be updated
++ $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\comerr32.lib');# This must be updated
++ $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\gssapi32.lib');# This must be updated
+ }
+ if ($self->{options}->{iconv})
+ {
+ $proj->AddIncludeDir($self->{options}->{iconv} . '\include');
+- $proj->AddLibrary($self->{options}->{iconv} . '\lib\iconv.lib');
++ $proj->AddLibrary($self->{options}->{iconv} . '\lib\iconv.lib'); # This must be updated
+ }
+ if ($self->{options}->{icu})
+ {
+ $proj->AddIncludeDir($self->{options}->{icu} . '\include');
+ if ($self->{platform} eq 'Win32')
+ {
+- $proj->AddLibrary($self->{options}->{icu} . '\lib\icuin.lib');
+- $proj->AddLibrary($self->{options}->{icu} . '\lib\icuuc.lib');
+- $proj->AddLibrary($self->{options}->{icu} . '\lib\icudt.lib');
++ $proj->AddLibrary($self->{options}->{icu} . '\lib\icuin.lib'); # This must be updated
++ $proj->AddLibrary($self->{options}->{icu} . '\lib\icuuc.lib'); # This must be updated
++ $proj->AddLibrary($self->{options}->{icu} . '\lib\icudt.lib'); # This must be updated
+ }
+ else
+ {
+- $proj->AddLibrary($self->{options}->{icu} . '\lib64\icuin.lib');
+- $proj->AddLibrary($self->{options}->{icu} . '\lib64\icuuc.lib');
+- $proj->AddLibrary($self->{options}->{icu} . '\lib64\icudt.lib');
++ $proj->AddLibrary($self->{options}->{icu} . '\lib\icuin.lib'); # This must be updated
++ $proj->AddLibrary($self->{options}->{icu} . '\lib\icuuc.lib'); # This must be updated
++ $proj->AddLibrary($self->{options}->{icu} . '\lib\icudt.lib'); # This must be updated
+ }
+ }
+ if ($self->{options}->{xml})
+ {
+ $proj->AddIncludeDir($self->{options}->{xml} . '\include');
+ $proj->AddIncludeDir($self->{options}->{xml} . '\include\libxml2');
+- $proj->AddLibrary($self->{options}->{xml} . '\lib\libxml2.lib');
++ $proj->AddLibrary($self->{options}->{xml} . '\lib\libxml2.lib'); # This must be updated
+ }
+ if ($self->{options}->{xslt})
+ {
+ $proj->AddIncludeDir($self->{options}->{xslt} . '\include');
+- $proj->AddLibrary($self->{options}->{xslt} . '\lib\libxslt.lib');
++ $proj->AddLibrary($self->{options}->{xslt} . '\lib\libxslt.lib'); # This must be updated
+ }
+ if ($self->{options}->{uuid})
+ {
+ $proj->AddIncludeDir($self->{options}->{uuid} . '\include');
+- $proj->AddLibrary($self->{options}->{uuid} . '\lib\uuid.lib');
++ $proj->AddLibrary($self->{options}->{uuid} . '\lib\uuid.lib'); # This must be updated
+ }
+ return $proj;
+ }
diff --git a/ports/libpq/patches/windows/arm.patch b/ports/libpq/patches/windows/arm.patch
new file mode 100644
index 000000000..0e47c34b9
--- /dev/null
+++ b/ports/libpq/patches/windows/arm.patch
@@ -0,0 +1,39 @@
+diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
+index 99f39caa5..4f51c12f2 100644
+--- a/src/tools/msvc/Mkvcbuild.pm
++++ b/src/tools/msvc/Mkvcbuild.pm
+@@ -110,8 +110,8 @@ sub mkvcbuild
+
+ if ($vsVersion >= '9.00')
+ {
+- push(@pgportfiles, 'pg_crc32c_sse42_choose.c');
+- push(@pgportfiles, 'pg_crc32c_sse42.c');
++ #push(@pgportfiles, 'pg_crc32c_sse42_choose.c');
++ #push(@pgportfiles, 'pg_crc32c_sse42.c');
+ push(@pgportfiles, 'pg_crc32c_sb8.c');
+ }
+ else
+diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm
+index 823357c02..625f32bf8 100644
+--- a/src/tools/msvc/MSBuildProject.pm
++++ b/src/tools/msvc/MSBuildProject.pm
+@@ -307,9 +307,8 @@ sub WriteItemDefinitionGroup
+ : ($self->{type} eq "dll" ? 'DynamicLibrary' : 'StaticLibrary');
+ my $libs = $self->GetAdditionalLinkerDependencies($cfgname, ';');
+
+- my $targetmachine =
+- $self->{platform} eq 'Win32' ? 'MachineX86' : 'MachineX64';
+-
++ my $targetmachine = $self->{platform} eq 'ARM64' ? 'MachineARM64' : 'MachineARM';
++
+ my $includes = $self->{includes};
+ unless ($includes eq '' or $includes =~ /;$/)
+ {
+@@ -347,7 +349,6 @@ sub WriteItemDefinitionGroup
+ <ProgramDatabaseFile>.\\$cfgname\\$self->{name}\\$self->{name}.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>false</GenerateMapFile>
+ <MapFileName>.\\$cfgname\\$self->{name}\\$self->{name}.map</MapFileName>
+- <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <!-- Permit links to MinGW-built, 32-bit DLLs (default before VS2012). -->
+ <ImageHasSafeExceptionHandlers/>
+ <SubSystem>Console</SubSystem>
diff --git a/ports/libpq/patches/windows/install.patch b/ports/libpq/patches/windows/install.patch
new file mode 100644
index 000000000..206dd1da0
--- /dev/null
+++ b/ports/libpq/patches/windows/install.patch
@@ -0,0 +1,225 @@
+diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm
+index d109b2c90..75c7446e6 100644
+--- a/src/tools/msvc/Install.pm
++++ b/src/tools/msvc/Install.pm
+@@ -106,7 +106,7 @@ sub Install
+ }
+ },
+ @top_dir);
+- CopySetOfFiles('config files', $sample_files, $target . '/share/');
++ CopySetOfFiles('config files', $sample_files, $target . '/share/libpq/');
+ CopyFiles(
+ 'Import libraries',
+ $target . '/lib/',
+@@ -78,10 +78,10 @@ sub Install
+ my $majorver = DetermineMajorVersion();
+ print "Installing version $majorver for $conf in $target\n";
+
+- my @client_dirs = ('bin', 'lib', 'share', 'symbols');
++ my @client_dirs = ('bin', 'lib', 'share', 'tools', 'share/libpq', 'tools/libpq');
+ my @all_dirs = (
+- @client_dirs, 'doc', 'doc/contrib', 'doc/extension', 'share/contrib',
+- 'share/extension', 'share/timezonesets', 'share/tsearch_data');
++ @client_dirs, 'doc', 'doc/libpq', 'doc/libpq/contrib', 'doc/libpq/extension', 'share/libpq/contrib',
++ 'share/libpq/extension', 'share/libpq/timezonesets', 'share/libpq/tsearch_data');
+ if ($insttype eq "client")
+ {
+ EnsureDirectories($target, @client_dirs);
+@@ -120,35 +120,35 @@ sub Install
+ CopySetOfFiles(
+ 'timezone names',
+ [ glob('src\timezone\tznames\*.txt') ],
+- $target . '/share/timezonesets/');
++ $target . '/share/libpq/timezonesets/');
+ CopyFiles(
+ 'timezone sets',
+- $target . '/share/timezonesets/',
++ $target . '/share/libpq/timezonesets/',
+ 'src/timezone/tznames/', 'Default', 'Australia', 'India');
+ CopySetOfFiles(
+ 'BKI files',
+ [ glob("src\\backend\\catalog\\postgres.*") ],
+- $target . '/share/');
++ $target . '/share/libpq/');
+ CopySetOfFiles(
+ 'SQL files',
+ [ glob("src\\backend\\catalog\\*.sql") ],
+- $target . '/share/');
++ $target . '/share/libpq/');
+ CopyFiles(
+- 'Information schema data', $target . '/share/',
++ 'Information schema data', $target . '/share/libpq/',
+ 'src/backend/catalog/', 'sql_features.txt');
+ CopyFiles(
+- 'Error code data', $target . '/share/',
++ 'Error code data', $target . '/share/libpq/',
+ 'src/backend/utils/', 'errcodes.txt');
+ GenerateTimezoneFiles($target, $conf);
+ GenerateTsearchFiles($target);
+ CopySetOfFiles(
+ 'Stopword files',
+ [ glob("src\\backend\\snowball\\stopwords\\*.stop") ],
+- $target . '/share/tsearch_data/');
++ $target . '/share/libpq/tsearch_data/');
+ CopySetOfFiles(
+ 'Dictionaries sample files',
+ [ glob("src\\backend\\tsearch\\dicts\\*_sample*") ],
+- $target . '/share/tsearch_data/');
++ $target . '/share/libpq/tsearch_data/');
+
+ my $pl_extension_files = [];
+ my @pldirs = ('src/pl/plpgsql/src');
+@@ -167,7 +167,7 @@ sub Install
+ },
+ @pldirs);
+ CopySetOfFiles('PL Extension files',
+- $pl_extension_files, $target . '/share/extension/');
++ $pl_extension_files, $target . '/share/libpq/extension/');
+ }
+
+ GenerateNLSFiles($target, $config->{nls}, $majorver) if ($config->{nls});
+@@ -282,23 +282,26 @@ sub CopySolutionOutput
+ {
+ if ($1 == 1)
+ {
+- push(@{ $install_list{'bin'} }, "exe");
++ push(@{ $install_list{'tools\\libpq'} }, "exe");
+ }
+ elsif ($1 == 2)
+ {
+- push(@{ $install_list{'lib'} }, "dll");
++ push(@{ $install_list{'bin'} }, "dll");
+ if ($is_sharedlib)
+ {
+ push(@{ $install_list{'bin'} }, "dll");
+ push(@{ $install_list{'lib'} }, "lib");
+ }
++ else
++ {
++ push(@{ $install_list{'lib'} }, "lib");
++ }
+ }
+ else
+ {
+-
++ push(@{ $install_list{'lib'} }, "lib");
+ # Static libraries, such as libpgport, only used internally
+ # during build, don't install.
+- next;
+ }
+ }
+ elsif ($vcproj eq 'vcxproj'
+@@ -306,11 +309,11 @@ sub CopySolutionOutput
+ {
+ if ($1 eq 'Application')
+ {
+- push(@{ $install_list{'bin'} }, "exe");
++ push(@{ $install_list{'tools\\libpq'} }, "exe");
+ }
+ elsif ($1 eq 'DynamicLibrary')
+ {
+- push(@{ $install_list{'lib'} }, "dll");
++ push(@{ $install_list{'bin'} }, "dll");
+ if ($is_sharedlib)
+ {
+ push(@{ $install_list{'bin'} }, "dll");
+@@ -319,10 +322,9 @@ sub CopySolutionOutput
+ }
+ else # 'StaticLibrary'
+ {
+-
++ push(@{ $install_list{'lib'} }, "lib");
+ # Static lib, such as libpgport, only used internally
+ # during build, don't install.
+- next;
+ }
+ }
+ else
+@@ -339,7 +339,7 @@ sub CopySolutionOutput
+ || croak "Could not copy $pf.$ext\n";
+ }
+ }
+- lcopy("$conf\\$pf\\$pf.pdb", "$target\\symbols\\$pf.pdb")
++ lcopy("$conf\\$pf\\$pf.pdb", "$target\\bin\\$pf.pdb")
+ || croak "Could not copy $pf.pdb\n";
+ print ".";
+ }
+@@ -366,7 +366,7 @@ sub GenerateTimezoneFiles
+ print "Generating timezone files...";
+
+ my @args =
+- ("$conf/zic/zic", '-d', "$target/share/timezone", '-p', "$posixrules");
++ ("$conf/zic/zic", '-d', "$target/share/libpq/timezone", '-p', "$posixrules");
+ foreach (@tzfiles)
+ {
+ my $tzfile = $_;
+@@ -391,7 +391,7 @@ sub GenerateTsearchFiles
+ $mf =~ /^LANGUAGES\s*=\s*(.*)$/m
+ || die "Could not find LANGUAGES line in snowball Makefile\n";
+ my @pieces = split /\s+/, $1;
+- open($F, '>', "$target/share/snowball_create.sql")
++ open($F, '>', "$target/share/libpq/snowball_create.sql")
+ || die "Could not write snowball_create.sql";
+ print $F read_file('src/backend/snowball/snowball_func.sql.in');
+
+@@ -476,7 +476,7 @@ sub CopySubdirFiles
+ foreach my $f (split /\s+/, $flist)
+ {
+ lcopy("$subdir/$module/$f.control",
+- "$target/share/extension/$f.control")
++ "$target/share/libpq/extension/$f.control")
+ || croak("Could not copy file $f.control in contrib $module");
+ print '.';
+ }
+@@ -494,7 +494,7 @@ sub CopySubdirFiles
+ foreach my $f (split /\s+/, $flist)
+ {
+ lcopy("$subdir/$module/$f",
+- "$target/share/$moduledir/" . basename($f))
++ "$target/share/libpq/$moduledir/" . basename($f))
+ || croak("Could not copy file $f in contrib $module");
+ print '.';
+ }
+@@ -509,7 +509,7 @@ sub CopySubdirFiles
+ foreach my $f (split /\s+/, $flist)
+ {
+ lcopy("$subdir/$module/$f",
+- "$target/share/tsearch_data/" . basename($f))
++ "$target/share/libpq/tsearch_data/" . basename($f))
+ || croak("Could not copy file $f in $subdir $module");
+ print '.';
+ }
+@@ -572,7 +572,7 @@ sub CopySubdirFiles
+ if ($module eq 'spi');
+ foreach my $f (split /\s+/, $flist)
+ {
+- lcopy("$subdir/$module/$f", "$target/doc/$moduledir/$f")
++ lcopy("$subdir/$module/$f", "$target/doc/libpq/$moduledir/$f")
+ || croak("Could not copy file $f in contrib $module");
+ print '.';
+ }
+@@ -701,7 +701,7 @@ sub GenerateNLSFiles
+ my $majorver = shift;
+
+ print "Installing NLS files...";
+- EnsureDirectories($target, "share/locale");
++ EnsureDirectories($target, "share/libpq/locale");
+ my @flist;
+ File::Find::find(
+ {
+@@ -723,12 +723,12 @@ sub GenerateNLSFiles
+ next unless /([^\/]+)\.po/;
+ $lang = $1;
+
+- EnsureDirectories($target, "share/locale/$lang",
+- "share/locale/$lang/LC_MESSAGES");
++ EnsureDirectories($target, "share/libpq/locale/$lang",
++ "share/libpq/locale/$lang/LC_MESSAGES");
+ my @args = (
+ "$nlspath\\bin\\msgfmt",
+ '-o',
+- "$target\\share\\locale\\$lang\\LC_MESSAGES\\$prgm-$majorver.mo",
++ "$target\\share\\libpq\\locale\\$lang\\LC_MESSAGES\\$prgm-$majorver.mo",
+ $_);
+ system(@args) && croak("Could not run msgfmt on $dir\\$_");
+ print ".";
diff --git a/ports/libpq/patches/windows/minimize_install.patch b/ports/libpq/patches/windows/minimize_install.patch
new file mode 100644
index 000000000..1d1eb2b57
--- /dev/null
+++ b/ports/libpq/patches/windows/minimize_install.patch
@@ -0,0 +1,35 @@
+diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm
+index d109b2c90..75c7446e6 100644
+--- a/src/tools/msvc/Install.pm
++++ b/src/tools/msvc/Install.pm
+@@ -19,13 +19,13 @@ our (@ISA, @EXPORT_OK);
+
+ my $insttype;
+ my @client_contribs = ('oid2name', 'pgbench', 'vacuumlo');
+-my @client_program_files = (
+- 'clusterdb', 'createdb', 'createuser', 'dropdb',
+- 'dropuser', 'ecpg', 'libecpg', 'libecpg_compat',
+- 'libpgtypes', 'libpq', 'pg_basebackup', 'pg_config',
+- 'pg_dump', 'pg_dumpall', 'pg_isready', 'pg_receivewal',
+- 'pg_recvlogical', 'pg_restore', 'psql', 'reindexdb',
+- 'vacuumdb', @client_contribs);
++my @client_program_files = ( 'libecpg','libecpg_compat', 'libpgtypes', 'libpq' );
++ # 'clusterdb', 'createdb', 'createuser', 'dropdb',
++ # 'dropuser', 'ecpg', 'libecpg', 'libecpg_compat',
++ #'libpgtypes', 'libpq', 'pg_basebackup', 'pg_config',
++ #'pg_dump', 'pg_dumpall', 'pg_isready', 'pg_receivewal',
++ #'pg_recvlogical', 'pg_restore', 'psql', 'reindexdb',
++ #'vacuumdb', @client_contribs);
+
+ sub lcopy
+ {
+@@ -110,7 +110,7 @@ sub Install
+ CopyFiles(
+ 'Import libraries',
+ $target . '/lib/',
+- "$conf\\", "postgres\\postgres.lib", "libpgcommon\\libpgcommon.lib",
++ "$conf\\", "libpgcommon\\libpgcommon.lib",
+ "libpgport\\libpgport.lib");
+ CopyContribFiles($config, $target);
+ CopyIncludeFiles($target);
+
diff --git a/ports/libpq/patches/windows/openssl_exe_path.patch b/ports/libpq/patches/windows/openssl_exe_path.patch
new file mode 100644
index 000000000..cf2930f7f
--- /dev/null
+++ b/ports/libpq/patches/windows/openssl_exe_path.patch
@@ -0,0 +1,34 @@
+diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm
+index 51711c2bf..d33fdc3b0 100644
+--- a/src/tools/msvc/Solution.pm
++++ b/src/tools/msvc/Solution.pm
+@@ -127,19 +127,19 @@ sub GetOpenSSLVersion
+ # openssl.exe is in the specified directory.
+ my $opensslcmd =
+ $self->{options}->{openssl} . "\\bin\\openssl.exe version 2>&1";
+- my $sslout = `$opensslcmd`;
++ #my $sslout = `$opensslcmd`;
+
+- $? >> 8 == 0
+- or croak
+- "Unable to determine OpenSSL version: The openssl.exe command wasn't found.";
++ #$? >> 8 == 0
++ # or croak
++ # "Unable to determine OpenSSL version: The openssl.exe command wasn't found.";
+
+- if ($sslout =~ /(\d+)\.(\d+)\.(\d+)(\D)/m)
+- {
+- return ($1, $2, $3);
+- }
++ #if ($sslout =~ /(\d+)\.(\d+)\.(\d+)(\D)/m)
++ #{
++ return (1, 1, 1);
++ #}
+
+- croak
+- "Unable to determine OpenSSL version: The openssl.exe version could not be determined.";
++ #croak
++ # "Unable to determine OpenSSL version: The openssl.exe version could not be determined.";
+ }
+
+ sub GenerateFiles
diff --git a/ports/libpq/patches/windows/win_bison_flex.patch b/ports/libpq/patches/windows/win_bison_flex.patch
new file mode 100644
index 000000000..95df3f495
--- /dev/null
+++ b/ports/libpq/patches/windows/win_bison_flex.patch
@@ -0,0 +1,43 @@
+diff --git a/src/tools/msvc/pgflex.pl b/src/tools/msvc/pgflex.pl
+index aceed5ffd..f6ed215e8 100644
+--- a/src/tools/msvc/pgflex.pl
++++ b/src/tools/msvc/pgflex.pl
+@@ -12,7 +12,7 @@ $ENV{CYGWIN} = 'nodosfilewarning';
+
+ do './src/tools/msvc/buildenv.pl' if -e 'src/tools/msvc/buildenv.pl';
+
+-my ($flexver) = `flex -V`; # grab first line
++my ($flexver) = `win_flex -V`; # grab first line
+ $flexver = (split(/\s+/, $flexver))[1];
+ $flexver =~ s/[^0-9.]//g;
+ my @verparts = split(/\./, $flexver);
+@@ -48,7 +47,7 @@ close($mf);
+ my $basetarg = basename($output);
+ my $flexflags = ($make =~ /^$basetarg:\s*FLEXFLAGS\s*=\s*(\S.*)/m ? $1 : '');
+
+-system("flex $flexflags -o$output $input");
++system("win_flex $flexflags -o$output $input");
+ if ($? == 0)
+ {
+
+diff --git a/src/tools/msvc/pgbison.pl b/src/tools/msvc/pgbison.pl
+index 895e398c0..f5b524a5d 100644
+--- a/src/tools/msvc/pgbison.pl
++++ b/src/tools/msvc/pgbison.pl
+@@ -9,7 +9,7 @@ use File::Basename;
+
+ do './src/tools/msvc/buildenv.pl' if -e 'src/tools/msvc/buildenv.pl';
+
+-my ($bisonver) = `bison -V`; # grab first line
++my ($bisonver) = `win_bison -V`; # grab first line
+ $bisonver = (split(/\s+/, $bisonver))[3]; # grab version number
+
+ unless ($bisonver eq '1.875' || $bisonver ge '2.2')
+@@ -45,5 +45,5 @@ close($mf);
+ my $basetarg = basename($output);
+ my $headerflag = ($make =~ /^$basetarg:\s+BISONFLAGS\b.*-d/m ? '-d' : '');
+
+-system("bison $headerflag $input -o $output");
++system("win_bison $headerflag $input -o $output");
+ exit $? >> 8;
+