3
5
Fork 0
mirror of git://git.savannah.gnu.org/guix.git synced 2023-12-14 03:33:07 +01:00
guix/gnu/packages/patches/kio-search-smbd-on-PATH.patch
Marius Bakke fd11c0fd3d
gnu: KDE Frameworks: Update to 5.54.0.
* gnu/packages/patches/kio-search-smbd-on-PATH.patch: Adjust context.
* gnu/packages/kde-frameworks.scm (kconfig): Update to 5.54.0.
[native-inputs]: Add DBUS.
[arguments]: Run tests with "dbus-launch".
(kio): Update to 5.54.1.
[inputs]: Add KCRASH.
(breeze-icons): Update to 5.54.0.
[arguments]: Remove.
(extra-cmake-modules, attica, bluez-qt, kapidox, karchive,
kcodecs, kcoreaddons, kdbusaddons, kdnssd, kguiaddons, ki18n, kidletime,
kirigami, kitemmodels, kitemviews, kplotting, ksyntaxhighlighting, kwayland,
kwidgetsaddons, kwindowsystem, modemmanager-qt, networkmanager-qt,
oxygen-icons, prison, qqc2-desktop-style, solid, sonnet, threadweaver,
kactivities, kauth, kcompletion, kcrash, kdoctools, kfilemetadata,
kimageformats, kjobwidgets, knotifications, kpackage, kpty, kunitconversion,
baloo, kactivities-stats, kbookmarks, kcmutils, kconfigwidgets, kdeclarative,
kded, kdesignerplugin, kdesu, kdewebkit, kemoticons, kglobalaccel,
kiconthemes, kinit, knewstuff, knotifyconfig, kparts, kpeople, krunner,
kservice, ktexteditor, ktextwidgets, kwallet, kxmlgui, kxmlrpcclient,
plasma-framework, kde-frameworkintegration, kdelibs4support, khtml, kjs,
kjsembed, kmediaplayer, kross): Update to 5.54.0.
2019-02-12 23:49:02 +01:00

30 lines
1 KiB
Diff

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(QStringLiteral("/smbd"));
+ if (QFile::exists(*it)) {
+ return true;
+ }
+ }
}
- //qDebug() << "Samba is not installed!";
-
return false;
}