From a3cf39e8a94ecf6145e3515a473764bc120f472f Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Mon, 20 Mar 2023 01:56:38 +0200 Subject: [PATCH 30/30] Meson: Add followtag support See osdn #46493 Signed-off-by: Marko Lindqvist --- doc/INSTALL.meson | 5 +++++ gen_headers/meson_freeciv_config.h.in | 3 +++ meson.build | 5 +++++ meson_options.txt | 5 +++++ 4 files changed, 18 insertions(+) diff --git a/doc/INSTALL.meson b/doc/INSTALL.meson index 12bff32fd6..b300cc46ea 100644 --- a/doc/INSTALL.meson +++ b/doc/INSTALL.meson @@ -113,6 +113,11 @@ cacert-path (string): This affects mostly downloading custom modpacks with modpack installer from an 'https' URL. +followtag (string): + Custom followtag name. If this is empty, default follow tag is used. + That's the version tag that the client checks from the metaserver to + see if there's newer freeciv versions of the kind available. + json-protocol (boolean): Build json-protocol support in. Json-protocol is an alternative to the default raw-protocol between freeciv server and client. diff --git a/gen_headers/meson_freeciv_config.h.in b/gen_headers/meson_freeciv_config.h.in index e447ac4789..ffb15fe82c 100644 --- a/gen_headers/meson_freeciv_config.h.in +++ b/gen_headers/meson_freeciv_config.h.in @@ -27,6 +27,9 @@ /* Is this freeciv-web instead of regular build */ #mesondefine FREECIV_WEB +/* Version tag to follow */ +#mesondefine FOLLOWTAG + /* nullptr available at C */ #mesondefine FREECIV_HAVE_C23_NULLPTR diff --git a/meson.build b/meson.build index 1389c68181..a4be1ce817 100644 --- a/meson.build +++ b/meson.build @@ -601,6 +601,11 @@ if get_option('cacert-path') != '' '"' + get_option('cacert-path') + '"') endif +if get_option('followtag') != '' + pub_conf_data.set('FOLLOWTAG', + '"' + get_option('followtag') + '"') +endif + potential_size_t_formats = [ '%zu', '%ld', '%lld', '%I64d', '%I32d' ] foreach format : potential_size_t_formats diff --git a/meson_options.txt b/meson_options.txt index 818fd8c8ca..ba30f446ae 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -15,6 +15,11 @@ option('cacert-path', value: '', description: 'Custom path to CA cert bundle') +option('followtag', + type: 'string', + value: '', + description: 'Custom followtag') + option('json-protocol', type: 'boolean', value: false, -- 2.39.2