From f88fd876e3c5ea5325bcecac7eed5fd162ccc374 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Thu, 11 Sep 2025 19:40:44 +0300
Subject: [PATCH 12/12] Drop meson support for gtk4x-client

See RM #1681

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 doc/INSTALL.meson |   4 +-
 meson.build       | 122 ----------------------------------------------
 meson_options.txt |   4 +-
 3 files changed, 4 insertions(+), 126 deletions(-)

diff --git a/doc/INSTALL.meson b/doc/INSTALL.meson
index 42ffa23070..63feea14bd 100644
--- a/doc/INSTALL.meson
+++ b/doc/INSTALL.meson
@@ -150,13 +150,13 @@ Freeciv specific configure options:
 clients (array):
   List of clients to build. To disable client build completely, give an
   empty array ('-Dclients=[]'). Currently gtk3.22-, sdl2-, qt-,
-  gtk4-, sdl3-, gtk4x-, and stub-client builds are supported.
+  gtk4-, sdl3-, and stub-client builds are supported.
   By default builds just gtk4-client.
 
 fcmp (array):
   List of freeciv modpack installer UIs to build. To disable their build
   completely, give an empty array ('-Dfcmp=[]'). Currently gtk3, qt, gtk4,
-  gtk4x, and cli are supported. By default builds just gtk4 UI.
+  and cli are supported. By default builds just gtk4 UI.
 
 cacert-path (string):
   Custom path to CA cert bundle. If this is empty, default path will be used.
