vcpkg/ports/libpq/patches/windows/Solution.patch
Daniel Schürmann 440075a9fc
[libpq] Update version to 14.1 2 (#22516)
* update to 14.1

* adjust patches

* add lz4 feature on !windows

* version stuff

* [skip actions] patch configure.ac and run autoreconf

* fix some stuff

* [skip actions] more details

* [libpq] Add license filed to vcpkg json

* [libpq] Adjust tcl version to 90g 90s and 90sg

* [libpq] fail early from unsupported features

* [libpq] lake xslt dependent from xml

* [libpq] Update version database

* [libpq] quote static

* [libpq] Update Version Database

Co-authored-by: Alexander Neumann <Alexander.Neumann@hamburg.de>
2022-03-23 16:41:00 -07:00

46 lines
1.5 KiB
Diff

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
@@ -63,17 +63,21 @@ sub DeterminePlatform
my $self = shift;
if ($^O eq "MSWin32")
{
# Examine CL help output to determine if we are in 32 or 64-bit mode.
my $output = `cl /help 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'
+ }
}
else
{
$self->{platform} = 'FAKE';
}
print "Detected hardware platform: $self->{platform}\n";
return;
}
@@ -757,14 +757,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"