From 899e966fad8afa41e9208877b25bbb1284453aa7 Mon Sep 17 00:00:00 2001 From: Petr Hodina Date: Sun, 30 Oct 2022 14:21:33 +0100 Subject: [PATCH 3/8] gnu: qtbase-5: Apply qtbase-xcursor.patch. * gnu/packages/qt.scm (qtbase-5)[source]: Apply qtbase-xcursor.patch. * gnu/packages/patches/qtbase-xcursor.patch: New file. * gnu/local.mk: Add patch. diff --git a/gnu/local.mk b/gnu/local.mk index 2e2218334a..9a5b4643a3 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1753,6 +1753,7 @@ dist_patch_DATA = \ %D%/packages/patches/qtbase-assert.patch \ %D%/packages/patches/qtbase-moc-ignore-gcc-macro.patch \ %D%/packages/patches/qtbase-use-TZDIR.patch \ + %D%/packages/patches/qtbase-xcursor.patch \ %D%/packages/patches/qtscript-disable-tests.patch \ %D%/packages/patches/quagga-reproducible-build.patch \ %D%/packages/patches/quickswitch-fix-dmenu-check.patch \ diff --git a/gnu/packages/patches/qtbase-xcursor.patch b/gnu/packages/patches/qtbase-xcursor.patch new file mode 100644 index 0000000000..42b25661a5 --- /dev/null +++ b/gnu/packages/patches/qtbase-xcursor.patch @@ -0,0 +1,30 @@ +From 707098eada20ba074e642a73248de74407bc261c Mon Sep 17 00:00:00 2001 +From: Thomas Tuegel +Date: Tue, 17 Sep 2019 05:35:58 -0500 +Subject: [PATCH 07/11] qtbase-xcursor + +--- + src/plugins/platforms/xcb/qxcbcursor.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/plugins/platforms/xcb/qxcbcursor.cpp b/src/plugins/platforms/xcb/qxcbcursor.cpp +index 42c7a52bd4..ba670ddb44 100644 +--- a/src/plugins/platforms/xcb/qxcbcursor.cpp ++++ b/src/plugins/platforms/xcb/qxcbcursor.cpp +@@ -317,10 +317,10 @@ QXcbCursor::QXcbCursor(QXcbConnection *conn, QXcbScreen *screen) + #if QT_CONFIG(xcb_xlib) && QT_CONFIG(library) + static bool function_ptrs_not_initialized = true; + if (function_ptrs_not_initialized) { +- QLibrary xcursorLib(QLatin1String("Xcursor"), 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(NIXPKGS_LIBXCURSOR)); + xcursorFound = xcursorLib.load(); + } + if (xcursorFound) { +-- +2.25.4 + + diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 2a86506579..e4d8803655 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -299,6 +299,7 @@ (define-public qtbase-5 ;; Use TZDIR to avoid depending on package "tzdata". (patches (search-patches "qtbase-use-TZDIR.patch" "qtbase-assert.patch" + "qtbase-xcursor.patch" "qtbase-moc-ignore-gcc-macro.patch" "qtbase-absolute-runpath.patch")) (modules '((guix build utils))) @@ -422,6 +423,11 @@ (define-public qtbase-5 "-no-mips_dspr2")) #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'nixos-patches + (lambda _ + ;; qtbase-xcursor.patch + (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp" + (("NIXPKGS_LIBXCURSOR") (string-append "\"" #$libxcursor "/lib\""))))) (add-after 'configure 'patch-bin-sh (lambda _ (substitute* '("config.status" -- 2.37.2