qt5: lib location fixes, mainly due to multiple outputs

This commit is contained in:
Vladimír Čunát 2015-10-11 18:46:55 +02:00
parent 2e2d39f31a
commit debdd33fc8
11 changed files with 60 additions and 42 deletions

View file

@ -16,13 +16,13 @@ index 60ff317..da8ac69 100644
{
m_libUdev.setLoadHints(QLibrary::ResolveAllSymbolsHint);
- m_libUdev.setFileNameAndVersion(QStringLiteral("udev"), 1);
+ m_libUdev.setFileNameAndVersion(QStringLiteral("@udev@/lib/libudev"), 1);
+ m_libUdev.setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 1);
m_loaded = m_libUdev.load();
if (resolveMethods())
return true;
- m_libUdev.setFileNameAndVersion(QStringLiteral("udev"), 0);
+ m_libUdev.setFileNameAndVersion(QStringLiteral("@udev@/lib/libudev"), 0);
+ m_libUdev.setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 0);
m_loaded = m_libUdev.load();
return resolveMethods();
}

View file

@ -16,10 +16,10 @@ index 09940ab..45460f9 100644
{
if (!udevLibrary->isLoaded()) {
- udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 1);
+ udevLibrary->setFileNameAndVersion(QStringLiteral("@udev@/lib/libudev"), 1);
+ udevLibrary->setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 1);
if (!udevLibrary->load()) {
- udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 0);
+ udevLibrary->setFileNameAndVersion(QStringLiteral("@udev@/lib/libudev"), 0);
+ udevLibrary->setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 0);
if (!udevLibrary->load()) {
qWarning("Failed to load the library: %s, supported version(s): %i and %i", qPrintable(udevLibrary->fileName()), 1, 0);
return false;

View file

@ -10,8 +10,8 @@ diff -uNr qt-everywhere-opensource-src-5.3.2.orig/qtbase/mkspecs/common/linux.co
QMAKE_LIBDIR_X11 =
-QMAKE_INCDIR_OPENGL =
-QMAKE_LIBDIR_OPENGL =
+QMAKE_INCDIR_OPENGL = @mesa@/include
+QMAKE_LIBDIR_OPENGL = @mesa@/lib
+QMAKE_INCDIR_OPENGL = @mesa_inc@/include
+QMAKE_LIBDIR_OPENGL = @mesa_lib@/lib
QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL
QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL
QMAKE_INCDIR_EGL =

View file

@ -15,6 +15,7 @@
, bison2
, mesa_noglu
, libudev
, cups
, gnome
@ -214,13 +215,18 @@ let
serialport = callPackage
(
{ qtSubmodule, base }:
{ qtSubmodule, base, substituteAll }:
qtSubmodule {
name = "qtserialport";
qtInputs = [ base ];
patchFlags = "-p2"; # patches originally for monolithic build
patches = [ ./0009-dlopen-serialport-udev.patch ];
patches = [
(substituteAll {
src = ./0009-dlopen-serialport-udev.patch;
libudev = libudev.out;
})
];
}
)
{};
@ -268,7 +274,7 @@ let
(
{ qtSubmodule, declarative, location, multimedia, sensors
, fontconfig, gdk_pixbuf, gtk, libwebp, libxml2, libxslt
, sqlite, udev
, sqlite, libudev
, bison2, flex, gdb, gperf, perl, pkgconfig, python, ruby
, substituteAll
, flashplayerFix ? false
@ -287,21 +293,22 @@ let
(substituteAll
{
src = ./0002-dlopen-webkit-nsplugin.patch;
inherit gtk gdk_pixbuf;
gtk = gtk.out;
gdk_pixbuf = gdk_pixbuf.out;
}
)
++ optional flashplayerFix
(substituteAll
{
src = ./0007-dlopen-webkit-gtk.patch;
inherit gtk;
gtk = gtk.out;
}
)
++ [
(substituteAll
{
src = ./0008-dlopen-webkit-udev.patch;
inherit udev;
libudev = libudev.out;
}
)
];

View file

@ -44,8 +44,8 @@ stdenv.mkDerivation {
substituteInPlace qtbase/configure --replace /bin/pwd pwd
substituteInPlace qtbase/src/corelib/global/global.pri --replace /bin/ls ${coreutils}/bin/ls
substituteInPlace qtbase/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp \
--replace /usr/share/X11/locale ${libX11}/share/X11/locale \
--replace /usr/lib/X11/locale ${libX11}/share/X11/locale
--replace /usr/share/X11/locale ${libX11.out}/share/X11/locale \
--replace /usr/lib/X11/locale ${libX11.out}/share/X11/locale
sed -e 's@/\(usr\|opt\)/@/var/empty/@g' -i config.tests/*/*.test -i qtbase/mkspecs/*/*.conf
'';
@ -54,25 +54,27 @@ stdenv.mkDerivation {
(substituteAll {
src = ./0001-dlopen-gtkstyle.patch;
# substituteAll ignores env vars starting with capital letter
gconf = GConf;
inherit gnome_vfs libgnomeui gtk;
gconf = GConf.out;
gtk = gtk.out;
libgnomeui = libgnomeui.out;
gnome_vfs = gnome_vfs.out;
})
++ [
(substituteAll {
src = ./0004-dlopen-resolv.patch;
glibc = stdenv.cc.libc;
glibc = stdenv.cc.libc.out;
})
(substituteAll {
src = ./0005-dlopen-gl.patch;
openglDriver = if mesaSupported then mesa.driverLink else "/no-such-path";
})
./0006-tzdir.patch
(substituteAll { src = ./0010-dlopen-libXcursor.patch; inherit libXcursor; })
(substituteAll { src = ./0011-dlopen-openssl.patch; inherit openssl; })
(substituteAll { src = ./0012-dlopen-dbus.patch; dbus_libs = dbus; })
(substituteAll { src = ./0010-dlopen-libXcursor.patch; libXcursor = libXcursor.out; })
(substituteAll { src = ./0011-dlopen-openssl.patch; openssl = openssl.out; })
(substituteAll { src = ./0012-dlopen-dbus.patch; dbus_libs = dbus.libs.out; })
./0013-xdg_config_dirs.patch
] ++ optional mesaSupported
(substituteAll { src = ./0014-mkspecs-libgl.patch; inherit mesa; })
(substituteAll { src = ./0014-mkspecs-libgl.patch; mesa_inc = mesa.dev; mesa_lib = mesa.out; })
++ (optional decryptSslTraffic ./0100-ssl.patch);
preConfigure = ''

View file

@ -10,8 +10,8 @@ diff -uNr qt-everywhere-opensource-src-5.3.2.orig/qtbase/mkspecs/common/linux.co
QMAKE_LIBDIR_X11 =
-QMAKE_INCDIR_OPENGL =
-QMAKE_LIBDIR_OPENGL =
+QMAKE_INCDIR_OPENGL = @mesa@/include
+QMAKE_LIBDIR_OPENGL = @mesa@/lib
+QMAKE_INCDIR_OPENGL = @mesa_inc@/include
+QMAKE_LIBDIR_OPENGL = @mesa_lib@/lib
QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL
QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL
QMAKE_INCDIR_EGL =

View file

@ -48,8 +48,8 @@ stdenv.mkDerivation {
substituteInPlace qtbase/configure --replace /bin/pwd pwd
substituteInPlace qtbase/src/corelib/global/global.pri --replace /bin/ls ${coreutils}/bin/ls
substituteInPlace qtbase/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp \
--replace /usr/share/X11/locale ${libX11}/share/X11/locale \
--replace /usr/lib/X11/locale ${libX11}/share/X11/locale
--replace /usr/share/X11/locale ${libX11.out}/share/X11/locale \
--replace /usr/lib/X11/locale ${libX11.out}/share/X11/locale
sed -e 's@/\(usr\|opt\)/@/var/empty/@g' -i config.tests/*/*.test -i qtbase/mkspecs/*/*.conf
'';
@ -57,12 +57,14 @@ stdenv.mkDerivation {
let dlopen-gtkstyle = substituteAll {
src = ./0001-dlopen-gtkstyle.patch;
# substituteAll ignores env vars starting with capital letter
gconf = GConf;
inherit gnome_vfs libgnomeui gtk;
gconf = GConf.out;
gtk = gtk.out;
libgnomeui = libgnomeui.out;
gnome_vfs = gnome_vfs.out;
};
dlopen-resolv = substituteAll {
src = ./0002-dlopen-resolv.patch;
glibc = stdenv.cc.libc;
glibc = stdenv.cc.libc.out;
};
dlopen-gl = substituteAll {
src = ./0003-dlopen-gl.patch;
@ -71,21 +73,22 @@ stdenv.mkDerivation {
tzdir = ./0004-tzdir.patch;
dlopen-libXcursor = substituteAll {
src = ./0005-dlopen-libXcursor.patch;
inherit libXcursor;
libXcursor = libXcursor.out;
};
dlopen-openssl = substituteAll {
src = ./0006-dlopen-openssl.patch;
inherit openssl;
openssl = openssl.out;
};
dlopen-dbus = substituteAll {
src = ./0007-dlopen-dbus.patch;
dbus_libs = dbus;
dbus_libs = dbus.libs.out;
};
xdg-config-dirs = ./0008-xdg-config-dirs.patch;
decrypt-ssl-traffic = ./0009-decrypt-ssl-traffic.patch;
mkspecs-libgl = substituteAll {
src = ./0014-mkspecs-libgl.patch;
inherit mesa;
mesa_inc = mesa.dev;
mesa_lib = mesa.out;
};
in [
dlopen-resolv dlopen-gl tzdir dlopen-libXcursor dlopen-openssl

View file

@ -16,10 +16,10 @@ index 6f2cabd..81b9849 100644
{
if (!udevLibrary->isLoaded()) {
- udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 1);
+ udevLibrary->setFileNameAndVersion(QStringLiteral("@udev@/lib/libudev"), 1);
+ udevLibrary->setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 1);
if (!udevLibrary->load()) {
- udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 0);
+ udevLibrary->setFileNameAndVersion(QStringLiteral("@udev@/lib/libudev"), 0);
+ udevLibrary->setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 0);
if (!udevLibrary->load()) {
qWarning("Failed to load the library: %s, supported version(s): %i and %i", qPrintable(udevLibrary->fileName()), 1, 0);
return false;

View file

@ -1,7 +1,12 @@
{ qtSubmodule, qtbase }:
{ qtSubmodule, qtbase, substituteAll, libudev }:
qtSubmodule {
name = "qtserialport";
qtInputs = [ qtbase ];
patches = [ ./0001-dlopen-serialport-udev.patch ];
patches = [
(substituteAll {
src = ./0001-dlopen-serialport-udev.patch;
libudev = libudev.out;
})
];
}

View file

@ -16,13 +16,13 @@ index 60ff317..da8ac69 100644
{
m_libUdev.setLoadHints(QLibrary::ResolveAllSymbolsHint);
- m_libUdev.setFileNameAndVersion(QStringLiteral("udev"), 1);
+ m_libUdev.setFileNameAndVersion(QStringLiteral("@udev@/lib/libudev"), 1);
+ m_libUdev.setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 1);
m_loaded = m_libUdev.load();
if (resolveMethods())
return true;
- m_libUdev.setFileNameAndVersion(QStringLiteral("udev"), 0);
+ m_libUdev.setFileNameAndVersion(QStringLiteral("@udev@/lib/libudev"), 0);
+ m_libUdev.setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 0);
m_loaded = m_libUdev.load();
return resolveMethods();
}

View file

@ -1,6 +1,6 @@
{ qtSubmodule, stdenv, qtdeclarative, qtlocation, qtmultimedia, qtsensors
, fontconfig, gdk_pixbuf, gtk, libwebp, libxml2, libxslt
, sqlite, udev
, sqlite, libudev
, bison2, flex, gdb, gperf, perl, pkgconfig, python, ruby
, substituteAll
, flashplayerFix ? false
@ -18,15 +18,16 @@ qtSubmodule {
patches =
let dlopen-webkit-nsplugin = substituteAll {
src = ./0001-dlopen-webkit-nsplugin.patch;
inherit gtk gdk_pixbuf;
gtk = gtk.out;
gdk_pixbuf = gdk_pixbuf.out;
};
dlopen-webkit-gtk = substituteAll {
src = ./0002-dlopen-webkit-gtk.patch;
inherit gtk;
gtk = gtk.out;
};
dlopen-webkit-udev = substituteAll {
src = ./0003-dlopen-webkit-udev.patch;
inherit udev;
libudev = libudev.out;
};
in optionals flashplayerFix [ dlopen-webkit-nsplugin dlopen-webkit-gtk ]
++ [ dlopen-webkit-udev ];