Skip to content

Commit e6e99d4

Browse files
committed
Merge #16408: depends: Prune X packages
0c55d8b depends: qt: Patch to remove dep on libX11 (Carl Dong) 222e6cc gitignore: Actually pay attention to depends patches (Carl Dong) 65f8da0 symbol-check: Disallow libX11-*.so.* shared libraries (Carl Dong) 9245699 depends: libXext isn't needed by anyone (Carl Dong) 689d3b4 build-aux: Remove check for x11-xcb (Carl Dong) aa53cb7 depends: libX11: Make package headers-only (Carl Dong) 9a01ab0 depends: qt: Explicitly stop using Xlib/libX11 (Carl Dong) 1ec30b8 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 0c55d8b fanquake: ACK 0c55d8b Tree-SHA512: 41f653a0f91bc0e0faac49713c0c6dfd8cb605f9c4e34eb75a790dd808ebf3e5c160f1dd40bc8fbc911ee718ea319313b526d63733c98ff62d8dffecb58caa01
2 parents 848f245 + 0c55d8b commit e6e99d4

File tree

11 files changed

+77
-144
lines changed

11 files changed

+77
-144
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ src/qt/bitcoin-qt.includes
7777

7878
# Only ignore unexpected patches
7979
*.patch
80-
!depends/patches/*.patch
80+
!depends/patches/**/*.patch
8181

8282
#libtool object files
8383
*.lo

build-aux/m4/bitcoin_qt.m4

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,6 @@ AC_DEFUN([_BITCOIN_QT_FIND_STATIC_PLUGINS],[
355355
PKG_CHECK_MODULES([QTFB], [Qt5FbSupport], [QT_LIBS="-lQt5FbSupport $QT_LIBS"])
356356
fi
357357
if test "x$TARGET_OS" = xlinux; then
358-
PKG_CHECK_MODULES([X11XCB], [x11-xcb], [QT_LIBS="$X11XCB_LIBS $QT_LIBS"])
359358
PKG_CHECK_MODULES([QTXCBQPA], [Qt5XcbQpa], [QT_LIBS="$QTXCBQPA_LIBS $QT_LIBS"])
360359
elif test "x$TARGET_OS" = xdarwin; then
361360
PKG_CHECK_MODULES([QTCLIPBOARD], [Qt5ClipboardSupport], [QT_LIBS="-lQt5ClipboardSupport $QT_LIBS"])

contrib/devtools/symbol-check.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@
6767
'ld-linux-armhf.so.3', # 32-bit ARM dynamic linker
6868
'ld-linux-riscv64-lp64d.so.1', # 64-bit RISC-V dynamic linker
6969
# bitcoin-qt only
70-
'libX11-xcb.so.1', # part of X11
71-
'libX11.so.6', # part of X11
7270
'libxcb.so.1', # part of X11
7371
'libfontconfig.so.1', # font support
7472
'libfreetype.so.6', # font parsing

depends/packages/libX11.mk

Lines changed: 0 additions & 32 deletions
This file was deleted.

depends/packages/libXext.mk

Lines changed: 0 additions & 53 deletions
This file was deleted.

depends/packages/libxcb.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ $(package)_version=1.10
33
$(package)_download_path=https://xcb.freedesktop.org/dist
44
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
55
$(package)_sha256_hash=98d9ab05b636dd088603b64229dd1ab2d2cc02ab807892e107d674f9c3f2d5b5
6-
$(package)_dependencies=xcb_proto libXau xproto
6+
$(package)_dependencies=xcb_proto libXau
77

88
define $(package)_set_vars
99
$(package)_config_opts=--disable-static

depends/packages/packages.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ packages:=boost openssl libevent
33
qt_native_packages = native_protobuf
44
qt_packages = qrencode protobuf zlib
55

6-
qt_linux_packages:=qt expat libxcb xcb_proto libXau xproto freetype fontconfig libX11 xextproto libXext xtrans
6+
qt_linux_packages:=qt expat libxcb xcb_proto libXau xproto freetype fontconfig
77

88
rapidcheck_packages = rapidcheck
99

depends/packages/qt.mk

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ $(package)_suffix=opensource-src-$($(package)_version).tar.xz
55
$(package)_file_name=qtbase-$($(package)_suffix)
66
$(package)_sha256_hash=36dd9574f006eaa1e5af780e4b33d11fe39d09fd7c12f3b9d83294174bd28f00
77
$(package)_dependencies=openssl zlib
8-
$(package)_linux_dependencies=freetype fontconfig libxcb libX11 xproto libXext
8+
$(package)_linux_dependencies=freetype fontconfig libxcb
99
$(package)_build_subdir=qtbase
1010
$(package)_qt_libs=corelib network widgets gui plugins testlib
11-
$(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_configure_mac.patch fix_no_printer.patch fix_rcc_determinism.patch fix_riscv64_arch.patch xkb-default.patch
11+
$(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_configure_mac.patch fix_no_printer.patch fix_rcc_determinism.patch fix_riscv64_arch.patch xkb-default.patch no-xlib.patch
1212

1313
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
1414
$(package)_qttranslations_sha256_hash=b36da7d93c3ab6fca56b32053bb73bc619c8b192bb89b74e3bcde2705f1c2a14
@@ -98,6 +98,8 @@ endif
9898

9999
$(package)_config_opts_linux = -qt-xkbcommon-x11
100100
$(package)_config_opts_linux += -qt-xcb
101+
$(package)_config_opts_linux += -no-xcb-xlib
102+
$(package)_config_opts_linux += -no-feature-xlib
101103
$(package)_config_opts_linux += -system-freetype
102104
$(package)_config_opts_linux += -no-feature-sessionmanager
103105
$(package)_config_opts_linux += -fontconfig
@@ -156,6 +158,7 @@ define $(package)_preprocess_cmds
156158
echo "!host_build: QMAKE_CXXFLAGS += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
157159
echo "!host_build: QMAKE_LFLAGS += $($(package)_ldflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
158160
patch -p1 -i $($(package)_patch_dir)/fix_riscv64_arch.patch &&\
161+
patch -p1 -i $($(package)_patch_dir)/no-xlib.patch &&\
159162
echo "QMAKE_LINK_OBJECT_MAX = 10" >> qtbase/mkspecs/win32-g++/qmake.conf &&\
160163
echo "QMAKE_LINK_OBJECT_SCRIPT = object_script" >> qtbase/mkspecs/win32-g++/qmake.conf &&\
161164
sed -i.old "s|QMAKE_CFLAGS = |!host_build: QMAKE_CFLAGS = $($(package)_cflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \

depends/packages/xextproto.mk

Lines changed: 0 additions & 25 deletions
This file was deleted.

depends/packages/xtrans.mk

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)