From dbd9226e596ad2c65d7c70b33919a76ad9f2e73e Mon Sep 17 00:00:00 2001 From: Sebastian Goth Date: Mon, 15 Jul 2024 12:40:45 +0200 Subject: [PATCH 1/2] [libpqxx] Fix building with cmake 3.30 Fixes #39694 Upstream issue: https://github.com/jtv/libpqxx/issues/851 --- ports/libpqxx/fix_build_cmake_3.30.patch | 42 ++++++++++++++++++++++++ ports/libpqxx/portfile.cmake | 1 + ports/libpqxx/vcpkg.json | 1 + 3 files changed, 44 insertions(+) create mode 100644 ports/libpqxx/fix_build_cmake_3.30.patch diff --git a/ports/libpqxx/fix_build_cmake_3.30.patch b/ports/libpqxx/fix_build_cmake_3.30.patch new file mode 100644 index 00000000000000..0dafe3da791680 --- /dev/null +++ b/ports/libpqxx/fix_build_cmake_3.30.patch @@ -0,0 +1,42 @@ +From d5bf7cf83d0c86c502b6b30d5f0c8dc3b3049a38 Mon Sep 17 00:00:00 2001 +From: Jeroen Vermeulen +Date: Sun, 23 Jun 2024 21:03:24 +0200 +Subject: [PATCH] Fixes https://github.com/jtv/libpqxx/issues/851 + +Thanks @tt4g. +--- + cmake/config.cmake | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/cmake/config.cmake b/cmake/config.cmake +index ef2ebf5fc..4d9f7e935 100644 +--- a/cmake/config.cmake ++++ b/cmake/config.cmake +@@ -8,10 +8,18 @@ function(detect_code_compiled code macro msg) + endif() + endfunction(detect_code_compiled) + ++if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.30.0) ++ include(CMakeDetermineCompilerSupport) ++ cmake_determine_compiler_support(CXX) ++else() ++ # This function changed names in CMake 3.30. :-( ++ include(CMakeDetermineCompileFeatures) ++ cmake_determine_compile_features(CXX) ++endif() ++ + include(CheckIncludeFileCXX) + include(CheckFunctionExists) + include(CheckSymbolExists) +-include(CMakeDetermineCompileFeatures) + include(CheckCXXSourceCompiles) + include(CMakeFindDependencyMacro) + +@@ -39,7 +47,6 @@ check_function_exists("poll" PQXX_HAVE_POLL) + + set(CMAKE_REQUIRED_LIBRARIES pq) + +-cmake_determine_compile_features(CXX) + cmake_policy(SET CMP0057 NEW) + + # check_cxx_source_compiles requires CMAKE_REQUIRED_DEFINITIONS to specify diff --git a/ports/libpqxx/portfile.cmake b/ports/libpqxx/portfile.cmake index 6c9699e7bf94f6..07dad5b9c16cf4 100644 --- a/ports/libpqxx/portfile.cmake +++ b/ports/libpqxx/portfile.cmake @@ -6,6 +6,7 @@ vcpkg_from_github( HEAD_REF master PATCHES fix_build_with_vs2017.patch + fix_build_cmake_3.30.patch # remove with > 7.9.1, upstream fix: https://github.com/jtv/libpqxx/commit/d5bf7cf83d0c86c502b6b30d5f0c8dc3b3049a38 ) file(COPY "${CMAKE_CURRENT_LIST_DIR}/config-public-compiler.h.in" DESTINATION "${SOURCE_PATH}") diff --git a/ports/libpqxx/vcpkg.json b/ports/libpqxx/vcpkg.json index 5c44d753e42050..aa355ac8226387 100644 --- a/ports/libpqxx/vcpkg.json +++ b/ports/libpqxx/vcpkg.json @@ -1,6 +1,7 @@ { "name": "libpqxx", "version": "7.9.0", + "port-version": 1, "description": "The official C++ client API for PostgreSQL", "homepage": "https://www.postgresql.org/", "license": "BSD-3-Clause", From 8dd61ee34938acb64769ecf33154bf516799378a Mon Sep 17 00:00:00 2001 From: Sebastian Goth Date: Mon, 15 Jul 2024 12:47:11 +0200 Subject: [PATCH 2/2] Update version database --- versions/baseline.json | 2 +- versions/l-/libpqxx.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index be9186476dbf5b..54cda010ff53ec 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4874,7 +4874,7 @@ }, "libpqxx": { "baseline": "7.9.0", - "port-version": 0 + "port-version": 1 }, "libprotobuf-mutator": { "baseline": "1.3", diff --git a/versions/l-/libpqxx.json b/versions/l-/libpqxx.json index 9ca593a8a22f32..763d217576ed64 100644 --- a/versions/l-/libpqxx.json +++ b/versions/l-/libpqxx.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "36fb80efda7137194f2bf679b9e685e9dab60bb5", + "version": "7.9.0", + "port-version": 1 + }, { "git-tree": "c8078815fcddf1da8e7d8fba66100befaa779ec0", "version": "7.9.0",