[Libpq] update to 15.2 (#29867)

* [libpq] update to 15.2

* v db

* add ldap to wrapper

* fix arm patch

* v db

* use vcpkg_extract_source_archive instead of the _ex version

* v db
This commit is contained in:
Alexander Neumann 2023-03-01 20:04:27 +01:00 committed by GitHub
parent 9cf4835a54
commit 2c3f7b45b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 72 additions and 24 deletions

View File

@ -7,18 +7,19 @@ our $config = {
# blocksize => 8, # --with-blocksize, 8kB by default
# wal_blocksize => 8, # --with-wal-blocksize, 8kB by default
ldap => undef, # --with-ldap
ldap => 1, # --with-ldap
extraver => undef, # --with-extra-version=<string>
gss => undef, # --with-gssapi=<path>
icu => undef, # --with-icu=<path>
lz4 => undef, # --with-lz4=<path>
zstd => undef, # --with-zstd=<path>
nls => undef, # --enable-nls=<path>
tap_tests => undef, # --enable-tap-tests
tcl => undef, # --with-tcl=<path>
perl => undef, # --with-perl
perl => undef, # --with-perl=<path>
python => undef, # --with-python=<path>
openssl => undef, # --with-openssl=<path>
uuid => undef, # --with-ossp-uuid
openssl => undef, # --with-ssl=openssl with <path>
uuid => undef, # --with-uuid=<path>
xml => undef, # --with-libxml=<path>
xslt => undef, # --with-libxslt=<path>
iconv => undef, # (not in configure, path to iconv)

View File

@ -4,7 +4,7 @@ index fba79ee..4fadb94 100644
+++ b/configure.ac
@@ -19,7 +19,7 @@ m4_pattern_forbid(^PGAC_)dnl to catch undefined macros
AC_INIT([PostgreSQL], [14.4], [pgsql-bugs@lists.postgresql.org], [], [https://www.postgresql.org/])
AC_INIT([PostgreSQL], [15.2], [pgsql-bugs@lists.postgresql.org], [], [https://www.postgresql.org/])
-m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_fatal([Autoconf version 2.69 is required.
+m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_warn([unsupported],[Autoconf version 2.69 is required.
@ -48,7 +48,7 @@ index fba79ee..4fadb94 100644
# Function introduced in OpenSSL 1.0.2.
AC_CHECK_FUNCS([X509_get_signature_nid])
# Functions introduced in OpenSSL 1.1.0. We used to check for
@@ -1273,15 +1278,18 @@ if test "$with_pam" = yes ; then
@@ -1365,15 +1365,18 @@ if test "$with_pam" = yes ; then
fi
if test "$with_libxml" = yes ; then
@ -69,4 +69,10 @@ index fba79ee..4fadb94 100644
+ LIBS="$LZ4_LIBS $LIBS"
fi
if test "$with_zstd" = yes ; then
- AC_CHECK_LIB(zstd, ZSTD_compress, [], [AC_MSG_ERROR([library 'zstd' is required for ZSTD support])])
+ PKG_CHECK_MODULES([zstd], [zstd], [AC_DEFINE(HAVE_LIBZSTD,1,[Define to 1 if with lz4])], [AC_MSG_ERROR([library 'zstd' is required for ZSTD support])])
+ LIBS="$LZ4_LIBS $LIBS"
fi
# Note: We can test for libldap_r only after we know PTHREAD_LIBS;

View File

@ -63,7 +63,7 @@ index 2820ace22..7fddbf0fb 100644
+ $proj->AddLibrary($self->{options}->{icu} . '\debug\lib\icuucd.lib'); #
+ $proj->AddLibrary($self->{options}->{icu} . '\debug\lib\icudtd.lib'); #
}
@@ -1074,22 +1074,22 @@ sub AddProject
@@ -1074,27 +1074,27 @@ sub AddProject
{
$proj->AddIncludeDir($self->{options}->{xml} . '\include');
$proj->AddIncludeDir($self->{options}->{xml} . '\include\libxml2');
@ -81,6 +81,12 @@ index 2820ace22..7fddbf0fb 100644
$proj->AddIncludeDir($self->{options}->{lz4} . '\include');
- $proj->AddLibrary($self->{options}->{lz4} . '\lib\liblz4.lib');
+ $proj->AddLibrary($self->{options}->{lz4} . '\debug\lib\lz4d.lib'); #
}
if ($self->{options}->{zstd})
{
$proj->AddIncludeDir($self->{options}->{zstd} . '\include');
- $proj->AddLibrary($self->{options}->{zstd} . '\lib\libzstd.lib');
+ $proj->AddLibrary($self->{options}->{zstd} . '\debug\lib\zstd.lib');
}
if ($self->{options}->{uuid})
{

View File

@ -63,7 +63,7 @@ index 2820ace22..7fddbf0fb 100644
+ $proj->AddLibrary($self->{options}->{icu} . '\lib\icuuc.lib'); #
+ $proj->AddLibrary($self->{options}->{icu} . '\lib\icudt.lib'); #
}
@@ -1074,22 +1074,22 @@ sub AddProject
@@ -1074,27 +1074,27 @@ sub AddProject
{
$proj->AddIncludeDir($self->{options}->{xml} . '\include');
$proj->AddIncludeDir($self->{options}->{xml} . '\include\libxml2');
@ -81,6 +81,12 @@ index 2820ace22..7fddbf0fb 100644
$proj->AddIncludeDir($self->{options}->{lz4} . '\include');
- $proj->AddLibrary($self->{options}->{lz4} . '\lib\liblz4.lib');
+ $proj->AddLibrary($self->{options}->{lz4} . '\lib\lz4.lib'); #
}
if ($self->{options}->{zstd})
{
$proj->AddIncludeDir($self->{options}->{zstd} . '\include');
- $proj->AddLibrary($self->{options}->{zstd} . '\lib\libzstd.lib');
+ $proj->AddLibrary($self->{options}->{zstd} . '\lib\zstd.lib');
}
if ($self->{options}->{uuid})
{

View File

@ -17,7 +17,7 @@ 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
@@ -307,7 +307,6 @@ sub WriteItemDefinitionGroup
: ($self->{type} eq "dll" ? 'DynamicLibrary' : 'StaticLibrary');
my $libs = $self->GetAdditionalLinkerDependencies($cfgname, ';');
@ -26,9 +26,7 @@ index 823357c02..625f32bf8 100644
-
+ my $targetmachine = $self->{platform} eq 'ARM64' ? 'MachineARM64' : 'MachineARM';
+
my $includes = $self->{includes};
unless ($includes eq '' or $includes =~ /;$/)
{
my $includes = join ';', @{ $self->{includes} }, "";
@@ -347,7 +349,6 @@ sub WriteItemDefinitionGroup
<ProgramDatabaseFile>.\\$cfgname\\$self->{name}\\$self->{name}.pdb</ProgramDatabaseFile>
<GenerateMapFile>false</GenerateMapFile>

View File

@ -26,8 +26,11 @@ index 99f39caa5..21b5559d6 100644
# 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);
@@ -510,11 +511,12 @@ sub mkvcbuild
die
"Python version $pyver is too old (version 3 or later is required)"
if int($pymajorver) < 3;
my $plpython = $solution->AddProject('plpython' . $pymajorver,
'dll', 'PLs', 'src/pl/plpython');
- $plpython->AddIncludeDir($pyprefix . '/include');
@ -38,3 +41,4 @@ index 99f39caa5..21b5559d6 100644
$plpython->AddReference($postgres);
# Add transform modules dependent on plpython

View File

@ -26,8 +26,11 @@ index 99f39caa5..21b5559d6 100644
# 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);
@@ -510,11 +511,11 @@ sub mkvcbuild
die
"Python version $pyver is too old (version 3 or later is required)"
if int($pymajorver) < 3;
my $plpython = $solution->AddProject('plpython' . $pymajorver,
'dll', 'PLs', 'src/pl/plpython');
- $plpython->AddIncludeDir($pyprefix . '/include');

View File

@ -1,11 +1,11 @@
set(PORT_VERSION 14.4)
set(PORT_VERSION ${VERSION})
# NOTE: the python patches must be regenerated on version update
## Download and extract sources
vcpkg_download_distfile(ARCHIVE
URLS "https://ftp.postgresql.org/pub/source/v${PORT_VERSION}/postgresql-${PORT_VERSION}.tar.bz2"
FILENAME "postgresql-${PORT_VERSION}.tar.bz2"
SHA512 dd2f80248684e331d2ffb1e26cd2a285df1fb18710807a0c31aedabf917912ce9267f8ca26318e5371d916c6fe476f8a17886d82d3ff86a974e6f24c19a6aafb
SHA512 115a8a4234791bba4e6dcc4617e9dd77abedcf767894ce9472c59cce9d5d4ef2d4e1746f3a0c7a99de4fc4385fb716652b70dce9f48be45a9db5a682517db7e8
)
set(PATCHES
@ -38,8 +38,8 @@ if(NOT "${FEATURES}" MATCHES "client")
else()
set(HAS_TOOLS TRUE)
endif()
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
vcpkg_extract_source_archive(
SOURCE_PATH
ARCHIVE "${ARCHIVE}"
PATCHES ${PATCHES}
)
@ -166,6 +166,9 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
if("${FEATURES}" MATCHES "lz4")
string(REPLACE "lz4 => undef" "lz4 => \"${CURRENT_INSTALLED_DIR}\"" _contents "${_contents}")
endif()
if("${FEATURES}" MATCHES "zstd")
string(REPLACE "zstd => undef" "zstd => \"${CURRENT_INSTALLED_DIR}\"" _contents "${_contents}")
endif()
file(WRITE "${CONFIG_FILE}" "${_contents}")
file(WRITE "${BUILDPATH_${_buildtype}}/src/tools/msvc/buildenv.pl" "${buildenv_contents}")
@ -254,6 +257,11 @@ else()
else()
list(APPEND BUILD_OPTS --without-zlib)
endif()
if("zstd" IN_LIST FEATURES)
list(APPEND BUILD_OPTS --with-zstd)
else()
list(APPEND BUILD_OPTS --without-zstd)
endif()
if("icu" IN_LIST FEATURES)
list(APPEND BUILD_OPTS --with-icu)
else()

View File

@ -61,6 +61,12 @@ if(PostgreSQL_FOUND AND "@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static")
endif()
list(APPEND PostgreSQL_LIBRARIES OpenSSL::SSL)
endif()
if(WIN32)
if(TARGET PostgreSQL::PostgreSQL)
set_property(TARGET PostgreSQL::PostgreSQL APPEND PROPERTY INTERFACE_LINK_LIBRARIES "Wldap32.lib")
endif()
list(APPEND PostgreSQL_LIBRARIES Wldap32.lib)
endif()
unset(Z_VCPKG_PORT_FEATURES)
cmake_policy(POP)
endif()

View File

@ -1,7 +1,6 @@
{
"name": "libpq",
"version": "14.4",
"port-version": 3,
"version": "15.2",
"description": "The official database access API of postgresql",
"homepage": "https://www.postgresql.org/",
"license": "PostgreSQL",
@ -124,6 +123,12 @@
"dependencies": [
"zlib"
]
},
"zstd": {
"description": "Use zstd (else --without-zstd)",
"dependencies": [
"zstd"
]
}
}
}

View File

@ -4269,8 +4269,8 @@
"port-version": 14
},
"libpq": {
"baseline": "14.4",
"port-version": 3
"baseline": "15.2",
"port-version": 0
},
"libpqxx": {
"baseline": "7.7.4",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "afe52a0d413f6e4dce23ba247692413dd9ff1cce",
"version": "15.2",
"port-version": 0
},
{
"git-tree": "9f0ed34d496ccb005282bd747bafe12a2734a4f7",
"version": "14.4",