gnu: kservice: Transfer patches from NixOS.

Transfer the NixOS patches for kservice as of 2018-02-17.
- Make QDirIterator follow symlinks.
- Normalize path, but don't resolve symlinks.

* gnu/packages/kde-frameworks.scm(kservice)<patch>: New phase.
This commit is contained in:
Hartmut Goebel 2017-10-23 15:15:23 +02:00
parent 0fd6138175
commit fb0356d956
No known key found for this signature in database
GPG Key ID: 634A8DFFD3F631DF
1 changed files with 14 additions and 0 deletions

View File

@ -2979,6 +2979,20 @@ typed.")
`(#:tests? #f ; FIXME: 6/10 tests fail. `(#:tests? #f ; FIXME: 6/10 tests fail.
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after 'unpack 'patch
;; Adopted from NixOS' patches "qdiriterator-follow-symlinks" and
;; "no-canonicalize-path".
(lambda _
(substitute* "src/sycoca/kbuildsycoca.cpp"
;; make QDirIterator follow symlinks
(("^\\s*(QDirIterator it\\(.*, QDirIterator::Subdirectories)(\\);)" _ a b)
(string-append a " | QDirIterator::FollowSymlinks" b)))
(substitute* "src/sycoca/vfolder_menu.cpp"
;; Normalize path, but don't resolve symlinks (taken from
;; NixOS)
(("^\\s*QString resolved = QDir\\(dir\\)\\.canonicalPath\\(\\);")
"QString resolved = QDir::cleanPath(dir);"))
#t))
(add-before 'check 'check-setup (add-before 'check 'check-setup
(lambda _ (lambda _
(setenv "HOME" (getcwd)) (setenv "HOME" (getcwd))