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