gnu: kwin: Update to 6.1.2.

* gnu/packages/kde-plasma.scm (kwin): Update to 6.1.2.
[inputs]: Remove kactivities, plasma-framework, qtbase-5, qtdeclarative-5,
qtmultimedia-5, qtwayland-5, and qtx11extras; add plasma-activities,
kglobalacceld, ksvg, kauth, kguiaddons, libplasma, qt5compat,
qtdeclarative, qtmultimedia, qtwayland, qtsensors, and
libdisplay-info.
[native-inputs]: Remove qttools-5 and wayland-protocols; add qttools,
wayland-protocols-next, python-minimal, and qtwayland.
[arguments]: Set #:qtbase to qtbase.
<#:phases>: Adjust it. Remove add-symlinks phase.
* gnu/packages/patches/kwin-unwrap-executable-name-for-dot-desktop-search.patch:
Adjust it.

Change-Id: I37237eb3524bad755be45ba39ec7d4db060a8f9b
This commit is contained in:
Zheng Junjie 2024-07-06 13:52:07 +08:00
parent 51747b31c6
commit 555a6914b2
No known key found for this signature in database
GPG key ID: 3B5AA993E1A2DFF0
2 changed files with 47 additions and 36 deletions

View file

@ -76,6 +76,7 @@ (define-module (gnu packages kde-plasma)
#:use-module (gnu packages video) #:use-module (gnu packages video)
#:use-module (gnu packages vpn) #:use-module (gnu packages vpn)
#:use-module (gnu packages vulkan) #:use-module (gnu packages vulkan)
#:use-module (gnu packages wm)
#:use-module (gnu packages textutils) #:use-module (gnu packages textutils)
#:use-module (gnu packages qt) #:use-module (gnu packages qt)
#:use-module (gnu packages xdisorg) #:use-module (gnu packages xdisorg)
@ -1298,18 +1299,24 @@ (define-public kwayland-integration
(define-public kwin (define-public kwin
(package (package
(name "kwin") (name "kwin")
(version "5.27.7") (version "6.1.2")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://kde/stable/plasma/" version "/" (uri (string-append "mirror://kde/stable/plasma/"
version "/"
name "-" version ".tar.xz")) name "-" version ".tar.xz"))
(patches (search-patches "kwin-unwrap-executable-name-for-dot-desktop-search.patch")) (patches (search-patches "kwin-unwrap-executable-name-for-dot-desktop-search.patch"))
(sha256 (sha256
(base32 (base32
"0bssp76lzqqlan5pfg6wjf4z9c6pl6p66ri8p82vqqw406x5bzyb")))) "03y0als06vryf1cwiladnn9a3vnsp32gp9bcvp42mm017g485ic2"))))
(build-system qt-build-system) (build-system qt-build-system)
(arguments (arguments
(list (list
#:qtbase qtbase
#:configure-flags
#~(list (string-append "-DQtWaylandScanner_EXECUTABLE="
#$(this-package-native-input "qtwayland")
"/lib/qt6/libexec/qtwaylandscanner"))
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'patch (add-after 'unpack 'patch
@ -1327,8 +1334,8 @@ (define-public kwin
(string-append (string-append
"setProgram(QByteArrayLiteral(\"" (which "glxgears") "\")"))) "setProgram(QByteArrayLiteral(\"" (which "glxgears") "\")")))
(substitute* (substitute*
'("src/wayland/tests/renderingservertest.cpp" '("tests/renderingservertest.cpp"
"src/wayland/tests/waylandservertest.cpp") "tests/waylandservertest.cpp")
(("QByteArrayLiteral\\(\"Xwayland\"\\)") (("QByteArrayLiteral\\(\"Xwayland\"\\)")
(string-append (string-append
"QByteArrayLiteral(\"" (which "Xwayland") "\")"))) "QByteArrayLiteral(\"" (which "Xwayland") "\")")))
@ -1345,14 +1352,6 @@ (define-public kwin
(substitute* '("cmake/modules/Findhwdata.cmake") (substitute* '("cmake/modules/Findhwdata.cmake")
(("/usr/share") (("/usr/share")
(string-append #$(this-package-input "hwdata") "/share"))))) (string-append #$(this-package-input "hwdata") "/share")))))
(add-after 'install 'add-symlinks
(lambda* (#:key outputs #:allow-other-keys)
(let ((kst5 (string-append #$output
"/share/kservicetypes5/")))
(symlink (string-append kst5 "kwineffect.desktop")
(string-append kst5 "kwin-effect.desktop"))
(symlink (string-append kst5 "kwinscript.desktop")
(string-append kst5 "kwin-script.desktop")))))
(replace 'check (replace 'check
(lambda* (#:key tests? #:allow-other-keys) (lambda* (#:key tests? #:allow-other-keys)
(when tests? (when tests?
@ -1363,7 +1362,7 @@ (define-public kwin
(getenv "XDG_DATA_DIRS"))) (getenv "XDG_DATA_DIRS")))
(setenv "QT_PLUGIN_PATH" (setenv "QT_PLUGIN_PATH"
(string-append #$output (string-append #$output
"/lib/qt5/plugins:" "/lib/qt6/plugins:"
(getenv "QT_PLUGIN_PATH"))) (getenv "QT_PLUGIN_PATH")))
(setenv "DISPLAY" ":1") (setenv "DISPLAY" ":1")
(system "Xvfb :1 &") (system "Xvfb :1 &")
@ -1372,31 +1371,39 @@ (define-public kwin
"ctest" "ctest"
"-E" "-E"
(string-join (string-join
(list "kwin-testXkb" (list
"kwin-testPointerInput" "kwin-testDrm" ;; require Drm
"kwin-testXdgShellWindow" "kwin-testInputMethod"
"kwin-testXdgShellWindow-waylandonly" "kwin-testPlasmaWindow" ;; require plasma-workspace qml module.
"kwin-testSceneOpenGLES" "kwin-testButtonRebind"
"kwin-testSceneOpenGLES-waylandonly" "kwin-testPointerInput"
"kwin-testNightColor" "kwin-testXdgShellWindow"
"kwin-testNightColor-waylandonly" "kwin-testXdgShellWindow-waylandonly"
"kwin-testScriptedEffects" "kwin-testSceneOpenGLES"
"kwayland-testWaylandSurface") "kwin-testSceneOpenGLES-waylandonly"
"kwin-testNightColor"
"kwin-testNightColor-waylandonly"
"kwin-testScriptedEffects"
"kwayland-testServerSideDecoration"
"kwayland-testWaylandSurface")
"|")))))))) "|"))))))))
(native-inputs (list extra-cmake-modules (native-inputs (list extra-cmake-modules
dbus dbus
kdoctools kdoctools
mesa-utils mesa-utils
pkg-config pkg-config
qttools-5 qttools
wayland-protocols wayland-protocols-next
xorg-server-for-tests)) xorg-server-for-tests
python-minimal
;; for QtWaylandScanner
qtwayland))
(inputs (list breeze (inputs (list breeze
eudev eudev
fontconfig fontconfig
freetype freetype
`(,hwdata "pnp") `(,hwdata "pnp")
kactivities plasma-activities
kcmutils kcmutils
kcompletion kcompletion
kconfig kconfig
@ -1407,6 +1414,7 @@ (define-public kwin
kdeclarative kdeclarative
kdecoration kdecoration
kglobalaccel kglobalaccel
kglobalacceld
ki18n ki18n
kiconthemes kiconthemes
kidletime kidletime
@ -1421,6 +1429,9 @@ (define-public kwin
kwayland kwayland
kwindowsystem kwindowsystem
kxmlgui kxmlgui
ksvg
kauth
kguiaddons
libqaccessibilityclient libqaccessibilityclient
lcms lcms
libcap libcap
@ -1429,13 +1440,13 @@ (define-public kwin
libinput libinput
libxkbcommon libxkbcommon
pipewire pipewire
plasma-framework libplasma
plasma-wayland-protocols plasma-wayland-protocols
qtbase-5 qt5compat
qtdeclarative-5 qtdeclarative
qtmultimedia-5 qtmultimedia
qtwayland-5 qtwayland
qtx11extras qtsensors
wayland wayland
xcb-util ;fails at build time without this xcb-util ;fails at build time without this
xcb-util-cursor xcb-util-cursor
@ -1444,6 +1455,7 @@ (define-public kwin
xcmsdb xcmsdb
xinput ;XXX: Says disabled in configure phase xinput ;XXX: Says disabled in configure phase
xorg-server-xwayland xorg-server-xwayland
libdisplay-info
zlib)) zlib))
;; Runtime-only dependency needed for mapping monitor hardware vendor IDs to full names ;; Runtime-only dependency needed for mapping monitor hardware vendor IDs to full names
;; * QtQuick.Controls-QMLModule, QML module 'QtQuick.Controls' is a runtime dependency. ;; * QtQuick.Controls-QMLModule, QML module 'QtQuick.Controls' is a runtime dependency.

View file

@ -14,12 +14,11 @@ new file mode 100644
index 0000000..726065d index 0000000..726065d
--- /dev/null --- /dev/null
+++ b/src/guix_utils.h +++ b/src/guix_utils.h
@@ -0,0 +1,24 @@ @@ -0,0 +1,23 @@
+#ifndef GUIX_UTILS_H +#ifndef GUIX_UTILS_H
+#define GUIX_UTILS_H +#define GUIX_UTILS_H
+ +
+// kwin +// kwin
+#include <kwinglobals.h>
+ +
+namespace KWin +namespace KWin
+{ +{