diff --git a/gnu/local.mk b/gnu/local.mk
index 3c6b4cf4d6..10b97c8bc3 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1323,7 +1323,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/kinit-kdeinit-extra_libs.patch		\
   %D%/packages/patches/kinit-kdeinit-libpath.patch		\
   %D%/packages/patches/kio-search-smbd-on-PATH.patch		\
-  %D%/packages/patches/kmail-Fix-missing-link-libraries.patch \
   %D%/packages/patches/kmod-module-directory.patch		\
   %D%/packages/patches/kmscon-runtime-keymap-switch.patch	\
   %D%/packages/patches/kpackage-allow-external-paths.patch	\
diff --git a/gnu/packages/kde-pim.scm b/gnu/packages/kde-pim.scm
index 671286022d..c65dcf714f 100644
--- a/gnu/packages/kde-pim.scm
+++ b/gnu/packages/kde-pim.scm
@@ -44,14 +44,14 @@
 (define-public akonadi
   (package
     (name "akonadi")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/akonadi-" version ".tar.xz"))
        (sha256
-        (base32 "0kkn7lh3akkk9cdi8qdk9kqzs1cgv916mkl440x4ykqd1v8brzqb"))
+        (base32 "0jwhjdqha82hbyg2wmzjl5qi2rgmyd2sghdw85s77y63bxm9f0s2"))
        (patches (search-patches
                  "akonadi-paths.patch"
                  "akonadi-timestamps.patch"
@@ -90,10 +90,10 @@
        #:phases
        (modify-phases (@ (guix build qt-build-system) %standard-phases)
          (add-before 'configure 'add-definitions
-           (lambda _
-             (let ((out (assoc-ref %outputs "out"))
-                   (mysql (assoc-ref %build-inputs "mysql"))
-                   (pgsql (assoc-ref %build-inputs "postgresql")))
+           (lambda* (#:key outputs build-inputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (mysql (assoc-ref build-inputs "mysql"))
+                   (pgsql (assoc-ref build-inputs "postgresql")))
                (with-output-to-file "CMakeLists.txt.new"
                  (lambda _
                    (display
@@ -121,14 +121,14 @@ programs.")
 (define-public akonadi-calendar
   (package
     (name "akonadi-calendar")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/akonadi-calendar-" version ".tar.xz"))
        (sha256
-        (base32 "1mq76qyd3jcngb2yfanpn7qvklzllza399fxwii0mqppp1vmnb2b"))))
+        (base32 "0k4cbcr6cw9rcrzidlbjbpshmsfh0p2m8bd9inkgzxi08drwizsa"))))
     (build-system qt-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
@@ -137,6 +137,7 @@ programs.")
        ("akonadi-contacts" ,akonadi-contacts)
        ("akonadi-mime" ,akonadi-mime)
        ("boost" ,boost)
+       ("grantleetheme" ,grantleetheme)
        ("kcalendarcore" ,kcalendarcore)
        ("kcalutils" ,kcalutils)
        ("kcodecs" ,kcodecs)
@@ -155,7 +156,7 @@ programs.")
        ("qtbase" ,qtbase-5)))
     (arguments
      `(#:tests? #f))  ;; TODO: 1/1 test fails
-    (home-page "https://api.kde.org/kdepim/akonadi/html/index.html")
+    (home-page "https://api.kde.org/kdepim/akonadi/html/")
     (synopsis "Library providing calendar helpers for Akonadi items")
     (description "This library manages calendar specific actions for
 collection and item views.")
@@ -164,21 +165,24 @@ collection and item views.")
 (define-public akonadi-contacts
   (package
     (name "akonadi-contacts")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/akonadi-contacts-" version ".tar.xz"))
        (sha256
-        (base32 "0igggarnl99s5pl73dgrpha4lf7vnr000iy69vcwmqs5lxb7cyli"))))
+        (base32 "1ap2c16c0z4m7f3zsp5w5wqwcdr3fn1n2kvb6d647c3knszgibvg"))))
     (build-system qt-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
     (inputs
      `(("akonadi" ,akonadi)
        ("boost" ,boost)
+       ("grantlee" ,grantlee)
+       ("grantleetheme" ,grantleetheme)
        ("kauth" ,kauth)
+       ("kcmutils" ,kcmutils)
        ("kcodecs" ,kcodecs)
        ("kcompletion" ,kcompletion)
        ("kconfigwidgets" ,kconfigwidgets)
@@ -195,6 +199,7 @@ collection and item views.")
        ("ktextwidgets" ,ktextwidgets)
        ("kwidgetsaddons" ,kwidgetsaddons)
        ("kxmlgui" ,kxmlgui)
+       ("libkleo" ,libkleo)
        ("prison" ,prison)
        ("kio" ,kio)
        ("qtbase" ,qtbase-5)
@@ -215,14 +220,14 @@ to list and filter contacts.")
 (define-public akonadi-mime
   (package
     (name "akonadi-mime")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/akonadi-mime-" version ".tar.xz"))
        (sha256
-        (base32 "1wd776ia3z22a79biq04y4m83n8xpvfmyg8bcsslr7lmc3avdg8w"))))
+        (base32 "0fkv26zl92xijkibpxvbqcmip24qrq58lan3w9s642gqh972a6x3"))))
     (build-system qt-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -268,14 +273,14 @@ with emails through Akonadi easier.")
 (define-public akonadi-notes
   (package
     (name "akonadi-notes")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/akonadi-notes-" version ".tar.xz"))
        (sha256
-        (base32 "04y293kjrmjjcbb7fkjl7hl4vrks4cjjxnvc6ibzyv81rn6cdhh2"))))
+        (base32 "0r19g9a0asqlw1qsh9vidbwpgbslfwqc8g577hdkhahfvg7hplmq"))))
     (build-system qt-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
@@ -297,14 +302,14 @@ wrapping notes into KMime::Message objects.")
 (define-public akonadi-search
   (package
     (name "akonadi-search")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/akonadi-search-" version ".tar.xz"))
        (sha256
-        (base32 "1h5p44y244gzf7ndzw7afrvq9c76ybp8ddvg82p3lzjh02rrvd50"))))
+        (base32 "1a1pf9q93z0cv7v2fxksiw3vn5dylg0lgniv98z9p6zv0wijxhn5"))))
     (build-system qt-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -353,46 +358,58 @@ Akonadi PIM data server.  It uses Xapian for indexing and querying.")
 (define-public kincidenceeditor
   (package
     (name "kincidenceeditor")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/incidenceeditor-" version ".tar.xz"))
        (sha256
-        (base32 "1xpp5lw60mvpjsjsxmicfa5y2d68wnb9vm4yb1krwkihm852ziny"))))
+        (base32 "0xrz3kzf4mc37zgfbjgc23l7wxry9m6d5igvyf1qm33yxwr4w78q"))))
     (properties `((upstream-name . "incidenceeditor")))
     (build-system qt-build-system)
     (native-inputs
-     `(("extra-cmake-modules" ,extra-cmake-modules)))
+     `(("extra-cmake-modules" ,extra-cmake-modules)
+       ("dbus" ,dbus)))
     (inputs
      `(("akonadi" ,akonadi)
        ("akonadi-calendar" ,akonadi-calendar)
        ("akonadi-contacts" ,akonadi-contacts)
        ("akonadi-mime" ,akonadi-mime)
        ("boost" ,boost)
+       ("grantleetheme" ,grantleetheme)
        ("kcalendarcore" ,kcalendarcore)
        ("kcalendarsupport" ,kcalendarsupport)
        ("kcalutils" ,kcalutils)
        ("kcodecs" ,kcodecs)
        ("kcontacts" ,kcontacts)
        ("kdbusaddons" ,kdbusaddons)
-       ("kdepim-apps-libs" ,kdepim-apps-libs)
        ("kdiagram" ,kdiagram)
        ("keventviews" ,keventviews)
        ("ki18n" ,ki18n)
        ("kiconthemes" ,kiconthemes)
        ("kidentitymanagement" ,kidentitymanagement)
+       ("kimap" ,kimap)
        ("kio" ,kio)
        ("kitemmodels" ,kitemmodels)
        ("kldap" ,kldap)
        ("kmailtransport" ,kmailtransport)
        ("kmime" ,kmime)
+       ("kpimcommon" ,kpimcommon)
        ("kpimtextedit" ,kpimtextedit)
        ("ktextwidgets" ,ktextwidgets)
        ("kwallat" ,kwallet)
        ("libkdepim" ,libkdepim)
        ("qtbase" ,qtbase-5)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "dbus-launch" "ctest" ;; FIXME: test fails.
+                       "-E" "akonadi-sqlite-incidencedatetimetest"))
+             #t)))))
     (home-page "https://invent.kde.org/pim/incidenceeditor")
     (synopsis "KDE PIM library for editing incidences")
     (description "This library provides an incidence editor for KDE PIM.")
