diff options
author | Carl Dong <contact@carldong.me> | 2019-07-18 17:43:06 -0400 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2019-07-18 17:43:06 -0400 |
commit | 0c55d8b58186ba69fffc147cd02b174450dac578 (patch) | |
tree | fa16bd87dc3b9230dd9d6ec6f06de6ef1447b56c /depends/patches | |
parent | 222e6cc52075cf6f866ce4a2e5900f0d6358f903 (diff) |
depends: qt: Patch to remove dep on libX11
We can actually patch QT to remove its dependency on libX11's headers.
It turns it this wasn't that hard.
Diffstat (limited to 'depends/patches')
-rw-r--r-- | depends/patches/libX11/configure.ac | 6 | ||||
-rw-r--r-- | depends/patches/qt/no-xlib.patch | 69 |
2 files changed, 69 insertions, 6 deletions
diff --git a/depends/patches/libX11/configure.ac b/depends/patches/libX11/configure.ac deleted file mode 100644 index 1c3bd41b3f..0000000000 --- a/depends/patches/libX11/configure.ac +++ /dev/null @@ -1,6 +0,0 @@ -AC_PREREQ([2.60]) -AC_INIT([libX11], [1.6.2], - [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libX11]) -AM_INIT_AUTOMAKE([foreign]) -AC_CONFIG_FILES([include/Makefile]) -AC_OUTPUT diff --git a/depends/patches/qt/no-xlib.patch b/depends/patches/qt/no-xlib.patch new file mode 100644 index 0000000000..fe82c2c73c --- /dev/null +++ b/depends/patches/qt/no-xlib.patch @@ -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 + |