From 0adb0b09da34112274923ba03abd1e9d92b622d5 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Thu, 17 Apr 2025 03:30:45 +0300
Subject: [PATCH 43/43] Make Qt6-6.4 the minimum requirement

See RM #1300

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 doc/INSTALL.autotools | 4 ++--
 doc/README.packaging  | 2 ++
 m4/qt.m4              | 2 +-
 meson.build           | 8 ++++----
 4 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/doc/INSTALL.autotools b/doc/INSTALL.autotools
index 6a39e8b8ee..3a10e239b6 100644
--- a/doc/INSTALL.autotools
+++ b/doc/INSTALL.autotools
@@ -8,7 +8,7 @@ Installing Freeciv:
 
 This file describes how to compile and install Freeciv. Last time we
 made sure this file is up to date was 16-Jul-06.
-Last minor update was 18-Jan-25.
+Last minor update was 17-Apr-25.
 
 There may be a localized version of this file in the ./doc directory,
 named INSTALL.<locale> (e.g., INSTALL.de).
@@ -345,7 +345,7 @@ following order: pkgconf, Glib, Atk, Pango, Gdk-Pixbuf, Gtk.
    ../src/configure MOCCMD="/home/freeciv/local-qt/bin/moc" --enable-client=qt
 
  - Qt6Core, Qt6Gui, and Qt6Widgets libraries and headers.
-   At least version 6.0 is required.
+   At least version 6.4 is required.
 
 
 2. Generating Makefiles
diff --git a/doc/README.packaging b/doc/README.packaging
index 75bdcf54b9..c22f39e161 100644
--- a/doc/README.packaging
+++ b/doc/README.packaging
@@ -19,6 +19,8 @@ Updating from 3.3 to 3.4
 * Qt5 support removed
 * Minimum meson requirement for builds made with it is 0.63.0
 * Minimum Python requirement for code generation scripts is 3.7
+* Minimum Qt6 version for building Qt-client, Qt modpack installer,
+  and Ruledit is 6.4.
 
 ----------------------------------------------------------------------
 Compatibility of modified versions
diff --git a/m4/qt.m4 b/m4/qt.m4
index 1b8487033d..620b84a8b2 100644
--- a/m4/qt.m4
+++ b/m4/qt.m4
@@ -3,7 +3,7 @@
 AC_DEFUN([FC_QT],
 [
   case "x$1" in
-    xqt6|xQt6|x) FC_QT6([0x060000], [6.0])
+    xqt6|xQt6|x) FC_QT6([0x060400], [6.4])
       FC_QT_CPPFLAGS="$FC_QT6_CPPFLAGS"
       FC_QT_CXXFLAGS="$FC_QT6_CXXFLAGS"
       FC_QT_LIBS="$FC_QT6_LIBS"
diff --git a/meson.build b/meson.build
index d980f1249e..daf9100fd4 100644
--- a/meson.build
+++ b/meson.build
@@ -930,7 +930,7 @@ if qtver == 'qt6x'
   qt_opts = 'cpp_std=c++17'
   qt_cppflags = ['-std=c++17', '-fPIC']
 else
-  qt_minver='0x060000'
+  qt_minver='0x060400'
   add_global_arguments('-DQT_DISABLE_DEPRECATED_BEFORE=' + qt_minver, language : 'cpp')
   qt_opts = 'cpp_std=c++17'
   qt_cppflags = ['-std=c++17', '-fPIC']
@@ -3648,7 +3648,7 @@ if get_option('clients').contains('qt')
 
 if not qtfine
   if qtver == 'qt6'
-    error('Qt6 >= 6.0 required for qt-client in Qt6 mode, but not found')
+    error('Qt6 >= 6.4 required for qt-client in Qt6 mode, but not found')
   elser
     error('Qt6 >= 6.7 required for qt-client in Qt6x mode, but not found')
   endif
@@ -4344,7 +4344,7 @@ if get_option('fcmp').contains('qt')
 
 if not qtfine
   if qtver == 'qt6'
-    error('Qt6 >= 6.0 required for qt-modpack-installer in Qt6 mode, but not found')
+    error('Qt6 >= 6.4 required for qt-modpack-installer in Qt6 mode, but not found')
   else
     error('Qt6 >= 6.7 required for qt-modpack-installer in Qt6x mode, but not found')
   endif
@@ -4432,7 +4432,7 @@ if get_option('tools').contains('ruledit')
 
 if not qtfine
   if qtver == 'qt6'
-    error('Qt6 >= 6.0 required for ruledit in Qt6 mode, but not found')
+    error('Qt6 >= 6.4 required for ruledit in Qt6 mode, but not found')
   else
     error('Qt6 >= 6.7 required for ruledit in Qt6x mode, but not found')
   endif
-- 
2.47.2