@@ -402,14 +419,14 @@ Akonadi PIM data server.  It uses Xapian for indexing and querying.")
 (define-public kaddressbook
   (package
     (name "kaddressbook")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/kaddressbook-" version ".tar.xz"))
        (sha256
-        (base32 "1vpdhdj87ai2sxjn2jk3mh6bzfr1n3yzydnkgv7nc8v1m2fdawap"))))
+        (base32 "1pvd31zpam13jv0mhxzaagdlvnav60znd68l24y1dw5i98wk7n72"))))
     (build-system qt-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
@@ -428,7 +445,6 @@ Akonadi PIM data server.  It uses Xapian for indexing and querying.")
        ("kcontacts" ,kcontacts)
        ("kcrash" ,kcrash)
        ("kdbusaddons" ,kdbusaddons)
-       ("kdepim-apps-libs" ,kdepim-apps-libs)
        ("kdoctools" ,kdoctools)
        ("ki18n" ,ki18n)
        ("kiconthemes" ,kiconthemes)
@@ -444,7 +460,7 @@ Akonadi PIM data server.  It uses Xapian for indexing and querying.")
        ("kxmlgui" ,kxmlgui)
        ("libkdepim" ,libkdepim)
        ("libkleo" ,libkleo)
-       ("oxygen-icons" ,oxygen-icons) ; default icon set, required for tests
+       ("breeze-icons" ,breeze-icons) ; default icon set, required for tests
        ("prison" ,prison)
        ("qgpgme" ,qgpgme)
        ("qtbase" ,qtbase-5)))
@@ -459,14 +475,14 @@ CalDAV server.")
 (define-public kalarmcal
   (package
     (name "kalarmcal")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/kalarmcal-" version ".tar.xz"))
        (sha256
-        (base32 "0g0bm4zzzcpl2pqqf609349zagwrgj6a4ibxpgg4zf21aacdq8bi"))))
+        (base32 "0xdcazbbkm2z0r2g1avwh9bvdkvv0fy6qhhddlmfzj4cwh4c9vih"))))
     (build-system qt-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
@@ -491,7 +507,7 @@ CalDAV server.")
        ("qtbase" ,qtbase-5)))
     (arguments
      `(#:tests? #f)) ;; TODO: TZ setup
-    (home-page "https://api.kde.org/stable/kdepimlibs-apidocs/")
+    (home-page "https://github.com/KDE/kalarmcal")
     (synopsis "Library for handling kalarm calendar data")
     (description "This library provides access to and handling of kalarm
 calendar data.")
@@ -520,7 +536,7 @@ calendar data.")
        ("qtbase" ,qtbase-5)
        ("syndication" ,syndication)))
     ;; Note: Some tests take up to 90 sec.
-    (home-page "https://invent.kde.org/pim/kblog")
+    (home-page "https://apps.kde.org/kblog/")
     (synopsis "Client-side support library for web application remote blogging
 APIs")
     (description "KBlog is a library for calling functions on Blogger 1.0,
@@ -534,14 +550,14 @@ one of the APIs mentioned above.")
 (define-public kcalendarsupport
   (package
     (name "kcalendarsupport")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/calendarsupport-" version ".tar.xz"))
        (sha256
-        (base32 "1yv3hs7qw481cxw4kzbx5l8vv18bgzm1b0vj3zrlqqxwl5ac6xvy"))))
+        (base32 "01plq4qzp94lxcc2gp04afnlvmni8993c8mf6kl256158z0y24ik"))))
     (properties `((upstream-name . "calendarsupport")))
     (build-system qt-build-system)
     (native-inputs
@@ -551,12 +567,12 @@ one of the APIs mentioned above.")
      `(("akonadi" ,akonadi)
        ("akonadi-calendar" ,akonadi-calendar)
        ("akonadi-mime" ,akonadi-mime)
+       ("akonadi-notes" ,akonadi-notes)
        ("boost" ,boost)
        ("kcalendarcore" ,kcalendarcore)
        ("kcalutils" ,kcalutils)
        ("kcompletion" ,kcompletion)
        ("kdbusaddons" ,kdbusaddons)
-       ("kdepim-apps-libs" ,kdepim-apps-libs)
        ("kguiaddons" ,kguiaddons)
        ("kholidays" ,kholidays)
        ("ki18n" ,ki18n)
@@ -570,7 +586,7 @@ one of the APIs mentioned above.")
        ("ktextwidgets" ,ktextwidgets)
        ("kxmlgui" ,kxmlgui)
        ("qtbase" ,qtbase-5)))
-    (home-page "https://api.kde.org/stable/calendarsupport/")
+    (home-page "https://github.com/KDE/calendarsupport")
     (synopsis "Calendar Support library for KDE PIM")
     (description "The Calendar Support library provides helper utilities for
 calendaring applications.")
@@ -580,14 +596,14 @@ calendaring applications.")
 (define-public kcalutils
   (package
     (name "kcalutils")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/kcalutils-" version ".tar.xz"))
        (sha256
-        (base32 "0v268w8vhgqxq1nwv9b9cy4h7zqgjrv19r44g3zc9w5j76ivix86"))))
+        (base32 "0kvfpsz6zxdbgl4qvk3q55fjgjql1chx844cys26anhza0ld9afz"))))
     (build-system qt-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -605,72 +621,28 @@ calendaring applications.")
        ("kpimtextedit" ,kpimtextedit)
        ("ktextwidgets" ,ktextwidgets)
        ("kwidgetsaddons" ,kwidgetsaddons)
-       ("oxygen-icons" ,oxygen-icons) ; default icon set, required for tests
+       ("breeze-icons" ,breeze-icons) ; default icon set, required for tests
        ("qtbase" ,qtbase-5)))
     (arguments
      `(#:tests? #f)) ;; TODO: seem to pull in some wrong theme
-    (home-page "https://api.kde.org/stable/kdepimlibs-apidocs/")
+    (home-page "https://github.com/KDE/kcalutils")
     (synopsis "Library with utility functions for the handling of calendar
 data")
     (description "This library provides a utility and user interface
 functions for accessing calendar data using the kcalcore API.")
     (license  license:lgpl2.0+)))
 
-(define-public kdepim-apps-libs
-  (package
-    (name "kdepim-apps-libs")
-    (version "20.04.1")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append "mirror://kde/stable/release-service/" version
-                           "/src/kdepim-apps-libs-" version ".tar.xz"))
-       (sha256
-        (base32 "0m9qrfjs97anh9h6ibggx23ddlm1zkxjap2iyf3gf672ip01fvci"))))
-    (build-system qt-build-system)
-    (native-inputs
-     `(("extra-cmake-modules" ,extra-cmake-modules)))
-    (inputs
-     `(("akonadi" ,akonadi)
-       ("akonadi-contacts" ,akonadi-contacts)
-       ("boost" ,boost)
-       ("gpgme" ,gpgme)
-       ("grantlee" ,grantlee)
-       ("grantleetheme" ,grantleetheme)
-       ("kconfig" ,kconfig)
-       ("kconfigwidgets" ,kconfigwidgets)
-       ("kcontacts" ,kcontacts)
-       ("kcoreaddons" ,kcoreaddons)
-       ("ki18n" ,ki18n)
-       ("kimap" ,kimap)
-       ("kio" ,kio)
-       ("kitemmodels" ,kitemmodels)
-       ("kmime" ,kmime)
-       ("kpimcommon" ,kpimcommon)
-       ("kservice" ,kservice)
-       ("kwidgetsaddons" ,kwidgetsaddons)
-       ("libkleo" ,libkleo)
-       ("prison" ,prison)
-       ("qgpgme" ,qgpgme)
-       ("qtbase" ,qtbase-5)))
-    (home-page "https://invent.kde.org/pim/kdepim-apps-libs")
-    (synopsis "KDE PIM mail related libraries and data files")
-    (description "This package provides mail related libraries and data files
-for KDE PIM.")
-    (license ;; GPL for programs, LGPL for libraries
-     (list license:gpl2+ license:lgpl2.0+))))
-
 (define-public kdepim-runtime
   (package
     (name "kdepim-runtime")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/kdepim-runtime-" version ".tar.xz"))
        (sha256
-        (base32 "1in4x4wvgclkni72cfkw9jx35d0qd0jmfwybm3ksx5qx5sbki9gg"))))
+        (base32 "0vzly768f2g0zhprl1970k16kza128izhrby2mm1wdskrmdrvflq"))))
     (build-system qt-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -686,9 +658,11 @@ for KDE PIM.")
        ("akonadi-notes" ,akonadi-notes)
        ("boost" ,boost)
        ("cyrus-sasl" ,cyrus-sasl)
+       ("grantleetheme" ,grantleetheme)
        ("kalarmcal" ,kalarmcal)
        ("kcalendarcore" ,kcalendarcore)
        ("kcalutils" ,kcalutils)
+       ("kcmutils" ,kcmutils)
        ("kcodecs" ,kcodecs)
        ("kconfig" ,kconfig)
        ("kconfigwidgets" ,kconfigwidgets)
@@ -700,6 +674,7 @@ for KDE PIM.")
        ("kio" ,kio)
        ("kitemmodels" ,kitemmodels)
        ("kmailtransport" ,kmailtransport)
+       ("kldap" ,kldap)
        ("kmbox" ,kmbox)
        ("kmime" ,kmime)
        ("knotifications" ,knotifications)
@@ -711,29 +686,45 @@ for KDE PIM.")
        ("kwallet" ,kwallet)
        ("kwindowsystem" ,kwindowsystem)
        ("libkgapi" ,libkgapi)
-       ;; TODO: libkolab
+       ("libkdepim" ,libkdepim)
+       ;; TODO: libkolab, etebase
        ("qca" ,qca)
        ("qtbase" ,qtbase-5)
        ("qtdeclarative" ,qtdeclarative)
+       ("qtkeychain" ,qtkeychain)
        ("qtnetworkauth" ,qtnetworkauth)
        ("qtspeech" ,qtspeech)
        ("qtwebchannel" ,qtwebchannel)
        ("qtwebengine" ,qtwebengine)
        ("qtxmlpatterns" ,qtxmlpatterns)))
     (arguments
-      ;; TODO: 5/45 tests fail for quite different reasons, even with
-      ;; "offscreen" and dbus
-     `(#:tests? #f
-       #:phases (modify-phases %standard-phases
-                  (add-after 'set-paths 'extend-CPLUS_INCLUDE_PATH
-                    (lambda* (#:key inputs #:allow-other-keys)
-                      ;; FIXME: <Akonadi/KMime/SpecialMailCollections> is not
-                      ;; found during one of the compilation steps without
-                      ;; this hack.
-                      (setenv "CPLUS_INCLUDE_PATH"
-                              (string-append
-                               (search-input-directory inputs "include/KF5")
-                               ":" (or (getenv "CPLUS_INCLUDE_PATH") ""))))))))
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'set-paths 'extend-CPLUS_INCLUDE_PATH
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; FIXME: <Akonadi/KMime/SpecialMailCollections> is not
+             ;; found during one of the compilation steps without
+             ;; this hack.
+             (setenv "CPLUS_INCLUDE_PATH"
+                     (string-append (assoc-ref inputs "akonadi-mime")
+                                    "/include/KF5:"
+                                    (or (getenv "CPLUS_INCLUDE_PATH") "")))
+             #t))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               ;; FIXME: Atleast some appear to require network.
+               (invoke "dbus-launch" "ctest" "-E"
+                       "(akonadi-sqlite-synctest|\
+akonadi-sqlite-pop3test|\
+storecompacttest|\
+akonadi-sqlite-ewstest|\
+ewsmoveitemrequest_ut|\
+ewsdeleteitemrequest_ut|\
+ewsgetitemrequest_ut|\
+ewsunsubscriberequest_ut|\
+ewssettings_ut)"))
+             #t)))))
     (home-page "https://invent.kde.org/pim/kdepim-runtime")
     (synopsis "Runtime components for Akonadi KDE")
     (description "This package contains Akonadi agents written using KDE
@@ -748,14 +739,14 @@ package.")
 (define-public keventviews
   (package
     (name "keventviews")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/eventviews-" version ".tar.xz"))
        (sha256
-        (base32 "0si9p95rgp7mgkzhzwyy10zrwzy1kipbhm1y96yjlc9rxi3jrc73"))))
+        (base32 "0d1ahknazkjav9641i1wggj9f67cr3s3y176v1j6ljhr4dl3m3xj"))))
     (properties `((upstream-name . "eventviews")))
     (build-system qt-build-system)
     (native-inputs
@@ -798,14 +789,14 @@ package.")
 (define-public kgpg
   (package
     (name "kgpg")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/kgpg-" version ".tar.xz"))
        (sha256
-        (base32 "03d3gsbara7ga2cyrhafkw11qq9cj804h9vpvxl4wd2a9c90snkh"))))
+        (base32 "051z9h12zqmhgvr8pk17vsfzld25mpklk1z6nknlf3hydjnq6ns1"))))
     (build-system qt-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -816,6 +807,7 @@ package.")
        ("akonadi-contacts" ,akonadi-contacts)
        ("boost" ,boost)
        ("gpgme" ,gpgme)
+       ("grantleetheme" ,grantleetheme)
        ("karchive" ,karchive)
        ("kcodecs" ,kcodecs)
        ("kcontacts" ,kcontacts)
@@ -833,9 +825,18 @@ package.")
        ("kwidgetsaddons" ,kwidgetsaddons)
        ("kwindowsystem" ,kwindowsystem)
        ("kxmlgui" ,kxmlgui)
-       ("oxygen-icons" ,oxygen-icons) ;; default icon set
+       ("breeze-icons" ,breeze-icons) ;; default icon set
        ("qtbase" ,qtbase-5)))
