From dd3e27f2e72ec3da756df0382b2031eae9f900ce Mon Sep 17 00:00:00 2001 From: michael bishop Date: Fri, 29 Jul 2016 18:50:06 -0300 Subject: [PATCH] qt56: purge all refrences to gtk, solves all of the theme problems --- .../libraries/qt-5/5.6/default.nix | 2 - .../libraries/qt-5/5.6/qtbase/default.nix | 27 +--------- .../qt-5/5.6/qtbase/dlopen-gtkstyle.patch | 50 ------------------- 3 files changed, 2 insertions(+), 77 deletions(-) delete mode 100644 pkgs/development/libraries/qt-5/5.6/qtbase/dlopen-gtkstyle.patch diff --git a/pkgs/development/libraries/qt-5/5.6/default.nix b/pkgs/development/libraries/qt-5/5.6/default.nix index 3cc8c51909b7..94b75f1c18b9 100644 --- a/pkgs/development/libraries/qt-5/5.6/default.nix +++ b/pkgs/development/libraries/qt-5/5.6/default.nix @@ -66,8 +66,6 @@ let mesa = pkgs.mesa_noglu; harfbuzz = pkgs.harfbuzz-icu; 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(... inherit developerBuild decryptSslTraffic; }; diff --git a/pkgs/development/libraries/qt-5/5.6/qtbase/default.nix b/pkgs/development/libraries/qt-5/5.6/qtbase/default.nix index 14a89f82038d..82b54ebd3a11 100644 --- a/pkgs/development/libraries/qt-5/5.6/qtbase/default.nix +++ b/pkgs/development/libraries/qt-5/5.6/qtbase/default.nix @@ -19,15 +19,11 @@ , buildExamples ? false , buildTests ? false , developerBuild ? false -, libgnomeui, GConf, gnome_vfs, gtk , decryptSslTraffic ? false }: let 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 stdenv.mkDerivation { @@ -35,7 +31,7 @@ stdenv.mkDerivation { name = "qtbase-${srcs.qtbase.version}"; inherit (srcs.qtbase) src version; - outputs = [ "dev" "out" "gtk" ]; + outputs = [ "dev" "out" ]; patches = copyPathsToStore (lib.readPathsFromFile ./. ./series) @@ -127,7 +123,6 @@ stdenv.mkDerivation { -xcb -qpa xcb -${lib.optionalString (cups == null) "no-"}cups - -gtkstyle -no-eglfs -no-directfb @@ -189,9 +184,7 @@ stdenv.mkDerivation { ++ lib.optional developerBuild gdb ++ lib.optional (cups != null) cups ++ lib.optional (mysql != null) mysql.lib - ++ lib.optional (postgresql != null) postgresql - # FIXME: move to the main list on rebuild. - ++ [gnome_vfs.out libgnomeui.out gtk GConf]; + ++ lib.optional (postgresql != null) postgresql; nativeBuildInputs = [ lndir patchelf perl pkgconfig python ]; @@ -216,22 +209,6 @@ stdenv.mkDerivation { # The destination directory must exist or moveToOutput will do nothing mkdir -p "$dev/share" 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 = diff --git a/pkgs/development/libraries/qt-5/5.6/qtbase/dlopen-gtkstyle.patch b/pkgs/development/libraries/qt-5/5.6/qtbase/dlopen-gtkstyle.patch deleted file mode 100644 index 755b0965cf5f..000000000000 --- a/pkgs/development/libraries/qt-5/5.6/qtbase/dlopen-gtkstyle.patch +++ /dev/null @@ -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); - }