[libpq] Update to 16.2 (#36849)

Fixes #36168.
* Update `libpq` to 16.2.

* Removed outdated patch `python_lib.patch`.

* Feature `client` has an error on `x86-windows`:
https://github.com/microsoft/vcpkg/issues/36693, but it is not caused by
this update and will be solved in another PR.

- [x] Changes comply with the [maintainer
guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md).
- [x] SHA512s are updated for each updated download.
- [ ] ~The "supports" clause reflects platforms that may be fixed by
this new version.~
- [ ] ~Any fixed [CI
baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt)
entries are removed from that file.~
- [x] Any patches that are no longer applied are deleted from the port's
directory.
- [x] The version database is fixed by rerunning `./vcpkg x-add-version
--all` and committing the result.
- [x] Only one version is added to each modified port's versions file.


Features `client,icu,lz4,nls,openssl,python,tcl,xml,xslt,zlib,zstd` are
tested successfully in the following triplet:
```
x64-windows
x64-windows-static
```
Features `icu,lz4,nls,openssl,xml,xslt,zlib,zstd` are tested
successfully in the following triplet:
```
x86-windows
```
Features `readline,bonjour` are tested successfully in the following
triplet:
```
x64-osx
```
Feature `readline` are tested successfully in the following triplet:
```
x64-linux
```

The usage test passed on `x64-windows` (header files found):
```
The package libpq provides CMake integration:

    find_package(PostgreSQL REQUIRED)
    target_link_libraries(main PRIVATE PostgreSQL::PostgreSQL)
```

---------

Co-authored-by: Monica <v-liumonica@microsoft.com>
This commit is contained in:
MonicaLiu 2024-02-22 13:54:14 +08:00 committed by GitHub
parent 2a78dbbe37
commit 46c5f1fff1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 11 additions and 25 deletions

View File

@ -1,7 +1,7 @@
vcpkg_download_distfile(ARCHIVE
URLS "https://ftp.postgresql.org/pub/source/v${VERSION}/postgresql-${VERSION}.tar.bz2"
FILENAME "postgresql-${VERSION}.tar.bz2"
SHA512 c66b72d2d9bc503b9ad19c67384517ae921c494b2916f32157c2528dcbb38aefeb4a8cd5003fd40ba8a19612ea64511d534ff5d99e7a1b266024232f983bcf39
SHA512 3194941cc3f1ec86b6cf4f08c6422d268d99890441f8fc9ab87b6a7fd16c990fa230b544308644cbef54e6960c4984e3703752e40930bdc0537b7bfda3ab7ccf
)
vcpkg_extract_source_archive(
@ -15,11 +15,10 @@ vcpkg_extract_source_archive(
unix/mingw-install.patch
unix/python.patch
windows/macro-def.patch
windows/python_lib.patch
windows/win_bison_flex.patch
windows/msbuild.patch
windows/spin_delay.patch
android/unversioned_so.patch
android/unversioned_so.patch
)
file(GLOB _py3_include_path "${CURRENT_HOST_INSTALLED_DIR}/include/python3*")

View File

@ -4,7 +4,7 @@ index 7f97248..48ff1a1 100644
+++ b/configure.ac
@@ -19,7 +19,8 @@ m4_pattern_forbid(^PGAC_)dnl to catch undefined macros
AC_INIT([PostgreSQL], [16.0], [pgsql-bugs@lists.postgresql.org], [], [https://www.postgresql.org/])
AC_INIT([PostgreSQL], [16.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.
+cross_compiling=yes # Avoid conftest loading shared objects

View File

@ -1,7 +1,6 @@
{
"name": "libpq",
"version": "16.0",
"port-version": 2,
"version": "16.2",
"description": "The official database access API of postgresql",
"homepage": "https://www.postgresql.org/",
"license": "PostgreSQL",

View File

@ -1,17 +0,0 @@
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
@@ -45,12 +45,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>

View File

@ -4741,8 +4741,8 @@
"port-version": 16
},
"libpq": {
"baseline": "16.0",
"port-version": 2
"baseline": "16.2",
"port-version": 0
},
"libpqxx": {
"baseline": "7.8.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "97c817b2d307e12dfec28d56e87ae08faff70a1b",
"version": "16.2",
"port-version": 0
},
{
"git-tree": "308af7b81ee1abf1d533d93f28eb3a423dd2ea3d",
"version": "16.0",