kf5-kinit 5.43.0
[git/cygwin-packages/kf5-kinit.git] / 5.27.0-kinit-cygwin.patch
1 --- origsrc/kinit-5.27.0/src/kdeinit/kinit.cpp 2016-10-02 04:52:57.000000000 -0500
2 +++ src/kinit-5.27.0/src/kdeinit/kinit.cpp 2016-11-02 00:14:49.671940400 -0500
3 @@ -95,6 +95,10 @@ static const char *extra_libs[] = {
4 "libKF5KIOCore.5.dylib",
5 "libKF5Parts.5.dylib",
6 "libKF5Plasma.5.dylib"
7 +#elif defined(Q_OS_CYGWIN)
8 + "cygKF5KIOCore-5.dll",
9 + "cygKF5Parts-5.dll",
10 + "cygKF5Plasma-5.dll"
11 #else
12 "libKF5KIOCore.so.5",
13 "libKF5Parts.so.5",
14 @@ -461,7 +465,11 @@ static pid_t launch(int argc, const char
15 if (_name[0] != '/') {
16 name = _name;
17 lib = QFile::decodeName(name);
18 +#ifdef Q_OS_CYGWIN
19 + libpath = QLatin1String("cygkdeinit5_") + lib + QLatin1String(".dll");
20 +#else
21 libpath = QLatin1String("libkdeinit5_") + lib;
22 +#endif
23 libpath_relative = true;
24 execpath = execpath_avoid_loops(name, envc, envs, avoid_loops);
25 } else {
26 @@ -470,7 +478,7 @@ static pid_t launch(int argc, const char
27 name = name.mid(name.lastIndexOf('/') + 1);
28
29 // FIXME: this .so extension stuff is very Linux-specific
30 - if (lib.endsWith(QLatin1String(".so"))) {
31 + if (lib.endsWith(QLatin1String(".so")) || lib.endsWith(QLatin1String(".dll"))) {
32 libpath = lib;
33 } else {
34 execpath = _name;
35 @@ -482,6 +490,15 @@ static pid_t launch(int argc, const char
36 // the install prefix, although this may not be the case if the user
37 // has overridden them, and so this search is inherently fragile in
38 // the face of unusual installation layouts.
39 +#ifdef Q_OS_CYGWIN
40 + if (lib.contains(QLatin1String(KF5_LIBEXEC_INSTALL_DIR))) {
41 + libpath = QString(lib).replace(QLatin1String(KF5_LIBEXEC_INSTALL_DIR),
42 + QLatin1String("/bin/cygkdeinit5_")) + QLatin1String(".dll");
43 + } else if (lib.contains(QLatin1String("/bin/"))) {
44 + libpath = QString(lib).replace(QLatin1String("/bin/"),
45 + QLatin1String("/bin/cygkdeinit5_")) + QLatin1String(".dll");
46 + }
47 +#else
48 if (lib.contains(QLatin1String(KF5_LIBEXEC_INSTALL_DIR))) {
49 libpath = QString(lib).replace(QLatin1String(KF5_LIBEXEC_INSTALL_DIR),
50 QLatin1String(LIB_INSTALL_DIR "/libkdeinit5_")) + QLatin1String(".so");
51 @@ -489,6 +506,7 @@ static pid_t launch(int argc, const char
52 libpath = QString(lib).replace(QLatin1String("/bin/"),
53 QLatin1String(LIB_INSTALL_DIR "/libkdeinit5_")) + QLatin1String(".so");
54 }
55 +#endif
56 // Don't confuse the user with "Could not load libkdeinit5_foo.so" if it doesn't exist
57 if (!QFile::exists(libpath)) {
58 libpath.clear();
This page took 0.033009 seconds and 5 git commands to generate.