qt58: ignore NIX_PROFILES environment variable

This commit is contained in:
Thomas Tuegel 2017-04-08 19:54:06 -05:00
parent 12c981d4b7
commit 6169bd98f5
No known key found for this signature in database
GPG Key ID: 22CBF5249D4B4D59
4 changed files with 0 additions and 46 deletions

View File

@ -1,22 +0,0 @@
Index: qtbase-opensource-src-5.6.0/src/corelib/kernel/qcoreapplication.cpp
===================================================================
--- qtbase-opensource-src-5.6.0.orig/src/corelib/kernel/qcoreapplication.cpp
+++ qtbase-opensource-src-5.6.0/src/corelib/kernel/qcoreapplication.cpp
@@ -2533,7 +2533,17 @@ QStringList QCoreApplication::libraryPat
QStringList *app_libpaths = new QStringList;
coreappdata()->app_libpaths.reset(app_libpaths);
+ // Add library paths derived from NIX_PROFILES.
+ const QByteArrayList profiles = qgetenv("NIX_PROFILES").split(' ');
+ const QString plugindir = QString::fromLatin1("/lib/qt5/plugins");
+ Q_FOREACH (const QByteArray &profile, profiles) {
+ if (!profile.isEmpty()) {
+ app_libpaths->append(QFile::decodeName(profile) + plugindir);
+ }
+ }
+
const QByteArray libPathEnv = qgetenv("QT_PLUGIN_PATH");
+ qunsetenv("QT_PLUGIN_PATH"); // do not propagate to child processes
if (!libPathEnv.isEmpty()) {
QStringList paths = QFile::decodeName(libPathEnv).split(QDir::listSeparator(), QString::SkipEmptyParts);
for (QStringList::const_iterator it = paths.constBegin(); it != paths.constEnd(); ++it) {

View File

@ -4,6 +4,5 @@ dlopen-libXcursor.patch
dlopen-openssl.patch
dlopen-dbus.patch
xdg-config-dirs.patch
nix-profiles-library-paths.patch
compose-search-path.patch
libressl.patch

View File

@ -1,22 +0,0 @@
Index: qtbase-opensource-src-5.8.0/src/corelib/kernel/qcoreapplication.cpp
===================================================================
--- qtbase-opensource-src-5.8.0.orig/src/corelib/kernel/qcoreapplication.cpp
+++ qtbase-opensource-src-5.8.0/src/corelib/kernel/qcoreapplication.cpp
@@ -2476,7 +2476,17 @@ QStringList QCoreApplication::libraryPat
QStringList *app_libpaths = new QStringList;
coreappdata()->app_libpaths.reset(app_libpaths);
+ // Add library paths derived from NIX_PROFILES.
+ const QByteArrayList profiles = qgetenv("NIX_PROFILES").split(' ');
+ const QString plugindir = QString::fromLatin1("/lib/qt5/plugins");
+ for (const QByteArray &profile: profiles) {
+ if (!profile.isEmpty()) {
+ app_libpaths->append(QFile::decodeName(profile) + plugindir);
+ }
+ }
+
const QByteArray libPathEnv = qgetenv("QT_PLUGIN_PATH");
+ qunsetenv("QT_PLUGIN_PATH"); // do not propagate to child processes
if (!libPathEnv.isEmpty()) {
QStringList paths = QFile::decodeName(libPathEnv).split(QDir::listSeparator(), QString::SkipEmptyParts);
for (QStringList::const_iterator it = paths.constBegin(); it != paths.constEnd(); ++it) {

View File

@ -4,7 +4,6 @@ dlopen-libXcursor.patch
dlopen-openssl.patch
dlopen-dbus.patch
xdg-config-dirs.patch
nix-profiles-library-paths.patch
compose-search-path.patch
libressl.patch
qpa-plugin-path.patch