-    (home-page "https://kde.org/applications/utilities/org.kde.kgpg")
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests? ;; Test fails inconsistently
+               ;; https://bugs.kde.org/show_bug.cgi?id=442886
+               (invoke "ctest" "-E" "(kgpg-import|kgpg-encrypt)"))
+             #t)))))
+    (home-page "https://apps.kde.org/kgpg/")
     (synopsis "Graphical front end for GNU Privacy Guard")
     (description "Kgpg manages cryptographic keys for the GNU Privacy Guard,
 and can encrypt, decrypt, sign, and verify files.  It features a simple editor
@@ -846,14 +847,14 @@ cryptography to the contents of the clipboard.")
 (define-public kidentitymanagement
   (package
     (name "kidentitymanagement")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/kidentitymanagement-" version ".tar.xz"))
        (sha256
-        (base32 "0flp9p9hlr1zfgvsy5i1nq55p7bvnhqxkxbif1lyw0cq6iblxhgr"))))
+        (base32 "0kaws0w21sm0mb0fd5av7gid8gvyz0zxxjrbx0kf3c52dwkrmw5c"))))
     (build-system qt-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
@@ -885,14 +886,14 @@ cryptography to the contents of the clipboard.")
 (define-public kimap
   (package
     (name "kimap")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/kimap-" version ".tar.xz"))
        (sha256
-        (base32 "1x22wfzqp92mn1fy2xl89k9yjfk2vgcva0fd30i9rrqj4aw2rsma"))))
+        (base32 "0qdl94zqk0qvy5mcnbhskh7dskcx8g1bkv4qv8zjjj9rz1r2rm2x"))))
     (build-system qt-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
@@ -903,7 +904,7 @@ cryptography to the contents of the clipboard.")
        ("kio" ,kio)
        ("kmime" ,kmime)
        ("qtbase" ,qtbase-5)))
-    (home-page "https://api.kde.org/stable/kdepimlibs-apidocs/")
+    (home-page "https://api.kde.org/kdepim/kimap/html/index.html")
     (synopsis "Library for handling IMAP")
     (description "This library provides a job-based API for interacting with
 an IMAP4rev1 server.  It manages connections, encryption and parameter quoting
@@ -916,14 +917,14 @@ easier to do so.")
 (define-public kldap
   (package
     (name "kldap")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/kldap-" version ".tar.xz"))
        (sha256
-        (base32 "0whlp586ycsx0qf0nr81avwscpq62w5js46z7vayy0dxkhrhfayr"))))
+        (base32 "1vc94n9wq1422bp9ky2sapy8wra0gi5gfl6dz0h8wxnxflb28zvw"))))
     (build-system qt-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -932,28 +933,29 @@ easier to do so.")
      `(("ki18n" ,ki18n)
        ("kio" ,kio)
        ("kwidgetsaddons" ,kwidgetsaddons)
-       ("qtbase" ,qtbase-5)))
+       ("qtbase" ,qtbase-5)
+       ("qtkeychain" ,qtkeychain)))
     (propagated-inputs
      `(("cyrus-sasl" ,cyrus-sasl)
        ("openldap" ,openldap)))
-    (home-page "https://api.kde.org/stable/kdepimlibs-apidocs/")
+    (home-page "https://api.kde.org/kdepim/kldap/html/")
     (synopsis "Library for accessing LDAP")
