build KDE Frameworks with each Qt version
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
{
|
||||
kdeFramework, lib, copyPathsToStore,
|
||||
extra-cmake-modules, kdoctools,
|
||||
kconfig, kcrash, ki18n, kio, kservice, kwindowsystem
|
||||
}:
|
||||
|
||||
kdeFramework {
|
||||
name = "kinit";
|
||||
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
|
||||
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
|
||||
propagatedBuildInputs = [
|
||||
kconfig kcrash ki18n kio kservice kwindowsystem
|
||||
];
|
||||
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
Index: kinit-5.24.0/src/kdeinit/kinit.cpp
|
||||
===================================================================
|
||||
--- kinit-5.24.0.orig/src/kdeinit/kinit.cpp
|
||||
+++ kinit-5.24.0/src/kdeinit/kinit.cpp
|
||||
@@ -672,19 +672,16 @@ static pid_t launch(int argc, const char
|
||||
|
||||
if (!libpath.isEmpty()) {
|
||||
if (libpath_relative) {
|
||||
- // NB: Because Qt makes the actual dlopen() call, the
|
||||
- // RUNPATH of kdeinit is *not* respected - see
|
||||
- // https://sourceware.org/bugzilla/show_bug.cgi?id=13945
|
||||
- // - so we try hacking it in ourselves
|
||||
- QString install_lib_dir = QFile::decodeName(
|
||||
- CMAKE_INSTALL_PREFIX "/" LIB_INSTALL_DIR "/");
|
||||
- QString orig_libpath = libpath;
|
||||
- libpath = install_lib_dir + libpath;
|
||||
- l.setFileName(libpath);
|
||||
- if (!l.load()) {
|
||||
- libpath = orig_libpath;
|
||||
- l.setFileName(libpath);
|
||||
- l.load();
|
||||
+ // Try to load the library relative to the active profiles.
|
||||
+ QByteArrayList profiles = qgetenv("NIX_PROFILES").split(' ');
|
||||
+ // Reverse the profile list.
|
||||
+ std::reverse(profiles.begin(), profiles.end());
|
||||
+ const QString libdir = QString::fromLatin1("/lib/");
|
||||
+ Q_FOREACH (const QByteArray &profile, profiles) {
|
||||
+ if (!profile.isEmpty()) {
|
||||
+ l.setFileName(QFile::decodeName(profile) + libdir + libpath);
|
||||
+ if (l.load()) break;
|
||||
+ }
|
||||
}
|
||||
} else {
|
||||
l.load();
|
||||
@@ -0,0 +1,2 @@
|
||||
kinit-libpath.patch
|
||||
start_kdeinit-path.patch
|
||||
@@ -0,0 +1,13 @@
|
||||
Index: kinit-5.24.0/src/start_kdeinit/start_kdeinit_wrapper.c
|
||||
===================================================================
|
||||
--- kinit-5.24.0.orig/src/start_kdeinit/start_kdeinit_wrapper.c
|
||||
+++ kinit-5.24.0/src/start_kdeinit/start_kdeinit_wrapper.c
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
-#define EXECUTE CMAKE_INSTALL_FULL_LIBEXECDIR_KF5 "/start_kdeinit"
|
||||
+#define EXECUTE "/var/setuid-wrappers/start_kdeinit"
|
||||
|
||||
#if KDEINIT_OOM_PROTECT
|
||||
|
||||
Reference in New Issue
Block a user