vcpkg/ports/libpq/patches/windows/win_bison_flex.patch
Daniel Schürmann 01a065a970
Libpq update and VCPKG_OSX_SYSROOT fix (#21583)
* [libpq] Update to 12.9

* [libpq] Use VCPKG_OSX_SYSROOT if set

otherwise configure set the default sysroot in addition, ignoring the
sysroot set by vcpkg_configure_cmake.

* [libpq] remove comment only chunks from patches

* [libpq] update version registry
2021-12-14 10:59:38 -08:00

44 lines
1.5 KiB
Diff

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 +48,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 $nodep = $bisonver ge '3.0' ? "-Wno-deprecated" : "";
-system("bison $nodep $headerflag $input -o $output");
+system("win_bison $nodep $headerflag $input -o $output");
exit $? >> 8;