gnu: kpackage: Use G-expressions.

* gnu/packages/kde-frameworks.scm (kpackage)[arguments]:
Rewrite as G-expressions.

Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
This commit is contained in:
Zheng Junjie 2023-07-12 14:13:17 +08:00 committed by 宋文武
parent c11c2343c9
commit 070c724a23
No known key found for this signature in database
GPG key ID: D415BF253B515976

View file

@ -1928,31 +1928,36 @@ (define-public kpackage
ki18n ki18n
qtbase-5)) qtbase-5))
(arguments (arguments
`(#:phases (list
(modify-phases %standard-phases #:phases
(add-after 'unpack 'patch #~(modify-phases %standard-phases
(lambda _ (add-after 'unpack 'patch
(substitute* "src/kpackage/package.cpp" (lambda _
(("externalPaths.false.") "externalPaths(true)")) (substitute* "src/kpackage/package.cpp"
;; Make QDirIterator follow symlinks (("externalPaths.false.")
(substitute* '("src/kpackage/packageloader.cpp") "externalPaths(true)"))
(("^\\s*(const QDirIterator::IteratorFlags flags = QDirIterator::Subdirectories)(;)" _ a b) ;; Make QDirIterator follow symlinks
(string-append a " | QDirIterator::FollowSymlinks" b)) (substitute* '("src/kpackage/packageloader.cpp")
(("^\\s*(QDirIterator it\\(.*, QDirIterator::Subdirectories)(\\);)" _ a b) (("^\\s*(const QDirIterator::IteratorFlags flags = QDirIterator::Subdirectories)(;)"
(string-append a " | QDirIterator::FollowSymlinks" b))))) _ a b)
(add-after 'unpack 'patch-tests (string-append a " | QDirIterator::FollowSymlinks" b))
(lambda _ (("^\\s*(QDirIterator it\\(.*, QDirIterator::Subdirectories)(\\);)"
;; /bin/ls doesn't exist in the build-container use /etc/passwd _ a b)
(substitute* "autotests/packagestructuretest.cpp" (string-append a " | QDirIterator::FollowSymlinks" b)))))
(("(addDirectoryDefinition\\(\")bin(\".*\")bin(\".*\")bin\"" (add-after 'unpack 'patch-tests
_ a b c) (lambda _
(string-append a "etc" b "etc" c "etc\"")) ;; /bin/ls doesn't exist in the build-container use /etc/passwd
(("filePath\\(\"bin\", QStringLiteral\\(\"ls\"))") (substitute* "autotests/packagestructuretest.cpp"
"filePath(\"etc\", QStringLiteral(\"passwd\"))") (("(addDirectoryDefinition\\(\")bin(\".*\")bin(\".*\")bin\""
(("\"/bin/ls\"") "\"/etc/passwd\"")))) _ a b c)
(add-before 'check 'check-setup (string-append a "etc" b "etc" c "etc\""))
(lambda _ (("filePath\\(\"bin\", QStringLiteral\\(\"ls\"))")
(setenv "HOME" (getcwd))))))) "filePath(\"etc\", QStringLiteral(\"passwd\"))")
(("\"/bin/ls\"")
"\"/etc/passwd\""))))
(add-before 'check 'check-setup
(lambda _
(setenv "HOME" (getcwd)))))))
(home-page "https://community.kde.org/Frameworks") (home-page "https://community.kde.org/Frameworks")
(synopsis "Installation and loading of additional content as packages") (synopsis "Installation and loading of additional content as packages")
(description "The Package framework lets the user install and load packages (description "The Package framework lets the user install and load packages