diff --git a/meson.build b/meson.build
index 365d76fc79..8bbb956877 100644
--- a/meson.build
+++ b/meson.build
@@ -3542,91 +3542,6 @@ custom_target('mi_gtk4',
 
 endif
 
-if get_option('clients').contains('gtk4x')
-
-if not gtk5_dep.found()
-  error('gtk-4.0 >= 4.14 required for gtk4x-client, but not found')
-endif
-
-executable('freeciv-gtk4x',
-  'client/gui-gtk-5.0/action_dialog.c',
-  'client/gui-gtk-5.0/canvas.c',
-  'client/gui-gtk-5.0/chatline.c',
-  'client/gui-gtk-5.0/choice_dialog.c',
-  'client/gui-gtk-5.0/citizensinfo.c',
-  'client/gui-gtk-5.0/citydlg.c',
-  'client/gui-gtk-5.0/cityrep.c',
-  'client/gui-gtk-5.0/cma_fe.c',
-  'client/gui-gtk-5.0/colors.c',
-  'client/gui-gtk-5.0/connectdlg.c',
-  'client/gui-gtk-5.0/dialogs.c',
-  'client/gui-gtk-5.0/diplodlg.c',
-  'client/gui-gtk-5.0/editgui.c',
-  'client/gui-gtk-5.0/editprop.c',
-  'client/gui-gtk-5.0/finddlg.c',
-  'client/gui-gtk-5.0/gamedlgs.c',
-  'client/gui-gtk-5.0/gotodlg.c',
-  'client/gui-gtk-5.0/graphics.c',
-  'client/gui-gtk-5.0/gui_main.c',
-  'client/gui-gtk-5.0/gui_stuff.c',
-  'client/gui-gtk-5.0/happiness.c',
-  'client/gui-gtk-5.0/helpdlg.c',
-  'client/gui-gtk-5.0/infradlg.c',
-  'client/gui-gtk-5.0/inputdlg.c',
-  'client/gui-gtk-5.0/inteldlg.c',
-  'client/gui-gtk-5.0/luaconsole.c',
-  'client/gui-gtk-5.0/mapctrl.c',
-  'client/gui-gtk-5.0/mapview.c',
-  'client/gui-gtk-5.0/menu.c',
-  'client/gui-gtk-5.0/messagedlg.c',
-  'client/gui-gtk-5.0/messagewin.c',
-  'client/gui-gtk-5.0/optiondlg.c',
-  'client/gui-gtk-5.0/pages.c',
-  'client/gui-gtk-5.0/plrdlg.c',
-  'client/gui-gtk-5.0/rallypointdlg.c',
-  'client/gui-gtk-5.0/repodlgs.c',
-  'client/gui-gtk-5.0/soundset_dlg.c',
-  'client/gui-gtk-5.0/spaceshipdlg.c',
-  'client/gui-gtk-5.0/sprite.c',
-  'client/gui-gtk-5.0/theme_dlg.c',
-  'client/gui-gtk-5.0/themes.c',
-  'client/gui-gtk-5.0/tileset_dlg.c',
-  'client/gui-gtk-5.0/transportdlg.c',
-  'client/gui-gtk-5.0/unitselect.c',
-  'client/gui-gtk-5.0/unitselextradlg.c',
-  'client/gui-gtk-5.0/unitselunitdlg.c',
-  'client/gui-gtk-5.0/voteinfo_bar.c',
-  'client/gui-gtk-5.0/wldlg.c',
-  clienticon,
-  c_args: [ '-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_4_8',
-            '-DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_4_14',
-            '-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_76',
-            '-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_76'],
-  include_directories: client_inc,
-  dependencies: [gtk5_dep, net_dep, gettext_dep, mw_extra_dep],
-  link_with: client_common,
-  install: true,
-  win_subsystem: 'windows'
-  )
-
-  gtk4_theme = true
-
-install_data(
-  'bootstrap/org.freeciv.gtk4x.desktop',
-  install_dir : join_paths(get_option('prefix'), 'share/applications')
-  )
-
-custom_target('mi_gtk4x',
-              input: 'bootstrap/org.freeciv.gtk4x.metainfo.xml.in',
-              output: '@BASENAME@',
-              command: [sh_exe, files('bootstrap/generate_metainfo.sh'),
-                        '@OUTPUT@', b_root],
-              depend_files: files('fc_version'),
-              install: true,
-              install_dir: join_paths(get_option('datadir'), 'metainfo'))
-
-endif
-
 if gtk4_theme
   install_data('data/themes/gtk4/Freeciv/gtk-4.0/gtk.css',
                'data/themes/gtk4/Freeciv/gtk-4.0/menubar.css',
@@ -4328,43 +4243,6 @@ custom_target('mi_mp_gtk4',
 
 endif
 
-if get_option('fcmp').contains('gtk4x')
-
-if not gtk5_dep.found()
-  error('gtk-4.0 >= 4.14 required for gtk4x modpack installer, but not found')
-endif
-
-executable('freeciv-mp-gtk4x',
-  'tools/fcmp/mpgui_gtk5.c',
-  mpicon,
-  c_args: [ '-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_4_14',
-            '-DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_4_14',
-            '-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_76',
-            '-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_76'],
-  include_directories: tool_inc,
-  sources: [verhdr],
-  dependencies: [gtk5_dep, sqlite3_dep, gettext_dep],
-  link_with: [common_lib, fcmp_common],
-  install: true,
-  win_subsystem: 'windows'
-  )
-
-install_data(
-  'bootstrap/org.freeciv.gtk4x.mp.desktop',
-  install_dir : join_paths(get_option('prefix'), 'share/applications')
-  )
-
-custom_target('mi_mp_gtk4x',
-              input: 'bootstrap/org.freeciv.gtk4x.mp.metainfo.xml.in',
-              output: '@BASENAME@',
-              command: [sh_exe, files('bootstrap/generate_metainfo.sh'),
-                        '@OUTPUT@', b_root],
-              depend_files: files('fc_version'),
-              install: true,
-              install_dir: join_paths(get_option('datadir'), 'metainfo'))
-
-endif
-
 if get_option('fcmp').contains('qt')
 
 if not qtfine
diff --git a/meson_options.txt b/meson_options.txt
index b4176f0ac4..0e4786e51b 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,12 +1,12 @@
 option('clients',
        type: 'array',
-       choices: ['gtk3.22','sdl2', 'qt', 'gtk4', 'stub', 'sdl3', 'gtk4x'],
+       choices: ['gtk3.22','sdl2', 'qt', 'gtk4', 'stub', 'sdl3'],
        value: ['gtk4'],
        description: 'Clients to build')
 
 option('fcmp',
        type: 'array',
-       choices: ['gtk3','qt','cli','gtk4', 'gtk4x'],
+       choices: ['gtk3','qt','cli','gtk4'],
        value: ['gtk4'],
        description: 'Modpack installer UIs to build')
 
-- 
2.51.0

