0004-meson-Remove-conditionals-for-Meson-versions-lower-t.patch
text/plain
Filename: 0004-meson-Remove-conditionals-for-Meson-versions-lower-t.patch
Type: text/plain
Part: 3
Message:
Re: minimum Meson version
Patch
Format: format-patch
Series: patch 0004
Subject: meson: Remove conditionals for Meson versions lower than 0.57
| File | + | − |
|---|---|---|
| meson.build | 94 | 109 |
From 9c263b581795682c136177b86c4dc26a547156aa Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Wed, 18 Jun 2025 10:18:26 +0200
Subject: [PATCH 4/5] meson: Remove conditionals for Meson versions lower than
0.57
---
meson.build | 203 ++++++++++++++++++++++++----------------------------
1 file changed, 94 insertions(+), 109 deletions(-)
diff --git a/meson.build b/meson.build
index 3c3667ffe61..92945cb4291 100644
--- a/meson.build
+++ b/meson.build
@@ -3600,19 +3600,13 @@ sys.exit(sp.returncode)
# Test Generation
###############################################################
-# When using a meson version understanding exclude_suites, define a
-# 'tmp_install' test setup (the default) that excludes tests running against a
-# pre-existing install and a 'running' setup that conflicts with creation of
-# the temporary installation and tap tests (which don't support running
-# against a running server).
+# Define a 'tmp_install' test setup (the default) that excludes tests
+# running against a pre-existing install and a 'running' setup that
+# conflicts with creation of the temporary installation and tap tests
+# (which don't support running against a running server).
running_suites = []
install_suites = []
-if meson.version().version_compare('>=0.57')
- runningcheck = true
-else
- runningcheck = false
-endif
testwrap = files('src/tools/testwrap')
@@ -3709,7 +3703,7 @@ foreach test_dir : tests
install_suites += test_group
# some tests can't support running against running DB
- if runningcheck and t.get('runningcheck', true)
+ if t.get('runningcheck', true)
test(test_group_running / kind,
python,
args: [
@@ -3792,13 +3786,11 @@ foreach test_dir : tests
endforeach # directories with tests
# repeat condition so meson realizes version dependency
-if meson.version().version_compare('>=0.57')
- add_test_setup('tmp_install',
- is_default: true,
- exclude_suites: running_suites)
- add_test_setup('running',
- exclude_suites: ['setup'] + install_suites)
-endif
+add_test_setup('tmp_install',
+ is_default: true,
+ exclude_suites: running_suites)
+add_test_setup('running',
+ exclude_suites: ['setup'] + install_suites)
@@ -3886,10 +3878,7 @@ alias_target('pgdist', [tar_gz, tar_bz2])
# But not if we are in a subproject, in case the parent project wants to
# create a dist using the standard Meson command.
if not meson.is_subproject()
- # We can only pass the identifier perl here when we depend on >= 0.55
- if meson.version().version_compare('>=0.55')
- meson.add_dist_script(perl, '-e', 'exit 1')
- endif
+ meson.add_dist_script(perl, '-e', 'exit 1')
endif
@@ -3898,106 +3887,102 @@ endif
# The End, The End, My Friend
###############################################################
-if meson.version().version_compare('>=0.57')
+summary(
+ {
+ 'data block size': '@0@ kB'.format(cdata.get('BLCKSZ') / 1024),
+ 'WAL block size': '@0@ kB'.format(cdata.get('XLOG_BLCKSZ') / 1024),
+ 'segment size': get_option('segsize_blocks') != 0 ?
+ '@0@ blocks'.format(cdata.get('RELSEG_SIZE')) :
+ '@0@ GB'.format(get_option('segsize')),
+ },
+ section: 'Data layout',
+)
- summary(
- {
- 'data block size': '@0@ kB'.format(cdata.get('BLCKSZ') / 1024),
- 'WAL block size': '@0@ kB'.format(cdata.get('XLOG_BLCKSZ') / 1024),
- 'segment size': get_option('segsize_blocks') != 0 ?
- '@0@ blocks'.format(cdata.get('RELSEG_SIZE')) :
- '@0@ GB'.format(get_option('segsize')),
- },
- section: 'Data layout',
- )
+summary(
+ {
+ 'host system': '@0@ @1@'.format(host_system, host_cpu),
+ 'build system': '@0@ @1@'.format(build_machine.system(),
+ build_machine.cpu_family()),
+ },
+ section: 'System',
+)
- summary(
- {
- 'host system': '@0@ @1@'.format(host_system, host_cpu),
- 'build system': '@0@ @1@'.format(build_machine.system(),
- build_machine.cpu_family()),
- },
- section: 'System',
- )
+summary(
+ {
+ 'linker': '@0@'.format(cc.get_linker_id()),
+ 'C compiler': '@0@ @1@'.format(cc.get_id(), cc.version()),
+ },
+ section: 'Compiler',
+)
+summary(
+ {
+ 'CPP FLAGS': ' '.join(cppflags),
+ 'C FLAGS, functional': ' '.join(cflags),
+ 'C FLAGS, warnings': ' '.join(cflags_warn),
+ 'C FLAGS, modules': ' '.join(cflags_mod),
+ 'C FLAGS, user specified': ' '.join(get_option('c_args')),
+ 'LD FLAGS': ' '.join(ldflags + get_option('c_link_args')),
+ },
+ section: 'Compiler Flags',
+)
+
+if llvm.found()
summary(
{
- 'linker': '@0@'.format(cc.get_linker_id()),
- 'C compiler': '@0@ @1@'.format(cc.get_id(), cc.version()),
+ 'C++ compiler': '@0@ @1@'.format(cpp.get_id(), cpp.version()),
},
section: 'Compiler',
)
summary(
{
- 'CPP FLAGS': ' '.join(cppflags),
- 'C FLAGS, functional': ' '.join(cflags),
- 'C FLAGS, warnings': ' '.join(cflags_warn),
- 'C FLAGS, modules': ' '.join(cflags_mod),
- 'C FLAGS, user specified': ' '.join(get_option('c_args')),
- 'LD FLAGS': ' '.join(ldflags + get_option('c_link_args')),
+ 'C++ FLAGS, functional': ' '.join(cxxflags),
+ 'C++ FLAGS, warnings': ' '.join(cxxflags_warn),
+ 'C++ FLAGS, user specified': ' '.join(get_option('cpp_args')),
},
section: 'Compiler Flags',
)
+endif
- if llvm.found()
- summary(
- {
- 'C++ compiler': '@0@ @1@'.format(cpp.get_id(), cpp.version()),
- },
- section: 'Compiler',
- )
-
- summary(
- {
- 'C++ FLAGS, functional': ' '.join(cxxflags),
- 'C++ FLAGS, warnings': ' '.join(cxxflags_warn),
- 'C++ FLAGS, user specified': ' '.join(get_option('cpp_args')),
- },
- section: 'Compiler Flags',
- )
- endif
-
- summary(
- {
- 'bison': '@0@ @1@'.format(bison.full_path(), bison_version),
- 'dtrace': dtrace,
- 'flex': '@0@ @1@'.format(flex.full_path(), flex_version),
- },
- section: 'Programs',
- )
-
- summary(
- {
- 'bonjour': bonjour,
- 'bsd_auth': bsd_auth,
- 'docs': docs_dep,
- 'docs_pdf': docs_pdf_dep,
- 'gss': gssapi,
- 'icu': icu,
- 'ldap': ldap,
- 'libcurl': libcurl,
- 'libnuma': libnuma,
- 'liburing': liburing,
- 'libxml': libxml,
- 'libxslt': libxslt,
- 'llvm': llvm,
- 'lz4': lz4,
- 'nls': libintl,
- 'openssl': ssl,
- 'pam': pam,
- 'plperl': [perl_dep, perlversion],
- 'plpython': python3_dep,
- 'pltcl': tcl_dep,
- 'readline': readline,
- 'selinux': selinux,
- 'systemd': systemd,
- 'uuid': uuid,
- 'zlib': zlib,
- 'zstd': zstd,
- },
- section: 'External libraries',
- list_sep: ' ',
- )
+summary(
+ {
+ 'bison': '@0@ @1@'.format(bison.full_path(), bison_version),
+ 'dtrace': dtrace,
+ 'flex': '@0@ @1@'.format(flex.full_path(), flex_version),
+ },
+ section: 'Programs',
+)
-endif
+summary(
+ {
+ 'bonjour': bonjour,
+ 'bsd_auth': bsd_auth,
+ 'docs': docs_dep,
+ 'docs_pdf': docs_pdf_dep,
+ 'gss': gssapi,
+ 'icu': icu,
+ 'ldap': ldap,
+ 'libcurl': libcurl,
+ 'libnuma': libnuma,
+ 'liburing': liburing,
+ 'libxml': libxml,
+ 'libxslt': libxslt,
+ 'llvm': llvm,
+ 'lz4': lz4,
+ 'nls': libintl,
+ 'openssl': ssl,
+ 'pam': pam,
+ 'plperl': [perl_dep, perlversion],
+ 'plpython': python3_dep,
+ 'pltcl': tcl_dep,
+ 'readline': readline,
+ 'selinux': selinux,
+ 'systemd': systemd,
+ 'uuid': uuid,
+ 'zlib': zlib,
+ 'zstd': zstd,
+ },
+ section: 'External libraries',
+ list_sep: ' ',
+)
--
2.49.0