-    (description " This is a library for accessing LDAP with a convenient Qt
+    (description "This is a library for accessing LDAP with a convenient Qt
 style C++ API.  LDAP (Lightweight Directory Access Protocol) is an application
-protocol for querying and modifying directory services running over TCP/IP. ")
+protocol for querying and modifying directory services running over TCP/IP.")
     (license license:lgpl2.0+)))
 
 (define-public kleopatra
   (package
     (name "kleopatra")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/kleopatra-" version ".tar.xz"))
        (sha256
-        (base32 "1m50nzb2m27fkb8z3k34cv4zi2akr0fx8zn7lk5swhg49sgrip6n"))))
+        (base32 "1ym40xxwl9qqz8sbsck606vzxys5qhkca8g23gqn3sxx3kk8zpn9"))))
     (build-system qt-build-system)
     (native-inputs
      `(("dbus" ,dbus)
@@ -981,7 +983,7 @@ protocol for querying and modifying directory services running over TCP/IP. ")
        ("kxmlgui" ,kxmlgui)
        ("libassuan" ,libassuan)
        ("libkleo" ,libkleo)
-       ("oxygen-icons" ,oxygen-icons) ;; default icon set
+       ("breeze-icons" ,breeze-icons) ;; default icon set
        ("qgpgme" ,qgpgme)
        ("qtbase" ,qtbase-5)))
     (arguments
@@ -990,9 +992,9 @@ protocol for querying and modifying directory services running over TCP/IP. ")
          (replace 'check
            (lambda* (#:key tests? #:allow-other-keys)
              (when tests?
-               (invoke "dbus-launch" "ctest" "."))
+               (invoke "dbus-launch" "ctest"))
              #t)))))
-    (home-page "https://kde.org/applications/utilities/org.kde.kleopatra")
+    (home-page "https://apps.kde.org/kleopatra/")
     (synopsis "Certificate Manager and Unified Crypto GUI")
     (description "Kleopatra is a certificate manager and a universal crypto
 GUI.  It supports managing X.509 and OpenPGP certificates in the GpgSM keybox
@@ -1003,15 +1005,14 @@ and retrieving certificates from LDAP servers.")
 (define-public kmail
   (package
     (name "kmail")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/kmail-" version ".tar.xz"))
        (sha256
-        (base32 "06qfxzi5pasm6p5ck44sjca96dz8xzd1nndq5lqcyvcxmmnvvz3p"))
-       (patches (search-patches "kmail-Fix-missing-link-libraries.patch"))))
+        (base32 "0way147xqjhapswdfqnnvav8dk41lf2050jzmd6jz7qj0dina977"))))
     (build-system qt-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -1025,6 +1026,7 @@ and retrieving certificates from LDAP servers.")
        ("boost" ,boost)
        ("gpgme" ,gpgme)
        ("kbookmarks" ,kbookmarks)
+       ("grantleetheme" ,grantleetheme)
        ("kcalendarcore" ,kcalendarcore)
        ("kcalutils" ,kcalutils)
        ("kcmutils" ,kcmutils)
@@ -1034,7 +1036,6 @@ and retrieving certificates from LDAP servers.")
        ("kcontacts" ,kcontacts)
        ("kcrash" ,kcrash)
        ("kdbusaddons" ,kdbusaddons)
-       ("kdepim-apps-libs" ,kdepim-apps-libs)
        ("kguiaddons" ,kguiaddons)
        ("ki18n" ,ki18n)
        ("kiconthemes" ,kiconthemes)
@@ -1049,7 +1050,6 @@ and retrieving certificates from LDAP servers.")
        ("kmailtransport" ,kmailtransport)
        ("kmessagelib" ,kmessagelib)
        ("kmime" ,kmime)
-       ("kmime" ,kmime)
        ("knotifications" ,knotifications)
        ("knotifyconfig" ,knotifyconfig)
        ("kontactinterface" ,kontactinterface)
@@ -1059,6 +1059,7 @@ and retrieving certificates from LDAP servers.")
        ("kservice" ,kservice)
        ("ksyntaxhighlighting" ,ksyntaxhighlighting)
        ("ktextwidgets" ,ktextwidgets)
+       ("kuserfeedback" ,kuserfeedback)
        ("ktnef" ,ktnef)
        ("kwallet" ,kwallet)
        ("kwidgetsaddons" ,kwidgetsaddons)
@@ -1068,10 +1069,11 @@ and retrieving certificates from LDAP servers.")
        ("libkdepim" ,libkdepim)
        ("libkleo" ,libkleo)
        ("libksieve" ,libksieve)
-       ("oxygen-icons" ,oxygen-icons) ; default icon set, required for tests
+       ("breeze-icons" ,breeze-icons) ; default icon set, required for tests
        ("qgpgme" ,qgpgme)
        ("qtbase" ,qtbase-5)
        ("qtdeclarative" ,qtdeclarative)
+       ("qtkeychain" ,qtkeychain)
        ("qtwebchannel" ,qtwebchannel)
        ("qtwebengine" ,qtwebengine)
        ("sonnet" ,sonnet)))
@@ -1081,7 +1083,13 @@ and retrieving certificates from LDAP servers.")
          (replace 'check
            (lambda* (#:key tests? #:allow-other-keys)
              (when tests?
-               (invoke "dbus-launch" "ctest" "."))
+               (invoke "dbus-launch" "ctest" "-E" ;; FIXME: Many failing tests.
+                       "(akonadi-sqlite-kmcomposerwintest|\
+akonadi-sqlite-tagselectdialogtest|\
+akonadi-sqlite-kmcommandstest|\
+sendlateragent-sendlaterutiltest|\
+sendlateragent-sendlaterconfigtest|\
+followupreminder-followupreminderconfigtest)"))
              #t)))))
     (home-page "https://kontact.kde.org/components/kmail.html")
     (synopsis "Full featured graphical email client")
@@ -1098,14 +1106,14 @@ manager from KDE.")
 (define-public kmailcommon
   (package
     (name "kmailcommon")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/mailcommon-" version ".tar.xz"))
        (sha256
-        (base32 "0q1k57zx1l7bnzrk1hadjxjn6r4yzz833mgsvaai9sd8qg022x2l"))))
+        (base32 "0d0czxrf3i796pyrlifv4psq3hl4z2abhsqj1ns30xng45pzyrvz"))))
     (properties `((upstream-name . "mailcommon")))
     (build-system qt-build-system)
     (native-inputs
@@ -1119,6 +1127,7 @@ manager from KDE.")
        ("akonadi-mime" ,akonadi-mime)
        ("boost" ,boost)
        ("gpgme" ,gpgme)
+       ("grantleetheme" ,grantleetheme)
        ("karchive" ,karchive)
        ("kcodecs" ,kcodecs)
        ("kcompletion" ,kcompletion)
@@ -1127,6 +1136,7 @@ manager from KDE.")
        ("kcontacts" ,kcontacts)
        ("kdbusaddons" ,kdbusaddons)
        ("kdesignerplugin" ,kdesignerplugin)
+       ("kguiaddons" ,kguiaddons)
        ("ki18n" ,ki18n)
        ("kiconthemes" ,kiconthemes)
        ("kidentitymanagement" ,kidentitymanagement)
@@ -1154,7 +1164,15 @@ manager from KDE.")
        ("qgpgme" ,qgpgme)
        ("qtbase" ,qtbase-5)))
     (arguments
-     `(#:tests? #f))  ;; TODO: 4/56 tests fail, even with "offscreen" and dbus
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests? ;; FIXME: 2 Tests fail.
+               (invoke "dbus-launch" "ctest" "-E"
+                       "\(mailcommon-filter-filteractionencrypttest|\
+mailcommon-filter-filteractionpipethroughtest)"))
+             #t)))))
     (home-page "https://invent.kde.org/pim/mailcommon")
     (synopsis "KDE email utility library")
     (description "The mail common library provides utility functions for
@@ -1165,32 +1183,37 @@ dealing with email.")
 (define-public kmailimporter
   (package
     (name "kmailimporter")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/mailimporter-" version ".tar.xz"))
        (sha256
-        (base32 "1929pw0shdzi0yvjnqhak680hjjibg8f8hqy3svyxxhiqbhfjm26"))))
+        (base32 "0vd0bghszwr1wh4x2ygd7flg0kypb8m92gvh0q800gdgnqj87lw7"))))
     (properties `((upstream-name . "mailimporter")))
     (build-system qt-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
     (inputs
      `(("akonadi" ,akonadi)
+       ("akonadi-contacts" ,akonadi-contacts)
        ("akonadi-mime" ,akonadi-mime)
+       ("grantleetheme" ,grantleetheme)
        ("boost" ,boost)
        ("karchive" ,karchive)
        ("kcompletion" ,kcompletion)
        ("kconfig" ,kconfig)
        ("kconfigwidgets" ,kconfigwidgets)
+       ("kcontacts" ,kcontacts)
        ("kcoreaddons" ,kcoreaddons)
        ("kdbusaddons" ,kdbusaddons)
        ("ki18n" ,ki18n)
+       ("kimap" ,kimap)
        ("kio" ,kio)
        ("kitemmodels" ,kitemmodels)
        ("kmime" ,kmime)
+       ("kpimcommon" ,kpimcommon)
        ("kxmlgui" ,kxmlgui)
        ("libkdepim" ,libkdepim)
        ("qtbase" ,qtbase-5)))
@@ -1204,14 +1227,14 @@ e-mail client programs into KMail and KDE PIM.")
 (define-public kmailtransport
   (package
     (name "kmailtransport")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/kmailtransport-" version ".tar.xz"))
        (sha256
-        (base32 "1swqlgzxzlqffm119sbhszy9lr93m8lzwygr0q4raa660b6yiavm"))))
+        (base32 "0q76wanhby9gb9c07z8gpkmdqn6rv82bh6fz182m7bdzkqh4rbxx"))))
     (build-system qt-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -1234,10 +1257,11 @@ e-mail client programs into KMail and KDE PIM.")
        ("ktextwidgets" ,ktextwidgets)
        ("kwallet" ,kwallet)
        ("libkgapi" ,libkgapi)
-       ("qtbase" ,qtbase-5)))
+       ("qtbase" ,qtbase-5)
+       ("qtkeychain" ,qtkeychain)))
     (arguments
      `(#:tests? #f)) ;; TODO - 3/3 tests fail, require drkonqi
-    (home-page "https://api.kde.org/stable/kdepimlibs-apidocs/")
+    (home-page "https://api.kde.org/kdepim/kmailtransport/html/index.html")
     (synopsis "Mail transport service library")
     (description "This library provides an API and support code for managing
 mail transport.")
@@ -1246,14 +1270,14 @@ mail transport.")
 (define-public kmbox
   (package
     (name "kmbox")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/kmbox-" version ".tar.xz"))
        (sha256
-        (base32 "03cny38v4y1lmcrs6d34hbj9assqgf51rqryf5rdzkiaq79c1krc"))))
+        (base32 "055vx2cr9zqab887grjans5cassh2g86r1lcn64jb61sh1cvzj7y"))))
     (build-system qt-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
@@ -1261,7 +1285,7 @@ mail transport.")
      `(("kcodecs" ,kcodecs)
        ("kmime" ,kmime)
        ("qtbase" ,qtbase-5)))
-    (home-page "https://api.kde.org/stable/kdepimlibs-apidocs/")
+    (home-page "https://api.kde.org/kdepim/kmbox/html/index.html")
     (synopsis "Library for handling mbox mailboxes")
     (description "This is a library for handling mailboxes in mbox format,
 using a Qt/KMime C++ API.")
@@ -1270,14 +1294,14 @@ using a Qt/KMime C++ API.")
 (define-public kmessagelib
   (package
     (name "kmessagelib")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/messagelib-" version ".tar.xz"))
        (sha256
-        (base32 "03vq4962bhps2j9c9i52majlbkmvg2gmr197igv8xamja1vs8hk1"))))
+        (base32 "0gsxik4ib72xhw948h257m17w4k49sa3ymbg87n0q8nd6gykxyhr"))))
     (properties `((upstream-name . "messagelib")))
     (build-system qt-build-system)
     (native-inputs
@@ -1302,7 +1326,7 @@ using a Qt/KMime C++ API.")
        ("kconfigwidgets" ,kconfigwidgets)
        ("kcontacts" ,kcontacts)
        ("kdbusaddons" ,kdbusaddons)
-       ("kdepim-apps-libs" ,kdepim-apps-libs)
+       ("kguiaddons" ,kguiaddons)
        ("ki18n" ,ki18n)
        ("kiconthemes" ,kiconthemes)
        ("kidentitymanagement" ,kidentitymanagement)
@@ -1342,11 +1366,11 @@ using a Qt/KMime C++ API.")
                   (add-after 'set-paths 'extend-CPLUS_INCLUDE_PATH
                     (lambda* (#:key inputs #:allow-other-keys)
                       ;; FIXME: One of the compilation steps fail to find
-                      ;; <Libkdepim/MultiplyingLine> without this hack.
+                      ;; <QPrinter> without this hack.
                       (setenv "CPLUS_INCLUDE_PATH"
-                              (string-append
-                               (search-input-directory inputs "include/KF5")
-                               ":" (or (getenv "CPLUS_INCLUDE_PATH") ""))))))))
+                              (string-append (assoc-ref inputs "qtbase")
+                                             "/include/qt5/QtPrintSupport:"
+                                             (or (getenv "CPLUS_INCLUDE_PATH") ""))))))))
     (home-page "https://invent.kde.org/pim/messagelib")
     (synopsis "KDE PIM messaging libraries")
     (description "This package provides several libraries for messages,
@@ -1358,14 +1382,14 @@ kwebengineviewer.")
 (define-public kmime
   (package
     (name "kmime")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/kmime-" version ".tar.xz"))
        (sha256
-        (base32 "1dkdxfr1ry10qyql5sp1ai4li11f0ncf9hipg27j59y70mlyrl2r"))))
+        (base32 "1dg0vm576gqvj7ia80zcdyf9cyg3fzvj7j3fkxx79mw17binlzg4"))))
     (build-system qt-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
@@ -1384,7 +1408,7 @@ kwebengineviewer.")
                (("(Today|Yesterday) 12:34:56" line day)
                 (string-append day " 12:34 PM")))
              #t)))))
