From 541000614e76fc28bbf9ceb77eebb245d67b93c0 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 23 Sep 2023 14:13:31 +0300 Subject: [PATCH 09/16] Meson: Replace boolean 'ruledit' option with 'tools' array See osdn #48700 Signed-off-by: Marko Lindqvist --- doc/INSTALL.meson | 6 ++++-- meson.build | 4 ++-- meson_options.txt | 9 +++++---- platforms/flatpak/org.freeciv.gtk322.yml | 2 +- platforms/flatpak/org.freeciv.gtk4.yml | 2 +- platforms/flatpak/org.freeciv.mp.gtk3.yml | 2 +- platforms/flatpak/org.freeciv.mp.gtk4.yml | 2 +- platforms/flatpak/org.freeciv.qt.yml | 2 +- platforms/flatpak/org.freeciv.ruledit.yml | 2 +- platforms/flatpak/org.freeciv.sdl2.yml | 2 +- windows/installer_cross/meson-winbuild.sh | 16 ++++++++-------- windows/installer_msys2/Makefile.meson | 4 ++-- 12 files changed, 28 insertions(+), 25 deletions(-) diff --git a/doc/INSTALL.meson b/doc/INSTALL.meson index 7e323b0a8f..8ebdfe96f3 100644 --- a/doc/INSTALL.meson +++ b/doc/INSTALL.meson @@ -150,8 +150,10 @@ readline ('try'/'true'/'false') audio (boolean): Build sound support to the clients. Defaults to true. -ruledit (boolean): - Build ruleset editor. Defaults to true. +tools (array): + Extra tools to build: + * ruledit : Ruleset editor + Default is to build them all. nls (boolean): Build in Native Language Support. Defaults to true. diff --git a/meson.build b/meson.build index 84251829a7..ddd2a63df3 100644 --- a/meson.build +++ b/meson.build @@ -5,7 +5,7 @@ c_compiler = meson.get_compiler('c') b_root = meson.project_build_root() -if get_option('ruledit') or \ +if get_option('tools').contains('ruledit') or \ get_option('clients').contains('qt') or \ get_option('fcmp').contains('qt') add_languages('cpp', native: false) @@ -3996,7 +3996,7 @@ executable('freeciv-ruleup', install: true ) -if get_option('ruledit') +if get_option('tools').contains('ruledit') if not qt_dep.found() if get_option('qtver') == 'qt6' diff --git a/meson_options.txt b/meson_options.txt index 6a2a32ee0e..2cb3da12c3 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -50,10 +50,11 @@ option('audio', value: true, description: 'Build in sound support') -option('ruledit', - type: 'boolean', - value: true, - description: 'Build ruleset editor') +option('tools', + type: 'array', + choices: ['ruledit'], + value: ['ruledit'], + description: 'Extra tools to build') option('nls', type: 'boolean', diff --git a/platforms/flatpak/org.freeciv.gtk322.yml b/platforms/flatpak/org.freeciv.gtk322.yml index 81dc93ec9b..76cb997af5 100644 --- a/platforms/flatpak/org.freeciv.gtk322.yml +++ b/platforms/flatpak/org.freeciv.gtk322.yml @@ -18,7 +18,7 @@ modules: config-opts: - -Dclients=gtk3.22 - -Dfcmp=[] - - -Druledit=false + - -Dtools=[] sources: - type: dir path: ../.. diff --git a/platforms/flatpak/org.freeciv.gtk4.yml b/platforms/flatpak/org.freeciv.gtk4.yml index 1d8c139e02..1d6c62e91c 100644 --- a/platforms/flatpak/org.freeciv.gtk4.yml +++ b/platforms/flatpak/org.freeciv.gtk4.yml @@ -18,7 +18,7 @@ modules: config-opts: - -Dclients=gtk4 - -Dfcmp=[] - - -Druledit=false + - -Dtools=[] sources: - type: dir path: ../.. diff --git a/platforms/flatpak/org.freeciv.mp.gtk3.yml b/platforms/flatpak/org.freeciv.mp.gtk3.yml index a38692d0e2..7b89e0d783 100644 --- a/platforms/flatpak/org.freeciv.mp.gtk3.yml +++ b/platforms/flatpak/org.freeciv.mp.gtk3.yml @@ -18,7 +18,7 @@ modules: - -Dfcmp=gtk3 - -Dclients=[] - -Dserver=disabled - - -Druledit=false + - -Dtools=[] sources: - type: dir path: ../.. diff --git a/platforms/flatpak/org.freeciv.mp.gtk4.yml b/platforms/flatpak/org.freeciv.mp.gtk4.yml index b88ca4f71f..77e8721ef4 100644 --- a/platforms/flatpak/org.freeciv.mp.gtk4.yml +++ b/platforms/flatpak/org.freeciv.mp.gtk4.yml @@ -18,7 +18,7 @@ modules: - -Dfcmp=gtk4 - -Dclients=[] - -Dserver=disabled - - -Druledit=false + - -Dtools=[] sources: - type: dir path: ../.. diff --git a/platforms/flatpak/org.freeciv.qt.yml b/platforms/flatpak/org.freeciv.qt.yml index f8939c65c2..8fcc5bd338 100644 --- a/platforms/flatpak/org.freeciv.qt.yml +++ b/platforms/flatpak/org.freeciv.qt.yml @@ -19,7 +19,7 @@ modules: - -Dqtver=qt6 - -Dclients=qt - -Dfcmp=[] - - -Druledit=false + - -Dtools=[] sources: - type: dir path: ../.. diff --git a/platforms/flatpak/org.freeciv.ruledit.yml b/platforms/flatpak/org.freeciv.ruledit.yml index 4605edcef9..d778b57663 100644 --- a/platforms/flatpak/org.freeciv.ruledit.yml +++ b/platforms/flatpak/org.freeciv.ruledit.yml @@ -15,7 +15,7 @@ modules: no-autogen: true config-opts: - -Dqtver=qt6 - - -Druledit=true + - -Dtools=ruledit - -Dclients=[] - -Dserver=disabled - -Dfcmp=[] diff --git a/platforms/flatpak/org.freeciv.sdl2.yml b/platforms/flatpak/org.freeciv.sdl2.yml index 0b49e5fea6..0521f6cad5 100644 --- a/platforms/flatpak/org.freeciv.sdl2.yml +++ b/platforms/flatpak/org.freeciv.sdl2.yml @@ -19,7 +19,7 @@ modules: config-opts: - -Dclients=sdl2 - -Dfcmp=[] - - -Druledit=false + - -Dtools=[] sources: - type: dir path: ../.. diff --git a/windows/installer_cross/meson-winbuild.sh b/windows/installer_cross/meson-winbuild.sh index d360dcb708..bd925ee298 100755 --- a/windows/installer_cross/meson-winbuild.sh +++ b/windows/installer_cross/meson-winbuild.sh @@ -7,7 +7,7 @@ # See COPYING available from the same location you got this script. # -MESON_WINBUILD_VERSION="3.1.0-beta" +MESON_WINBUILD_VERSION="3.2.0-alpha" MIN_WINVER=0x0603 # Windows 8.1. Qt6-client and Qt6-ruledit builds override this CROSSER_FEATURE_LEVEL=2.7 @@ -77,23 +77,23 @@ QTPARAMS="" case "${GUI}" in gtk3.22) FCMP="gtk3" - RULEDIT=false ;; + TOOLS="[]" ;; gtk4) FCMP="gtk4" - RULEDIT=false ;; + TOOLS="[]" ;; sdl2) FCMP="gtk4" - RULEDIT=false ;; + TOOLS="[]" ;; qt5) CLIENT="qt" FCMP="qt" - RULEDIT=true + TOOLS="ruledit" QTPARAMS="-Dqtver=qt5" ;; qt6) CLIENT="qt" FCMP="qt" - RULEDIT=true + TOOLS="ruledit" MIN_WINVER=0x0A00 QTPARAMS="-Dqtver=qt6" ;; ruledit) CLIENT="[]" FCMP="[]" - RULEDIT=true + TOOLS="ruledit" MIN_WINVER=0x0A00 QTPARAMS="-Dqtver=qt6" ;; esac @@ -158,7 +158,7 @@ if ! meson setup \ -Dmwand="${MWAND}" \ -Dreadline=false \ -Dserver="${SERVER}" \ - -Druledit="${RULEDIT}" \ + -Dtools="${TOOLS}" \ -Ddefault_library=static \ ${QTPARAMS} \ ${EXTRA_CONFIG} \ diff --git a/windows/installer_msys2/Makefile.meson b/windows/installer_msys2/Makefile.meson index 694a94e2ec..c11e2f012d 100644 --- a/windows/installer_msys2/Makefile.meson +++ b/windows/installer_msys2/Makefile.meson @@ -156,7 +156,7 @@ installer-common: install-freeciv-$(GUI) install-env-$(GUI) install-freeciv-common: clean-install-client-arch # Create build directory mkdir -p $(BUILD_DIR)/$(WINARCH)-client-$(GUI) - cd $(BUILD_DIR)/$(WINARCH)-client-$(GUI); meson setup $(IMSYS2_DIR)/../.. -Dprefix=$(IMSYS2_DIR)/$(INST_DIR)/$(WINARCH)-client-$(GUI) -Dfollowtag='windows-S3_2' -Dclients=$(CLIENT) -Dfcmp=$(FCMP) -Druledit=false -Dreadline=false -Dcacert-path='./ssl/certs/ca-bundle.crt' -Dmin-win-ver=$(MIN_WIN_VER) -Dsyslua=false $(EXTRA_CONFIG) + cd $(BUILD_DIR)/$(WINARCH)-client-$(GUI); meson setup $(IMSYS2_DIR)/../.. -Dprefix=$(IMSYS2_DIR)/$(INST_DIR)/$(WINARCH)-client-$(GUI) -Dfollowtag='windows-S3_2' -Dclients=$(CLIENT) -Dfcmp=$(FCMP) -Dtools=[] -Dreadline=false -Dcacert-path='./ssl/certs/ca-bundle.crt' -Dmin-win-ver=$(MIN_WIN_VER) -Dsyslua=false $(EXTRA_CONFIG) cd $(BUILD_DIR)/$(WINARCH)-client-$(GUI); ninja cd $(BUILD_DIR)/$(WINARCH)-client-$(GUI); ninja install cd $(BUILD_DIR)/$(WINARCH)-client-$(GUI); ninja langstat_core.txt @@ -172,7 +172,7 @@ install-freeciv-common: clean-install-client-arch install-ruledit-common: clean-ruledit-install-arch # Create build directory mkdir -p $(BUILD_DIR)/$(WINARCH)-ruledit-$(GUI) - cd $(BUILD_DIR)/$(WINARCH)-ruledit-$(GUI); meson setup $(IMSYS2_DIR)/../.. -Dprefix=$(IMSYS2_DIR)/$(INST_DIR)/$(WINARCH)-ruledit-$(GUI) -Dfollowtag='windows-S3_2' -Dclients=[] -Dfcmp=[] -Dserver=disabled -Druledit=true -Dreadline=false -Dcacert-path='./ssl/certs/ca-bundle.crt' -Dmin-win-ver=$(MIN_WIN_VER) -Dsyslua=false $(EXTRA_CONFIG) + cd $(BUILD_DIR)/$(WINARCH)-ruledit-$(GUI); meson setup $(IMSYS2_DIR)/../.. -Dprefix=$(IMSYS2_DIR)/$(INST_DIR)/$(WINARCH)-ruledit-$(GUI) -Dfollowtag='windows-S3_2' -Dclients=[] -Dfcmp=[] -Dserver=disabled -Dtools=ruledit -Dreadline=false -Dcacert-path='./ssl/certs/ca-bundle.crt' -Dmin-win-ver=$(MIN_WIN_VER) -Dsyslua=false $(EXTRA_CONFIG) cd $(BUILD_DIR)/$(WINARCH)-ruledit-$(GUI); ninja cd $(BUILD_DIR)/$(WINARCH)-ruledit-$(GUI); ninja install cd $(BUILD_DIR)/$(WINARCH)-ruledit-$(GUI); ninja langstat_core.txt langstat_ruledit.txt -- 2.40.1