Subject: [bug#70395] [PATCH kde-team 17/63] gnu: Add ksyntaxhighlighting-6.

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

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

Change-Id: I7c6cfa1f98137a7ee61ea4d7081c9af5da68cbea
---
 gnu/packages/kde-frameworks.scm | 57 ++++++++++++++++++++++-----------
 1 file changed, 38 insertions(+), 19 deletions(-)

diff --git a/gnu/packages/kde-frameworks.scm b/gnu/packages/kde-frameworks.scm
index 4ac8ffa1c6..bb38fd33ce 100644
--- a/gnu/packages/kde-frameworks.scm
+++ b/gnu/packages/kde-frameworks.scm
@@ -1343,10 +1343,10 @@ (define-public kplotting
      (list extra-cmake-modules qttools-5))
     (arguments '())))
 
-(define-public ksyntaxhighlighting
+(define-public ksyntaxhighlighting-6
   (package
     (name "ksyntaxhighlighting")
-    (version "5.114.0")
+    (version "6.1.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1355,27 +1355,25 @@ (define-public ksyntaxhighlighting
                     "syntax-highlighting-" version ".tar.xz"))
               (sha256
                (base32
-                "1skblg2m0sar63qrgkjsg0w9scixggm5qj7lp4gzjn4hwq6m3n63"))))
+                "1dnacxfrr0llsv2zkn55iywrp3lm8xb7w5fn2pb9fghf5c2ljx0y"))))
     (build-system cmake-build-system)
     (native-inputs
-     (list extra-cmake-modules perl qttools-5
-           ;; Optional, for compile-time validation of syntax definition files:
-           qtxmlpatterns))
+     (list extra-cmake-modules perl qttools))
     (inputs
-     (list qtbase-5))
+     (list qtbase qtdeclarative))
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'patch-source-shebangs 'unpatch-source-shebang
-           (lambda _
-             ;; revert the patch-shebang phase on scripts which are
-             ;; in fact test data
-             (substitute* '("autotests/input/highlight.sh"
-                            "autotests/folding/highlight.sh.fold")
-               (((which "sh")) " /bin/sh")) ;; space in front!
-             (substitute* '("autotests/input/highlight.pl"
-                            "autotests/folding/highlight.pl.fold")
-               (((which "perl")) "/usr/bin/perl")))))))
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'patch-source-shebangs 'unpatch-source-shebang
+                 (lambda _
+                   ;; revert the patch-shebang phase on scripts which are
+                   ;; in fact test data
+                   (substitute* '("autotests/input/highlight.sh"
+                                  "autotests/folding/highlight.sh.fold")
+                     (((which "sh")) " /bin/sh")) ;; space in front!
+                   (substitute* '("autotests/input/highlight.pl"
+                                  "autotests/folding/highlight.pl.fold")
+                     (((which "perl")) "/usr/bin/perl")))))))
     (home-page "https://community.kde.org/Frameworks")
     (synopsis "Syntax highlighting engine for Kate syntax definitions")
     (description "This is a stand-alone implementation of the Kate syntax
@@ -1386,6 +1384,27 @@ (define-public ksyntaxhighlighting
     (properties `((upstream-name . "syntax-highlighting")))
     (license license:lgpl2.1+)))
 
+(define-public ksyntaxhighlighting
+  (package
+    (inherit ksyntaxhighlighting-6)
+    (name "ksyntaxhighlighting")
+    (version "5.114.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://kde/stable/frameworks/"
+                    (version-major+minor version) "/"
+                    "syntax-highlighting-" version ".tar.xz"))
+              (sha256
+               (base32
+                "1skblg2m0sar63qrgkjsg0w9scixggm5qj7lp4gzjn4hwq6m3n63"))))
+    (native-inputs
+     (list extra-cmake-modules perl qttools-5
+           ;; Optional, for compile-time validation of syntax definition files:
+           qtxmlpatterns))
+    (inputs
+     (list qtbase-5))))
+
 (define-public plasma-wayland-protocols
   (package
     (name "plasma-wayland-protocols")
-- 
2.41.0