-    (home-page "https://api.kde.org/stable/kdepimlibs-apidocs/")
+    (home-page "https://api.kde.org/kdepim/kmime/html/")
     (synopsis "Library for handling MIME data")
     (description "This library provides an API for handling MIME
 data.  MIME (Multipurpose Internet Mail Extensions) is an Internet Standard
@@ -1396,14 +1420,14 @@ information in non-ASCII character sets.")
 (define-public knotes
   (package
     (name "knotes")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/knotes-" version ".tar.xz"))
        (sha256
-        (base32 "13h4n7fb5p6g1f5kmw6pblpd76j904psm30s3a5d3kykni57dijx"))))
+        (base32 "1g3rmkpwbicga09qwhxn47rhiv9rfaacpzapsrhddh63831bl999"))))
     (build-system qt-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -1434,7 +1458,6 @@ information in non-ASCII character sets.")
        ("kitemmodels" ,kitemmodels)
        ("kitemviews" ,kitemviews)
        ("kmime" ,kmime)
-       ("kmime" ,kmime)
        ("knewstuff" ,knewstuff)
        ("knotifications" ,knotifications)
        ("knotifyconfig" ,knotifyconfig)
@@ -1448,7 +1471,7 @@ information in non-ASCII character sets.")
        ("kxmlgui" ,kxmlgui)
        ("kxmlgui" ,kxmlgui)
        ("libkdepim" ,libkdepim)
-       ("oxygen-icons" ,oxygen-icons) ; default icon set, required for tests
+       ("breeze-icons" ,breeze-icons) ; default icon set, required for tests
        ("qtbase" ,qtbase-5)
        ("qtx11extras" ,qtx11extras)))
     (home-page "https://kontact.kde.org/components/knotes.html")
@@ -1469,14 +1492,14 @@ Features:
 (define-public kontactinterface
   (package
     (name "kontactinterface")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/kontactinterface-" version ".tar.xz"))
        (sha256
-        (base32 "0s1qm1wjkvbb1film94r7g88d8vgh26bm0hm6gpyqv5bazw5qx3j"))))
+        (base32 "0wavclk0z55z8xmqiq6wjhlf2byiggmj9fr5kwdk8wsjfj30npwg"))))
     (build-system qt-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
@@ -1488,23 +1511,23 @@ Features:
        ("kwindowsystem" ,kwindowsystem)
        ("kxmlgui" ,kxmlgui)
        ("qtbase" ,qtbase-5)))
-    (home-page "https://api.kde.org/stable/kdepimlibs-apidocs/")
+    (home-page "https://api.kde.org/kdepim/kontactinterface/html/")
     (synopsis "Kontact interface library")
-    (description " This library provides the glue necessary for
+    (description "This library provides the glue necessary for
 application \"Parts\" to be embedded as a Kontact component (or plugin).")
     (license license:lgpl2.0+)))
 
 (define-public korganizer
   (package
     (name "korganizer")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/korganizer-" version ".tar.xz"))
        (sha256
-        (base32 "04lz3ldrr0lpy9zpsg9ja1i9gxzlcjpqcwn3g7l4jjdky4frcr2r"))))
+        (base32 "0izrzg5xxqgz0wq0vkv1i1xcf0xnzgfwixy8f4gcvihpqxyvixb7"))))
     (build-system qt-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -1519,6 +1542,7 @@ application \"Parts\" to be embedded as a Kontact component (or plugin).")
        ("akonadi-notes" ,akonadi-notes)
        ("akonadi-search" ,akonadi-search)
        ("boost" ,boost)
+       ("grantleetheme" ,grantleetheme)
        ("kcalendarcore" ,kcalendarcore)
        ("kcalendarsupport" ,kcalendarsupport)
        ("kcalutils" ,kcalutils)
@@ -1531,7 +1555,6 @@ application \"Parts\" to be embedded as a Kontact component (or plugin).")
        ("kcoreaddons" ,kcoreaddons)
        ("kcrash" ,kcrash)
        ("kdbusaddons" ,kdbusaddons)
-       ("kdepim-apps-libs" ,kdepim-apps-libs)
        ("keventviews" ,keventviews)
        ("kholidays" ,kholidays)
        ("kiconthemes" ,kiconthemes)
