Subject: [PATCH kde-team 45/63] gnu: Add kconfigwidgets-6.

From: Zheng Junjie <[email-masked]>
Date: Mon, 15 Apr 2024 20:47:22 +0800

* gnu/packages/kde-frameworks.scm (kconfigwidgets-6): New variable.
(kconfigwidgets): Inherit above.

Change-Id: I9d3b4c68f0a11c74f0d1c7c41eb615eb2c1600a2
---
 gnu/packages/kde-frameworks.scm | 63 +++++++++++++++++++++++++++------
 1 file changed, 52 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/kde-frameworks.scm b/gnu/packages/kde-frameworks.scm
index 42d352056f..a2fb4883a3 100644
--- a/gnu/packages/kde-frameworks.scm
+++ b/gnu/packages/kde-frameworks.scm
@@ -3214,10 +3214,10 @@ (define-public kcmutils
 KCModules can be created with the KConfigWidgets framework.")
     (license license:lgpl2.1+)))
 
-(define-public kconfigwidgets
+(define-public kconfigwidgets-6
   (package
     (name "kconfigwidgets")
-    (version "5.114.0")
+    (version "6.1.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -3226,21 +3226,21 @@ (define-public kconfigwidgets
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "16layydkcwfbvzxqjzprkq8bbxifn0z0wm7mc9bzwrfxy761rjnj"))))
+                "0wfiz6frwmvbjfz30ci2iilzxr1rww7i74mbjigg1xkgg4p2n98b"))))
     (build-system qt-build-system)
     (propagated-inputs
-     (list kauth kcodecs kconfig kwidgetsaddons))
+     (list kcodecs-6 kconfig-6 kcolorscheme kwidgetsaddons-6))
     (native-inputs
-     (list extra-cmake-modules kdoctools qttools-5))
+     (list extra-cmake-modules kdoctools-6 qttools))
     (inputs
-     (list kcoreaddons
-           kguiaddons
-           ki18n
+     (list kcoreaddons-6
+           kguiaddons-6
+           ki18n-6
            ;; todo: PythonModuleGeneration
-           qtbase-5
-           qttools-5))
+           qtdeclarative))
     (arguments
      (list
+      #:qtbase qtbase
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'unpack 'patch
@@ -3254,7 +3254,8 @@ (define-public kconfigwidgets
               (when tests?
                 (setenv "HOME"
                         (getcwd))
-                (invoke "ctest" "-E" "kstandardactiontest")))))))
+                (invoke "ctest" "-E" "(kstandardactiontest|\
+klanguagenametest)")))))))
     (home-page "https://community.kde.org/Frameworks")
     (synopsis "Widgets for configuration dialogs")
     (description "KConfigWidgets provides easy-to-use classes to create
@@ -3263,6 +3264,46 @@ (define-public kconfigwidgets
     ;; dual licensed
     (license (list license:gpl2+ license:lgpl2.1+))))
 
+(define-public kconfigwidgets
+  (package
+    (inherit kconfigwidgets-6)
+    (name "kconfigwidgets")
+    (version "5.114.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://kde/stable/frameworks/"
+                    (version-major+minor version) "/"
+                    name "-" version ".tar.xz"))
+              (sha256
+               (base32
+                "16layydkcwfbvzxqjzprkq8bbxifn0z0wm7mc9bzwrfxy761rjnj"))))
+    (propagated-inputs
+     (list kauth kcodecs kconfig kwidgetsaddons))
+    (native-inputs
+     (list extra-cmake-modules kdoctools qttools-5))
+    (inputs
+     (list kcoreaddons
+           kguiaddons
+           ;; todo: PythonModuleGeneration
+           ki18n))
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch
+            (lambda _
+              (substitute* "src/khelpclient.cpp"
+                ;; make QDirIterator follow symlinks
+                (("^\\s*(QDirIterator it\\(.*, QDirIterator::Subdirectories)(\\);)" _ a b)
+                 (string-append a " | QDirIterator::FollowSymlinks" b)))))
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                (setenv "HOME"
+                        (getcwd))
+                (invoke "ctest" "-E" "kstandardactiontest")))))))))
+
 (define-public kdeclarative
   (package
     (name "kdeclarative")
-- 
2.41.0