[[[
Support KDE 6, it's released in Feb 2024, which is 19 months ago.
* build/ac-macros/compiler.m4
Switch to C++17, since Qt6 requires C++17
* build/ac-macros/kwallet.m4
Check for KDE 6's libraries
* subversion/libsvn_auth_kwallet/kwallet.cpp
Update preprocessor for KDE 6
]]]
---
diff --git a/build/ac-macros/compiler.m4 b/build/ac-macros/compiler.m4
--- a/build/ac-macros/compiler.m4
+++ b/build/ac-macros/compiler.m4
@@ -102,7 +102,7 @@ AC_DEFUN([SVN_CXX_MODE_SETUP],
if test "$GXX" = "yes"; then
dnl Find flags to force C++98 mode
dnl g++ and clang++
- SVN_CXXFLAGS_ADD_IFELSE([-std=c++11])
+ SVN_CXXFLAGS_ADD_IFELSE([-std=c++17])
fi
CXXMODEFLAGS="$CXXFLAGS"
diff --git a/build/ac-macros/kwallet.m4 b/build/ac-macros/kwallet.m4
--- a/build/ac-macros/kwallet.m4
+++ b/build/ac-macros/kwallet.m4
@@ -45,21 +45,43 @@ AC_DEFUN(SVN_LIB_KWALLET,
if test -n "$PKG_CONFIG"; then
if test "$HAVE_DBUS" = "yes"; then
AC_MSG_CHECKING([for Qt])
- if $PKG_CONFIG --exists Qt5Core Qt5DBus Qt5Gui; then
+ kde_version=
+ if $PKG_CONFIG --exists Qt6Core Qt6DBus Qt6Gui; then
+ AC_MSG_RESULT([yes, Qt6])
+ kde_version=6
+ qt_pkg_config_names="Qt6Core Qt6DBus Qt6Gui"
+ kde_inc_names="KF6/KWallet KF6/KCoreAddons KF6/KI18n"
+ kde_lib_names="-lKF6Wallet -lKF6I18n -lKF6CoreAddons
`$PKG_CONFIG --libs Qt6Gui Qt6DBus Qt6Core`"
+ elif $PKG_CONFIG --exists Qt5Core Qt5DBus Qt5Gui; then
AC_MSG_RESULT([yes, Qt5])
+ kde_version=5
qt_pkg_config_names="Qt5Core Qt5DBus Qt5Gui"
kde_config_name="kf5-config"
kde_inc_names="KF5/KWallet KF5/KCoreAddons KF5/KI18n"
kde_lib_names="-lKF5Wallet -lKF5I18n -lKF5CoreAddons -lQt5Gui
-lQt5DBus -lQt5Core"
elif $PKG_CONFIG --exists QtCore QtDBus QtGui; then
AC_MSG_RESULT([yes, Qt4])
+ kde_version=4
qt_pkg_config_names="QtCore QtDBus QtGui"
kde_config_name="kde4-config"
kde_inc_names="/"
kde_lib_names="-lkdeui -lkdecore -lQtGui -lQtDBus -lQtCore"
fi
if test -n "$qt_pkg_config_names"; then
- if test "$svn_lib_kwallet" != "yes"; then
+ if test "$kde_version" = 6; then
+ KDE_CONFIG="unneeded"
+ AC_DEFINE([SVN_HAVE_KF6], [1], [Defined if KF6 available])
+ case "$svn_lib_kwallet" in
+ *:*)
+ kde_incdir="${svn_lib_kwallet%%:*}"
+ kde_libdir="${svn_lib_kwallet##*:}"
+ ;;
+ *)
+ kde_incdir="$svn_lib_kwallet/include"
+ kde_libdir="$svn_lib_kwallet/lib"
+ ;;
+ esac
+ elif test "$svn_lib_kwallet" != "yes"; then
AC_MSG_CHECKING([for $kde_config_name])
KDE_CONFIG="$svn_lib_kwallet/bin/$kde_config_name"
if test -f "$KDE_CONFIG" && test -x "$KDE_CONFIG"; then
diff --git a/subversion/libsvn_auth_kwallet/kwallet.cpp
b/subversion/libsvn_auth_kwallet/kwallet.cpp
--- a/subversion/libsvn_auth_kwallet/kwallet.cpp
+++ b/subversion/libsvn_auth_kwallet/kwallet.cpp
@@ -55,7 +55,7 @@
#include "svn_private_config.h"
-#ifndef SVN_HAVE_KF5
+#if !defined(SVN_HAVE_KF6) && !defined(SVN_HAVE_KF5)
#include <kcmdlineargs.h>
#include <kcomponentdata.h>
#endif
@@ -223,7 +223,7 @@ kwallet_password_get(svn_boolean_t *done
app = new QCoreApplication(argc, q_argv);
}
-#if SVN_HAVE_KF5
+#if defined(SVN_HAVE_KF6) || defined(SVN_HAVE_KF5)
KLocalizedString::setApplicationDomain("subversion"); /* translation domain
*/
/* componentName appears in KDE GUI prompts */
@@ -305,7 +305,7 @@ kwallet_password_set(svn_boolean_t *done
app = new QCoreApplication(argc, q_argv);
}
-#if SVN_HAVE_KF5
+#if defined(SVN_HAVE_KF6) || defined(SVN_HAVE_KF5)
KLocalizedString::setApplicationDomain("subversion"); /* translation domain
*/
/* componentName appears in KDE GUI prompts */