@@ -1556,7 +1579,7 @@ application \"Parts\" to be embedded as a Kontact component (or plugin).")
        ("kwindowsystem" ,kwindowsystem)
        ("kxmlgui" ,kxmlgui)
        ("libkdepim" ,libkdepim)
-       ("oxygen-icons" ,oxygen-icons) ; default icon set, required for tests
+       ("breeze-icons" ,breeze-icons) ; default icon set, required for tests
        ("phonon" ,phonon)
        ("qtbase" ,qtbase-5)))
     (arguments
@@ -1574,11 +1597,11 @@ application \"Parts\" to be embedded as a Kontact component (or plugin).")
          (replace 'check
            (lambda* (#:key tests? #:allow-other-keys)
              (when tests?
-               (invoke "dbus-launch" "ctest" "."))
+               (invoke "dbus-launch" "ctest"))
              #t)))))
     (home-page "https://kontact.kde.org/components/korganizer.html")
     (synopsis "Organizational assistant, providing calendars and other similar
-functionality to help you organize your life.")
+functionality to help you organize your life")
     (description "KOrganizer is the calendar and scheduling component of
 Kontact.  It provides management of events and tasks, alarm notification, web
 export, network transparent handling of data, group scheduling, import and
@@ -1625,14 +1648,14 @@ Virtual Contact File}) files to the KPeople contact management library.")
 (define-public kpimcommon
   (package
     (name "kpimcommon")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/pimcommon-" version ".tar.xz"))
        (sha256
-        (base32 "15lfqv5w4iwyjlvf4idykpkjgppl0ic59r4dw95qkbbjkps0nr7j"))))
+        (base32 "074pbxprzx8hd6fikjvx8hn9g9135swzhj1f5zvfvhyvlpyj90wg"))))
     (properties `((upstream-name . "pimcommon")))
     (build-system qt-build-system)
     (native-inputs
@@ -1643,9 +1666,12 @@ Virtual Contact File}) files to the KPeople contact management library.")
        ("akonadi" ,akonadi)
        ("akonadi-contacts" ,akonadi-contacts)
        ("akonadi-mime" ,akonadi-mime)
+       ("akonadi-search" ,akonadi-search)
        ("boost" ,boost)
-       ("grantlee" ,grantlee)
+       ("grantleetheme" ,grantleetheme)
        ;; TODO: ("kaccounts" ,kaccounts)
+       ("kcalendarcore" ,kcalendarcore)
+       ("kcmutils" ,kcmutils)
        ("kcodecs" ,kcodecs)
        ("kconfig" ,kconfig)
        ("kconfigwidgets" ,kconfigwidgets)
@@ -1660,6 +1686,7 @@ Virtual Contact File}) files to the KPeople contact management library.")
        ("kitemmodels" ,kitemmodels)
        ("kitemviews" ,kitemviews)
        ("kjobwidgets" ,kjobwidgets)
+       ("kldap" ,kldap)
        ("kmime" ,kmime)
        ("knewstuff" ,knewstuff)
        ("kpimtextedit" ,kpimtextedit)
@@ -1685,14 +1712,14 @@ Virtual Contact File}) files to the KPeople contact management library.")
 (define-public libgravatar
   (package
     (name "libgravatar")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/libgravatar-" version ".tar.xz"))
        (sha256
-        (base32 "0981ci2kr20v4fk11h57rqya0brgslfazpgq1yk5yqiwyqqm49r2"))))
+        (base32 "047fbdj02rnb7bn2vn9lava2mh4ypzlyd8iiri4mbpd686lmi0s1"))))
     (build-system qt-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
@@ -1717,14 +1744,14 @@ unnecessary network operations.")
 (define-public kpimtextedit
   (package
     (name "kpimtextedit")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/kpimtextedit-" version ".tar.xz"))
        (sha256
-        (base32 "0j6d4sv405c3x0ww75qsww94apidsb8aaqf59akhv96zmv0vx5wy"))))
+        (base32 "0v479g998amh822lxr0l2d9xhlrwbij9prlrn1z9y9al056cic7h"))))
     (build-system qt-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -1748,7 +1775,7 @@ unnecessary network operations.")
        ("sonnet" ,sonnet)))
     (arguments
      `(#:tests? #f)) ;; TODO - test suite hangs
-    (home-page "https://api.kde.org/stable/kdepimlibs-apidocs/")
+    (home-page "https://api.kde.org/kdepim/kpimtextedit/html/")
     (synopsis "Library providing a textedit with PIM-specific features")
     (description "This package provides a textedit with PIM-specific features.
 It also provides so-called rich text builders which can convert the formatted
@@ -1759,14 +1786,14 @@ text in the text edit to all kinds of markup, like HTML or BBCODE.")
 (define-public ksmtp
   (package
     (name "ksmtp")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/ksmtp-" version ".tar.xz"))
        (sha256
-        (base32 "1xyaahibm0dc3qdwiak5yqa66szxaxnylvqxi6k21ayvzn2vxbhx"))))
+        (base32 "08bdi23qwvayl9w1nsfgpxpxmxrw820qcmvw03ivdk1h7m6sl3yh"))))
     (build-system qt-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
@@ -1799,14 +1826,14 @@ standard protocols for e-mail transmission.")
 (define-public ktnef
   (package
     (name "ktnef")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/ktnef-" version ".tar.xz"))
        (sha256
-        (base32 "0cn5p32w2kas56yyc15c22kll4hd02lvvxz2n6cz1wda8alspj19"))))
+        (base32 "05l4g38f2m3qjl6q45j12zarpazsizjl2pyqh87vhaxgnf4fbqqp"))))
     (build-system qt-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
@@ -1819,7 +1846,7 @@ standard protocols for e-mail transmission.")
        ("kcoreaddons" ,kcoreaddons)
        ("ki18n" ,ki18n)
        ("qtbase" ,qtbase-5)))
