qt56: purge all refrences to gtk, solves all of the theme problems
This commit is contained in:
parent
06536879e7
commit
dd3e27f2e7
@ -66,8 +66,6 @@ let
|
|||||||
mesa = pkgs.mesa_noglu;
|
mesa = pkgs.mesa_noglu;
|
||||||
harfbuzz = pkgs.harfbuzz-icu;
|
harfbuzz = pkgs.harfbuzz-icu;
|
||||||
cups = if stdenv.isLinux then pkgs.cups else null;
|
cups = if stdenv.isLinux then pkgs.cups else null;
|
||||||
# GNOME dependencies are not used unless gtkStyle == true
|
|
||||||
inherit (pkgs.gnome) libgnomeui GConf gnome_vfs;
|
|
||||||
bison = pkgs.bison2; # error: too few arguments to function 'int yylex(...
|
bison = pkgs.bison2; # error: too few arguments to function 'int yylex(...
|
||||||
inherit developerBuild decryptSslTraffic;
|
inherit developerBuild decryptSslTraffic;
|
||||||
};
|
};
|
||||||
|
@ -19,15 +19,11 @@
|
|||||||
, buildExamples ? false
|
, buildExamples ? false
|
||||||
, buildTests ? false
|
, buildTests ? false
|
||||||
, developerBuild ? false
|
, developerBuild ? false
|
||||||
, libgnomeui, GConf, gnome_vfs, gtk
|
|
||||||
, decryptSslTraffic ? false
|
, decryptSslTraffic ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
system-x86_64 = lib.elem stdenv.system lib.platforms.x86_64;
|
system-x86_64 = lib.elem stdenv.system lib.platforms.x86_64;
|
||||||
|
|
||||||
# Search path for Gtk plugin
|
|
||||||
gtkLibPath = lib.makeLibraryPath [ gtk gnome_vfs libgnomeui GConf ];
|
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
@ -35,7 +31,7 @@ stdenv.mkDerivation {
|
|||||||
name = "qtbase-${srcs.qtbase.version}";
|
name = "qtbase-${srcs.qtbase.version}";
|
||||||
inherit (srcs.qtbase) src version;
|
inherit (srcs.qtbase) src version;
|
||||||
|
|
||||||
outputs = [ "dev" "out" "gtk" ];
|
outputs = [ "dev" "out" ];
|
||||||
|
|
||||||
patches =
|
patches =
|
||||||
copyPathsToStore (lib.readPathsFromFile ./. ./series)
|
copyPathsToStore (lib.readPathsFromFile ./. ./series)
|
||||||
@ -127,7 +123,6 @@ stdenv.mkDerivation {
|
|||||||
-xcb
|
-xcb
|
||||||
-qpa xcb
|
-qpa xcb
|
||||||
-${lib.optionalString (cups == null) "no-"}cups
|
-${lib.optionalString (cups == null) "no-"}cups
|
||||||
-gtkstyle
|
|
||||||
|
|
||||||
-no-eglfs
|
-no-eglfs
|
||||||
-no-directfb
|
-no-directfb
|
||||||
@ -189,9 +184,7 @@ stdenv.mkDerivation {
|
|||||||
++ lib.optional developerBuild gdb
|
++ lib.optional developerBuild gdb
|
||||||
++ lib.optional (cups != null) cups
|
++ lib.optional (cups != null) cups
|
||||||
++ lib.optional (mysql != null) mysql.lib
|
++ lib.optional (mysql != null) mysql.lib
|
||||||
++ lib.optional (postgresql != null) postgresql
|
++ lib.optional (postgresql != null) postgresql;
|
||||||
# FIXME: move to the main list on rebuild.
|
|
||||||
++ [gnome_vfs.out libgnomeui.out gtk GConf];
|
|
||||||
|
|
||||||
nativeBuildInputs = [ lndir patchelf perl pkgconfig python ];
|
nativeBuildInputs = [ lndir patchelf perl pkgconfig python ];
|
||||||
|
|
||||||
@ -216,22 +209,6 @@ stdenv.mkDerivation {
|
|||||||
# The destination directory must exist or moveToOutput will do nothing
|
# The destination directory must exist or moveToOutput will do nothing
|
||||||
mkdir -p "$dev/share"
|
mkdir -p "$dev/share"
|
||||||
moveToOutput "share/doc" "$dev"
|
moveToOutput "share/doc" "$dev"
|
||||||
|
|
||||||
# Move the QGtkStyle plugin to the gtk output
|
|
||||||
mkdir -p "$gtk/lib/qt5/plugins/platformthemes"
|
|
||||||
mv "$out/lib/qt5/plugins/platformthemes/libqgtk2.so" "$gtk/lib/qt5/plugins/platformthemes"
|
|
||||||
rm "$out/lib/cmake/Qt5Gui/Qt5Gui_QGtk2ThemePlugin.cmake"
|
|
||||||
|
|
||||||
# Set RPATH for QGtkStyle plugin
|
|
||||||
qgtk2="$gtk/lib/qt5/plugins/platformthemes/libqgtk2.so"
|
|
||||||
qgtk2_RPATH="$(patchelf --print-rpath "$qgtk2")"
|
|
||||||
qgtk2_RPATH="$qgtk2_RPATH''${qgtk2_RPATH:+:}${gtkLibPath}"
|
|
||||||
patchelf "$qgtk2" \
|
|
||||||
--add-needed libgtk-x11-2.0.so \
|
|
||||||
--add-needed libgnomeui-2.so \
|
|
||||||
--add-needed libgnomevfs-2.so \
|
|
||||||
--add-needed libgconf-2.so \
|
|
||||||
--set-rpath "$qgtk2_RPATH"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postFixup =
|
postFixup =
|
||||||
|
@ -1,50 +0,0 @@
|
|||||||
Index: qtbase-opensource-src-5.5.1/src/widgets/styles/qgtk2painter.cpp
|
|
||||||
===================================================================
|
|
||||||
--- qtbase-opensource-src-5.5.1.orig/src/widgets/styles/qgtk2painter.cpp
|
|
||||||
+++ qtbase-opensource-src-5.5.1/src/widgets/styles/qgtk2painter.cpp
|
|
||||||
@@ -96,7 +96,7 @@ static void initGtk()
|
|
||||||
static bool initialized = false;
|
|
||||||
if (!initialized) {
|
|
||||||
// enforce the "0" suffix, so we'll open libgtk-x11-2.0.so.0
|
|
||||||
- QLibrary libgtk(QLS("gtk-x11-2.0"), 0, 0);
|
|
||||||
+ QLibrary libgtk(QLS("@gtk@/lib/libgtk-x11-2.0"), 0, 0);
|
|
||||||
|
|
||||||
QGtk2PainterPrivate::gdk_pixmap_new = (Ptr_gdk_pixmap_new)libgtk.resolve("gdk_pixmap_new");
|
|
||||||
QGtk2PainterPrivate::gdk_pixbuf_get_from_drawable = (Ptr_gdk_pixbuf_get_from_drawable)libgtk.resolve("gdk_pixbuf_get_from_drawable");
|
|
||||||
Index: qtbase-opensource-src-5.5.1/src/widgets/styles/qgtkstyle_p.cpp
|
|
||||||
===================================================================
|
|
||||||
--- qtbase-opensource-src-5.5.1.orig/src/widgets/styles/qgtkstyle_p.cpp
|
|
||||||
+++ qtbase-opensource-src-5.5.1/src/widgets/styles/qgtkstyle_p.cpp
|
|
||||||
@@ -327,7 +327,7 @@ void QGtkStylePrivate::gtkWidgetSetFocus
|
|
||||||
void QGtkStylePrivate::resolveGtk() const
|
|
||||||
{
|
|
||||||
// enforce the "0" suffix, so we'll open libgtk-x11-2.0.so.0
|
|
||||||
- QLibrary libgtk(QLS("gtk-x11-2.0"), 0, 0);
|
|
||||||
+ QLibrary libgtk(QLS("@gtk@/lib/libgtk-x11-2.0"), 0, 0);
|
|
||||||
|
|
||||||
gtk_init = (Ptr_gtk_init)libgtk.resolve("gtk_init");
|
|
||||||
gtk_window_new = (Ptr_gtk_window_new)libgtk.resolve("gtk_window_new");
|
|
||||||
@@ -425,8 +425,8 @@ void QGtkStylePrivate::resolveGtk() cons
|
|
||||||
pango_font_description_get_family = (Ptr_pango_font_description_get_family)libgtk.resolve("pango_font_description_get_family");
|
|
||||||
pango_font_description_get_style = (Ptr_pango_font_description_get_style)libgtk.resolve("pango_font_description_get_style");
|
|
||||||
|
|
||||||
- gnome_icon_lookup_sync = (Ptr_gnome_icon_lookup_sync)QLibrary::resolve(QLS("gnomeui-2"), 0, "gnome_icon_lookup_sync");
|
|
||||||
- gnome_vfs_init= (Ptr_gnome_vfs_init)QLibrary::resolve(QLS("gnomevfs-2"), 0, "gnome_vfs_init");
|
|
||||||
+ gnome_icon_lookup_sync = (Ptr_gnome_icon_lookup_sync)QLibrary::resolve(QLS("@libgnomeui@/lib/libgnomeui-2"), 0, "gnome_icon_lookup_sync");
|
|
||||||
+ gnome_vfs_init= (Ptr_gnome_vfs_init)QLibrary::resolve(QLS("@gnome_vfs@/lib/libgnomevfs-2"), 0, "gnome_vfs_init");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* \internal
|
|
||||||
@@ -594,9 +594,9 @@ void QGtkStylePrivate::cleanupGtkWidgets
|
|
||||||
static bool resolveGConf()
|
|
||||||
{
|
|
||||||
if (!QGtkStylePrivate::gconf_client_get_default) {
|
|
||||||
- QGtkStylePrivate::gconf_client_get_default = (Ptr_gconf_client_get_default)QLibrary::resolve(QLS("gconf-2"), 4, "gconf_client_get_default");
|
|
||||||
- QGtkStylePrivate::gconf_client_get_string = (Ptr_gconf_client_get_string)QLibrary::resolve(QLS("gconf-2"), 4, "gconf_client_get_string");
|
|
||||||
- QGtkStylePrivate::gconf_client_get_bool = (Ptr_gconf_client_get_bool)QLibrary::resolve(QLS("gconf-2"), 4, "gconf_client_get_bool");
|
|
||||||
+ QGtkStylePrivate::gconf_client_get_default = (Ptr_gconf_client_get_default)QLibrary::resolve(QLS("@gconf@/lib/libgconf-2"), 4, "gconf_client_get_default");
|
|
||||||
+ QGtkStylePrivate::gconf_client_get_string = (Ptr_gconf_client_get_string)QLibrary::resolve(QLS("@gconf@/lib/libgconf-2"), 4, "gconf_client_get_string");
|
|
||||||
+ QGtkStylePrivate::gconf_client_get_bool = (Ptr_gconf_client_get_bool)QLibrary::resolve(QLS("@gconf@/lib/libgconf-2"), 4, "gconf_client_get_bool");
|
|
||||||
}
|
|
||||||
return (QGtkStylePrivate::gconf_client_get_default !=0);
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user