0009-meson-Add-extra-version-option.patch

text/plain

Filename: 0009-meson-Add-extra-version-option.patch
Type: text/plain
Part: 8
Message: Re: [RFC] building postgres with meson -v8

Patch

Format: format-patch
Series: patch 0009
Subject: meson: Add extra-version option
File+
meson.build 1 0
meson_options.txt 3 0
From 55e92f039526d9c6d01f0be1a4ad34e64d7e01b9 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Wed, 11 May 2022 10:04:50 +0200
Subject: [PATCH 9/9] meson: Add extra-version option

---
 meson.build       | 1 +
 meson_options.txt | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/meson.build b/meson.build
index 8a372282ff..a2680f5a1a 100644
--- a/meson.build
+++ b/meson.build
@@ -79,6 +79,7 @@ cdata.set_quoted('PACKAGE_NAME', 'PostgreSQL')
 cdata.set_quoted('PACKAGE_BUGREPORT', 'pgsql-bugs@lists.postgresql.org')
 cdata.set_quoted('PACKAGE_URL', pg_url)
 
+pg_version += get_option('extra-version')
 cdata.set_quoted('PG_VERSION', pg_version)
 cdata.set_quoted('PG_VERSION_STR', 'PostgreSQL @0@ on @1@, compiled by @2@-@3@'.format(
   pg_version, target_machine.cpu_family(), cc.get_id(), cc.version()))
diff --git a/meson_options.txt b/meson_options.txt
index d4a7500306..3cc211b39d 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -16,6 +16,9 @@ Large tables are divided into multiple operating-system files, each of size equa
 
 # Defaults
 
+option('extra-version', type: 'string', value: '',
+       description: 'Append string to version.')
+
 option('krb-srvnam', type: 'string', value: 'postgres',
   description: 'default service principal name in Kerberos (GSSAPI)')
 
-- 
2.35.1