diff options
| author | Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> | 2020-05-18 19:36:03 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-18 10:36:03 -0700 |
| commit | 6b871df7e03690dafdc6d65f606fef036f5db4e8 (patch) | |
| tree | dcde73e81fee79639759033a5ed8a57f446d3597 /ports/libpq/patches | |
| parent | 8a583e80da3b72141105da9003175679af2fcb92 (diff) | |
| download | vcpkg-6b871df7e03690dafdc6d65f606fef036f5db4e8.tar.gz vcpkg-6b871df7e03690dafdc6d65f606fef036f5db4e8.zip | |
[libpq] Update to 12.2 and some feature fixes (#10915)
* fix number of spaces in string replacement
* fix libiconv library name
* [libpq] update to 12.2
fix some issues with features
feature combination client+nls does not compile with latest VS
due to libpq src's accessing an implementation detail (needs upstream fix)
* on arm skip host openssl version check if host cannot execute the triplet version
* use PORT_VERSION to update the version references more easily
* fix tcl and python feature on windows
Diffstat (limited to 'ports/libpq/patches')
| -rw-r--r-- | ports/libpq/patches/windows/MSBuildProject_fix_gendef_perl.patch | 13 | ||||
| -rw-r--r-- | ports/libpq/patches/windows/Solution_Debug.patch | 2 | ||||
| -rw-r--r-- | ports/libpq/patches/windows/Solution_Release.patch | 2 | ||||
| -rw-r--r-- | ports/libpq/patches/windows/host_skip_openssl.patch | 38 | ||||
| -rw-r--r-- | ports/libpq/patches/windows/msgfmt.patch | 13 | ||||
| -rw-r--r-- | ports/libpq/patches/windows/openssl_exe_path.patch | 39 | ||||
| -rw-r--r-- | ports/libpq/patches/windows/python3_build_Debug.patch | 40 | ||||
| -rw-r--r-- | ports/libpq/patches/windows/python3_build_Release.patch | 39 | ||||
| -rw-r--r-- | ports/libpq/patches/windows/python_lib.patch | 17 |
9 files changed, 171 insertions, 32 deletions
diff --git a/ports/libpq/patches/windows/MSBuildProject_fix_gendef_perl.patch b/ports/libpq/patches/windows/MSBuildProject_fix_gendef_perl.patch new file mode 100644 index 000000000..6c52713a9 --- /dev/null +++ b/ports/libpq/patches/windows/MSBuildProject_fix_gendef_perl.patch @@ -0,0 +1,13 @@ +diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm +index 823357c02..b93992f22 100644 +--- a/src/tools/msvc/MSBuildProject.pm ++++ b/src/tools/msvc/MSBuildProject.pm +@@ -381,7 +381,7 @@ EOF + print $f <<EOF; + <PreLinkEvent> + <Message>Generate DEF file</Message> +- <Command>perl src\\tools\\msvc\\gendef.pl $cfgname\\$self->{name} $self->{platform}</Command> ++ <Command>perl "src\\tools\\msvc\\gendef.pl" $cfgname\\$self->{name} $self->{platform}</Command> + </PreLinkEvent> + EOF + } diff --git a/ports/libpq/patches/windows/Solution_Debug.patch b/ports/libpq/patches/windows/Solution_Debug.patch index 646c0407f..07e57497b 100644 --- a/ports/libpq/patches/windows/Solution_Debug.patch +++ b/ports/libpq/patches/windows/Solution_Debug.patch @@ -110,7 +110,7 @@ index 51711c2bf..d33fdc3b0 100644 { $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 ++ $proj->AddLibrary($self->{options}->{iconv} . '\debug\lib\libiconv.lib'); # This must be updated } if ($self->{options}->{icu}) { diff --git a/ports/libpq/patches/windows/Solution_Release.patch b/ports/libpq/patches/windows/Solution_Release.patch index 442beb6c7..e4b653c7a 100644 --- a/ports/libpq/patches/windows/Solution_Release.patch +++ b/ports/libpq/patches/windows/Solution_Release.patch @@ -110,7 +110,7 @@ index 51711c2bf..d33fdc3b0 100644 { $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 ++ $proj->AddLibrary($self->{options}->{iconv} . '\lib\libiconv.lib'); # This must be updated } if ($self->{options}->{icu}) { diff --git a/ports/libpq/patches/windows/host_skip_openssl.patch b/ports/libpq/patches/windows/host_skip_openssl.patch new file mode 100644 index 000000000..e18e17884 --- /dev/null +++ b/ports/libpq/patches/windows/host_skip_openssl.patch @@ -0,0 +1,38 @@ +diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm +index 25a549015..9018270ab 100644 +--- a/src/tools/msvc/Solution.pm ++++ b/src/tools/msvc/Solution.pm +@@ -132,21 +132,21 @@ sub GetOpenSSLVersion + # Attempt to get OpenSSL version and location. This assumes that + # openssl.exe is in the specified directory. + # Quote the .exe name in case it has spaces +- my $opensslcmd = +- qq("openssl.exe" version 2>&1);
+- my $sslout = `$opensslcmd`; ++ #my $opensslcmd = ++ # qq("openssl.exe" version 2>&1);
++ #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/msgfmt.patch b/ports/libpq/patches/windows/msgfmt.patch new file mode 100644 index 000000000..352daed87 --- /dev/null +++ b/ports/libpq/patches/windows/msgfmt.patch @@ -0,0 +1,13 @@ +diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm +index 66c0c3483..2154c6cf6 100644 +--- a/src/tools/msvc/Install.pm ++++ b/src/tools/msvc/Install.pm +@@ -728,7 +728,7 @@ sub GenerateNLSFiles + EnsureDirectories($target, "share/libpq/locale/$lang",
+ "share/libpq/locale/$lang/LC_MESSAGES");
+ my @args = (
+- "$nlspath\\bin\\msgfmt",
++ "msgfmt.exe",
+ '-o',
+ "$target\\share\\libpq\\locale\\$lang\\LC_MESSAGES\\$prgm-$majorver.mo",
+ $_);
diff --git a/ports/libpq/patches/windows/openssl_exe_path.patch b/ports/libpq/patches/windows/openssl_exe_path.patch index cf2930f7f..533f1c4fd 100644 --- a/ports/libpq/patches/windows/openssl_exe_path.patch +++ b/ports/libpq/patches/windows/openssl_exe_path.patch @@ -2,33 +2,12 @@ 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
+@@ -133,7 +133,7 @@ sub GetOpenSSLVersion
+ # openssl.exe is in the specified directory.
+ # Quote the .exe name in case it has spaces
+ my $opensslcmd =
+- qq("$self->{options}->{openssl}\\bin\\openssl.exe" version 2>&1);
++ qq("openssl.exe" version 2>&1);
+ my $sslout = `$opensslcmd`;
+
+ $? >> 8 == 0
diff --git a/ports/libpq/patches/windows/python3_build_Debug.patch b/ports/libpq/patches/windows/python3_build_Debug.patch new file mode 100644 index 000000000..cbc722e0c --- /dev/null +++ b/ports/libpq/patches/windows/python3_build_Debug.patch @@ -0,0 +1,40 @@ +diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm +index 99f39caa5..21b5559d6 100644 +--- a/src/tools/msvc/Mkvcbuild.pm ++++ b/src/tools/msvc/Mkvcbuild.pm +@@ -494,14 +494,15 @@ sub mkvcbuild + + # Attempt to get python version and location. + # Assume python.exe in specified dir. +- my $pythonprog = "import sys;print(sys.prefix);" +- . "print(str(sys.version_info[0])+str(sys.version_info[1]))"; +- my $prefixcmd = +- $solution->{options}->{python} . "\\python -c \"$pythonprog\""; +- my $pyout = `$prefixcmd`; +- die "Could not query for python version!\n" if $?; +- my ($pyprefix, $pyver) = split(/\r?\n/, $pyout); +- ++ #my $pythonprog = "import sys;print(sys.prefix);" ++ # . "print(str(sys.version_info[0])+str(sys.version_info[1]))"; ++ #my $prefixcmd = ++ # $solution->{options}->{python} . "\\python -c \"$pythonprog\""; ++ #my $pyout = `$prefixcmd`; ++ #die "Could not query for python version!\n" if $?; ++ #my ($pyprefix, $pyver) = split(/\r?\n/, $pyout); ++ my $pyprefix = $solution->{options}->{python}; ++ my $pyver = 37; + # Sometimes (always?) if python is not present, the execution + # appears to work, but gives no data... + die "Failed to query python for version information\n" +@@ -510,8 +511,9 @@ sub mkvcbuild + my $pymajorver = substr($pyver, 0, 1); + my $plpython = $solution->AddProject('plpython' . $pymajorver, + 'dll', 'PLs', 'src/pl/plpython'); +- $plpython->AddIncludeDir($pyprefix . '/include'); +- $plpython->AddLibrary($pyprefix . "/Libs/python$pyver.lib"); ++ $plpython->AddIncludeDir($pyprefix . '/include/python3.7'); ++ $plpython->AddDefine('_DEBUG'); # required for python autolink linking correctly! ++ $plpython->AddLibrary($pyprefix . "/debug/lib/python$pyver" . "_d.lib"); + $plpython->AddReference($postgres); + + # Add transform modules dependent on plpython diff --git a/ports/libpq/patches/windows/python3_build_Release.patch b/ports/libpq/patches/windows/python3_build_Release.patch new file mode 100644 index 000000000..5ac42cfc7 --- /dev/null +++ b/ports/libpq/patches/windows/python3_build_Release.patch @@ -0,0 +1,39 @@ +diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm +index 99f39caa5..21b5559d6 100644 +--- a/src/tools/msvc/Mkvcbuild.pm ++++ b/src/tools/msvc/Mkvcbuild.pm +@@ -494,14 +494,15 @@ sub mkvcbuild + + # Attempt to get python version and location. + # Assume python.exe in specified dir. +- my $pythonprog = "import sys;print(sys.prefix);" +- . "print(str(sys.version_info[0])+str(sys.version_info[1]))"; +- my $prefixcmd = +- $solution->{options}->{python} . "\\python -c \"$pythonprog\""; +- my $pyout = `$prefixcmd`; +- die "Could not query for python version!\n" if $?; +- my ($pyprefix, $pyver) = split(/\r?\n/, $pyout); +- ++ #my $pythonprog = "import sys;print(sys.prefix);" ++ # . "print(str(sys.version_info[0])+str(sys.version_info[1]))"; ++ #my $prefixcmd = ++ # $solution->{options}->{python} . "\\python -c \"$pythonprog\""; ++ #my $pyout = `$prefixcmd`; ++ #die "Could not query for python version!\n" if $?; ++ #my ($pyprefix, $pyver) = split(/\r?\n/, $pyout); ++ my $pyprefix = $solution->{options}->{python}; ++ my $pyver = 37; + # Sometimes (always?) if python is not present, the execution + # appears to work, but gives no data... + die "Failed to query python for version information\n" +@@ -510,8 +511,8 @@ sub mkvcbuild + my $pymajorver = substr($pyver, 0, 1); + my $plpython = $solution->AddProject('plpython' . $pymajorver, + 'dll', 'PLs', 'src/pl/plpython'); +- $plpython->AddIncludeDir($pyprefix . '/include'); +- $plpython->AddLibrary($pyprefix . "/Libs/python$pyver.lib"); ++ $plpython->AddIncludeDir($pyprefix . '/include/python3.7'); ++ $plpython->AddLibrary($pyprefix . "/lib/python$pyver.lib"); + $plpython->AddReference($postgres); + + # Add transform modules dependent on plpython diff --git a/ports/libpq/patches/windows/python_lib.patch b/ports/libpq/patches/windows/python_lib.patch new file mode 100644 index 000000000..8b52e26c7 --- /dev/null +++ b/ports/libpq/patches/windows/python_lib.patch @@ -0,0 +1,17 @@ +diff --git a/src/pl/plpython/plpython.h b/src/pl/plpython/plpython.h
+index 3a1f0d56d..6a8a09a20 100644
+--- a/src/pl/plpython/plpython.h
++++ b/src/pl/plpython/plpython.h
+@@ -46,12 +46,10 @@
+ #if defined(_MSC_VER) && defined(_DEBUG)
+ /* Python uses #pragma to bring in a non-default libpython on VC++ if
+ * _DEBUG is defined */
+-#undef _DEBUG
+ /* Also hide away errcode, since we load Python.h before postgres.h */
+ #define errcode __msvc_errcode
+ #include <Python.h>
+ #undef errcode
+-#define _DEBUG
+ #elif defined (_MSC_VER)
+ #define errcode __msvc_errcode
+ #include <Python.h>
|
