mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 03:22:47 +08:00
[libpq] update to 14.4 and pass flags in msbuild (#26051)
* update libpq and pass flags to msbuild * v db * readd patch for linux * v db * readd patch * v db * Update ports/libpq/patches/fix-configure.patch * v db * use #pragma x_macro * v db * CI retrigger
This commit is contained in:
parent
02b300f2a2
commit
52b6604253
25
ports/libpq/libpq.props.in
Normal file
25
ports/libpq/libpq.props.in
Normal file
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<CLCompile>
|
||||
<AdditionalOptions>%(AdditionalOptions) @VCPKG_COMBINED_C_FLAGS_DEBUG@</AdditionalOptions>
|
||||
</CLCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>%(AdditionalOptions) @VCPKG_COMBINED_SHARED_LINKER_FLAGS_DEBUG@</AdditionalOptions>
|
||||
</Link>
|
||||
<Lib>
|
||||
<AdditionalOptions>%(AdditionalOptions) @VCPKG_COMBINED_STATIC_LINKER_FLAGS_DEBUG@</AdditionalOptions>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
|
||||
<CLCompile>
|
||||
<AdditionalOptions>%(AdditionalOptions) @VCPKG_COMBINED_C_FLAGS_RELEASE@</AdditionalOptions>
|
||||
</CLCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>%(AdditionalOptions) @VCPKG_COMBINED_SHARED_LINKER_FLAGS_RELEASE@</AdditionalOptions>
|
||||
</Link>
|
||||
<Lib>
|
||||
<AdditionalOptions>%(AdditionalOptions) @VCPKG_COMBINED_STATIC_LINKER_FLAGS_RELEASE@</AdditionalOptions>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
@ -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.1], [pgsql-bugs@lists.postgresql.org], [], [https://www.postgresql.org/])
|
||||
AC_INIT([PostgreSQL], [14.4], [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.
|
||||
|
18
ports/libpq/patches/windows/macro-def.patch
Normal file
18
ports/libpq/patches/windows/macro-def.patch
Normal file
@ -0,0 +1,18 @@
|
||||
diff --git a/src/include/common/checksum_helper.h b/src/include/common/checksum_helper.h
|
||||
index cac7570ea..d0ca1243c 100644
|
||||
--- a/src/include/common/checksum_helper.h
|
||||
+++ b/src/include/common/checksum_helper.h
|
||||
@@ -33,7 +28,13 @@
|
||||
*/
|
||||
typedef enum pg_checksum_type
|
||||
{
|
||||
+#pragma push_macro("CHECKSUM_TYPE_NONE")
|
||||
+#ifdef CHECKSUM_TYPE_NONE
|
||||
+// winioctl.h defines CHECKSUM_TYPE_NONE to 0 as a macro.
|
||||
+#undef CHECKSUM_TYPE_NONE
|
||||
+#endif
|
||||
CHECKSUM_TYPE_NONE,
|
||||
+#pragma pop_macro("CHECKSUM_TYPE_NONE")
|
||||
CHECKSUM_TYPE_CRC32C,
|
||||
CHECKSUM_TYPE_SHA224,
|
||||
CHECKSUM_TYPE_SHA256,
|
@ -1,11 +1,11 @@
|
||||
set(PORT_VERSION 14.1)
|
||||
set(PORT_VERSION 14.4)
|
||||
# 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 4a0bec157d5464bb9e5f5c0eb0efdede55526e03f6f4d660b87d161a47705eb152fa0878960b1581bce42a5ed28a1f457825ea54e8d22e34b5b8eb36473ceefd
|
||||
SHA512 dd2f80248684e331d2ffb1e26cd2a285df1fb18710807a0c31aedabf917912ce9267f8ca26318e5371d916c6fe476f8a17886d82d3ff86a974e6f24c19a6aafb
|
||||
)
|
||||
|
||||
set(PATCHES
|
||||
@ -18,7 +18,8 @@ set(PATCHES
|
||||
patches/windows/python_lib.patch
|
||||
patches/windows/fix-compile-flag-Zi.patch
|
||||
patches/windows/tcl_version.patch
|
||||
patches/fix-configure.patch
|
||||
patches/windows/macro-def.patch
|
||||
patches/fix-configure.patch
|
||||
)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
@ -84,6 +85,9 @@ file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
|
||||
## Do the build
|
||||
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
vcpkg_cmake_get_vars(vars_file)
|
||||
include("${vars_file}")
|
||||
|
||||
file(GLOB SOURCE_FILES ${SOURCE_PATH}/*)
|
||||
foreach(_buildtype ${port_config_list})
|
||||
# Copy libpq sources.
|
||||
@ -165,6 +169,7 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
|
||||
file(WRITE "${CONFIG_FILE}" "${_contents}")
|
||||
file(WRITE "${BUILDPATH_${_buildtype}}/src/tools/msvc/buildenv.pl" "${buildenv_contents}")
|
||||
configure_file("${CURRENT_PORT_DIR}/libpq.props.in" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/libpq.props" @ONLY)
|
||||
vcpkg_get_windows_sdk(VCPKG_TARGET_PLATFORM_VERSION)
|
||||
set(ENV{MSBFLAGS} "/p:PlatformToolset=${VCPKG_PLATFORM_TOOLSET}
|
||||
/p:VCPkgLocalAppDataDisabled=true
|
||||
@ -172,6 +177,7 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
/p:WindowsTargetPlatformVersion=${VCPKG_TARGET_PLATFORM_VERSION}
|
||||
/m
|
||||
/p:ForceImportBeforeCppTargets=\"${SCRIPTS}/buildsystems/msbuild/vcpkg.targets\"
|
||||
/p:ForceImportAfterCppTargets=\"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/libpq.props\"
|
||||
/p:VcpkgTriplet=${TARGET_TRIPLET}
|
||||
/p:VcpkgCurrentInstalledDir=\"${CURRENT_INSTALLED_DIR}\""
|
||||
)
|
||||
@ -208,7 +214,6 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
message(STATUS "Installing libpq ${TARGET_TRIPLET}-${_buildtype}... done")
|
||||
endforeach()
|
||||
|
||||
|
||||
message(STATUS "Cleanup libpq ${TARGET_TRIPLET}...")
|
||||
#Cleanup
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "libpq",
|
||||
"version": "14.1",
|
||||
"port-version": 2,
|
||||
"version": "14.4",
|
||||
"description": "The official database access API of postgresql",
|
||||
"homepage": "https://www.postgresql.org/",
|
||||
"license": "PostgreSQL",
|
||||
@ -14,6 +13,10 @@
|
||||
"bonjour"
|
||||
],
|
||||
"platform": "osx"
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-get-vars",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"default-features": [
|
||||
|
@ -3981,8 +3981,8 @@
|
||||
"port-version": 14
|
||||
},
|
||||
"libpq": {
|
||||
"baseline": "14.1",
|
||||
"port-version": 2
|
||||
"baseline": "14.4",
|
||||
"port-version": 0
|
||||
},
|
||||
"libpqxx": {
|
||||
"baseline": "7.7.3",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "2b3456bfb8b04525c44007f3c8a04b7e208d639d",
|
||||
"version": "14.4",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "2b437be1592b794cb09437beba153937991a189a",
|
||||
"version": "14.1",
|
||||
|
Loading…
Reference in New Issue
Block a user