-    (home-page "https://api.kde.org/stable/kdepimlibs-apidocs/ktnef/html/")
+    (home-page "https://api.kde.org/frameworks-api/frameworks-apidocs/kdepim/ktnef/html/index.html")
     (synopsis "Library for handling mail attachments using TNEF format")
     (description "Ktnef is a library for handling data in the TNEF
 format (Transport Neutral Encapsulation Format, a proprietary format of e-mail
@@ -1831,14 +1858,14 @@ and allows one to view/extract message formatted text in Rich Text Format.")
 (define-public libkdepim
   (package
     (name "libkdepim")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/libkdepim-" version ".tar.xz"))
        (sha256
-        (base32 "0bask561laxgkgm3rxfpyxqs6jx1l9xjk058lhycq0pik6vwhdha"))))
+        (base32 "1j8nkfgzixpchz34p338mcm87f112ddy1linhaczg5fal1brangh"))))
     (build-system qt-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -1879,14 +1906,14 @@ and allows one to view/extract message formatted text in Rich Text Format.")
 (define-public libkgapi
   (package
     (name "libkgapi")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/libkgapi-" version ".tar.xz"))
        (sha256
-        (base32 "0nvd5fqrvyb7c3g7rf1lxbbv38q9sqnhd6irgx7awwgw92inxky4"))))
+        (base32 "13dna8iv3qzkc1jagjgji928g88wrgds47lcfj3dqkn8swamisa0"))))
     (build-system qt-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -1915,14 +1942,14 @@ various Google services.")
 (define-public libkleo
   (package
     (name "libkleo")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/libkleo-" version ".tar.xz"))
        (sha256
-        (base32 "0rijpmqyx4mrr7csik3vkfcra7kfywk6yz548fmq3ha8wa9ax8fv"))))
+        (base32 "14p3x2jq9sa5gkhcd7q3g5ras2sl62shrjm9kx4426mbnj10n0q2"))))
     (build-system qt-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -1930,7 +1957,6 @@ various Google services.")
        ("qttools" ,qttools)))
     (inputs
      `(("boost" ,boost)
-       ("gpgme" ,gpgme)
        ("kcodecs" ,kcodecs)
        ("kcompletion" ,kcompletion)
        ("kconfig" ,kconfig)
@@ -1941,8 +1967,19 @@ various Google services.")
        ("kwidgetsaddons" ,kwidgetsaddons)
        ("kwindowsystem" ,kwindowsystem)
        ("kpimtextedit" ,kpimtextedit)
-       ("qgpgme" ,qgpgme)
        ("qtbase" ,qtbase-5)))
+    (propagated-inputs
+     `(("gpgme" ,gpgme)
+       ("qgpgme" ,qgpgme)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests? ;; FIXME: These tests fail.
+               (invoke "ctest" "-E"
+                       "(keyresolvercoretest|newkeyapprovaldialogtest)"))
+             #t)))))
     (home-page "https://invent.kde.org/pim/libkleo")
     (synopsis "KDE PIM cryptographic library")
     (description "@code{libkleo} is a library for Kleopatra and other parts of
@@ -1953,14 +1990,14 @@ KDE using certificate-based crypto.")
 (define-public libksieve
   (package
     (name "libksieve")
-    (version "20.04.1")
+    (version "21.08.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://kde/stable/release-service/" version
                            "/src/libksieve-" version ".tar.xz"))
        (sha256
-        (base32 "04k2nkwg5vlgbr5wpvsq02wi54ljsy4ka7y3ns5x3d2gb06wp03c"))
+        (base32 "1jxb0a18mf8yqxbi90jbgjh90x17qr6z7ga6zxdb8gk1hjsyb10y"))
        (patches (search-patches "libksieve-Fix-missing-link-libraries.patch"))))
     (build-system qt-build-system)
     (native-inputs
@@ -1994,17 +2031,12 @@ KDE using certificate-based crypto.")
        (modify-phases %standard-phases
          (add-after 'unpack 'substitute
            (lambda _
-             ;; Disable a failing test
+             ;; FIXME: Disable a failing test
              ;; sieveeditorhelphtmlwidgettest fails with `sigtrap`
              (substitute*
                  "src/ksieveui/editor/webengine/autotests/CMakeLists.txt"
                (("^\\s*(add_test|ecm_mark_as_test)\\W" line)
                 (string-append "# " line)))
-             ;; FIXME: This test fails due to time zone problems.
-             (substitute*
-                 "src/ksieveui/autocreatescripts/autotests/CMakeLists.txt"
-               ((".*sieveeditorgraphicalmodewidgettest\\.cpp.*")
-                ""))
              #t)))))
     (home-page "https://invent.kde.org/pim/libksieve")
     (synopsis "KDE Sieve library")
diff --git a/gnu/packages/patches/akonadi-not-relocatable.patch b/gnu/packages/patches/akonadi-not-relocatable.patch
index c3964c5c05..bd4cbee79f 100644
--- a/gnu/packages/patches/akonadi-not-relocatable.patch
+++ b/gnu/packages/patches/akonadi-not-relocatable.patch
@@ -1,19 +1,18 @@
-From bc018b4bc816a3b51deb9739bedbf8a2268d0684 Mon Sep 17 00:00:00 2001
-From: gnidorah <gnidorah@users.noreply.github.com>
-Date: Fri, 22 Dec 2017 17:36:03 +0300
-Subject: [PATCH] Revert "Make Akonadi installation properly relocatable"
+From 4b90a0bd4411a66bbe6ecf85ce89a60a58bee969 Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@mailbox.org>
+Date: Sun, 25 Apr 2021 08:01:21 -0500
+Subject: [PATCH 3/3] akonadi revert make relocatable
 
-This reverts commit b2bb55f13f2ac783f89cc414de8c39f62fa2096a.
 ---
  CMakeLists.txt            | 3 ---
  KF5AkonadiConfig.cmake.in | 6 +++---
  2 files changed, 3 insertions(+), 6 deletions(-)
 
-Index: akonadi-19.08.0/CMakeLists.txt
-===================================================================
---- akonadi-19.08.0.orig/CMakeLists.txt
-+++ akonadi-19.08.0/CMakeLists.txt
-@@ -306,9 +306,6 @@ configure_package_config_file(
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4e8cc81..63161b7 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -368,9 +368,6 @@ configure_package_config_file(
      "${CMAKE_CURRENT_SOURCE_DIR}/KF5AkonadiConfig.cmake.in"
      "${CMAKE_CURRENT_BINARY_DIR}/KF5AkonadiConfig.cmake"
      INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
@@ -21,29 +20,25 @@ Index: akonadi-19.08.0/CMakeLists.txt
 -              AKONADI_INCLUDE_DIR
 -              KF5Akonadi_DATA_DIR
  )
- 
+
  install(FILES
-Index: akonadi-19.08.0/KF5AkonadiConfig.cmake.in
-===================================================================
---- akonadi-19.08.0.orig/KF5AkonadiConfig.cmake.in
-+++ akonadi-19.08.0/KF5AkonadiConfig.cmake.in
-@@ -26,8 +26,8 @@ if(BUILD_TESTING)
-     find_dependency(Qt5Test "@QT_REQUIRED_VERSION@")
- endif()
- 
+diff --git a/KF5AkonadiConfig.cmake.in b/KF5AkonadiConfig.cmake.in
+index bcf7320..1574319 100644
+--- a/KF5AkonadiConfig.cmake.in
++++ b/KF5AkonadiConfig.cmake.in
+@@ -1,10 +1,10 @@
+ @PACKAGE_INIT@
+
 -set_and_check(AKONADI_DBUS_INTERFACES_DIR  "@PACKAGE_AKONADI_DBUS_INTERFACES_INSTALL_DIR@")
 -set_and_check(AKONADI_INCLUDE_DIR          "@PACKAGE_AKONADI_INCLUDE_DIR@")
 +set_and_check(AKONADI_DBUS_INTERFACES_DIR  "@AKONADI_DBUS_INTERFACES_INSTALL_DIR@")
 +set_and_check(AKONADI_INCLUDE_DIR          "@AKONADI_INCLUDE_DIR@")
- 
- find_dependency(Boost "@Boost_MINIMUM_VERSION@")
- 
-@@ -35,7 +35,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/KF5Ako
- include(${CMAKE_CURRENT_LIST_DIR}/KF5AkonadiMacros.cmake)
- 
+
  # The directory where akonadi-xml.xsd and kcfg2dbus.xsl are installed
 -set(KF5Akonadi_DATA_DIR "@PACKAGE_KF5Akonadi_DATA_DIR@")
 +set(KF5Akonadi_DATA_DIR "@KF5Akonadi_DATA_DIR@")
- 
- ####################################################################################
- # CMAKE_AUTOMOC
+
+ # set the directories
+ if(NOT AKONADI_INSTALL_DIR)
+--
+2.31.1
diff --git a/gnu/packages/patches/akonadi-paths.patch b/gnu/packages/patches/akonadi-paths.patch
index ac08ec5448..3e79748d47 100644
--- a/gnu/packages/patches/akonadi-paths.patch
+++ b/gnu/packages/patches/akonadi-paths.patch
@@ -4,23 +4,23 @@ mysql and postgresql executables removed. The our package definition on why.
 diff --git a/src/akonadicontrol/agentmanager.cpp b/src/akonadicontrol/agentmanager.cpp
 --- a/src/akonadicontrol/agentmanager.cpp
 +++ b/src/akonadicontrol/agentmanager.cpp
-@@ -61,7 +61,7 @@ public:
-                 []() {
-                     QCoreApplication::instance()->exit(255);
-                 });
+@@ -47,7 +47,7 @@ public:
+         connect(this, &Akonadi::ProcessControl::unableToStart, this, []() {
+             QCoreApplication::instance()->exit(255);
+         });
 -        start(QStringLiteral("akonadiserver"), args, RestartOnCrash);
-+        start(QLatin1String(NIX_OUT "/bin/akonadiserver"), args, RestartOnCrash);
++        start(QStringLiteral(NIX_OUT "/bin/akonadiserver"), args, RestartOnCrash);
      }
- 
+
      ~StorageProcessControl() override
-@@ -84,7 +84,7 @@ public:
-                 []() {
-                     qCCritical(AKONADICONTROL_LOG) << "Failed to start AgentServer!";
-                 });
+@@ -69,7 +69,7 @@ public:
+         connect(this, &Akonadi::ProcessControl::unableToStart, this, []() {
+             qCCritical(AKONADICONTROL_LOG) << "Failed to start AgentServer!";
+         });
 -        start(QStringLiteral("akonadi_agent_server"), args, RestartOnCrash);
-+        start(QLatin1String(NIX_OUT "/bin/akonadi_agent_server"), args, RestartOnCrash);
++        start(QStringLiteral(NIX_OUT "/bin/akonadi_agent_server"), args, RestartOnCrash);
      }
- 
+
      ~AgentServerProcessControl() override
 diff --git a/src/akonadicontrol/agentprocessinstance.cpp b/src/akonadicontrol/agentprocessinstance.cpp
 --- a/src/akonadicontrol/agentprocessinstance.cpp
@@ -37,12 +37,12 @@ diff --git a/src/akonadicontrol/agentprocessinstance.cpp b/src/akonadicontrol/ag
 diff --git a/src/server/storage/dbconfigmysql.cpp b/src/server/storage/dbconfigmysql.cpp
 --- a/src/server/storage/dbconfigmysql.cpp
 +++ b/src/server/storage/dbconfigmysql.cpp
-@@ -209,7 +209,7 @@ bool DbConfigMysql::startInternalServer()
+@@ -215,7 +215,7 @@ bool DbConfigMysql::startInternalServer()
  #endif
- 
+
      // generate config file
 -    const QString globalConfig = StandardDirs::locateResourceFile("config", QStringLiteral("mysql-global.conf"));
 +    const QString globalConfig = QLatin1String(NIX_OUT "/etc/xdg/akonadi/mysql-global.conf");
-     const QString localConfig  = StandardDirs::locateResourceFile("config", QStringLiteral("mysql-local.conf"));
+     const QString localConfig = StandardDirs::locateResourceFile("config", QStringLiteral("mysql-local.conf"));
      const QString actualConfig = StandardDirs::saveDir("data") + QLatin1String("/mysql.conf");
      if (globalConfig.isEmpty()) {
diff --git a/gnu/packages/patches/akonadi-timestamps.patch b/gnu/packages/patches/akonadi-timestamps.patch
index e299a6991f..df81fdb2dc 100644
--- a/gnu/packages/patches/akonadi-timestamps.patch
+++ b/gnu/packages/patches/akonadi-timestamps.patch
@@ -2,12 +2,12 @@ Index: akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
 ===================================================================
 --- akonadi-19.08.0.orig/src/server/storage/dbconfigmysql.cpp
 +++ akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
-@@ -235,8 +235,7 @@ bool DbConfigMysql::startInternalServer(
+@@ -260,8 +260,7 @@ bool DbConfigMysql::startInternalServer(
      bool confUpdate = false;
      QFile actualFile(actualConfig);
      // update conf only if either global (or local) is newer than actual
--    if ((QFileInfo(globalConfig).lastModified() > QFileInfo(actualFile).lastModified()) ||
--            (QFileInfo(localConfig).lastModified()  > QFileInfo(actualFile).lastModified())) {
+-    if ((QFileInfo(globalConfig).lastModified() > QFileInfo(actualFile).lastModified())
+-        || (QFileInfo(localConfig).lastModified() > QFileInfo(actualFile).lastModified())) {
 +    if (true) {
          QFile globalFile(globalConfig);
          QFile localFile(localConfig);
diff --git a/gnu/packages/patches/kmail-Fix-missing-link-libraries.patch b/gnu/packages/patches/kmail-Fix-missing-link-libraries.patch
deleted file mode 100644
index fc784d63dd..0000000000
--- a/gnu/packages/patches/kmail-Fix-missing-link-libraries.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 6b0a3a60870499b20ce9ae2ea07cbc5ee53cbdd2 Mon Sep 17 00:00:00 2001
-From: Hartmut Goebel <h.goebel@crazy-compilers.com>
-Date: Tue, 21 Jan 2020 23:23:38 +0100
-Subject: [PATCH] Fix missing link libraries.
-
-See <https://phabricator.kde.org/D26821>
-
-These are only actually missing if the libraries reside in different
-prefixes, as it is the case in Guix or Nix.
----
- agents/archivemailagent/CMakeLists.txt      | 1 +
- agents/followupreminderagent/CMakeLists.txt | 1 +
- 2 files changed, 2 insertions(+)
-
-diff --git a/agents/archivemailagent/CMakeLists.txt b/agents/archivemailagent/CMakeLists.txt
-index 95c6249de..d0ddcd475 100644
---- a/agents/archivemailagent/CMakeLists.txt
-+++ b/agents/archivemailagent/CMakeLists.txt
-@@ -22,6 +22,7 @@ ki18n_wrap_ui(libarchivemailagent_SRCS ui/archivemailwidget.ui )
- add_library(archivemailagent STATIC ${libarchivemailagent_SRCS})
- target_link_libraries(archivemailagent
-     KF5::MailCommon
-+    KF5::Libkdepim
-     KF5::I18n
-     KF5::Notifications
-     KF5::KIOWidgets
-diff --git a/agents/followupreminderagent/CMakeLists.txt b/agents/followupreminderagent/CMakeLists.txt
-index 9ae7eaa29..527044807 100644
---- a/agents/followupreminderagent/CMakeLists.txt
-+++ b/agents/followupreminderagent/CMakeLists.txt
-@@ -27,6 +27,7 @@ target_link_libraries(followupreminderagent
-     KF5::AkonadiMime
-     KF5::AkonadiAgentBase
-     KF5::DBusAddons
-+    KF5::FollowupReminder
-     KF5::XmlGui
-     KF5::KIOWidgets
-     KF5::Notifications
--- 
-2.21.1
-
diff --git a/gnu/packages/patches/libksieve-Fix-missing-link-libraries.patch b/gnu/packages/patches/libksieve-Fix-missing-link-libraries.patch
index 238c4ec46c..3835c2e313 100644
--- a/gnu/packages/patches/libksieve-Fix-missing-link-libraries.patch
+++ b/gnu/packages/patches/libksieve-Fix-missing-link-libraries.patch
@@ -1,59 +1,23 @@
-From 732861dda9c466841a09329a0b2c992f2b78c40a Mon Sep 17 00:00:00 2001
-From: Hartmut Goebel <h.goebel@crazy-compilers.com>
-Date: Tue, 21 Jan 2020 23:15:23 +0100
-Subject: [PATCH] Fix missing link libraries.
-
 See <https://phabricator.kde.org/D26818>
 
-These are only actually missing if the libraries reside in different
-prefixes, as it is the case in Guix or Nix.
----
- src/ksieveui/autocreatescripts/tests/CMakeLists.txt  | 2 ++
- src/ksieveui/scriptsparsing/autotests/CMakeLists.txt | 2 +-
- src/ksieveui/scriptsparsing/tests/CMakeLists.txt     | 8 ++++++--
- 3 files changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/src/ksieveui/autocreatescripts/tests/CMakeLists.txt b/src/ksieveui/autocreatescripts/tests/CMakeLists.txt
-index 8a482b4..c43216c 100644
---- a/src/ksieveui/autocreatescripts/tests/CMakeLists.txt
-+++ b/src/ksieveui/autocreatescripts/tests/CMakeLists.txt
-@@ -15,6 +16,7 @@ set(parsingscript_gui_SRCS parsingscript_gui.cpp ../../tests/capability.cpp)
- add_executable(parsingscript_gui ${parsingscript_gui_SRCS})
- target_link_libraries(parsingscript_gui
-   KF5::KIOCore
-+  KF5::SyntaxHighlighting
-   KF5::KSieveUi
-   KF5::KSieve
-   KF5::PimCommon
-diff --git a/src/ksieveui/scriptsparsing/autotests/CMakeLists.txt b/src/ksieveui/scriptsparsing/autotests/CMakeLists.txt
-index e41a74e..31703ef 100644
---- a/src/ksieveui/scriptsparsing/autotests/CMakeLists.txt
-+++ b/src/ksieveui/scriptsparsing/autotests/CMakeLists.txt
-@@ -5,7 +5,7 @@ macro(add_sieveeditor_xmlprintingscriptbuilding _source _extrasource)
-     ecm_add_test(${_test}
-         TEST_NAME ${_name}
-         NAME_PREFIX "sieveeditor-xmlprintingscriptbuilding-"
--        LINK_LIBRARIES Qt5::Test KF5::I18n KF5::KSieveUi
-+        LINK_LIBRARIES Qt5::Test KF5::I18n KF5::KSieveUi KF5::SyntaxHighlighting
-         )
- endmacro()
- add_sieveeditor_xmlprintingscriptbuilding(xmlprintingscriptbuildertest.cpp "" "")
-diff --git a/src/ksieveui/scriptsparsing/tests/CMakeLists.txt b/src/ksieveui/scriptsparsing/tests/CMakeLists.txt
-index a252039..99a1aaa 100644
---- a/src/ksieveui/scriptsparsing/tests/CMakeLists.txt
-+++ b/src/ksieveui/scriptsparsing/tests/CMakeLists.txt
-@@ -9,5 +9,9 @@ set(xmlsieveparsing_SRCS
- )
- 
- add_executable(xmlsieveparsing ${xmlsieveparsing_SRCS} )
--target_link_libraries(xmlsieveparsing   KF5::KSieveUi KF5::KSieve KF5::I18n)
--
-+target_link_libraries(xmlsieveparsing
-+  KF5::KSieveUi
-+  KF5::SyntaxHighlighting
-+  KF5::KSieve
-+  KF5::I18n
-+)
--- 
-2.21.1
+diff --git a/src/ksieveui/CMakeLists.txt b/src/ksieveui/CMakeLists.txt
+--- a/src/ksieveui/CMakeLists.txt
++++ b/src/ksieveui/CMakeLists.txt
+@@ -255,6 +255,7 @@ target_link_libraries(KF5KSieveUi
+     KF5::KManageSieve
+     KF5::KSieve
+     KF5::PimCommon
++    KF5::SyntaxHighlighting
+     PRIVATE
+     KF5::Libkdepim
+     KF5::Archive
+@@ -269,7 +270,6 @@ target_link_libraries(KF5KSieveUi
+     KF5::I18n
+     KF5::SonnetUi
+     Qt::PrintSupport
+-    KF5::SyntaxHighlighting
+     )
 
+ set_target_properties(KF5KSieveUi PROPERTIES
+--
+2.33.0
