Skip to content

Commit

Permalink
build: qt 5.15.2
Browse files Browse the repository at this point in the history
  • Loading branch information
fanquake committed Dec 3, 2021
1 parent 904ba2a commit c870027
Show file tree
Hide file tree
Showing 12 changed files with 89 additions and 398 deletions.
11 changes: 6 additions & 5 deletions build-aux/m4/bitcoin_qt.m4
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,11 @@ AC_DEFUN([BITCOIN_QT_INIT],[
AS_IF([test "x$with_gui" = xqt5_debug],
[AS_CASE([$host],
[*darwin*], [qt_lib_suffix=_debug],
[*mingw*], [qt_lib_suffix=d],
[qt_lib_suffix= ]); bitcoin_qt_want_version=qt5],
[qt_lib_suffix= ])
AS_CASE([$host], [*android*], [qt_lib_suffix=_$ANDROID_ARCH])
AC_ARG_WITH([qt-incdir],[AS_HELP_STRING([--with-qt-incdir=INC_DIR],[specify qt include path (overridden by pkgconfig)])], [qt_include_path=$withval], [])
AC_ARG_WITH([qt-libdir],[AS_HELP_STRING([--with-qt-libdir=LIB_DIR],[specify qt lib path (overridden by pkgconfig)])], [qt_lib_path=$withval], [])
AC_ARG_WITH([qt-plugindir],[AS_HELP_STRING([--with-qt-plugindir=PLUGIN_DIR],[specify qt plugin path (overridden by pkgconfig)])], [qt_plugin_path=$withval], [])
Expand Down Expand Up @@ -149,8 +150,6 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
_BITCOIN_QT_CHECK_STATIC_PLUGIN([QWindowsVistaStylePlugin], [-lqwindowsvistastyle])
AC_DEFINE([QT_QPA_PLATFORM_WINDOWS], [1], [Define this symbol if the qt platform is windows])
elif test "x$TARGET_OS" = xlinux; then
dnl workaround for https://bugreports.qt.io/browse/QTBUG-74874
AX_CHECK_LINK_FLAG([-lxcb-shm], [QT_LIBS="$QT_LIBS -lxcb-shm"], [AC_MSG_ERROR([could not link against -lxcb-shm])])
_BITCOIN_QT_CHECK_STATIC_PLUGIN([QXcbIntegrationPlugin], [-lqxcb])
AC_DEFINE([QT_QPA_PLATFORM_XCB], [1], [Define this symbol if the qt platform is xcb])
elif test "x$TARGET_OS" = xdarwin; then
Expand All @@ -162,7 +161,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
_BITCOIN_QT_CHECK_STATIC_PLUGIN([QMacStylePlugin], [-lqmacstyle])
AC_DEFINE([QT_QPA_PLATFORM_COCOA], [1], [Define this symbol if the qt platform is cocoa])
elif test "x$TARGET_OS" = xandroid; then
QT_LIBS="-Wl,--export-dynamic,--undefined=JNI_OnLoad -lqtforandroid -ljnigraphics -landroid -lqtfreetype $QT_LIBS"
QT_LIBS="-Wl,--export-dynamic,--undefined=JNI_OnLoad -lplugins_platforms_qtforandroid_$ANDROID_ARCH -ljnigraphics -landroid -lqtfreetype_$ANDROID_ARCH $QT_LIBS"
AC_DEFINE([QT_QPA_PLATFORM_ANDROID], [1], [Define this symbol if the qt platform is android])
fi
fi
Expand Down Expand Up @@ -353,14 +352,16 @@ AC_DEFUN([_BITCOIN_QT_CHECK_STATIC_LIBS], [
PKG_CHECK_MODULES([QT_INPUT], [${qt_lib_prefix}InputSupport], [QT_LIBS="$QT_INPUT_LIBS $QT_LIBS"])
PKG_CHECK_MODULES([QT_SERVICE], [${qt_lib_prefix}ServiceSupport], [QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"])
PKG_CHECK_MODULES([QT_XCBQPA], [${qt_lib_prefix}XcbQpa], [QT_LIBS="$QT_XCBQPA_LIBS $QT_LIBS"])
PKG_CHECK_MODULES([QT_XKBCOMMON], [${qt_lib_prefix}XkbCommonSupport], [QT_LIBS="$QT_XKBCOMMON_LIBS $QT_LIBS"])
elif test "x$TARGET_OS" = xdarwin; then
PKG_CHECK_MODULES([QT_CLIPBOARD], [${qt_lib_prefix}ClipboardSupport${qt_lib_suffix}], [QT_LIBS="$QT_CLIPBOARD_LIBS $QT_LIBS"])
PKG_CHECK_MODULES([QT_GRAPHICS], [${qt_lib_prefix}GraphicsSupport${qt_lib_suffix}], [QT_LIBS="$QT_GRAPHICS_LIBS $QT_LIBS"])
PKG_CHECK_MODULES([QT_SERVICE], [${qt_lib_prefix}ServiceSupport${qt_lib_suffix}], [QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"])
elif test "x$TARGET_OS" = xwindows; then
PKG_CHECK_MODULES([QT_WINDOWSUIAUTOMATION], [${qt_lib_prefix}WindowsUIAutomationSupport${qt_lib_suffix}], [QT_LIBS="$QT_WINDOWSUIAUTOMATION_LIBS $QT_LIBS"])
elif test "x$TARGET_OS" = xandroid; then
PKG_CHECK_MODULES([QT_EGL], [${qt_lib_prefix}EglSupport], [QT_LIBS="$QT_EGL_LIBS $QT_LIBS"])
PKG_CHECK_MODULES([QT_EGL], [${qt_lib_prefix}EglSupport${qt_lib_suffix}], [QT_LIBS="$QT_EGL_LIBS $QT_LIBS"])
PKG_CHECK_MODULES([QT_SERVICE], [${qt_lib_prefix}ServiceSupport${qt_lib_suffix}], [QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"])
fi
])

Expand Down
15 changes: 14 additions & 1 deletion contrib/devtools/symbol-check.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,19 @@
'libxkbcommon-x11.so.0', # keyboard keymapping
'libfontconfig.so.1', # font support
'libfreetype.so.6', # font parsing
'libdl.so.2' # programming interface to dynamic linker
'libdl.so.2', # programming interface to dynamic linker
'libxcb-icccm.so.4',
'libxcb-image.so.0',
'libxcb-shm.so.0',
'libxcb-keysyms.so.1',
'libxcb-randr.so.0',
'libxcb-render-util.so.0',
'libxcb-render.so.0',
'libxcb-shape.so.0',
'libxcb-sync.so.1',
'libxcb-xfixes.so.0',
'libxcb-xinerama.so.0',
'libxcb-xkb.so.1',
}

MACHO_ALLOWED_LIBRARIES = {
Expand All @@ -116,6 +128,7 @@
'AppKit', # user interface
'ApplicationServices', # common application tasks.
'Carbon', # deprecated c back-compat API
'ColorSync',
'CoreFoundation', # low level func, data types
'CoreGraphics', # 2D rendering
'CoreServices', # operating system services
Expand Down
35 changes: 17 additions & 18 deletions depends/packages/qt.mk
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
PACKAGE=qt
$(package)_version=5.12.11
$(package)_download_path=https://download.qt.io/official_releases/qt/5.12/$($(package)_version)/submodules
package=qt
$(package)_version=5.15.2
$(package)_download_path=https://download.qt.io/official_releases/qt/5.15/$($(package)_version)/submodules
$(package)_suffix=everywhere-src-$($(package)_version).tar.xz
$(package)_file_name=qtbase-$($(package)_suffix)
$(package)_sha256_hash=1c1b4e33137ca77881074c140d54c3c9747e845a31338cfe8680f171f0bc3a39
$(package)_sha256_hash=909fad2591ee367993a75d7e2ea50ad4db332f05e1c38dd7a5a274e156a4e0f8
$(package)_linux_dependencies=freetype fontconfig libxcb libxkbcommon libxcb_util libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm
$(package)_qt_libs=corelib network widgets gui plugins testlib
$(package)_linguist_tools = lrelease lupdate lconvert
$(package)_patches = qt.pro qttools_src.pro
$(package)_patches += fix_qt_pkgconfig.patch mac-qmake.conf fix_no_printer.patch no-xlib.patch
$(package)_patches += support_new_android_ndks.patch fix_android_jni_static.patch dont_hardcode_pwd.patch
$(package)_patches += dont_hardcode_x86_64.patch
$(package)_patches+= fix_lib_paths.patch fix_android_pch.patch
$(package)_patches+= qtbase-moc-ignore-gcc-macro.patch fix_limits_header.patch
$(package)_patches+= fix_montery_include.patch
$(package)_patches += dont_hardcode_x86_64.patch fix_montery_include.patch
$(package)_patches += fix_android_jni_static.patch dont_hardcode_pwd.patch
$(package)_patches += qtbase-moc-ignore-gcc-macro.patch fix_limits_header.patch

$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
$(package)_qttranslations_sha256_hash=577b0668a777eb2b451c61e8d026d79285371597ce9df06b6dee6c814164b7c3
$(package)_qttranslations_sha256_hash=d5788e86257b21d5323f1efd94376a213e091d1e5e03b45a95dd052b5f570db8

$(package)_qttools_file_name=qttools-$($(package)_suffix)
$(package)_qttools_sha256_hash=98b2aaca230458f65996f3534fd471d2ffd038dd58ac997c0589c06dc2385b4f
$(package)_qttools_sha256_hash=c189d0ce1ff7c739db9a3ace52ac3e24cb8fd6dbf234e49f075249b38f43c1cc

$(package)_extra_sources = $($(package)_qttranslations_file_name)
$(package)_extra_sources += $($(package)_qttools_file_name)
Expand All @@ -30,14 +28,14 @@ $(package)_config_opts_release += -silent
$(package)_config_opts_debug = -debug
$(package)_config_opts_debug += -optimized-tools
$(package)_config_opts += -bindir $(build_prefix)/bin
$(package)_config_opts += -c++std c++1z
$(package)_config_opts += -c++std c++17
$(package)_config_opts += -confirm-license
$(package)_config_opts += -hostprefix $(build_prefix)
$(package)_config_opts += -no-compile-examples
$(package)_config_opts += -no-cups
$(package)_config_opts += -no-egl
$(package)_config_opts += -no-eglfs
$(package)_config_opts += -no-freetype
$(package)_config_opts += -no-evdev
$(package)_config_opts += -no-gif
$(package)_config_opts += -no-glib
$(package)_config_opts += -no-icu
Expand All @@ -52,6 +50,7 @@ $(package)_config_opts += -no-mtdev
$(package)_config_opts += -no-openssl
$(package)_config_opts += -no-openvg
$(package)_config_opts += -no-reduce-relocations
$(package)_config_opts += -no-schannel
$(package)_config_opts += -no-sctp
$(package)_config_opts += -no-securetransport
$(package)_config_opts += -no-sql-db2
Expand All @@ -65,6 +64,7 @@ $(package)_config_opts += -no-sql-sqlite
$(package)_config_opts += -no-sql-sqlite2
$(package)_config_opts += -no-system-proxies
$(package)_config_opts += -no-use-gold-linker
$(package)_config_opts += -no-zstd
$(package)_config_opts += -nomake examples
$(package)_config_opts += -nomake tests
$(package)_config_opts += -nomake tools
Expand Down Expand Up @@ -102,6 +102,7 @@ $(package)_config_opts += -no-feature-sqlmodel
$(package)_config_opts += -no-feature-statemachine
$(package)_config_opts += -no-feature-syntaxhighlighter
$(package)_config_opts += -no-feature-textbrowser
$(package)_config_opts += -no-feature-textmarkdownwriter
$(package)_config_opts += -no-feature-textodfwriter
$(package)_config_opts += -no-feature-topleveldomain
$(package)_config_opts += -no-feature-udpsocket
Expand All @@ -117,6 +118,7 @@ $(package)_config_opts_darwin = -no-dbus
$(package)_config_opts_darwin += -no-opengl
$(package)_config_opts_darwin += -pch
$(package)_config_opts_darwin += -no-feature-corewlan
$(package)_config_opts_darwin += -no-freetype
$(package)_config_opts_darwin += QMAKE_MACOSX_DEPLOYMENT_TARGET=$(OSX_MIN_VERSION)

ifneq ($(build_os),darwin)
Expand All @@ -133,7 +135,7 @@ $(package)_config_opts_aarch64_darwin += -device-option QMAKE_APPLE_DEVICE_ARCHS
$(package)_config_opts_x86_64_darwin += -device-option QMAKE_APPLE_DEVICE_ARCHS=x86_64
endif

$(package)_config_opts_linux = -qt-xcb
$(package)_config_opts_linux = -xcb
$(package)_config_opts_linux += -no-xcb-xlib
$(package)_config_opts_linux += -no-feature-xlib
$(package)_config_opts_linux += -system-freetype
Expand All @@ -152,6 +154,7 @@ $(package)_config_opts_s390x_linux = -platform linux-g++ -xplatform bitcoin-linu

$(package)_config_opts_mingw32 = -no-opengl
$(package)_config_opts_mingw32 += -no-dbus
$(package)_config_opts_mingw32 += -no-freetype
$(package)_config_opts_mingw32 += -xplatform win32-g++
$(package)_config_opts_mingw32 += "QMAKE_CFLAGS = '$($(package)_cflags) $($(package)_cppflags)'"
$(package)_config_opts_mingw32 += "QMAKE_CXXFLAGS = '$($(package)_cflags) $($(package)_cppflags)'"
Expand All @@ -166,7 +169,6 @@ $(package)_config_opts_android += -android-ndk-platform android-$(ANDROID_API_LE
$(package)_config_opts_android += -device-option CROSS_COMPILE="$(host)-"
$(package)_config_opts_android += -egl
$(package)_config_opts_android += -qpa xcb
$(package)_config_opts_android += -no-eglfs
$(package)_config_opts_android += -no-dbus
$(package)_config_opts_android += -opengl es2
$(package)_config_opts_android += -qt-freetype
Expand Down Expand Up @@ -227,12 +229,9 @@ define $(package)_preprocess_cmds
patch -p1 -i $($(package)_patch_dir)/dont_hardcode_pwd.patch && \
patch -p1 -i $($(package)_patch_dir)/fix_qt_pkgconfig.patch && \
patch -p1 -i $($(package)_patch_dir)/fix_no_printer.patch && \
patch -p1 -i $($(package)_patch_dir)/support_new_android_ndks.patch && \
patch -p1 -i $($(package)_patch_dir)/fix_android_jni_static.patch && \
patch -p1 -i $($(package)_patch_dir)/fix_android_pch.patch && \
patch -p1 -i $($(package)_patch_dir)/no-xlib.patch && \
patch -p1 -i $($(package)_patch_dir)/dont_hardcode_x86_64.patch && \
patch -p1 -i $($(package)_patch_dir)/fix_lib_paths.patch && \
patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.patch && \
patch -p1 -i $($(package)_patch_dir)/fix_limits_header.patch && \
patch -p1 -i $($(package)_patch_dir)/fix_montery_include.patch && \
Expand Down
34 changes: 15 additions & 19 deletions depends/patches/qt/dont_hardcode_x86_64.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ https://codereview.qt-project.org/q/I70db7e4c27f0d3da5d0af33cb491d72c312d3fa8

--- old/qtbase/configure.json
+++ new/qtbase/configure.json
@@ -208,11 +208,18 @@
@@ -244,11 +244,18 @@

"testTypeDependencies": {
"linkerSupportsFlag": [ "use_gold_linker" ],
- "verifySpec": [ "shared", "use_gold_linker", "compiler-flags", "qmakeargs", "commit" ],
"linkerSupportsFlag": [ "use_bfd_linker", "use_gold_linker", "use_lld_linker" ],
- "verifySpec": [ "shared", "use_bfd_linker", "use_gold_linker", "use_lld_linker", "compiler-flags", "qmakeargs", "commit" ],
+ "verifySpec": [
+ "shared",
+ "use_gold_linker",
+ "use_bfd_linker", "use_gold_linker", "use_lld_linker",
+ "compiler-flags", "qmakeargs",
+ "simulator_and_device",
+ "thread",
Expand All @@ -30,7 +30,7 @@ https://codereview.qt-project.org/q/I70db7e4c27f0d3da5d0af33cb491d72c312d3fa8
},

"testTypeAliases": {
@@ -653,7 +660,7 @@
@@ -762,7 +769,7 @@
},
"architecture": {
"label": "Architecture",
Expand All @@ -40,11 +40,10 @@ https://codereview.qt-project.org/q/I70db7e4c27f0d3da5d0af33cb491d72c312d3fa8
"pkg-config": {
"label": "Using pkg-config",
diff --git a/configure.pri b/configure.pri
index 33c90a8c2f..71767e29d6 100644

index 49755f7abfd..8be9b10d7d4 100644
--- old/qtbase/configure.pri
+++ new/qtbase/configure.pri
@@ -642,6 +642,13 @@ defineTest(qtConfOutput_commitOptions) {
@@ -662,6 +662,13 @@ defineTest(qtConfOutput_commitOptions) {
write_file($$QT_BUILD_TREE/mkspecs/qdevice.pri, $${currentConfig}.output.devicePro)|error()
}

Expand All @@ -59,24 +58,22 @@ index 33c90a8c2f..71767e29d6 100644
defineTest(processQtPath) {
out_var = config.rel_input.$${2}
diff --git a/mkspecs/common/macx.conf b/mkspecs/common/macx.conf
index 7d4a406134..de96c12fc9 100644

index d16b77acb8e..4ba0a8eaa36 100644
--- old/qtbase/mkspecs/common/macx.conf
+++ new/qtbase/mkspecs/common/macx.conf
@@ -6,7 +6,6 @@ QMAKE_PLATFORM += macos osx macx
QMAKE_MAC_SDK = macosx

QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.12
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.13
-QMAKE_APPLE_DEVICE_ARCHS = x86_64

QT_MAC_SDK_VERSION_MIN = 10.13
QT_MAC_SDK_VERSION_MAX = 11.0
# Should be 10.15, but as long as the CI builds with
# older SDKs we have to keep this.
diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf
index d052808c14..0a89effe87 100644

index 92a9112bca6..d888731ec8d 100644
--- old/qtbase/mkspecs/features/mac/default_post.prf
+++ new/qtbase/mkspecs/features/mac/default_post.prf
@@ -89,6 +89,11 @@ app_extension_api_only {
@@ -90,6 +90,11 @@ app_extension_api_only {
QMAKE_LFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION
}

Expand All @@ -88,7 +85,7 @@ index d052808c14..0a89effe87 100644
macx-xcode {
qmake_pkginfo_typeinfo.name = QMAKE_PKGINFO_TYPEINFO
!isEmpty(QMAKE_PKGINFO_TYPEINFO): \
@@ -144,9 +149,6 @@ macx-xcode {
@@ -145,9 +150,6 @@ macx-xcode {
simulator: VALID_SIMULATOR_ARCHS = $$QMAKE_APPLE_SIMULATOR_ARCHS
VALID_ARCHS = $$VALID_DEVICE_ARCHS $$VALID_SIMULATOR_ARCHS

Expand All @@ -99,8 +96,7 @@ index d052808c14..0a89effe87 100644

ACTIVE_ARCHS = $(filter $(EXPORT_VALID_ARCHS), $(ARCHS))
diff --git a/mkspecs/features/toolchain.prf b/mkspecs/features/toolchain.prf
index 5003679bd0..c7c080cb07 100644

index efbe7c1e55b..8add6dc8043 100644
--- old/qtbase/mkspecs/features/toolchain.prf
+++ new/qtbase/mkspecs/features/toolchain.prf
@@ -182,9 +182,14 @@ isEmpty($${target_prefix}.INCDIRS) {
Expand Down
2 changes: 1 addition & 1 deletion depends/patches/qt/fix_android_jni_static.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- old/qtbase/src/plugins/platforms/android/androidjnimain.cpp
+++ new/qtbase/src/plugins/platforms/android/androidjnimain.cpp
@@ -898,6 +898,14 @@
@@ -914,6 +914,14 @@ Q_DECL_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void */*reserved*/)
__android_log_print(ANDROID_LOG_FATAL, "Qt", "registerNatives failed");
return -1;
}
Expand Down
10 changes: 0 additions & 10 deletions depends/patches/qt/fix_android_pch.patch

This file was deleted.

Loading

0 comments on commit c870027

Please sign in to comment.