diff --git a/ports/libpq/Makefile b/ports/libpq/Makefile deleted file mode 100644 index d743b5335e16a2..00000000000000 --- a/ports/libpq/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -subdir = . -top_builddir = . -include src/Makefile.global - -ifeq ($(LIBPQ_LIBRARY_TYPE), static) -LIBPQ_INSTALL_LIBS = install-stlib -endif - -ifeq ($(LIBPQ_LIBRARY_TYPE), shared) -ifeq ($(LIBPQ_USING_MINGW), yes) -# The import library name is the same as the static library name -EXTRA_TARGET = install-lib-static -endif -endif - -.PHONY: all -all: - $(MAKE) -C src/include - $(MAKE) -C src/common - $(MAKE) -C src/port - $(MAKE) -C src/interfaces/libpq all-$(LIBPQ_LIBRARY_TYPE)-lib - $(MAKE) -C src/interfaces/ecpg/include - $(MAKE) -C src/interfaces/ecpg/pgtypeslib - $(MAKE) -C src/interfaces/ecpg/ecpglib - $(MAKE) -C src/interfaces/ecpg/compatlib -ifeq ($(LIBPQ_LIBRARY_TYPE), static) - $(AR) $(AROPT) src/interfaces/libpq/libpq.a src/common/encnames_shlib.o -endif -ifeq ($(LIBPQ_ENABLE_TOOLS), yes) - $(MAKE) -C src/interfaces/ecpg/preproc - $(MAKE) -C src/fe_utils - $(MAKE) -C src/bin -else - $(MAKE) -C src/bin/pg_config -endif - -.PHONY: install-stlib -install-stlib: - $(MAKE) -C src/common install -o all - mv -f '$(DESTDIR)$(libdir)/libpgcommon_shlib.a' '$(DESTDIR)$(libdir)/libpgcommon.a' - $(MAKE) -C src/port install -o all - rm -f '$(DESTDIR)$(libdir)/libpgport_shlib.a' - -.PHONY: install -install: $(LIBPQ_INSTALL_LIBS) - $(MAKE) -C src/include install - $(MAKE) -C src/interfaces/libpq $(EXTRA_TARGET) install-lib-$(LIBPQ_LIBRARY_TYPE) install-lib-pc install -o all -o install-lib - $(MAKE) -C src/interfaces/ecpg/include install - $(MAKE) -C src/interfaces/ecpg/pgtypeslib install - $(MAKE) -C src/interfaces/ecpg/ecpglib install - $(MAKE) -C src/interfaces/ecpg/compatlib install -ifeq ($(LIBPQ_ENABLE_TOOLS), yes) - $(MAKE) -C src/interfaces/ecpg/preproc install - $(MAKE) -C src/bin install -else - $(MAKE) -C src/bin/pg_config install -endif diff --git a/ports/libpq/build-msvc.cmake b/ports/libpq/build-msvc.cmake deleted file mode 100644 index 36dd79391e5e5b..00000000000000 --- a/ports/libpq/build-msvc.cmake +++ /dev/null @@ -1,221 +0,0 @@ -function(build_msvc source_path) - # Strip meson build to only compile client libraries and tools. - # The full PostgreSQL meson build includes the server backend, timezone data, - # PL languages, contrib modules, and tests - none of which we need. - - # src/meson.build: keep only bin (client tools) and interfaces (ecpg) - file(WRITE "${source_path}/src/meson.build" [=[ -subdir('bin') -subdir('interfaces') -]=]) - - # src/bin/meson.build: only client tools (mirrors unix/no-server-tools.patch) - file(WRITE "${source_path}/src/bin/meson.build" [=[ -subdir('pg_amcheck') -subdir('pg_basebackup') -subdir('pg_config') -subdir('pg_dump') -subdir('pg_verifybackup') -subdir('pgbench') -subdir('pgevent') -subdir('psql') -subdir('scripts') -]=]) - - # Truncate meson.build before the test/pseudo-target sections that reference - # variables from skipped subdirs (pg_regress, regress_module, docs, etc.). - # The subdirs themselves are already commented out by windows/meson-vcpkg.patch, - # but the test infrastructure section still references variables from them. - file(READ "${source_path}/meson.build" meson_content) - string(FIND "${meson_content}" "# all targets that require building code" truncate_pos) - if(NOT truncate_pos EQUAL -1) - string(SUBSTRING "${meson_content}" 0 ${truncate_pos} meson_content) - file(WRITE "${source_path}/meson.build" "${meson_content}") - endif() - - # For static builds, remove __declspec(dllimport) from installed headers - if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - vcpkg_replace_string("${source_path}/src/include/port/win32.h" - "__declspec (dllimport)" "") - endif() - - # The meson build compiles the static pgcommon with -DUSE_PRIVATE_ENCODING_FUNCS, - # which renames pg_char_to_encoding -> pg_char_to_encoding_private. But libpq - # (compiled as FRONTEND without that flag) calls the non-private names, causing - # unresolved symbols for consumers. The autoconf Makefile works around this by - # installing pgcommon_shlib (non-private names) as pgcommon. Since we don't build - # the server backend, there's no symbol conflict risk, so just remove the flag. - vcpkg_replace_string("${source_path}/src/common/meson.build" - "'c_args': ['-DUSE_PRIVATE_ENCODING_FUNCS']," - "# 'c_args': ['-DUSE_PRIVATE_ENCODING_FUNCS'], # vcpkg: use non-private names") - - # Map vcpkg features to meson options - vcpkg_list(SET MESON_OPTIONS) - - # Disable auto-detection so we don't pick up random system libraries - list(APPEND MESON_OPTIONS -Dauto_features=disabled) - - # Features that map directly to meson option names - foreach(option IN ITEMS icu lz4 zlib zstd) - if(option IN_LIST FEATURES) - list(APPEND MESON_OPTIONS -D${option}=enabled) - endif() - endforeach() - - # Features with different meson option names - if("openssl" IN_LIST FEATURES) - list(APPEND MESON_OPTIONS -Dssl=openssl) - else() - list(APPEND MESON_OPTIONS -Dssl=none) - endif() - if("xml" IN_LIST FEATURES) - list(APPEND MESON_OPTIONS -Dlibxml=enabled) - endif() - if("xslt" IN_LIST FEATURES) - list(APPEND MESON_OPTIONS -Dlibxslt=enabled) - endif() - if("nls" IN_LIST FEATURES) - list(APPEND MESON_OPTIONS -Dnls=enabled) - # Static intl depends on iconv, but PostgreSQL's meson build uses - # cc.find_library('intl') which doesn't resolve transitive deps. - # Patch to also link iconv when intl is found. - vcpkg_replace_string("${source_path}/meson.build" - "i18n = import('i18n')" - "iconv_dep = cc.find_library('iconv', required: false, dirs: test_lib_d)\n if iconv_dep.found()\n libintl = declare_dependency(dependencies: [libintl, iconv_dep])\n endif\n i18n = import('i18n')") - endif() - # plpython requires matching debug/release Python libraries. - # vcpkg's Python is release-only, so only enable for release builds. - vcpkg_list(SET MESON_OPTIONS_RELEASE) - vcpkg_list(SET MESON_OPTIONS_DEBUG) - if("python" IN_LIST FEATURES) - if(VCPKG_CROSSCOMPILING) - # plpython can't be configured when cross-compiling because meson - # needs to run the Python interpreter at configure time, but the - # target binary won't execute on the build host. - message(STATUS "Disabling plpython for cross-compilation build") - list(APPEND MESON_OPTIONS -Dplpython=disabled) - else() - # Use the vcpkg python3 interpreter (which has matching dev libraries) - # instead of the standalone tools Python (which has no SDK). - string(REPLACE [[\]] [[/]] VCPKG_PYTHON3_PATH "${CURRENT_INSTALLED_DIR}/tools/python3/python.exe") - list(APPEND MESON_OPTIONS_RELEASE -Dplpython=enabled "-DPYTHON=${VCPKG_PYTHON3_PATH}") - list(APPEND MESON_OPTIONS_DEBUG -Dplpython=disabled) - endif() - endif() - if("tcl" IN_LIST FEATURES) - list(APPEND MESON_OPTIONS -Dpltcl=enabled) - # The vcpkg tcl port doesn't generate pkg-config files on Windows, - # so meson's dependency('tcl90') fails. Its fallback cc.find_library() - # also fails because meson's link-test probe doesn't work reliably - # with vcpkg's directory layout. Generate .pc files so meson can - # find Tcl through its preferred pkg-config path. - # Tcl naming: tcl90 (dynamic), tcl90s (static), +g suffix for debug. - set(_tcl_pc_name "tcl90") - # Determine the release library name - if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - set(_tcl_rel_libname "tcl90s") - else() - set(_tcl_rel_libname "tcl90") - endif() - # Generate release .pc file - set(_tcl_pc_dir "${CURRENT_INSTALLED_DIR}/lib/pkgconfig") - file(MAKE_DIRECTORY "${_tcl_pc_dir}") - file(WRITE "${_tcl_pc_dir}/${_tcl_pc_name}.pc" -"prefix=${CURRENT_INSTALLED_DIR}\nlibdir=\${prefix}/lib\nincludedir=\${prefix}/include\n\nName: ${_tcl_pc_name}\nDescription: Tcl scripting language\nVersion: 9.0\nLibs: -L\${libdir} -l${_tcl_rel_libname}\nCflags: -I\${includedir}\n") - # Determine the debug library name - if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - set(_tcl_dbg_libname "tcl90sg") - else() - set(_tcl_dbg_libname "tcl90g") - endif() - # Generate debug .pc file - if(NOT VCPKG_BUILD_TYPE) - set(_tcl_pc_dbg_dir "${CURRENT_INSTALLED_DIR}/debug/lib/pkgconfig") - file(MAKE_DIRECTORY "${_tcl_pc_dbg_dir}") - file(WRITE "${_tcl_pc_dbg_dir}/${_tcl_pc_name}.pc" -"prefix=${CURRENT_INSTALLED_DIR}/debug\nlibdir=\${prefix}/lib\nincludedir=${CURRENT_INSTALLED_DIR}/include\n\nName: ${_tcl_pc_name}\nDescription: Tcl scripting language\nVersion: 9.0\nLibs: -L\${libdir} -l${_tcl_dbg_libname}\nCflags: -I\${includedir}\n") - endif() - list(APPEND MESON_OPTIONS "-Dtcl_version=${_tcl_pc_name}") - endif() - - # Provide paths to required tools - vcpkg_list(SET ADDITIONAL_BINARIES) - string(REPLACE [[\]] [[/]] BISON_PATH "${BISON}") - string(REPLACE [[\]] [[/]] FLEX_PATH "${FLEX}") - string(REPLACE [[\]] [[/]] PERL_PATH "${PERL}") - list(APPEND ADDITIONAL_BINARIES - "bison = ['${BISON_PATH}']" - "flex = ['${FLEX_PATH}']" - "perl = ['${PERL_PATH}']" - ) - - # Extra include/lib dirs for vcpkg dependencies (only if they exist; - # with no optional deps installed, CURRENT_INSTALLED_DIR may lack these). - # Debug and release use different lib dirs (debug libs have different - # suffixes, e.g. tcl90g.lib vs tcl90.lib). - if(EXISTS "${CURRENT_INSTALLED_DIR}/include") - list(APPEND MESON_OPTIONS "-Dextra_include_dirs=['${CURRENT_INSTALLED_DIR}/include']") - endif() - if(EXISTS "${CURRENT_INSTALLED_DIR}/lib") - list(APPEND MESON_OPTIONS_RELEASE "-Dextra_lib_dirs=['${CURRENT_INSTALLED_DIR}/lib']") - endif() - if(EXISTS "${CURRENT_INSTALLED_DIR}/debug/lib") - list(APPEND MESON_OPTIONS_DEBUG "-Dextra_lib_dirs=['${CURRENT_INSTALLED_DIR}/debug/lib']") - endif() - - vcpkg_configure_meson( - SOURCE_PATH "${source_path}" - OPTIONS - ${MESON_OPTIONS} - OPTIONS_RELEASE - ${MESON_OPTIONS_RELEASE} - OPTIONS_DEBUG - ${MESON_OPTIONS_DEBUG} - LANGUAGES C - ADDITIONAL_BINARIES - ${ADDITIONAL_BINARIES} - ) - vcpkg_install_meson() - - # Remove _shlib variants of pgcommon/pgport that consumers don't need - file(GLOB _shlib_libs - "${CURRENT_PACKAGES_DIR}/lib/*pgcommon_shlib*" - "${CURRENT_PACKAGES_DIR}/lib/*pgport_shlib*" - "${CURRENT_PACKAGES_DIR}/debug/lib/*pgcommon_shlib*" - "${CURRENT_PACKAGES_DIR}/debug/lib/*pgport_shlib*" - ) - if(_shlib_libs) - file(REMOVE ${_shlib_libs}) - endif() - - # Remove server-related installed files we don't need - file(REMOVE_RECURSE - "${CURRENT_PACKAGES_DIR}/lib/postgresql" - "${CURRENT_PACKAGES_DIR}/debug/lib/postgresql" - "${CURRENT_PACKAGES_DIR}/share/postgresql" - ) - - if(HAS_TOOLS) - set(TOOL_NAMES - clusterdb createdb createuser dropdb dropuser ecpg pgbench - pg_amcheck pg_basebackup pg_config pg_createsubscriber - pg_dump pg_dumpall pg_isready pg_receivewal pg_recvlogical - pg_restore pg_verifybackup psql reindexdb vacuumdb - ) - vcpkg_copy_tools(TOOL_NAMES ${TOOL_NAMES} AUTO_CLEAN) - else() - # Remove all executables (keep DLLs in bin/ for dynamic linkage) - file(GLOB exe_files - "${CURRENT_PACKAGES_DIR}/bin/*.exe" - "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe" - ) - if(exe_files) - file(REMOVE ${exe_files}) - endif() - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools") - endif() - - if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") - endif() -endfunction() diff --git a/ports/libpq/libintl.diff b/ports/libpq/libintl.diff new file mode 100644 index 00000000000000..a5d11673115a02 --- /dev/null +++ b/ports/libpq/libintl.diff @@ -0,0 +1,17 @@ +diff --git a/meson.build b/meson.build +index dd7ca47..8e0964a 100644 +--- a/meson.build ++++ b/meson.build +@@ -3023,6 +3023,12 @@ if not nlsopt.disabled() + endif + + if libintl.found() ++ if build_system == 'windows' ++ iconv_dep = cc.find_library('iconv', required: false, dirs: test_lib_d) ++ if iconv_dep.found() ++ libintl = declare_dependency(dependencies: [libintl, iconv_dep]) ++ endif ++ endif + i18n = import('i18n') + cdata.set('ENABLE_NLS', 1) + endif diff --git a/ports/libpq/libpq-and-client-tools.diff b/ports/libpq/libpq-and-client-tools.diff new file mode 100644 index 00000000000000..2f0cddb90454e8 --- /dev/null +++ b/ports/libpq/libpq-and-client-tools.diff @@ -0,0 +1,127 @@ +diff --git a/config/meson.build b/config/meson.build +index ab19c38..b6203b5 100644 +--- a/config/meson.build ++++ b/config/meson.build +@@ -1,3 +1,4 @@ ++subdir_done() + install_data( + 'install-sh', 'missing', + install_dir: dir_pgxs / 'config' +diff --git a/meson.build b/meson.build +index 4016033..dd7ca47 100644 +--- a/meson.build ++++ b/meson.build +@@ -3381,6 +3381,10 @@ test_install_libs = [] + + subdir('src') + ++contrib_data_dir = dir_data_extension ++ ++if false # skip for vcpkg port ++ + subdir('contrib') + + subdir('src/test') +@@ -3924,6 +3928,7 @@ if not meson.is_subproject() + endif + endif + ++endif # skip for vcpkg port libpq + + + ############################################################### +diff --git a/meson_options.txt b/meson_options.txt +index 06bf562..5505bfd 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -1,3 +1,6 @@ ++option('tools', type: 'feature', value: 'disabled', ++ description: 'Enable tool executables') ++ + # Copyright (c) 2022-2025, PostgreSQL Global Development Group + + # Data layout influencing options +diff --git a/src/backend/meson.build b/src/backend/meson.build +index 2b0db21..75d8f68 100644 +--- a/src/backend/meson.build ++++ b/src/backend/meson.build +@@ -40,6 +40,8 @@ subdir('po', if_found: libintl) + backend_link_args = [] + backend_link_depends = [] + ++subdir_done() ++if false # skip for vcpkg port + + # On windows when compiling with msvc we need to make postgres export all its + # symbols so that extension libraries can use them. For that we need to scan +@@ -140,6 +142,8 @@ postgres = executable('postgres', + + backend_targets += postgres + ++endif # skip for vcpkg port ++ + pg_mod_c_args = cflags_mod + pg_mod_cpp_args = cxxflags_mod + pg_mod_link_args = ldflags_sl + ldflags_mod +@@ -187,6 +191,7 @@ pg_test_mod_args = pg_mod_args + { + } + + ++subdir_done() + + # Shared modules that, on some system, link against the server binary. Only + # enter these after we defined the server build. +diff --git a/src/bin/meson.build b/src/bin/meson.build +index b33cb6c..b08941f 100644 +--- a/src/bin/meson.build ++++ b/src/bin/meson.build +@@ -1,24 +1,13 @@ + # Copyright (c) 2022-2025, PostgreSQL Global Development Group + +-subdir('initdb') ++# vcpkg: Reduced to documented "Client applications" (and scripts) ++# Cf. https://www.postgresql.org/docs/current/reference-client.html + subdir('pg_amcheck') +-subdir('pg_archivecleanup') + subdir('pg_basebackup') +-subdir('pg_checksums') + subdir('pg_combinebackup') + subdir('pg_config') +-subdir('pg_controldata') +-subdir('pg_ctl') + subdir('pg_dump') +-subdir('pg_resetwal') +-subdir('pg_rewind') +-subdir('pg_test_fsync') +-subdir('pg_test_timing') +-subdir('pg_upgrade') + subdir('pg_verifybackup') +-subdir('pg_waldump') +-subdir('pg_walsummary') + subdir('pgbench') +-subdir('pgevent') + subdir('psql') + subdir('scripts') +diff --git a/src/meson.build b/src/meson.build +index f098f9f..28eb09c 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -3,12 +3,18 @@ + # libraries that other subsystems might depend upon first, in their respective + # dependency order + ++subdir('interfaces') ++if not get_option('tools').disabled() ++ + subdir('timezone') + + subdir('backend') + + subdir('bin') + ++endif ++subdir_done() ++ + subdir('pl') + + subdir('interfaces') diff --git a/ports/libpq/libpq.props.in b/ports/libpq/libpq.props.in deleted file mode 100644 index 223e528fe9f96f..00000000000000 --- a/ports/libpq/libpq.props.in +++ /dev/null @@ -1,25 +0,0 @@ - - - - - %(AdditionalOptions) @VCPKG_COMBINED_C_FLAGS_DEBUG@ - - - %(AdditionalOptions) @VCPKG_COMBINED_SHARED_LINKER_FLAGS_DEBUG@ - - - %(AdditionalOptions) @VCPKG_COMBINED_STATIC_LINKER_FLAGS_DEBUG@ - - - - - %(AdditionalOptions) @VCPKG_COMBINED_C_FLAGS_RELEASE@ - - - %(AdditionalOptions) @VCPKG_COMBINED_SHARED_LINKER_FLAGS_RELEASE@ - - - %(AdditionalOptions) @VCPKG_COMBINED_STATIC_LINKER_FLAGS_RELEASE@ - - - diff --git a/ports/libpq/library-linkage.diff b/ports/libpq/library-linkage.diff new file mode 100644 index 00000000000000..6c3c260d390a27 --- /dev/null +++ b/ports/libpq/library-linkage.diff @@ -0,0 +1,241 @@ +diff --git a/meson.build b/meson.build +index 6e1c867..4016033 100644 +--- a/meson.build ++++ b/meson.build +@@ -3293,6 +3293,12 @@ frontend_shlib_code = declare_dependency( + dependencies: [shlib_code, os_deps, libintl], + ) + ++if get_option('default_library') == 'shared' ++ frontend_lib_code = frontend_shlib_code ++else ++ frontend_lib_code = frontend_stlib_code ++endif ++ + # For frontend code that doesn't use fe_utils - this mainly exists for libpq's + # tests, which are defined before fe_utils is defined, as fe_utils depends on + # libpq. +@@ -3326,7 +3332,7 @@ subdir('src/interfaces/libpq-oauth') + # for frontend binaries + frontend_code = declare_dependency( + include_directories: [postgres_inc], +- link_with: [fe_utils, common_static, pgport_static], ++ link_with: [fe_utils, common_default, pgport_default], + sources: generated_headers, + dependencies: [os_deps, libintl], + ) +diff --git a/src/bin/initdb/meson.build b/src/bin/initdb/meson.build +index 06958e3..a25abd1 100644 +--- a/src/bin/initdb/meson.build ++++ b/src/bin/initdb/meson.build +@@ -20,7 +20,7 @@ initdb = executable('initdb', + # from libpq, else we have risks of version skew if we run with a libpq + # shared library from a different PG version. Define + # USE_PRIVATE_ENCODING_FUNCS to ensure that that happens. +- c_args: ['-DUSE_PRIVATE_ENCODING_FUNCS'], ++ # But vcpkg cannot build the libs with this definition. + dependencies: [frontend_code, libpq, icu, icu_i18n], + kwargs: default_bin_args, + ) +diff --git a/src/bin/pg_combinebackup/meson.build b/src/bin/pg_combinebackup/meson.build +index bbc4c57..9ea8597 100644 +--- a/src/bin/pg_combinebackup/meson.build ++++ b/src/bin/pg_combinebackup/meson.build +@@ -17,7 +17,7 @@ endif + + pg_combinebackup = executable('pg_combinebackup', + pg_combinebackup_sources, +- dependencies: [frontend_code], ++ dependencies: [frontend_code, libpq], + kwargs: default_bin_args, + ) + bin_targets += pg_combinebackup +diff --git a/src/common/meson.build b/src/common/meson.build +index 1540ba6..e29d594 100644 +--- a/src/common/meson.build ++++ b/src/common/meson.build +@@ -114,6 +114,8 @@ common_sources_frontend_shlib += files( + ) + + common_sources_excluded_shlib = files( ++) ++common_sources_frontend_shlib += files( + 'fe_memutils.c', + 'logging.c', + ) +@@ -144,7 +146,7 @@ pgcommon_variants = { + 'dependencies': [frontend_common_code], + # Files in libpgcommon.a should use/export the "xxx_private" versions + # of pg_char_to_encoding() and friends. +- 'c_args': ['-DUSE_PRIVATE_ENCODING_FUNCS'], ++ # But vcpkg's static library linkage must not add the private suffix + }, + '_shlib': default_lib_args + { + 'pic': true, +@@ -159,6 +161,19 @@ pgcommon_variants = { + + foreach name, opts : pgcommon_variants + ++ if name == '_srv' ++ pgcommon += {name: disabler()} ++ continue ++ endif ++ if name == '' and get_option('default_library') == 'shared' ++ pgcommon += {name: disabler()} ++ continue ++ endif ++ if name == '_shlib' and get_option('default_library') == 'static' ++ pgcommon += {name: disabler()} ++ continue ++ endif ++ + # Build internal static libraries for sets of files that need to be built + # with different cflags + cflag_libs = [] +@@ -195,6 +210,7 @@ foreach name, opts : pgcommon_variants + } + ) + pgcommon += {name: lib} ++ common_default = lib + endforeach + + common_srv = pgcommon['_srv'] +diff --git a/src/interfaces/ecpg/compatlib/meson.build b/src/interfaces/ecpg/compatlib/meson.build +index 56e0a21..e3c8675 100644 +--- a/src/interfaces/ecpg/compatlib/meson.build ++++ b/src/interfaces/ecpg/compatlib/meson.build +@@ -41,11 +41,17 @@ ecpg_compat_so = shared_library('libecpg_compat', + ) + ecpg_targets += ecpg_compat_so + ++if get_option('default_library') == 'shared' ++ ecpg_compat_libraries = ecpg_compat_so ++else ++ ecpg_compat_libraries = ecpg_compat_st ++endif ++ + pkgconfig.generate( + name: 'libecpg_compat', + description: 'PostgreSQL libecpg_compat library', + url: pg_url, +- libraries: ecpg_compat_so, +- libraries_private: [frontend_stlib_code, thread_dep], ++ libraries: ecpg_compat_libraries, ++ libraries_private: [frontend_lib_code, thread_dep], + requires_private: ['libecpg', 'libpgtypes'], + ) +diff --git a/src/interfaces/ecpg/ecpglib/meson.build b/src/interfaces/ecpg/ecpglib/meson.build +index 8f478c6..fbae057 100644 +--- a/src/interfaces/ecpg/ecpglib/meson.build ++++ b/src/interfaces/ecpg/ecpglib/meson.build +@@ -52,12 +52,18 @@ ecpglib_so = shared_library('libecpg', + ) + ecpg_targets += ecpglib_so + ++if get_option('default_library') == 'shared' ++ ecpglib_libraries = ecpglib_so ++else ++ ecpglib_libraries = ecpglib_st ++endif ++ + pkgconfig.generate( + name: 'libecpg', + description: 'PostgreSQL libecpg library', + url: pg_url, +- libraries: ecpglib_so, +- libraries_private: [frontend_stlib_code, thread_dep], ++ libraries: ecpglib_libraries, ++ libraries_private: [frontend_lib_code, thread_dep], + requires_private: ['libpgtypes', 'libpq'], + ) + +diff --git a/src/interfaces/ecpg/pgtypeslib/meson.build b/src/interfaces/ecpg/pgtypeslib/meson.build +index 02301ec..e695b98 100644 +--- a/src/interfaces/ecpg/pgtypeslib/meson.build ++++ b/src/interfaces/ecpg/pgtypeslib/meson.build +@@ -46,10 +46,16 @@ ecpg_pgtypes_so = shared_library('libpgtypes', + ) + ecpg_targets += ecpg_pgtypes_so + ++if get_option('default_library') == 'shared' ++ ecpg_pgtypes_libraries = ecpg_pgtypes_so ++else ++ ecpg_pgtypes_libraries = ecpg_pgtypes_st ++endif ++ + pkgconfig.generate( + name: 'libpgtypes', + description: 'PostgreSQL libpgtypes library', + url: pg_url, +- libraries: ecpg_pgtypes_so, +- libraries_private: [frontend_stlib_code], ++ libraries: ecpg_pgtypes_libraries, ++ libraries_private: [frontend_lib_code], + ) +diff --git a/src/interfaces/libpq/meson.build b/src/interfaces/libpq/meson.build +index a74e885..7354286 100644 +--- a/src/interfaces/libpq/meson.build ++++ b/src/interfaces/libpq/meson.build +@@ -60,7 +60,7 @@ libpq_so_c_args = ['-DUSE_DYNAMIC_OAUTH'] + libpq_st = static_library('libpq', + libpq_sources, + include_directories: [libpq_inc], +- c_args: libpq_c_args, ++ c_args: libpq_c_args + ['-DFRONTEND'], + c_pch: pch_postgres_fe_h, + dependencies: [frontend_stlib_code, libpq_deps], + kwargs: default_lib_args, +@@ -80,13 +80,19 @@ libpq_so = shared_library('libpq', + kwargs: default_lib_args, + ) + ++if get_option('default_library') == 'shared' ++ libpq_link_with = [libpq_so] ++else ++ libpq_link_with = [libpq_st] ++endif ++ + libpq = declare_dependency( +- link_with: [libpq_so], ++ link_with: libpq_link_with, + include_directories: [include_directories('.')] + ) + + private_deps = [ +- frontend_stlib_code, ++ frontend_lib_code, + libpq_deps, + ] + +diff --git a/src/port/meson.build b/src/port/meson.build +index fc7b059..3b8cf40 100644 +--- a/src/port/meson.build ++++ b/src/port/meson.build +@@ -167,6 +167,19 @@ pgport_variants = { + + foreach name, opts : pgport_variants + ++ if name == '_srv' ++ pgport += {name: disabler()} ++ continue ++ endif ++ if name == '' and get_option('default_library') == 'shared' ++ pgport += {name: disabler()} ++ continue ++ endif ++ if name == '_shlib' and get_option('default_library') == 'static' ++ pgport += {name: disabler()} ++ continue ++ endif ++ + # Build internal static libraries for sets of files that need to be built + # with different cflags + cflag_libs = [] +@@ -196,6 +209,7 @@ foreach name, opts : pgport_variants + } + ) + pgport += {name: lib} ++ pgport_default = lib + endforeach + + pgport_srv = pgport['_srv'] diff --git a/ports/libpq/portfile.cmake b/ports/libpq/portfile.cmake index 72a02c8297c7e8..13df66d5424ce9 100644 --- a/ports/libpq/portfile.cmake +++ b/ports/libpq/portfile.cmake @@ -9,17 +9,12 @@ vcpkg_extract_source_archive( SOURCE_PATH ARCHIVE "${ARCHIVE}" PATCHES - unix/installdirs.patch - unix/fix-configure.patch - unix/single-linkage.patch - unix/no-server-tools.patch - unix/mingw-install.patch - unix/mingw-static-importlib-fix.patch - unix/python.patch + library-linkage.diff + libpq-and-client-tools.diff + libintl.diff + zic.diff windows/macro-def.patch windows/spin_delay.patch - windows/tcl-9.0-alpha.patch - windows/meson-vcpkg.patch windows/getopt.patch ) @@ -27,119 +22,89 @@ file(GLOB _py3_include_path "${CURRENT_HOST_INSTALLED_DIR}/include/python3*") string(REGEX MATCH "python3\\.([0-9]+)" _python_version_tmp "${_py3_include_path}") set(PYTHON_VERSION_MINOR "${CMAKE_MATCH_1}") -if("client" IN_LIST FEATURES) - set(HAS_TOOLS TRUE) -else() - set(HAS_TOOLS FALSE) -endif() - vcpkg_cmake_get_vars(cmake_vars_file) include("${cmake_vars_file}") -set(required_programs BISON FLEX) -if(VCPKG_DETECTED_MSVC OR NOT VCPKG_HOST_IS_WINDOWS) - list(APPEND required_programs PERL) -endif() -foreach(program_name IN LISTS required_programs) - vcpkg_find_acquire_program(${program_name}) - get_filename_component(program_dir ${${program_name}} DIRECTORY) - vcpkg_add_to_path(PREPEND "${program_dir}") +vcpkg_find_acquire_program(BISON) +vcpkg_find_acquire_program(FLEX) +vcpkg_find_acquire_program(PERL) + +vcpkg_list(SET MESON_OPTIONS_RELEASE) +vcpkg_list(SET MESON_OPTIONS) +foreach(option IN ITEMS icu lz4 zlib zstd) + if(option IN_LIST FEATURES) + list(APPEND MESON_OPTIONS -D${option}=enabled) + endif() endforeach() -if(VCPKG_DETECTED_MSVC) - include("${CMAKE_CURRENT_LIST_DIR}/build-msvc.cmake") - build_msvc("${SOURCE_PATH}") +if("openssl" IN_LIST FEATURES) + list(APPEND MESON_OPTIONS -Dssl=openssl) else() - file(COPY "${CMAKE_CURRENT_LIST_DIR}/Makefile" DESTINATION "${SOURCE_PATH}") + list(APPEND MESON_OPTIONS -Dssl=none) +endif() - vcpkg_list(SET BUILD_OPTS) - foreach(option IN ITEMS bonjour icu lz4 readline zlib zstd) - if(option IN_LIST FEATURES) - list(APPEND BUILD_OPTS --with-${option}) - else() - list(APPEND BUILD_OPTS --without-${option}) - endif() - endforeach() - if("openssl" IN_LIST FEATURES) - list(APPEND BUILD_OPTS --with-openssl) - else() - list(APPEND BUILD_OPTS --without-openssl) - endif() - if("xml" IN_LIST FEATURES) - list(APPEND BUILD_OPTS --with-libxml) - else() - list(APPEND BUILD_OPTS --without-libxml) - endif() - if("xslt" IN_LIST FEATURES) - list(APPEND BUILD_OPTS --with-libxslt) - else() - list(APPEND BUILD_OPTS --without-libxslt) - endif() - if("nls" IN_LIST FEATURES) - list(APPEND BUILD_OPTS --enable-nls) - else() - list(APPEND BUILD_OPTS --disable-nls) - endif() - if("nls" IN_LIST FEATURES) - set(ENV{MSGFMT} "${CURRENT_HOST_INSTALLED_DIR}/tools/gettext/bin/msgfmt${VCPKG_HOST_EXECUTABLE_SUFFIX}") - endif() - if("python" IN_LIST FEATURES) - list(APPEND BUILD_OPTS --with-python=3.${PYTHON_VERSION_MINOR}) - vcpkg_find_acquire_program(PYTHON3) - list(APPEND BUILD_OPTS "PYTHON=${PYTHON3}") - endif() - if(VCPKG_TARGET_IS_ANDROID AND (NOT VCPKG_CMAKE_SYSTEM_VERSION OR VCPKG_CMAKE_SYSTEM_VERSION LESS "26")) - list(APPEND BUILD_OPTS ac_cv_header_langinfo_h=no) - endif() - if(VCPKG_DETECTED_CMAKE_OSX_SYSROOT) - list(APPEND BUILD_OPTS "PG_SYSROOT=${VCPKG_DETECTED_CMAKE_OSX_SYSROOT}") - endif() - if(VCPKG_TARGET_IS_OSX) - set(ENV{LDFLAGS} "$ENV{LDFLAGS} -headerpad_max_install_names") - endif() - vcpkg_configure_make( - SOURCE_PATH "${SOURCE_PATH}" - COPY_SOURCE - AUTOCONFIG - ADDITIONAL_MSYS_PACKAGES autoconf-archive - DIRECT_PACKAGES - "https://mirror.msys2.org/msys/x86_64/tzcode-2025b-1-x86_64.pkg.tar.zst" - 824779e3ac4857bb21cbdc92fa881fa24bf89dfa8bc2f9ca816e9a9837a6d963805e8e0991499c43337a134552215fdee50010e643ddc8bd699170433a4c83de - OPTIONS - ${BUILD_OPTS} - OPTIONS_DEBUG - --enable-debug - ) +if("nls" IN_LIST FEATURES) + list(APPEND MESON_OPTIONS -Dnls=enabled) +endif() - if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set(ENV{LIBPQ_LIBRARY_TYPE} shared) - else() - set(ENV{LIBPQ_LIBRARY_TYPE} static) - endif() - if(VCPKG_TARGET_IS_MINGW) - set(ENV{LIBPQ_USING_MINGW} yes) - endif() - if(HAS_TOOLS) - set(ENV{LIBPQ_ENABLE_TOOLS} yes) +if("client" IN_LIST FEATURES) + list(APPEND MESON_OPTIONS_RELEASE -Dtools=enabled) + if(VCPKG_CROSSCOMPILING) + list(APPEND MESON_OPTIONS "-DZIC=${CURRENT_HOST_INSTALLED_DIR}/manual-tools/${PORT}/zic${VCPKG_HOST_EXECUTABLE_SUFFIX}") endif() - vcpkg_install_make() - - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/postgresql/server/pg_config.h" "#define CONFIGURE_ARGS" "// #define CONFIGURE_ARGS") - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/pg_config.h" "#define CONFIGURE_ARGS" "// #define CONFIGURE_ARGS") endif() +vcpkg_configure_meson( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -Dauto_features=disabled + ${MESON_OPTIONS} + # cannot use ADDITIONAL_BINARIES for "native" programs + "-DBISON=['${BISON}']" + "-DFLEX=['${FLEX}']" + "-DPERL=${PERL}" + OPTIONS_RELEASE + ${MESON_OPTIONS_RELEASE} +) +vcpkg_install_meson() vcpkg_fixup_pkgconfig() -configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/postgresql/vcpkg-cmake-wrapper.cmake" @ONLY) + +if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(GLOB pc_files "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/*.pc" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/*.pc") + foreach(file IN LISTS pc_files) + vcpkg_replace_string("${file}" " -l(pq|pg|ecpg)" " -llib\\1" REGEX) + endforeach() +endif() + +vcpkg_copy_tools(TOOL_NAMES ecpg AUTO_CLEAN) +if("client" IN_LIST FEATURES) + if(NOT VCPKG_CROSSCOMPILING) + vcpkg_copy_tools(TOOL_NAMES zic AUTO_CLEAN DESTINATION "${CURRENT_PACKAGES_DIR}/manual-tools/${PORT}") + endif() + vcpkg_copy_tools( + TOOL_NAMES + clusterdb createdb createuser + dropdb dropuser + pg_amcheck + pg_basebackup pgbench + pg_combinebackup pg_config pg_createsubscriber + pg_dump pg_dumpall + pg_isready + pg_receivewal pg_recvlogical pg_restore + pg_verifybackup + psql + reindexdb + vacuumdb + AUTO_CLEAN + ) +endif() + file(REMOVE_RECURSE - "${CURRENT_PACKAGES_DIR}/debug/doc" "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share" - "${CURRENT_PACKAGES_DIR}/debug/symbols" - "${CURRENT_PACKAGES_DIR}/debug/tools" - "${CURRENT_PACKAGES_DIR}/symbols" - "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug" ) +configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/postgresql/vcpkg-cmake-wrapper.cmake" @ONLY) file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYRIGHT") diff --git a/ports/libpq/unix/fix-configure.patch b/ports/libpq/unix/fix-configure.patch deleted file mode 100644 index 0e72f18218119d..00000000000000 --- a/ports/libpq/unix/fix-configure.patch +++ /dev/null @@ -1,61 +0,0 @@ -diff --git a/configure.ac b/configure.ac ---- a/configure.ac -+++ b/configure.ac -@@ -20,7 +20,8 @@ AC_INIT([PostgreSQL], [18.3], [pgsql-bugs@lists.postgresql.org], [], [https://ww - --m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_fatal([Autoconf version 2.69 is required. --Untested combinations of 'autoconf' and PostgreSQL versions are not --recommended. You can remove the check from 'configure.ac' but it is then --your responsibility whether the result works or not.])]) -+cross_compiling=yes # Avoid conftest loading shared objects -+m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_warn([unsupported],[Autoconf version 2.69 is required. -+Untested combinations of 'autoconf' and PostgreSQL versions are not -+recommended. You can remove the check from 'configure.ac' but it is then -+your responsibility whether the result works or not.])]) - AC_COPYRIGHT([Copyright (c) 1996-2025, PostgreSQL Global Development Group]) - AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c]) -@@ -1347,3 +1348,4 @@ AC_SEARCH_LIBS(pthread_barrier_wait, pthread) - if test "$with_readline" = yes; then -- PGAC_CHECK_READLINE -+ PKG_CHECK_MODULES([READLINE], [readline], [HAVE_LIBREADLINE=1], [pgac_cv_check_readline=no]) -+ LIBS="$READLINE_LIBS $LIBS" - if test x"$pgac_cv_check_readline" = x"no"; then -@@ -1357,3 +1359,3 @@ fi - if test "$with_zlib" = yes; then -- AC_CHECK_LIB(z, inflate, [], -+ PKG_CHECK_MODULES([ZLIB], [zlib], [LIBS="$ZLIB_LIBS $LIBS"], - [AC_MSG_ERROR([zlib library not found -@@ -1394,5 +1396,9 @@ fi - AC_DEFINE(OPENSSL_API_COMPAT, [0x10101000L], - [Define to the OpenSSL API version in use. This avoids deprecation warnings from newer OpenSSL versions.]) -+ PKG_CHECK_MODULES([CRYPTO_new_ex_data], [libcrypto], [LIBS="$CRYPTO_new_ex_data_LIBS $LIBS"], [AC_MSG_ERROR([library 'crypto' is required for OpenSSL])]) -+ PKG_CHECK_MODULES([SSL_new], [libssl], [LIBS="$SSL_new_LIBS $LIBS"], [AC_MSG_ERROR([library 'ssl' is required for OpenSSL])]) -+ if false ; then - AC_CHECK_LIB(crypto, CRYPTO_new_ex_data, [], [AC_MSG_ERROR([library 'crypto' is required for OpenSSL])]) - AC_CHECK_LIB(ssl, SSL_new, [], [AC_MSG_ERROR([library 'ssl' is required for OpenSSL])]) -+ fi - # Functions introduced in OpenSSL 1.1.1. -@@ -1415,3 +1421,4 @@ fi - if test "$with_libxml" = yes ; then -- AC_CHECK_LIB(xml2, xmlSaveToBuffer, [], [AC_MSG_ERROR([library 'xml2' (version >= 2.6.23) is required for XML support])]) -+ PKG_CHECK_MODULES([LIBXML2], [libxml-2.0 >= 2.6.23], [AC_DEFINE(HAVE_LIBXML2,1,[Define to 1 if with xml2])], [AC_MSG_ERROR([library 'xml2' (version >= 2.6.23) is required for XML support])]) -+ LIBS="$LIBXML2_LIBS $LIBS" - fi -@@ -1419,3 +1426,4 @@ fi - if test "$with_libxslt" = yes ; then -- AC_CHECK_LIB(xslt, xsltCleanupGlobals, [], [AC_MSG_ERROR([library 'xslt' is required for XSLT support])]) -+ PKG_CHECK_MODULES([LIBXSLT], [libxslt], [AC_DEFINE(HAVE_LIBXSLT,1,[Define to 1 if with xslt])], [AC_MSG_ERROR([library 'xslt' is required for XSLT support])]) -+ LIBS="$LIBXSLT_LIBS $LIBS" - fi -@@ -1430,3 +1438,4 @@ fi - if test "$with_lz4" = yes ; then -- AC_CHECK_LIB(lz4, LZ4_compress_default, [], [AC_MSG_ERROR([library 'lz4' is required for LZ4 support])]) -+ PKG_CHECK_MODULES([LZ4], [liblz4], [AC_DEFINE(HAVE_LIBLZ4,1,[Define to 1 if with lz4])], [AC_MSG_ERROR([library 'lz4' is required for LZ4 support])]) -+ LIBS="$LZ4_LIBS $LIBS" - fi -@@ -1434,3 +1443,4 @@ 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], [libzstd], [AC_DEFINE(HAVE_LIBZSTD,1,[Define to 1 if with zstd])], [AC_MSG_ERROR([library 'zstd' is required for ZSTD support])]) -+ LIBS="$ZSTD_LIBS $LIBS" - fi diff --git a/ports/libpq/unix/installdirs.patch b/ports/libpq/unix/installdirs.patch deleted file mode 100644 index bbba0fe07eca7b..00000000000000 --- a/ports/libpq/unix/installdirs.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff --git a/src/Makefile.global.in b/src/Makefile.global.in ---- a/src/Makefile.global.in -+++ b/src/Makefile.global.in -@@ -113,42 +113,42 @@ bindir := @bindir@ - --datadir := @datadir@ -+datadir := @datadir@/postgresql - ifeq "$(findstring pgsql, $(datadir))" "" - ifeq "$(findstring postgres, $(datadir))" "" - override datadir := $(datadir)/postgresql - endif - endif - --sysconfdir := @sysconfdir@ -+sysconfdir := @sysconfdir@/postgresql - ifeq "$(findstring pgsql, $(sysconfdir))" "" - ifeq "$(findstring postgres, $(sysconfdir))" "" - override sysconfdir := $(sysconfdir)/postgresql - endif - endif - - libdir := @libdir@ - --pkglibdir = $(libdir) -+pkglibdir = $(libdir)/postgresql - ifeq "$(findstring pgsql, $(pkglibdir))" "" - ifeq "$(findstring postgres, $(pkglibdir))" "" - override pkglibdir := $(pkglibdir)/postgresql - endif - endif - - includedir := @includedir@ - --pkgincludedir = $(includedir) -+pkgincludedir = $(includedir)/postgresql - ifeq "$(findstring pgsql, $(pkgincludedir))" "" - ifeq "$(findstring postgres, $(pkgincludedir))" "" - override pkgincludedir := $(pkgincludedir)/postgresql - endif - endif - - mandir := @mandir@ - --docdir := @docdir@ -+docdir := @docdir@/postgresql - ifeq "$(findstring pgsql, $(docdir))" "" - ifeq "$(findstring postgres, $(docdir))" "" - override docdir := $(docdir)/postgresql - endif - endif - - htmldir := @htmldir@ diff --git a/ports/libpq/unix/mingw-install.patch b/ports/libpq/unix/mingw-install.patch deleted file mode 100644 index ffeea023cfc559..00000000000000 --- a/ports/libpq/unix/mingw-install.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/src/Makefile.shlib b/src/Makefile.shlib -index 16255d7..51e9ed2 100644 ---- a/src/Makefile.shlib -+++ b/src/Makefile.shlib -@@ -85,7 +85,11 @@ else - # Naming convention for dynamically loadable modules - shlib = $(NAME)$(DLSUFFIX) - endif -+ifeq ($(PORTNAME)-$(LIBPQ_LIBRARY_TYPE), win32-shared) -+stlib = lib$(NAME).dll.a -+else - stlib = lib$(NAME).a -+endif - - ifndef soname - # additional flags for backend modules -@@ -468,6 +472,9 @@ endif - else # no soname - $(INSTALL_SHLIB) $< '$(DESTDIR)$(pkglibdir)/$(shlib)' - endif -+ifeq ($(PORTNAME)-$(LIBPQ_LIBRARY_TYPE), win32-shared) -+ mv '$(DESTDIR)$(libdir)/$(shlib)' '$(DESTDIR)$(libdir)/../bin/$(shlib)' -+endif - - - installdirs-lib: -@@ -476,6 +483,9 @@ ifdef soname - else - $(MKDIR_P) '$(DESTDIR)$(pkglibdir)' - endif -+ifeq ($(PORTNAME)-$(LIBPQ_LIBRARY_TYPE), win32-shared) -+ $(MKDIR_P) '$(DESTDIR)$(libdir)/../bin' -+endif - - - ## diff --git a/ports/libpq/unix/mingw-static-importlib-fix.patch b/ports/libpq/unix/mingw-static-importlib-fix.patch deleted file mode 100644 index 44d46571058bc5..00000000000000 --- a/ports/libpq/unix/mingw-static-importlib-fix.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff --git a/src/Makefile.shlib b/src/Makefile.shlib -index f94d59d..77aa6bf 100644 ---- a/src/Makefile.shlib -+++ b/src/Makefile.shlib -@@ -216,8 +216,10 @@ ifeq ($(PORTNAME), win32) - ifdef SO_MAJOR_VERSION - shlib = lib$(NAME)$(DLSUFFIX) - endif -+ifneq ($(LIBPQ_LIBRARY_TYPE), static) - haslibarule = yes - endif -+endif - - - # If the shared library doesn't have an export file, mark all symbols not -@@ -323,8 +325,10 @@ else - # Win32 case - - # See notes in src/backend/parser/Makefile about the following two rules -+ifneq ($(LIBPQ_LIBRARY_TYPE), static) - $(stlib): $(shlib) - touch $@ -+endif - - # XXX A backend that loads a module linked with libgcc_s_dw2-1.dll will exit - # uncleanly, hence -static-libgcc. (Last verified with MinGW-w64 compilers - -diff --git a/src/makefiles/Makefile.win32 b/src/makefiles/Makefile.win32: -index dc1aafa..1ab97a8 100644 ---- a/src/makefiles/Makefile.win32 -+++ b/src/makefiles/Makefile.win32 -@@ -22,21 +22,32 @@ endif - endif - endif - -+ifeq (,$(filter static,$(LIBPQ_LIBRARY_TYPE))) - ifneq (,$(findstring src/common,$(subdir))) - override CPPFLAGS+= -DBUILDING_DLL - endif -+endif -+ - -+ifeq (,$(filter static,$(LIBPQ_LIBRARY_TYPE))) - ifneq (,$(findstring src/port,$(subdir))) - override CPPFLAGS+= -DBUILDING_DLL - endif -+endif -+ - -+ifeq (,$(filter static,$(LIBPQ_LIBRARY_TYPE))) - ifneq (,$(findstring timezone,$(subdir))) - override CPPFLAGS+= -DBUILDING_DLL - endif -+endif -+ - -+ifeq (,$(filter static,$(LIBPQ_LIBRARY_TYPE))) - ifneq (,$(findstring ecpg/ecpglib,$(subdir))) - override CPPFLAGS+= -DBUILDING_DLL - endif -+endif - - # required by Python headers - ifneq (,$(findstring src/pl/plpython,$(subdir))) diff --git a/ports/libpq/unix/no-server-tools.patch b/ports/libpq/unix/no-server-tools.patch deleted file mode 100644 index 1677edb75a403f..00000000000000 --- a/ports/libpq/unix/no-server-tools.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/src/bin/Makefile b/src/bin/Makefile -index 7f9dde9..bc6d835 100644 ---- a/src/bin/Makefile -+++ b/src/bin/Makefile -@@ -13,31 +13,20 @@ subdir = src/bin - top_builddir = ../.. - include $(top_builddir)/src/Makefile.global - -+.NOTPARALLEL: -+# incl. https://www.postgresql.org/docs/current/reference-client.html -+# excl. https://www.postgresql.org/docs/current/reference-server.html - SUBDIRS = \ -- initdb \ - pg_amcheck \ -- pg_archivecleanup \ - pg_basebackup \ -- pg_checksums \ -- pg_combinebackup \ - pg_config \ -- pg_controldata \ -- pg_ctl \ - pg_dump \ -- pg_resetwal \ -- pg_rewind \ -- pg_test_fsync \ -- pg_test_timing \ -- pg_upgrade \ - pg_verifybackup \ -- pg_waldump \ -- pg_walsummary \ - pgbench \ - psql \ - scripts - - ifeq ($(PORTNAME), win32) --SUBDIRS += pgevent - else - ALWAYS_SUBDIRS += pgevent - endif diff --git a/ports/libpq/unix/python.patch b/ports/libpq/unix/python.patch deleted file mode 100644 index 7d8f58d4af1970..00000000000000 --- a/ports/libpq/unix/python.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index 7f97248992..33b6c84fc4 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -891,7 +891,9 @@ AC_SUBST(with_perl) - # Optionally build Python modules (PL/Python) - # - AC_MSG_CHECKING([whether to build Python modules]) --PGAC_ARG_BOOL(with, python, no, [build Python modules (PL/Python)]) -+PGAC_ARG_OPTARG(with, python, [PYTHON_VERSION], [build Python modules (PL/Python)], -+ [], -+ [python_version=$withval]) - AC_MSG_RESULT([$with_python]) - AC_SUBST(with_python) - -@@ -1214,7 +1216,18 @@ fi - - if test "$with_python" = yes; then - PGAC_PATH_PYTHON -- PGAC_CHECK_PYTHON_EMBED_SETUP -+ python_majorversion=3 -+ PKG_CHECK_MODULES(PYTHON_EMBED, python-${python_version}-embed) -+ python_includespec="${PYTHON_EMBED_CFLAGS}" -+ python_libdir=[$(echo " ${PYTHON_EMBED_LIBS}" | sed -e 's/\( -L[^ ]*\).*/\1/' -e 's/^.* -L//')] -+ python_libspec="${PYTHON_EMBED_LIBS}" -+ python_additional_libs="" -+ AC_SUBST(python_majorversion) -+ AC_SUBST(python_version) -+ AC_SUBST(python_includespec) -+ AC_SUBST(python_libdir) -+ AC_SUBST(python_libspec) -+ AC_SUBST(python_additional_libs) - fi - - if test x"$cross_compiling" = x"yes" && test -z "$with_system_tzdata"; then diff --git a/ports/libpq/unix/single-linkage.patch b/ports/libpq/unix/single-linkage.patch deleted file mode 100644 index 1c334a58a6d8b4..00000000000000 --- a/ports/libpq/unix/single-linkage.patch +++ /dev/null @@ -1,56 +0,0 @@ -diff --git a/src/Makefile.shlib b/src/Makefile.shlib -index 551023c..16255d7 100644 ---- a/src/Makefile.shlib -+++ b/src/Makefile.shlib -@@ -260,10 +260,14 @@ endif - - .PHONY: all-lib all-static-lib all-shared-lib - -+ifndef LIBPQ_LIBRARY_TYPE - all-lib: all-shared-lib - ifdef soname - # no static library when building a dynamically loadable module - all-lib: all-static-lib -+endif -+else -+all-lib: all-$(LIBPQ_LIBRARY_TYPE)-lib - all-lib: lib$(NAME).pc - endif - -@@ -417,9 +421,13 @@ endif # PORTNAME == cygwin || PORTNAME == win32 - ## - - .PHONY: install-lib install-lib-static install-lib-shared installdirs-lib -+ifndef LIBPQ_LIBRARY_TYPE - install-lib: install-lib-shared - ifdef soname - install-lib: install-lib-static -+endif -+else -+install-lib: install-lib-$(LIBPQ_LIBRARY_TYPE) - install-lib: install-lib-pc - endif - -diff --git a/src/interfaces/libpq/Makefile b/src/interfaces/libpq/Makefile -index 8abdb09..185461e 100644 ---- a/src/interfaces/libpq/Makefile -+++ b/src/interfaces/libpq/Makefile -@@ -115,6 +115,7 @@ backend_src = $(top_srcdir)/src/backend - # Also skip the test on platforms where libpq infrastructure may be provided - # by statically-linked libraries, as we can't expect them to honor this - # coding rule. -+ifeq ($(LIBPQ_LIBRARY_TYPE), shared) - libpq-refs-stamp: $(shlib) - ifneq ($(enable_coverage), yes) - ifeq (,$(filter solaris,$(PORTNAME))) -@@ -124,6 +125,10 @@ ifeq (,$(filter solaris,$(PORTNAME))) - endif - endif - touch $@ -+else -+.PHONY: libpq-refs-stamp -+libpq-refs-stamp: -+endif - - # Make dependencies on pg_config_paths.h visible in all builds. - fe-connect.o: fe-connect.c $(top_builddir)/src/port/pg_config_paths.h diff --git a/ports/libpq/usage b/ports/libpq/usage index 8dfcd275480ab7..1f36ee18b258e4 100644 --- a/ports/libpq/usage +++ b/ports/libpq/usage @@ -1,4 +1,4 @@ -The package libpq provides CMake integration: +libpq provides CMake integration: - find_package(PostgreSQL REQUIRED) - target_link_libraries(main PRIVATE PostgreSQL::PostgreSQL) + find_package(PostgreSQL REQUIRED) + target_link_libraries(main PRIVATE PostgreSQL::PostgreSQL) diff --git a/ports/libpq/vcpkg-cmake-wrapper.cmake b/ports/libpq/vcpkg-cmake-wrapper.cmake index fa7d3b56ea39e4..fdb71459044b3b 100644 --- a/ports/libpq/vcpkg-cmake-wrapper.cmake +++ b/ports/libpq/vcpkg-cmake-wrapper.cmake @@ -44,9 +44,9 @@ if(PostgreSQL_FOUND AND "@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static") endforeach() if(WIN32) if(TARGET PostgreSQL::PostgreSQL) - set_property(TARGET PostgreSQL::PostgreSQL APPEND PROPERTY INTERFACE_LINK_LIBRARIES "Secur32.lib") + set_property(TARGET PostgreSQL::PostgreSQL APPEND PROPERTY INTERFACE_LINK_LIBRARIES "secur32.lib") endif() - list(APPEND PostgreSQL_LIBRARIES Secur32.lib) + list(APPEND PostgreSQL_LIBRARIES secur32.lib) endif() cmake_policy(PUSH) cmake_policy(SET CMP0057 NEW) @@ -56,13 +56,13 @@ if(PostgreSQL_FOUND AND "@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static") if(TARGET PostgreSQL::PostgreSQL) set_property(TARGET PostgreSQL::PostgreSQL APPEND PROPERTY INTERFACE_LINK_LIBRARIES "OpenSSL::SSL") endif() - list(APPEND PostgreSQL_LIBRARIES OpenSSL::SSL) + list(APPEND PostgreSQL_LIBRARIES ${OPENSSL_LIBRARIES}) endif() if(WIN32) if(TARGET PostgreSQL::PostgreSQL) - set_property(TARGET PostgreSQL::PostgreSQL APPEND PROPERTY INTERFACE_LINK_LIBRARIES "Wldap32.lib") + set_property(TARGET PostgreSQL::PostgreSQL APPEND PROPERTY INTERFACE_LINK_LIBRARIES "wldap32.lib") endif() - list(APPEND PostgreSQL_LIBRARIES Wldap32.lib) + list(APPEND PostgreSQL_LIBRARIES wldap32.lib) endif() unset(Z_VCPKG_PORT_FEATURES) cmake_policy(POP) diff --git a/ports/libpq/vcpkg-libs.props.in b/ports/libpq/vcpkg-libs.props.in deleted file mode 100644 index cb7e5f92c13e38..00000000000000 --- a/ports/libpq/vcpkg-libs.props.in +++ /dev/null @@ -1,31 +0,0 @@ - - - - @CURRENT_INSTALLED_DIR@/debug/lib/icuind.lib;@CURRENT_INSTALLED_DIR@/debug/lib/icuucd.lib;@CURRENT_INSTALLED_DIR@/debug/lib/icudtd.lib; - @CURRENT_INSTALLED_DIR@/debug/lib/lz4d.lib - @CURRENT_INSTALLED_DIR@/debug/lib/intl.lib;@CURRENT_INSTALLED_DIR@/debug/lib/iconv.lib;@CURRENT_INSTALLED_DIR@/debug/lib/charset.lib - @CURRENT_INSTALLED_DIR@/debug/lib/libssl.lib;@CURRENT_INSTALLED_DIR@/debug/lib/libcrypto.lib;crypt32.lib;ws2_32.lib;secur32.lib - @CURRENT_INSTALLED_DIR@/debug/lib/python3@PYTHON_VERSION_MINOR@_d.lib - @CURRENT_INSTALLED_DIR@/debug/lib/tcl90g.lib - @CURRENT_INSTALLED_DIR@/debug/lib/tcl90sg.lib - @CURRENT_INSTALLED_DIR@/debug/lib/tcl90sgx.lib - @LIBXML2_LIBS_DEBUG@ - @LIBXSLT_LIBS_DEBUG@ - @CURRENT_INSTALLED_DIR@/debug/lib/zlibd.lib - @CURRENT_INSTALLED_DIR@/debug/lib/zstd.lib - - - @CURRENT_INSTALLED_DIR@/lib/icuin.lib;@CURRENT_INSTALLED_DIR@/lib/icuuc.lib;@CURRENT_INSTALLED_DIR@/lib/icudt.lib; - @CURRENT_INSTALLED_DIR@/lib/lz4.lib - @CURRENT_INSTALLED_DIR@/lib/intl.lib;@CURRENT_INSTALLED_DIR@/lib/iconv.lib;@CURRENT_INSTALLED_DIR@/lib/charset.lib - @CURRENT_INSTALLED_DIR@/lib/libssl.lib;@CURRENT_INSTALLED_DIR@/lib/libcrypto.lib;crypt32.lib;ws2_32.lib;secur32.lib - @CURRENT_INSTALLED_DIR@/lib/python3@PYTHON_VERSION_MINOR@.lib - @CURRENT_INSTALLED_DIR@/lib/tcl90.lib - @CURRENT_INSTALLED_DIR@/lib/tcl90s.lib - @CURRENT_INSTALLED_DIR@/lib/tcl90sx.lib - @LIBXML2_LIBS_RELEASE@ - @LIBXSLT_LIBS_RELEASE@ - @CURRENT_INSTALLED_DIR@/lib/zlib.lib - @CURRENT_INSTALLED_DIR@/lib/zstd.lib - - diff --git a/ports/libpq/vcpkg.json b/ports/libpq/vcpkg.json index 782747bdaa4b74..ef00d2cb91bf0f 100644 --- a/ports/libpq/vcpkg.json +++ b/ports/libpq/vcpkg.json @@ -1,27 +1,19 @@ { "name": "libpq", "version": "18.3", + "port-version": 1, "description": "The official database access API of postgresql", "homepage": "https://www.postgresql.org/", "license": "PostgreSQL", "supports": "!uwp & !emscripten", "dependencies": [ - { - "name": "libpq", - "default-features": false, - "features": [ - "bonjour" - ], - "platform": "osx" - }, { "name": "vcpkg-cmake-get-vars", "host": true }, { "name": "vcpkg-tool-meson", - "host": true, - "platform": "windows & !mingw" + "host": true } ], "default-features": [ @@ -38,55 +30,35 @@ "features": [ "client", "icu", - "xml", - "xslt", + "lz4", + "nls", + "openssl", + "zlib", "zstd" ] }, - { - "name": "libpq", - "features": [ - "bonjour" - ], - "platform": "osx" - }, - { - "name": "libpq", - "features": [ - "nls" - ], - "platform": "!osx" - }, { "name": "libpq", "features": [ "readline" ], "platform": "!windows" - }, - { - "name": "libpq", - "features": [ - "python" - ], - "platform": "!android & !mingw" - }, + } + ] + }, + "client": { + "description": "Build all client tools and libraries", + "dependencies": [ { "name": "libpq", + "host": true, + "default-features": false, "features": [ - "tcl" - ], - "platform": "windows & !mingw & !arm" + "client" + ] } ] }, - "bonjour": { - "description": "Build with Bonjour support", - "supports": "osx" - }, - "client": { - "description": "Build all client tools and libraries" - }, "icu": { "description": "Build with support for the ICU library", "dependencies": [ @@ -119,20 +91,6 @@ "openssl" ] }, - "python": { - "$supports": "!(windows & (static | mingw))", - "description": "build the PL/Python server programming language", - "dependencies": [ - { - "name": "libpq", - "default-features": false, - "features": [ - "client" - ] - }, - "python3" - ] - }, "readline": { "description": "Use readline", "supports": "!windows, mingw", @@ -140,43 +98,6 @@ "readline" ] }, - "tcl": { - "$supports": "!(windows & (static | mingw))", - "description": "build the PL/Tcl procedural language", - "supports": "windows & !mingw", - "dependencies": [ - { - "name": "libpq", - "default-features": false, - "features": [ - "client" - ] - }, - "tcl" - ] - }, - "xml": { - "description": "Build with libxml", - "dependencies": [ - { - "name": "libxml2", - "default-features": false - } - ] - }, - "xslt": { - "description": "Build with libxslt", - "dependencies": [ - { - "name": "libpq", - "default-features": false, - "features": [ - "xml" - ] - }, - "libxslt" - ] - }, "zlib": { "description": "Use zlib", "dependencies": [ diff --git a/ports/libpq/windows/getopt.patch b/ports/libpq/windows/getopt.patch index 073b32adb20977..c6e0126a34b03c 100644 --- a/ports/libpq/windows/getopt.patch +++ b/ports/libpq/windows/getopt.patch @@ -1,21 +1,14 @@ diff --git a/meson.build b/meson.build +index 34456b3..052e8c8 100644 --- a/meson.build +++ b/meson.build -@@ -2624,7 +2624,7 @@ header_checks = [ - 'copyfile.h', - 'crtdefs.h', - 'execinfo.h', -- 'getopt.h', -+ # 'getopt.h', # vcpkg: skip to avoid getopt-win32 header pollution - 'ifaddrs.h', - 'mbarrier.h', - 'strings.h', -@@ -2714,7 +2714,7 @@ endforeach +@@ -2650,6 +2650,9 @@ foreach header : header_checks + description: 'Define to 1 if you have the <@0@> header file.'.format(header)) + endforeach - if cc.has_type('struct option', - args: test_c_args, include_directories: postgres_inc, -- prefix: '@0@'.format(cdata.get('HAVE_GETOPT_H')) == '1' ? '#include ' : '') -+ prefix: '@0@'.format(cdata.get('HAVE_GETOPT_H', 0)) == '1' ? '#include ' : '') - cdata.set('HAVE_STRUCT_OPTION', 1) - endif ++if cc.get_id() == 'msvc' ++ cdata.set('HAVE_GETOPT_H', false) ++endif + decl_checks = [ + ['F_FULLFSYNC', 'fcntl.h'], diff --git a/ports/libpq/windows/meson-vcpkg.patch b/ports/libpq/windows/meson-vcpkg.patch deleted file mode 100644 index 84543bcd032247..00000000000000 --- a/ports/libpq/windows/meson-vcpkg.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff --git a/meson.build b/meson.build ---- a/meson.build -+++ b/meson.build -@@ -83,7 +83,7 @@ endif - ############################################################### - - postgres_inc_d = ['src/include'] --postgres_inc_d += get_option('extra_include_dirs') -+# postgres_inc_d += get_option('extra_include_dirs') # vcpkg: moved below - - postgres_lib_d = get_option('extra_lib_dirs') - -@@ -316,6 +316,7 @@ elif host_system == 'windows' - postgres_inc_d += 'src/include/port/win32' - if cc.get_id() == 'msvc' - postgres_inc_d += 'src/include/port/win32_msvc' -+ postgres_inc_d += get_option('extra_include_dirs') # vcpkg: moved here for correct priority - endif - - windows = import('windows') -@@ -3218,6 +3219,7 @@ endif - generated_headers = [] - # headers that the backend build depends on - generated_backend_headers = [] -+generated_backend_sources = [] - # configure_files() output, needs a way of converting to file names - configure_files = [] - -@@ -3372,12 +3374,12 @@ test_install_libs = [] - - subdir('src') - --subdir('contrib') -+# subdir('contrib') # vcpkg: skip - --subdir('src/test') --subdir('src/interfaces/ecpg/test') -+# subdir('src/test') # vcpkg: skip -+# subdir('src/interfaces/ecpg/test') # vcpkg: skip - --subdir('doc/src/sgml') -+# subdir('doc/src/sgml') # vcpkg: skip - - generated_sources_ac += {'': ['GNUmakefile']} - diff --git a/ports/libpq/windows/tcl-9.0-alpha.patch b/ports/libpq/windows/tcl-9.0-alpha.patch deleted file mode 100644 index 154efcb8f005d7..00000000000000 --- a/ports/libpq/windows/tcl-9.0-alpha.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur postgresql-16.9/src/pl/tcl/pltcl.c postgresql-16.9-vcpkg/src/pl/tcl/pltcl.c ---- postgresql-16.9/src/pl/tcl/pltcl.c 2025-05-05 22:30:08.000000000 +0200 -+++ postgresql-16.9-vcpkg/src/pl/tcl/pltcl.c 2025-05-23 22:53:43.485828671 +0200 -@@ -56,7 +56,7 @@ - #define CONST86 - #endif - --#if !HAVE_TCL_VERSION(8,7) -+#if !HAVE_TCL_VERSION(8,7) || (TCL_MAJOR_VERSION == 9 && TCL_MINOR_VERSION == 0 && TCL_RELEASE_LEVEL == TCL_ALPHA_RELEASE) - typedef int Tcl_Size; - #endif - diff --git a/ports/libpq/zic.diff b/ports/libpq/zic.diff new file mode 100644 index 00000000000000..737182f2dcbded --- /dev/null +++ b/ports/libpq/zic.diff @@ -0,0 +1,22 @@ +diff --git a/src/timezone/meson.build b/src/timezone/meson.build +index ad9f6f6..bb06082 100644 +--- a/src/timezone/meson.build ++++ b/src/timezone/meson.build +@@ -27,7 +27,7 @@ if get_option('system_tzdata') == '' + # FIXME: For cross builds, it would need a native built libpgport/pgcommon to + # build our zic. But for that we'd need to run a good chunk of the configure + # tests both natively and cross. Unclear if it's worth it. +- if meson.is_cross_build() ++ if meson.is_cross_build() or get_option('ZIC') != 'zic' + zic = find_program(get_option('ZIC'), native: true, required: true) + else + if host_system == 'windows' +@@ -38,7 +38,7 @@ if get_option('system_tzdata') == '' + + zic = executable('zic', zic_sources, + dependencies: [frontend_code], +- kwargs: default_bin_args + {'install': false} ++ kwargs: default_bin_args + {'install': true} + ) + endif + diff --git a/ports/qt5-base/portfile.cmake b/ports/qt5-base/portfile.cmake index cd02591530f8b3..f2f09dbd70df4b 100644 --- a/ports/qt5-base/portfile.cmake +++ b/ports/qt5-base/portfile.cmake @@ -14,11 +14,6 @@ endif() list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake) -set(WITH_PGSQL_PLUGIN OFF) -if("postgresqlplugin" IN_LIST FEATURES) - set(WITH_PGSQL_PLUGIN ON) -endif() - set(WITH_MYSQL_PLUGIN OFF) if ("mysqlplugin" IN_LIST FEATURES) set(WITH_MYSQL_PLUGIN ON) @@ -134,11 +129,6 @@ else() list(APPEND CORE_OPTIONS -dbus-runtime) endif() -if(WITH_PGSQL_PLUGIN) - list(APPEND CORE_OPTIONS -sql-psql) -else() - list(APPEND CORE_OPTIONS -no-sql-psql) -endif() if(WITH_MYSQL_PLUGIN) list(APPEND CORE_OPTIONS -sql-mysql) else() @@ -241,6 +231,15 @@ if(NOT VCPKG_TARGET_IS_WINDOWS) list(APPEND DEBUG_OPTIONS "FONTCONFIG_LIBS=${fontconfig_LIBS_DEBUG}") endif() +if("postgresqlplugin" IN_LIST FEATURES) + list(APPEND CORE_OPTIONS -sql-psql) + x_vcpkg_pkgconfig_get_modules(PREFIX libpq MODULES libpq LIBS) + list(APPEND RELEASE_OPTIONS "PSQL_LIBS=${libpq_LIBS_RELEASE}") + list(APPEND DEBUG_OPTIONS "PSQL_LIBS=${libpq_LIBS_DEBUG}") +else() + list(APPEND CORE_OPTIONS -no-sql-psql) +endif() + if("sqlite3plugin" IN_LIST FEATURES) list(APPEND CORE_OPTIONS -system-sqlite) x_vcpkg_pkgconfig_get_modules(PREFIX sqlite3 MODULES sqlite3 LIBS) @@ -296,11 +295,6 @@ if(VCPKG_TARGET_IS_WINDOWS) else() list(APPEND CORE_OPTIONS -schannel) endif() - - if(WITH_PGSQL_PLUGIN) - list(APPEND RELEASE_OPTIONS "PSQL_LIBS=${PSQL_RELEASE} ${PSQL_PORT_RELEASE} ${PSQL_COMMON_RELEASE} ${SSL_RELEASE} ${EAY_RELEASE} ${ADDITIONAL_WINDOWS_LIBS} -lwldap32") - list(APPEND DEBUG_OPTIONS "PSQL_LIBS=${PSQL_DEBUG} ${PSQL_PORT_DEBUG} ${PSQL_COMMON_DEBUG} ${SSL_DEBUG} ${EAY_DEBUG} ${ADDITIONAL_WINDOWS_LIBS} -lwldap32") - endif() elseif(VCPKG_TARGET_IS_LINUX) list(APPEND CORE_OPTIONS -xcb-xlib -xcb -linuxfb) @@ -308,11 +302,6 @@ elseif(VCPKG_TARGET_IS_LINUX) list(APPEND RELEASE_OPTIONS "OPENSSL_LIBS=${SSL_RELEASE} ${EAY_RELEASE} -ldl -lpthread") list(APPEND DEBUG_OPTIONS "OPENSSL_LIBS=${SSL_DEBUG} ${EAY_DEBUG} -ldl -lpthread") endif() - - if(WITH_PGSQL_PLUGIN) - list(APPEND RELEASE_OPTIONS "PSQL_LIBS=${PSQL_RELEASE} ${PSQL_PORT_RELEASE} ${PSQL_TYPES_RELEASE} ${PSQL_COMMON_RELEASE} ${SSL_RELEASE} ${EAY_RELEASE} -ldl -lpthread") - list(APPEND DEBUG_OPTIONS "PSQL_LIBS=${PSQL_DEBUG} ${PSQL_PORT_DEBUG} ${PSQL_TYPES_DEBUG} ${PSQL_COMMON_DEBUG} ${SSL_DEBUG} ${EAY_DEBUG} -ldl -lpthread") - endif() elseif(VCPKG_TARGET_IS_OSX) if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") # Avoid frameworks for vcpkg @@ -377,11 +366,6 @@ elseif(VCPKG_TARGET_IS_OSX) list(APPEND RELEASE_OPTIONS "OPENSSL_LIBS=${SSL_RELEASE} ${EAY_RELEASE} -ldl -lpthread") list(APPEND DEBUG_OPTIONS "OPENSSL_LIBS=${SSL_DEBUG} ${EAY_DEBUG} -ldl -lpthread") endif() - - if(WITH_PGSQL_PLUGIN) - list(APPEND RELEASE_OPTIONS "PSQL_LIBS=${PSQL_RELEASE} ${PSQL_PORT_RELEASE} ${PSQL_TYPES_RELEASE} ${PSQL_COMMON_RELEASE} ${SSL_RELEASE} ${EAY_RELEASE} -ldl -lpthread") - list(APPEND DEBUG_OPTIONS "PSQL_LIBS=${PSQL_DEBUG} ${PSQL_PORT_DEBUG} ${PSQL_TYPES_DEBUG} ${PSQL_COMMON_DEBUG} ${SSL_DEBUG} ${EAY_DEBUG} -ldl -lpthread") - endif() endif() if (WITH_MYSQL_PLUGIN) diff --git a/ports/qt5-base/vcpkg.json b/ports/qt5-base/vcpkg.json index 049a766824bf75..6b52f3edff01c6 100644 --- a/ports/qt5-base/vcpkg.json +++ b/ports/qt5-base/vcpkg.json @@ -1,7 +1,7 @@ { "name": "qt5-base", "version": "5.15.18", - "port-version": 3, + "port-version": 4, "description": "Qt Base provides the basic non-GUI functionality required by all Qt applications.", "homepage": "https://www.qt.io/", "license": null, diff --git a/scripts/ci.feature.baseline.txt b/scripts/ci.feature.baseline.txt index b45cee26fba266..2642481b32e361 100644 --- a/scripts/ci.feature.baseline.txt +++ b/scripts/ci.feature.baseline.txt @@ -1142,7 +1142,6 @@ qt5-base[icu]:x64-windows-static-md=feature-fails qt5-base[icu]:x64-windows-static=feature-fails qt5-base[icu]:x64-windows=feature-fails qt5-base[icu]:x86-windows=feature-fails -qt5-base[postgresqlplugin](windows & !static)=feature-fails # https://github.com/microsoft/vcpkg/issues/51102 qt5-base[vulkan]:arm64-osx=feature-fails # needs MolkenVK qt5-base(android)=skip # port doesn't support cross builds qt5-base(arm & windows)=fail # qt5-base: no cross builds diff --git a/versions/baseline.json b/versions/baseline.json index ff4c1802ee05fc..4b46ed9ccfde46 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5446,7 +5446,7 @@ }, "libpq": { "baseline": "18.3", - "port-version": 0 + "port-version": 1 }, "libpqxx": { "baseline": "8.0.1", @@ -8134,7 +8134,7 @@ }, "qt5-base": { "baseline": "5.15.18", - "port-version": 3 + "port-version": 4 }, "qt5-charts": { "baseline": "5.15.18", diff --git a/versions/l-/libpq.json b/versions/l-/libpq.json index 071ddb0fc1cf40..cf29af46ca105f 100644 --- a/versions/l-/libpq.json +++ b/versions/l-/libpq.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "07600c753f8d06aa4cba70f08673e23c8b3c4466", + "version": "18.3", + "port-version": 1 + }, { "git-tree": "fc832da8b65bf0a3b12a174b3b100ab256692eee", "version": "18.3", diff --git a/versions/q-/qt5-base.json b/versions/q-/qt5-base.json index f320d211cc703e..c101a14faa00cc 100644 --- a/versions/q-/qt5-base.json +++ b/versions/q-/qt5-base.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "14bdcd108f6ea114034cb7c602378695b90bcfce", + "version": "5.15.18", + "port-version": 4 + }, { "git-tree": "997295bf0dc2718ba909ddc293a37e1d795d4107", "version": "5.15.18",