dash/depends/patches/qt/no-xlib.patch

62 lines
2.0 KiB
Diff
Raw Normal View History

Merge #16408: depends: Prune X packages 0c55d8b58186ba69fffc147cd02b174450dac578 depends: qt: Patch to remove dep on libX11 (Carl Dong) 222e6cc52075cf6f866ce4a2e5900f0d6358f903 gitignore: Actually pay attention to depends patches (Carl Dong) 65f8da08df601ac98bad6f638392343fd564c0b9 symbol-check: Disallow libX11-*.so.* shared libraries (Carl Dong) 924569914e6079763fd1692bed372ded2c63d685 depends: libXext isn't needed by anyone (Carl Dong) 689d3b4a030675b6de87a55463a8e155843293fb build-aux: Remove check for x11-xcb (Carl Dong) aa53cb7a2f04a59a4722c662e67b7a6ec04e32b5 depends: libX11: Make package headers-only (Carl Dong) 9a01ab04e1125b37618266d7fd1c3a6e3bb7e3f8 depends: qt: Explicitly stop using Xlib/libX11 (Carl Dong) 1ec30b8fbe4a162d6e2e6a9711d83f1bafd9b645 depends: xproto is only directly needed by libXau (Carl Dong) Pull request description: Related to: #16150 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. See commit messages for more details. --- Reviewers: I am least sure about the minimal `configure.ac`, as I'm not too familiar with the autoconf syntax. Any improvements w/re robustness would be welcome. ACKs for top commit: theuni: ACK 0c55d8b58186ba69fffc147cd02b174450dac578 fanquake: ACK 0c55d8b58186ba69fffc147cd02b174450dac578 Tree-SHA512: 41f653a0f91bc0e0faac49713c0c6dfd8cb605f9c4e34eb75a790dd808ebf3e5c160f1dd40bc8fbc911ee718ea319313b526d63733c98ff62d8dffecb58caa01
2019-07-23 08:22:06 +02:00
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.
--- 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>
@@ -391,6 +393,7 @@ void QXcbCursor::changeCursor(QCursor *cursor, QWindow *window)
2021-11-25 05:02:50 +01:00
xcb_flush(xcb_connection());
Merge #16408: depends: Prune X packages 0c55d8b58186ba69fffc147cd02b174450dac578 depends: qt: Patch to remove dep on libX11 (Carl Dong) 222e6cc52075cf6f866ce4a2e5900f0d6358f903 gitignore: Actually pay attention to depends patches (Carl Dong) 65f8da08df601ac98bad6f638392343fd564c0b9 symbol-check: Disallow libX11-*.so.* shared libraries (Carl Dong) 924569914e6079763fd1692bed372ded2c63d685 depends: libXext isn't needed by anyone (Carl Dong) 689d3b4a030675b6de87a55463a8e155843293fb build-aux: Remove check for x11-xcb (Carl Dong) aa53cb7a2f04a59a4722c662e67b7a6ec04e32b5 depends: libX11: Make package headers-only (Carl Dong) 9a01ab04e1125b37618266d7fd1c3a6e3bb7e3f8 depends: qt: Explicitly stop using Xlib/libX11 (Carl Dong) 1ec30b8fbe4a162d6e2e6a9711d83f1bafd9b645 depends: xproto is only directly needed by libXau (Carl Dong) Pull request description: Related to: #16150 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. See commit messages for more details. --- Reviewers: I am least sure about the minimal `configure.ac`, as I'm not too familiar with the autoconf syntax. Any improvements w/re robustness would be welcome. ACKs for top commit: theuni: ACK 0c55d8b58186ba69fffc147cd02b174450dac578 fanquake: ACK 0c55d8b58186ba69fffc147cd02b174450dac578 Tree-SHA512: 41f653a0f91bc0e0faac49713c0c6dfd8cb605f9c4e34eb75a790dd808ebf3e5c160f1dd40bc8fbc911ee718ea319313b526d63733c98ff62d8dffecb58caa01
2019-07-23 08:22:06 +02:00
}
+#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
static int cursorIdForShape(int cshape)
{
int cursorId = 0;
@@ -444,6 +447,7 @@ static int cursorIdForShape(int cshape)
Merge #16408: depends: Prune X packages 0c55d8b58186ba69fffc147cd02b174450dac578 depends: qt: Patch to remove dep on libX11 (Carl Dong) 222e6cc52075cf6f866ce4a2e5900f0d6358f903 gitignore: Actually pay attention to depends patches (Carl Dong) 65f8da08df601ac98bad6f638392343fd564c0b9 symbol-check: Disallow libX11-*.so.* shared libraries (Carl Dong) 924569914e6079763fd1692bed372ded2c63d685 depends: libXext isn't needed by anyone (Carl Dong) 689d3b4a030675b6de87a55463a8e155843293fb build-aux: Remove check for x11-xcb (Carl Dong) aa53cb7a2f04a59a4722c662e67b7a6ec04e32b5 depends: libX11: Make package headers-only (Carl Dong) 9a01ab04e1125b37618266d7fd1c3a6e3bb7e3f8 depends: qt: Explicitly stop using Xlib/libX11 (Carl Dong) 1ec30b8fbe4a162d6e2e6a9711d83f1bafd9b645 depends: xproto is only directly needed by libXau (Carl Dong) Pull request description: Related to: #16150 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. See commit messages for more details. --- Reviewers: I am least sure about the minimal `configure.ac`, as I'm not too familiar with the autoconf syntax. Any improvements w/re robustness would be welcome. ACKs for top commit: theuni: ACK 0c55d8b58186ba69fffc147cd02b174450dac578 fanquake: ACK 0c55d8b58186ba69fffc147cd02b174450dac578 Tree-SHA512: 41f653a0f91bc0e0faac49713c0c6dfd8cb605f9c4e34eb75a790dd808ebf3e5c160f1dd40bc8fbc911ee718ea319313b526d63733c98ff62d8dffecb58caa01
2019-07-23 08:22:06 +02:00
}
return cursorId;
}
+#endif
xcb_cursor_t QXcbCursor::createNonStandardCursor(int cshape)
{
@@ -558,7 +562,9 @@ static xcb_cursor_t loadCursor(void *dpy, int cshape)
Merge #16408: depends: Prune X packages 0c55d8b58186ba69fffc147cd02b174450dac578 depends: qt: Patch to remove dep on libX11 (Carl Dong) 222e6cc52075cf6f866ce4a2e5900f0d6358f903 gitignore: Actually pay attention to depends patches (Carl Dong) 65f8da08df601ac98bad6f638392343fd564c0b9 symbol-check: Disallow libX11-*.so.* shared libraries (Carl Dong) 924569914e6079763fd1692bed372ded2c63d685 depends: libXext isn't needed by anyone (Carl Dong) 689d3b4a030675b6de87a55463a8e155843293fb build-aux: Remove check for x11-xcb (Carl Dong) aa53cb7a2f04a59a4722c662e67b7a6ec04e32b5 depends: libX11: Make package headers-only (Carl Dong) 9a01ab04e1125b37618266d7fd1c3a6e3bb7e3f8 depends: qt: Explicitly stop using Xlib/libX11 (Carl Dong) 1ec30b8fbe4a162d6e2e6a9711d83f1bafd9b645 depends: xproto is only directly needed by libXau (Carl Dong) Pull request description: Related to: #16150 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. See commit messages for more details. --- Reviewers: I am least sure about the minimal `configure.ac`, as I'm not too familiar with the autoconf syntax. Any improvements w/re robustness would be welcome. ACKs for top commit: theuni: ACK 0c55d8b58186ba69fffc147cd02b174450dac578 fanquake: ACK 0c55d8b58186ba69fffc147cd02b174450dac578 Tree-SHA512: 41f653a0f91bc0e0faac49713c0c6dfd8cb605f9c4e34eb75a790dd808ebf3e5c160f1dd40bc8fbc911ee718ea319313b526d63733c98ff62d8dffecb58caa01
2019-07-23 08:22:06 +02:00
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;
#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
@@ -590,6 +596,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
Merge #16408: depends: Prune X packages 0c55d8b58186ba69fffc147cd02b174450dac578 depends: qt: Patch to remove dep on libX11 (Carl Dong) 222e6cc52075cf6f866ce4a2e5900f0d6358f903 gitignore: Actually pay attention to depends patches (Carl Dong) 65f8da08df601ac98bad6f638392343fd564c0b9 symbol-check: Disallow libX11-*.so.* shared libraries (Carl Dong) 924569914e6079763fd1692bed372ded2c63d685 depends: libXext isn't needed by anyone (Carl Dong) 689d3b4a030675b6de87a55463a8e155843293fb build-aux: Remove check for x11-xcb (Carl Dong) aa53cb7a2f04a59a4722c662e67b7a6ec04e32b5 depends: libX11: Make package headers-only (Carl Dong) 9a01ab04e1125b37618266d7fd1c3a6e3bb7e3f8 depends: qt: Explicitly stop using Xlib/libX11 (Carl Dong) 1ec30b8fbe4a162d6e2e6a9711d83f1bafd9b645 depends: xproto is only directly needed by libXau (Carl Dong) Pull request description: Related to: #16150 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. See commit messages for more details. --- Reviewers: I am least sure about the minimal `configure.ac`, as I'm not too familiar with the autoconf syntax. Any improvements w/re robustness would be welcome. ACKs for top commit: theuni: ACK 0c55d8b58186ba69fffc147cd02b174450dac578 fanquake: ACK 0c55d8b58186ba69fffc147cd02b174450dac578 Tree-SHA512: 41f653a0f91bc0e0faac49713c0c6dfd8cb605f9c4e34eb75a790dd808ebf3e5c160f1dd40bc8fbc911ee718ea319313b526d63733c98ff62d8dffecb58caa01
2019-07-23 08:22:06 +02:00
// Non-standard X11 cursors are created from bitmaps
cursor = createNonStandardCursor(cshape);
2023-08-03 13:45:17 +02:00
Merge #16408: depends: Prune X packages 0c55d8b58186ba69fffc147cd02b174450dac578 depends: qt: Patch to remove dep on libX11 (Carl Dong) 222e6cc52075cf6f866ce4a2e5900f0d6358f903 gitignore: Actually pay attention to depends patches (Carl Dong) 65f8da08df601ac98bad6f638392343fd564c0b9 symbol-check: Disallow libX11-*.so.* shared libraries (Carl Dong) 924569914e6079763fd1692bed372ded2c63d685 depends: libXext isn't needed by anyone (Carl Dong) 689d3b4a030675b6de87a55463a8e155843293fb build-aux: Remove check for x11-xcb (Carl Dong) aa53cb7a2f04a59a4722c662e67b7a6ec04e32b5 depends: libX11: Make package headers-only (Carl Dong) 9a01ab04e1125b37618266d7fd1c3a6e3bb7e3f8 depends: qt: Explicitly stop using Xlib/libX11 (Carl Dong) 1ec30b8fbe4a162d6e2e6a9711d83f1bafd9b645 depends: xproto is only directly needed by libXau (Carl Dong) Pull request description: Related to: #16150 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. See commit messages for more details. --- Reviewers: I am least sure about the minimal `configure.ac`, as I'm not too familiar with the autoconf syntax. Any improvements w/re robustness would be welcome. ACKs for top commit: theuni: ACK 0c55d8b58186ba69fffc147cd02b174450dac578 fanquake: ACK 0c55d8b58186ba69fffc147cd02b174450dac578 Tree-SHA512: 41f653a0f91bc0e0faac49713c0c6dfd8cb605f9c4e34eb75a790dd808ebf3e5c160f1dd40bc8fbc911ee718ea319313b526d63733c98ff62d8dffecb58caa01
2019-07-23 08:22:06 +02:00
+#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
// Create a glpyh cursor if everything else failed
if (!cursor && cursorId) {
cursor = xcb_generate_id(conn);
@@ -597,6 +604,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
Merge #16408: depends: Prune X packages 0c55d8b58186ba69fffc147cd02b174450dac578 depends: qt: Patch to remove dep on libX11 (Carl Dong) 222e6cc52075cf6f866ce4a2e5900f0d6358f903 gitignore: Actually pay attention to depends patches (Carl Dong) 65f8da08df601ac98bad6f638392343fd564c0b9 symbol-check: Disallow libX11-*.so.* shared libraries (Carl Dong) 924569914e6079763fd1692bed372ded2c63d685 depends: libXext isn't needed by anyone (Carl Dong) 689d3b4a030675b6de87a55463a8e155843293fb build-aux: Remove check for x11-xcb (Carl Dong) aa53cb7a2f04a59a4722c662e67b7a6ec04e32b5 depends: libX11: Make package headers-only (Carl Dong) 9a01ab04e1125b37618266d7fd1c3a6e3bb7e3f8 depends: qt: Explicitly stop using Xlib/libX11 (Carl Dong) 1ec30b8fbe4a162d6e2e6a9711d83f1bafd9b645 depends: xproto is only directly needed by libXau (Carl Dong) Pull request description: Related to: #16150 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. See commit messages for more details. --- Reviewers: I am least sure about the minimal `configure.ac`, as I'm not too familiar with the autoconf syntax. Any improvements w/re robustness would be welcome. ACKs for top commit: theuni: ACK 0c55d8b58186ba69fffc147cd02b174450dac578 fanquake: ACK 0c55d8b58186ba69fffc147cd02b174450dac578 Tree-SHA512: 41f653a0f91bc0e0faac49713c0c6dfd8cb605f9c4e34eb75a790dd808ebf3e5c160f1dd40bc8fbc911ee718ea319313b526d63733c98ff62d8dffecb58caa01
2019-07-23 08:22:06 +02:00
cursorId, cursorId + 1,
0xFFFF, 0xFFFF, 0xFFFF, 0, 0, 0);
}
+#endif
if (cursor && cshape >= 0 && cshape < Qt::LastCursor && connection()->hasXFixes()) {
2021-11-25 05:02:50 +01:00
const char *name = cursorNames[cshape].front();