forked from Bitcoin-ABC/bitcoin-abc
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: ``` We noticed that we could build QT without using XLib/libX11 as a library. XLib/libX11's headers are still used, and a minimal configure.ac has been added to eliminate overly-enthusiastic configure-time dependencies that aren't actually required to obtain the headers. This also means that we eliminate XLib/libX11 as required shared libraries at runtime, which is desirable. ``` Backport of core [[bitcoin/bitcoin#16408 | PR16408]]. Depends on D5632. Test Plan: Run the Gitian builds. Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D5636
- Loading branch information
Showing
11 changed files
with
77 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
From 9563cef873ae82e06f60708d706d054717e801ce Mon Sep 17 00:00:00 2001 | ||
From: Carl Dong <contact@carldong.me> | ||
Date: Thu, 18 Jul 2019 17:22:05 -0400 | ||
Subject: [PATCH] Wrap xlib related code blocks in #if's | ||
|
||
They are not necessary to compile QT. | ||
--- | ||
qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp | 8 ++++++++ | ||
1 file changed, 8 insertions(+) | ||
|
||
diff --git a/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp b/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp | ||
index 7c62c2e2b3..c05c6c0a07 100644 | ||
--- a/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp | ||
+++ b/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp | ||
@@ -49,7 +49,9 @@ | ||
#include <QtGui/QWindow> | ||
#include <QtGui/QBitmap> | ||
#include <QtGui/private/qguiapplication_p.h> | ||
+#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library) | ||
#include <X11/cursorfont.h> | ||
+#endif | ||
#include <xcb/xfixes.h> | ||
#include <xcb/xcb_image.h> | ||
|
||
@@ -384,6 +386,7 @@ void QXcbCursor::changeCursor(QCursor *cursor, QWindow *widget) | ||
w->setCursor(c, isBitmapCursor); | ||
} | ||
|
||
+#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library) | ||
static int cursorIdForShape(int cshape) | ||
{ | ||
int cursorId = 0; | ||
@@ -437,6 +440,7 @@ static int cursorIdForShape(int cshape) | ||
} | ||
return cursorId; | ||
} | ||
+#endif | ||
|
||
xcb_cursor_t QXcbCursor::createNonStandardCursor(int cshape) | ||
{ | ||
@@ -558,7 +562,9 @@ static xcb_cursor_t loadCursor(void *dpy, int cshape) | ||
xcb_cursor_t QXcbCursor::createFontCursor(int cshape) | ||
{ | ||
xcb_connection_t *conn = xcb_connection(); | ||
+#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library) | ||
int cursorId = cursorIdForShape(cshape); | ||
+#endif | ||
xcb_cursor_t cursor = XCB_NONE; | ||
|
||
// Try Xcursor first | ||
@@ -589,6 +595,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape) | ||
// Non-standard X11 cursors are created from bitmaps | ||
cursor = createNonStandardCursor(cshape); | ||
|
||
+#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library) | ||
// Create a glpyh cursor if everything else failed | ||
if (!cursor && cursorId) { | ||
cursor = xcb_generate_id(conn); | ||
@@ -596,6 +603,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape) | ||
cursorId, cursorId + 1, | ||
0xFFFF, 0xFFFF, 0xFFFF, 0, 0, 0); | ||
} | ||
+#endif | ||
|
||
if (cursor && cshape >= 0 && cshape < Qt::LastCursor && connection()->hasXFixes()) { | ||
const char *name = cursorNames[cshape]; | ||
-- | ||
2.22.0 | ||
|