From 6b871df7e03690dafdc6d65f606fef036f5db4e8 Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Mon, 18 May 2020 19:36:03 +0200 Subject: [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 --- .../patches/windows/python3_build_Debug.patch | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 ports/libpq/patches/windows/python3_build_Debug.patch (limited to 'ports/libpq/patches/windows/python3_build_Debug.patch') 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 -- cgit v1.2.3