mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 13:28:12 -05:00
gnu: kpackage: Transfer patches from NixOS.
Transfer the NixOS patches for kpackage as of 2018-02-17: - Allow external paths. - Make QDirIterator follow symlinks. Decided to use a patch for one of the "allow external paths" changes since 'substitute*' seems not to be robust enough. * gnu/packages/patches/kpackage-allow-external-paths.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/kde-frameworks.scm(kpackage)[source]: Use it. <patch>: New phase.
This commit is contained in:
parent
16b8aff85b
commit
0fd6138175
3 changed files with 28 additions and 1 deletions
|
@ -859,6 +859,7 @@ dist_patch_DATA = \
|
|||
%D%/packages/patches/kinit-kdeinit-libpath.patch \
|
||||
%D%/packages/patches/kio-search-smbd-on-PATH.patch \
|
||||
%D%/packages/patches/kmod-module-directory.patch \
|
||||
%D%/packages/patches/kpackage-allow-external-paths.patch \
|
||||
%D%/packages/patches/kobodeluxe-paths.patch \
|
||||
%D%/packages/patches/kobodeluxe-enemies-pipe-decl.patch \
|
||||
%D%/packages/patches/kobodeluxe-const-charp-conversion.patch \
|
||||
|
|
|
@ -1825,7 +1825,10 @@ (define-public kpackage
|
|||
name "-" version ".tar.xz"))
|
||||
(sha256
|
||||
(base32
|
||||
"1xbfjwxb4gff8gg0hs5m9s0jcnzqk27rs2jr71g5ckhvs5psnkcd"))))
|
||||
"1xbfjwxb4gff8gg0hs5m9s0jcnzqk27rs2jr71g5ckhvs5psnkcd"))
|
||||
;; Default to: external paths/symlinks can be followed by a
|
||||
;; package
|
||||
(patches (search-patches "kpackage-allow-external-paths.patch"))))
|
||||
(build-system cmake-build-system)
|
||||
(native-inputs
|
||||
`(("extra-cmake-modules" ,extra-cmake-modules)))
|
||||
|
@ -1840,6 +1843,16 @@ (define-public kpackage
|
|||
`(#:tests? #f ; FIXME: 3/9 tests fail.
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'patch
|
||||
(lambda _
|
||||
;; Make QDirIterator follow symlinks
|
||||
(substitute* '("src/kpackage/packageloader.cpp"
|
||||
"src/kpackage/private/packagejobthread.cpp")
|
||||
(("^\\s*(const QDirIterator::IteratorFlags flags = QDirIterator::Subdirectories)(;)" _ a b)
|
||||
(string-append a " | QDirIterator::FollowSymlinks" b))
|
||||
(("^\\s*(QDirIterator it\\(.*, QDirIterator::Subdirectories)(\\);)" _ a b)
|
||||
(string-append a " | QDirIterator::FollowSymlinks" b)))
|
||||
#t))
|
||||
(add-before 'check 'check-setup
|
||||
(lambda _
|
||||
(setenv "HOME" (getcwd))
|
||||
|
|
13
gnu/packages/patches/kpackage-allow-external-paths.patch
Normal file
13
gnu/packages/patches/kpackage-allow-external-paths.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git a/src/kpackage/package.cpp b/src/kpackage/package.cpp
|
||||
index 5aec9fd..b15c933 100644
|
||||
--- a/src/kpackage/package.cpp
|
||||
+++ b/src/kpackage/package.cpp
|
||||
@@ -820,7 +820,7 @@ PackagePrivate::PackagePrivate()
|
||||
: QSharedData(),
|
||||
fallbackPackage(nullptr),
|
||||
metadata(nullptr),
|
||||
- externalPaths(false),
|
||||
+ externalPaths(true),
|
||||
valid(false),
|
||||
checkedValid(false)
|
||||
{
|
Loading…
Reference in a new issue