summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorHartmut Goebel <h.goebel@crazy-compilers.com>2017-10-22 17:17:57 +0200
committerHartmut Goebel <h.goebel@crazy-compilers.com>2019-01-04 10:10:42 +0100
commita6e532815d5022d005a00f8323e46084cfa66221 (patch)
treed3c909838f6a6e118273e0bceb4e99101a89b7e9 /gnu
parent8791aa98a741eeea78f0bbc1dd735ade1911d55c (diff)
gnu: kio: Search 'smbd' on $PATH.
Transfer the remaining NixOS patch for kio as of 2018-02-17. * gnu/packages/patches/kio-search-smbd-on-PATH.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/kde-frameworks.scm(kio)<source>: Use it.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/kde-frameworks.scm6
-rw-r--r--gnu/packages/patches/kio-search-smbd-on-PATH.patch30
3 files changed, 34 insertions, 3 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 362f934e99..a7e6a06e8b 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -855,6 +855,7 @@ dist_patch_DATA = \
%D%/packages/patches/kiki-makefile.patch \
%D%/packages/patches/kiki-missing-includes.patch \
%D%/packages/patches/kiki-portability-64bit.patch \
+ %D%/packages/patches/kio-search-smbd-on-PATH.patch \
%D%/packages/patches/kmod-module-directory.patch \
%D%/packages/patches/kobodeluxe-paths.patch \
%D%/packages/patches/kobodeluxe-enemies-pipe-decl.patch \
diff --git a/gnu/packages/kde-frameworks.scm b/gnu/packages/kde-frameworks.scm
index e270035b21..98c920aaa7 100644
--- a/gnu/packages/kde-frameworks.scm
+++ b/gnu/packages/kde-frameworks.scm
@@ -2573,7 +2573,8 @@ makes starting KDE applications faster and reduces memory consumption.")
name "-" version ".tar.xz"))
(sha256
(base32
- "0rrsg3g1b204cdp58vxd5dig1ggwyvk1382p1c86vn6w8qbrq27k"))))
+ "0rrsg3g1b204cdp58vxd5dig1ggwyvk1382p1c86vn6w8qbrq27k"))
+ (patches (search-patches "kio-search-smbd-on-PATH.patch"))))
(build-system cmake-build-system)
(propagated-inputs
`(("kbookmarks" ,kbookmarks)
@@ -2616,11 +2617,10 @@ makes starting KDE applications faster and reduces memory consumption.")
(modify-phases %standard-phases
(add-after 'unpack 'patch
(lambda _
- ;; Better error message (taken from nix)
+ ;; Better error message (taken from NixOS)
(substitute* "src/kiod/kiod_main.cpp"
(("(^\\s*qCWarning(KIOD_CATEGORY) << \"Error loading plugin:\")( << loader.errorString();)" _ a b)
(string-append a "<< name" b)))
- ;; TODO: samba-search-path.patch from nix: search smbd on $PATH
#t))
(add-before 'check 'check-setup
(lambda _
diff --git a/gnu/packages/patches/kio-search-smbd-on-PATH.patch b/gnu/packages/patches/kio-search-smbd-on-PATH.patch
new file mode 100644
index 0000000000..47e20cfc0b
--- /dev/null
+++ b/gnu/packages/patches/kio-search-smbd-on-PATH.patch
@@ -0,0 +1,30 @@
+Adopted from NixOS
+pkgs/development/libraries/kde-frameworks/kio/samba-search-path.patch
+
+===================================================================
+--- kio-5.17.0.orig/src/core/ksambashare.cpp
++++ kio-5.17.0/src/core/ksambashare.cpp
+@@ -67,13 +67,18 @@ KSambaSharePrivate::~KSambaSharePrivate(
+
+ bool KSambaSharePrivate::isSambaInstalled()
+ {
+- if (QFile::exists(QStringLiteral("/usr/sbin/smbd"))
+- || QFile::exists(QStringLiteral("/usr/local/sbin/smbd"))) {
+- return true;
++ const QByteArray pathEnv = qgetenv("PATH");
++ if (!pathEnv.isEmpty()) {
++ QLatin1Char pathSep(':');
++ QStringList paths = QFile::decodeName(pathEnv).split(pathSep, QString::SkipEmptyParts);
++ for (QStringList::iterator it = paths.begin(); it != paths.end(); ++it) {
++ it->append("/smbd");
++ if (QFile::exists(*it)) {
++ return true;
++ }
++ }
+ }
+
+- //qDebug() << "Samba is not installed!";
+-
+ return false;
+ }
+