Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13115781
D5636.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
11 KB
Subscribers
None
D5636.diff
View Options
diff --git a/.gitignore b/.gitignore
--- a/.gitignore
+++ b/.gitignore
@@ -76,7 +76,7 @@
# Only ignore unexpected patches
*.patch
-!depends/patches/*.patch
+!depends/patches/**/*.patch
#libtool object files
*.lo
diff --git a/build-aux/m4/bitcoin_qt.m4 b/build-aux/m4/bitcoin_qt.m4
--- a/build-aux/m4/bitcoin_qt.m4
+++ b/build-aux/m4/bitcoin_qt.m4
@@ -355,7 +355,6 @@
PKG_CHECK_MODULES([QTFB], [Qt5FbSupport], [QT_LIBS="-lQt5FbSupport $QT_LIBS"])
fi
if test "x$TARGET_OS" = xlinux; then
- PKG_CHECK_MODULES([X11XCB], [x11-xcb], [QT_LIBS="$X11XCB_LIBS $QT_LIBS"])
PKG_CHECK_MODULES([QTXCBQPA], [Qt5XcbQpa], [QT_LIBS="$QTXCBQPA_LIBS $QT_LIBS"])
elif test "x$TARGET_OS" = xdarwin; then
PKG_CHECK_MODULES([QTCLIPBOARD], [Qt5ClipboardSupport], [QT_LIBS="-lQt5ClipboardSupport $QT_LIBS"])
diff --git a/contrib/devtools/symbol-check.py b/contrib/devtools/symbol-check.py
--- a/contrib/devtools/symbol-check.py
+++ b/contrib/devtools/symbol-check.py
@@ -69,8 +69,6 @@
'ld-linux-aarch64.so.1', # 64-bit ARM dynamic linker
'ld-linux-armhf.so.3', # 32-bit ARM dynamic linker
# bitcoin-qt only
- 'libX11-xcb.so.1', # part of X11
- 'libX11.so.6', # part of X11
'libxcb.so.1', # part of X11
'libfontconfig.so.1', # font support
'libfreetype.so.6', # font parsing
diff --git a/depends/packages/libX11.mk b/depends/packages/libX11.mk
deleted file mode 100644
--- a/depends/packages/libX11.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-package=libX11
-$(package)_version=1.6.2
-$(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/
-$(package)_file_name=$(package)-$($(package)_version).tar.bz2
-$(package)_sha256_hash=2aa027e837231d2eeea90f3a4afe19948a6eb4c8b2bec0241eba7dbc8106bd16
-$(package)_dependencies=libxcb xtrans xextproto xproto
-
-define $(package)_set_vars
- # See libXext for --disable-malloc0returnsnull rationale.
- $(package)_config_opts=--disable-xkb --disable-static --disable-malloc0returnsnull
- $(package)_config_opts_linux=--with-pic
-endef
-
-define $(package)_config_cmds
- $($(package)_autoconf)
-endef
-
-define $(package)_build_cmds
- $(MAKE) -j$(JOBS)
-endef
-
-define $(package)_stage_cmds
- $(MAKE) DESTDIR=$($(package)_staging_dir) install
-endef
-
-define $(package)_postprocess_cmds
- rm lib/*.la
-endef
diff --git a/depends/packages/libXext.mk b/depends/packages/libXext.mk
deleted file mode 100644
--- a/depends/packages/libXext.mk
+++ /dev/null
@@ -1,49 +0,0 @@
-package=libXext
-$(package)_version=1.3.3
-$(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/
-$(package)_file_name=$(package)-$($(package)_version).tar.bz2
-$(package)_sha256_hash=b518d4d332231f313371fdefac59e3776f4f0823bcb23cf7c7305bfb57b16e35
-$(package)_dependencies=xproto xextproto libX11 libXau
-
-define $(package)_set_vars
- # A number of steps in the autoconfig process implicitly assume that the build
- # system and the host system are the same. For example, library components
- # want to build and run test programs to determine the behavior of certain
- # host system elements. This is clearly impossible when crosscompiling. To
- # work around these issues, the --enable-malloc0returnsnull (or
- # --disable-malloc0returnsnull, depending on the host system) must be passed
- # to configure.
- # -- https://www.x.org/wiki/CrossCompilingXorg/
- #
- # Concretely, between the releases of libXext 1.3.2 and 1.3.3,
- # XORG_CHECK_MALLOC_ZERO from xorg-macros was changed to use the autoconf
- # cache, expecting cross-compilation environments to seed this cache as there
- # is no single correct value when cross compiling (think uclibc, musl, etc.).
- # You can see the actual change in commit 72fdc868b56fe2b7bdc9a69872651baeca72
- # in the freedesktop/xorg-macros repo.
- #
- # As a result of this change, if we don't seed the cache and we don't use
- # either --{en,dis}able-malloc0returnsnull, the AC_RUN_IFELSE block has no
- # optional action-if-cross-compiling argument and configure prints an error
- # message and exits as documented in the autoconf manual. Prior to this
- # commit, the AC_RUN_IFELSE block had an action-if-cross-compiling argument
- # which set the more pessimistic default value MALLOC_ZERO_RETURNS_NULL=yes.
- # This is why the flag was not required prior to libXext 1.3.3.
- $(package)_config_opts=--disable-static --disable-malloc0returnsnull
-endef
-
-define $(package)_config_cmds
- $($(package)_autoconf)
-endef
-
-define $(package)_build_cmds
- $(MAKE) -j$(JOBS)
-endef
-
-define $(package)_stage_cmds
- $(MAKE) DESTDIR=$($(package)_staging_dir) install
-endef
-
-define $(package)_postprocess_cmds
- rm lib/*.la
-endef
diff --git a/depends/packages/libxcb.mk b/depends/packages/libxcb.mk
--- a/depends/packages/libxcb.mk
+++ b/depends/packages/libxcb.mk
@@ -3,7 +3,7 @@
$(package)_download_path=https://xcb.freedesktop.org/dist
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=98d9ab05b636dd088603b64229dd1ab2d2cc02ab807892e107d674f9c3f2d5b5
-$(package)_dependencies=xcb_proto libXau xproto
+$(package)_dependencies=xcb_proto libXau
define $(package)_set_vars
$(package)_config_opts=--disable-static
diff --git a/depends/packages/packages.mk b/depends/packages/packages.mk
--- a/depends/packages/packages.mk
+++ b/depends/packages/packages.mk
@@ -3,7 +3,7 @@
qt_native_packages = native_protobuf
qt_packages = qrencode protobuf zlib
-qt_linux_packages:=qt expat libxcb xcb_proto libXau xproto freetype fontconfig libX11 xextproto libXext xtrans
+qt_linux_packages:=qt expat libxcb xcb_proto libXau xproto freetype fontconfig
rapidcheck_packages = rapidcheck
diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk
--- a/depends/packages/qt.mk
+++ b/depends/packages/qt.mk
@@ -5,10 +5,10 @@
$(package)_file_name=qtbase-$($(package)_suffix)
$(package)_sha256_hash=36dd9574f006eaa1e5af780e4b33d11fe39d09fd7c12f3b9d83294174bd28f00
$(package)_dependencies=openssl zlib
-$(package)_linux_dependencies=freetype fontconfig libxcb libX11 xproto libXext
+$(package)_linux_dependencies=freetype fontconfig libxcb
$(package)_build_subdir=qtbase
$(package)_qt_libs=corelib network widgets gui plugins testlib
-$(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_configure_mac.patch fix_no_printer.patch fix_rcc_determinism.patch xkb-default.patch
+$(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_configure_mac.patch fix_no_printer.patch fix_rcc_determinism.patch xkb-default.patch no-xlib.patch
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
$(package)_qttranslations_sha256_hash=b36da7d93c3ab6fca56b32053bb73bc619c8b192bb89b74e3bcde2705f1c2a14
@@ -98,6 +98,8 @@
$(package)_config_opts_linux = -qt-xkbcommon-x11
$(package)_config_opts_linux += -qt-xcb
+$(package)_config_opts_linux += -no-xcb-xlib
+$(package)_config_opts_linux += -no-feature-xlib
$(package)_config_opts_linux += -system-freetype
$(package)_config_opts_linux += -no-feature-sessionmanager
$(package)_config_opts_linux += -fontconfig
@@ -152,6 +154,7 @@
echo "!host_build: QMAKE_CFLAGS += $($(package)_cflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
echo "!host_build: QMAKE_CXXFLAGS += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
echo "!host_build: QMAKE_LFLAGS += $($(package)_ldflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
+ patch -p1 -i $($(package)_patch_dir)/no-xlib.patch &&\
echo "QMAKE_LINK_OBJECT_MAX = 10" >> qtbase/mkspecs/win32-g++/qmake.conf &&\
echo "QMAKE_LINK_OBJECT_SCRIPT = object_script" >> qtbase/mkspecs/win32-g++/qmake.conf &&\
sed -i.old "s|QMAKE_CFLAGS = |!host_build: QMAKE_CFLAGS = $($(package)_cflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \
diff --git a/depends/packages/xextproto.mk b/depends/packages/xextproto.mk
deleted file mode 100644
--- a/depends/packages/xextproto.mk
+++ /dev/null
@@ -1,25 +0,0 @@
-package=xextproto
-$(package)_version=7.3.0
-$(package)_download_path=https://xorg.freedesktop.org/releases/individual/proto
-$(package)_file_name=$(package)-$($(package)_version).tar.bz2
-$(package)_sha256_hash=f3f4b23ac8db9c3a9e0d8edb591713f3d70ef9c3b175970dd8823dfc92aa5bb0
-
-define $(package)_preprocess_cmds
- cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub .
-endef
-
-define $(package)_set_vars
-$(package)_config_opts=--disable-shared
-endef
-
-define $(package)_config_cmds
- $($(package)_autoconf)
-endef
-
-define $(package)_build_cmds
- $(MAKE) -j$(JOBS)
-endef
-
-define $(package)_stage_cmds
- $(MAKE) DESTDIR=$($(package)_staging_dir) install
-endef
diff --git a/depends/packages/xtrans.mk b/depends/packages/xtrans.mk
deleted file mode 100644
--- a/depends/packages/xtrans.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-package=xtrans
-$(package)_version=1.3.4
-$(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/
-$(package)_file_name=$(package)-$($(package)_version).tar.bz2
-$(package)_sha256_hash=054d4ee3efd52508c753e9f7bc655ef185a29bd2850dd9e2fc2ccc33544f583a
-$(package)_dependencies=
-
-define $(package)_set_vars
- $(package)_config_opts_linux=--disable-docs --without-xmlto --without-fop --without-xsltproc
-endef
-
-define $(package)_config_cmds
- $($(package)_autoconf)
-endef
-
-define $(package)_build_cmds
- $(MAKE) -j$(JOBS)
-endef
-
-define $(package)_stage_cmds
- $(MAKE) DESTDIR=$($(package)_staging_dir) install
-endef
diff --git a/depends/patches/qt/no-xlib.patch b/depends/patches/qt/no-xlib.patch
new file mode 100644
--- /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
+
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 1, 12:04 (3 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5187761
Default Alt Text
D5636.diff (11 KB)
Attached To
D5636: depends: Prune X packages
Event Timeline
Log In to Comment