From ff8fa7e397a92faaeb60e78fdc1bcef5a3eab8bf Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sat, 15 Apr 2017 11:34:00 -0500 Subject: [PATCH] qt58.qtbase: Fix path to libXcursor --- .../libraries/qt-5/5.8/qtbase/default.nix | 4 +--- .../qt-5/5.8/qtbase/dlopen-libXcursor.patch | 15 +++++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/pkgs/development/libraries/qt-5/5.8/qtbase/default.nix b/pkgs/development/libraries/qt-5/5.8/qtbase/default.nix index 3e667d5cc40d..3bcbf0caf406 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtbase/default.nix +++ b/pkgs/development/libraries/qt-5/5.8/qtbase/default.nix @@ -56,9 +56,6 @@ stdenv.mkDerivation { substituteInPlace src/network/ssl/qsslsocket_openssl_symbols.cpp \ --replace "@openssl@" "${openssl.out}" '' + lib.optionalString stdenv.isLinux '' - substituteInPlace src/plugins/platforms/xcb/qxcbcursor.cpp \ - --replace "@libXcursor@" "${libXcursor.out}" - substituteInPlace src/dbus/qdbus_symbols.cpp \ --replace "@dbus_libs@" "${dbus.lib}" '' @@ -225,6 +222,7 @@ stdenv.mkDerivation { "-Wno-error=sign-compare" ''-DNIXPKGS_QTCOMPOSE="${libX11.out}/share/X11/locale"'' ''-DNIXPKGS_LIBRESOLV="${stdenv.cc.libc.out}/lib/libresolv"'' + ''-DNIXPKGS_LIBXCURSOR="${libXcursor.out}/lib/libXcursor"'' ] ++ lib.optionals stdenv.isDarwin [ diff --git a/pkgs/development/libraries/qt-5/5.8/qtbase/dlopen-libXcursor.patch b/pkgs/development/libraries/qt-5/5.8/qtbase/dlopen-libXcursor.patch index 02b7efb73d22..d0e82cf122ac 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtbase/dlopen-libXcursor.patch +++ b/pkgs/development/libraries/qt-5/5.8/qtbase/dlopen-libXcursor.patch @@ -1,17 +1,20 @@ -Index: qtbase-opensource-src-5.7.0/src/plugins/platforms/xcb/qxcbcursor.cpp +Index: qtbase-opensource-src-5.8.0/src/plugins/platforms/xcb/qxcbcursor.cpp =================================================================== ---- qtbase-opensource-src-5.7.0.orig/src/plugins/platforms/xcb/qxcbcursor.cpp -+++ qtbase-opensource-src-5.7.0/src/plugins/platforms/xcb/qxcbcursor.cpp -@@ -309,10 +309,10 @@ QXcbCursor::QXcbCursor(QXcbConnection *c +--- qtbase-opensource-src-5.8.0.orig/src/plugins/platforms/xcb/qxcbcursor.cpp ++++ qtbase-opensource-src-5.8.0/src/plugins/platforms/xcb/qxcbcursor.cpp +@@ -309,13 +309,13 @@ QXcbCursor::QXcbCursor(QXcbConnection *c #if defined(XCB_USE_XLIB) && !defined(QT_NO_LIBRARY) static bool function_ptrs_not_initialized = true; if (function_ptrs_not_initialized) { - QLibrary xcursorLib(QLatin1String("Xcursor"), 1); -+ QLibrary xcursorLib(QLatin1String("@libXcursor@/lib/libXcursor"), 1); ++ QLibrary xcursorLib(QLatin1String(NIXPKGS_LIBXCURSOR), 1); bool xcursorFound = xcursorLib.load(); if (!xcursorFound) { // try without the version number - xcursorLib.setFileName(QLatin1String("Xcursor")); -+ xcursorLib.setFileName(QLatin1String("@libXcursor@/lib/Xcursor")); ++ xcursorLib.setFileName(QLatin1String(NIXPKGS_LIBXCURSOR)); xcursorFound = xcursorLib.load(); } if (xcursorFound) { + ptrXcursorLibraryLoadCursor = + (PtrXcursorLibraryLoadCursor) xcursorLib.resolve("XcursorLibraryLoadCursor"); + ptrXcursorLibraryGetTheme =