Skip to content

Commit 2b27feb

Browse files
authored
Merge pull request #7 from padraiq/qt_bump
Bump to Qt5.9.6 & remove Qt4 Support
2 parents d49eb23 + ea56af8 commit 2b27feb

31 files changed

+1714
-1911
lines changed

build-aux/m4/bitcoin_qt.m4

Lines changed: 139 additions & 155 deletions
Large diffs are not rendered by default.

configure.ac

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ fi
611611
BITCOIN_QT_INIT
612612

613613
dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus
614-
BITCOIN_QT_CONFIGURE([$use_pkgconfig], [qt5])
614+
BITCOIN_QT_CONFIGURE([$use_pkgconfig])
615615

616616
if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests = xnononono; then
617617
use_boost=no
@@ -1155,7 +1155,6 @@ echo "Options used to compile and link:"
11551155
echo " with wallet = $enable_wallet"
11561156
echo " with gui / qt = $bitcoin_enable_qt"
11571157
if test x$bitcoin_enable_qt != xno; then
1158-
echo " qt version = $bitcoin_qt_got_major_vers"
11591158
echo " with qr = $use_qr"
11601159
fi
11611160
echo " with zmq = $use_zmq"

depends/packages/qt.mk

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
PACKAGE=qt
2-
$(package)_version=5.7.1
3-
$(package)_download_path=http://download.qt.io/official_releases/qt/5.7/$($(package)_version)/submodules
4-
$(package)_suffix=opensource-src-$($(package)_version).tar.gz
2+
$(package)_version=5.9.6
3+
$(package)_download_path=https://download.qt.io/official_releases/qt/5.9/$($(package)_version)/submodules
4+
$(package)_suffix=opensource-src-$($(package)_version).tar.xz
55
$(package)_file_name=qtbase-$($(package)_suffix)
6-
$(package)_sha256_hash=95f83e532d23b3ddbde7973f380ecae1bac13230340557276f75f2e37984e410
6+
$(package)_sha256_hash=eed620cb268b199bd83b3fc6a471c51d51e1dc2dbb5374fc97a0cc75facbe36f
77
$(package)_dependencies=openssl zlib
88
$(package)_linux_dependencies=freetype fontconfig libxcb libX11 xproto libXext
99
$(package)_build_subdir=qtbase
1010
$(package)_qt_libs=corelib network widgets gui plugins testlib
11-
$(package)_patches=mac-qmake.conf aarch32-qmake.conf aarch64-qmake.conf mingw-uuidof.patch pidlist_absolute.patch fix-xcb-include-order.patch fix_qt_pkgconfig.patch
11+
$(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_configure_mac.patch fix_no_printer.patch
1212

1313
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
14-
$(package)_qttranslations_sha256_hash=3a15aebd523c6d89fb97b2d3df866c94149653a26d27a00aac9b6d3020bc5a1d
15-
14+
$(package)_qttranslations_sha256_hash=9822084f8e2d2939ba39f4af4c0c2320e45d5996762a9423f833055607604ed8
1615

1716
$(package)_qttools_file_name=qttools-$($(package)_suffix)
18-
$(package)_qttools_sha256_hash=22d67de915cb8cd93e16fdd38fa006224ad9170bd217c2be1e53045a8dd02f0f
17+
$(package)_qttools_sha256_hash=50e75417ec0c74bb8b1989d1d8e981ee83690dce7dfc0c2169f7c00f397e5117
1918

2019
$(package)_extra_sources = $($(package)_qttranslations_file_name)
2120
$(package)_extra_sources += $($(package)_qttools_file_name)
@@ -28,25 +27,18 @@ $(package)_config_opts += -c++std c++11
2827
$(package)_config_opts += -confirm-license
2928
$(package)_config_opts += -dbus-runtime
3029
$(package)_config_opts += -hostprefix $(build_prefix)
31-
$(package)_config_opts += -no-alsa
32-
$(package)_config_opts += -no-audio-backend
3330
$(package)_config_opts += -no-cups
3431
$(package)_config_opts += -no-egl
3532
$(package)_config_opts += -no-eglfs
36-
$(package)_config_opts += -no-feature-style-windowsmobile
37-
$(package)_config_opts += -no-feature-style-windowsce
3833
$(package)_config_opts += -no-freetype
3934
$(package)_config_opts += -no-gif
4035
$(package)_config_opts += -no-glib
41-
$(package)_config_opts += -no-gstreamer
4236
$(package)_config_opts += -no-icu
4337
$(package)_config_opts += -no-iconv
4438
$(package)_config_opts += -no-kms
4539
$(package)_config_opts += -no-linuxfb
4640
$(package)_config_opts += -no-libudev
47-
$(package)_config_opts += -no-mitshm
4841
$(package)_config_opts += -no-mtdev
49-
$(package)_config_opts += -no-pulseaudio
5042
$(package)_config_opts += -no-openvg
5143
$(package)_config_opts += -no-reduce-relocations
5244
$(package)_config_opts += -no-qml-debug
@@ -61,7 +53,6 @@ $(package)_config_opts += -no-sql-sqlite
6153
$(package)_config_opts += -no-sql-sqlite2
6254
$(package)_config_opts += -no-use-gold-linker
6355
$(package)_config_opts += -no-xinput2
64-
$(package)_config_opts += -no-xrender
6556
$(package)_config_opts += -nomake examples
6657
$(package)_config_opts += -nomake tests
6758
$(package)_config_opts += -opensource
@@ -74,12 +65,13 @@ $(package)_config_opts += -qt-libpng
7465
$(package)_config_opts += -qt-libjpeg
7566
$(package)_config_opts += -qt-pcre
7667
$(package)_config_opts += -system-zlib
77-
$(package)_config_opts += -reduce-exports
7868
$(package)_config_opts += -static
7969
$(package)_config_opts += -silent
8070
$(package)_config_opts += -v
8171
$(package)_config_opts += -no-feature-printer
8272
$(package)_config_opts += -no-feature-printdialog
73+
$(package)_config_opts += -no-feature-concurrent
74+
$(package)_config_opts += -no-feature-xml
8375

8476
ifneq ($(build_os),darwin)
8577
$(package)_config_opts_darwin = -xplatform macx-clang-linux
@@ -94,12 +86,13 @@ endif
9486
$(package)_config_opts_linux = -qt-xkbcommon
9587
$(package)_config_opts_linux += -qt-xcb
9688
$(package)_config_opts_linux += -system-freetype
97-
$(package)_config_opts_linux += -no-sm
89+
$(package)_config_opts_linux += -no-feature-sessionmanager
9890
$(package)_config_opts_linux += -fontconfig
9991
$(package)_config_opts_linux += -no-opengl
10092
$(package)_config_opts_arm_linux = -platform linux-g++ -xplatform $(host)
10193
$(package)_config_opts_aarch64_linux = -platform linux-g++ -xplatform $(host)
10294
$(package)_config_opts_i686_linux = -xplatform linux-g++-32
95+
$(package)_config_opts_x86_64_linux = -xplatform linux-g++-64
10396
$(package)_config_opts_mingw32 = -no-opengl -xplatform win32-g++ -device-option CROSS_COMPILE="$(host)-"
10497
$(package)_build_env = QT_RCC_TEST=1
10598
endef
@@ -124,11 +117,10 @@ define $(package)_extract_cmds
124117
tar --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttools_file_name) -C qttools
125118
endef
126119

127-
128120
define $(package)_preprocess_cmds
129121
sed -i.old "s|updateqm.commands = \$$$$\$$$$LRELEASE|updateqm.commands = $($(package)_extract_dir)/qttools/bin/lrelease|" qttranslations/translations/translations.pro && \
130122
sed -i.old "/updateqm.depends =/d" qttranslations/translations/translations.pro && \
131-
sed -i.old "s/src_plugins.depends = src_sql src_xml src_network/src_plugins.depends = src_xml src_network/" qtbase/src/src.pro && \
123+
sed -i.old "s/src_plugins.depends = src_sql src_network/src_plugins.depends = src_network/" qtbase/src/src.pro && \
132124
sed -i.old "s|X11/extensions/XIproto.h|X11/X.h|" qtbase/src/plugins/platforms/xcb/qxcbxsettings.cpp && \
133125
sed -i.old 's/if \[ "$$$$XPLATFORM_MAC" = "yes" \]; then xspecvals=$$$$(macSDKify/if \[ "$$$$BUILD_ON_MAC" = "yes" \]; then xspecvals=$$$$(macSDKify/' qtbase/configure && \
134126
sed -i.old 's/CGEventCreateMouseEvent(0, kCGEventMouseMoved, pos, 0)/CGEventCreateMouseEvent(0, kCGEventMouseMoved, pos, kCGMouseButtonLeft)/' qtbase/src/plugins/platforms/cocoa/qcocoacursor.mm && \
@@ -137,6 +129,10 @@ define $(package)_preprocess_cmds
137129
cp -f qtbase/mkspecs/macx-clang/Info.plist.app qtbase/mkspecs/macx-clang-linux/ &&\
138130
cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\
139131
cp -f $($(package)_patch_dir)/mac-qmake.conf qtbase/mkspecs/macx-clang-linux/qmake.conf && \
132+
patch -p1 -i $($(package)_patch_dir)/fix_qt_pkgconfig.patch &&\
133+
patch -p1 -i $($(package)_patch_dir)/fix_configure_mac.patch &&\
134+
patch -p1 -i $($(package)_patch_dir)/fix_no_printer.patch &&\
135+
patch -p1 -i $($(package)_patch_dir)/qfixed-coretext.patch &&\
140136
mkdir -p qtbase/mkspecs/arm-linux-gnueabihf &&\
141137
cp -f qtbase/mkspecs/linux-arm-gnueabi-g++/qplatformdefs.h qtbase/mkspecs/arm-linux-gnueabihf/ &&\
142138
cp -f $($(package)_patch_dir)/aarch32-qmake.conf qtbase/mkspecs/arm-linux-gnueabihf/qmake.conf &&\
@@ -150,10 +146,11 @@ define $(package)_preprocess_cmds
150146
echo "!host_build: QMAKE_CFLAGS += $($(package)_cflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
151147
echo "!host_build: QMAKE_CXXFLAGS += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
152148
echo "!host_build: QMAKE_LFLAGS += $($(package)_ldflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
149+
echo "QMAKE_LINK_OBJECT_MAX = 10" >> qtbase/mkspecs/win32-g++/qmake.conf &&\
150+
echo "QMAKE_LINK_OBJECT_SCRIPT = object_script" >> qtbase/mkspecs/win32-g++/qmake.conf &&\
153151
sed -i.old "s|QMAKE_CFLAGS = |!host_build: QMAKE_CFLAGS = $($(package)_cflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \
154152
sed -i.old "s|QMAKE_LFLAGS = |!host_build: QMAKE_LFLAGS = $($(package)_ldflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \
155153
sed -i.old "s|QMAKE_CXXFLAGS = |!host_build: QMAKE_CXXFLAGS = $($(package)_cxxflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf
156-
157154
endef
158155

159156
define $(package)_config_cmds
@@ -165,19 +162,22 @@ define $(package)_config_cmds
165162
echo "CONFIG += force_bootstrap" >> mkspecs/qconfig.pri && \
166163
$(MAKE) sub-src-clean && \
167164
cd ../qttranslations && ../qtbase/bin/qmake qttranslations.pro -o Makefile && \
168-
cd translations && ../../qtbase/bin/qmake translations.pro -o Makefile && cd ../.. &&\
169-
cd qttools/src/linguist/lrelease/ && ../../../../qtbase/bin/qmake lrelease.pro -o Makefile
165+
cd translations && ../../qtbase/bin/qmake translations.pro -o Makefile && cd ../.. && \
166+
cd qttools/src/linguist/lrelease/ && ../../../../qtbase/bin/qmake lrelease.pro -o Makefile && \
167+
cd ../lupdate/ && ../../../../qtbase/bin/qmake lupdate.pro -o Makefile && cd ../../../..
170168
endef
171169

172170
define $(package)_build_cmds
173171
$(MAKE) -C src $(addprefix sub-,$($(package)_qt_libs)) && \
174172
$(MAKE) -C ../qttools/src/linguist/lrelease && \
173+
$(MAKE) -C ../qttools/src/linguist/lupdate && \
175174
$(MAKE) -C ../qttranslations
176175
endef
177176

178177
define $(package)_stage_cmds
179-
$(MAKE) -C src INSTALL_ROOT=$($(package)_staging_dir) $(addsuffix -install_subtargets,$(addprefix sub-,$($(package)_qt_libs))) && cd .. &&\
178+
$(MAKE) -C src INSTALL_ROOT=$($(package)_staging_dir) $(addsuffix -install_subtargets,$(addprefix sub-,$($(package)_qt_libs))) && cd .. && \
180179
$(MAKE) -C qttools/src/linguist/lrelease INSTALL_ROOT=$($(package)_staging_dir) install_target && \
180+
$(MAKE) -C qttools/src/linguist/lupdate INSTALL_ROOT=$($(package)_staging_dir) install_target && \
181181
$(MAKE) -C qttranslations INSTALL_ROOT=$($(package)_staging_dir) install_subtargets && \
182182
if `test -f qtbase/src/plugins/platforms/xcb/xcb-static/libxcb-static.a`; then \
183183
cp qtbase/src/plugins/platforms/xcb/xcb-static/libxcb-static.a $($(package)_staging_prefix_dir)/lib; \

depends/patches/qt/fix-xcb-include-order.patch

Lines changed: 0 additions & 49 deletions
This file was deleted.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
--- old/qtbase/mkspecs/features/mac/sdk.prf 2018-02-08 10:24:48.000000000 -0800
2+
+++ new/qtbase/mkspecs/features/mac/sdk.prf 2018-03-23 10:38:56.000000000 -0700
3+
@@ -8,21 +8,21 @@
4+
defineReplace(xcodeSDKInfo) {
5+
info = $$1
6+
equals(info, "Path"): \
7+
- info = --show-sdk-path
8+
+ infoarg = --show-sdk-path
9+
equals(info, "PlatformPath"): \
10+
- info = --show-sdk-platform-path
11+
+ infoarg = --show-sdk-platform-path
12+
equals(info, "SDKVersion"): \
13+
- info = --show-sdk-version
14+
+ infoarg = --show-sdk-version
15+
sdk = $$2
16+
isEmpty(sdk): \
17+
sdk = $$QMAKE_MAC_SDK
18+
19+
isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}) {
20+
- QMAKE_MAC_SDK.$${sdk}.$${info} = $$system("/usr/bin/xcrun --sdk $$sdk $$info 2>/dev/null")
21+
+ QMAKE_MAC_SDK.$${sdk}.$${info} = $$system("/usr/bin/xcrun --sdk $$sdk $$infoarg 2>/dev/null")
22+
# --show-sdk-platform-path won't work for Command Line Tools; this is fine
23+
# only used by the XCTest backend to testlib
24+
- isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}):if(!isEmpty(QMAKE_XCODEBUILD_PATH)|!equals(info, "--show-sdk-platform-path")): \
25+
- error("Could not resolve SDK $$info for \'$$sdk\'")
26+
+ isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}):if(!isEmpty(QMAKE_XCODEBUILD_PATH)|!equals(infoarg, "--show-sdk-platform-path")): \
27+
+ error("Could not resolve SDK $$info for \'$$sdk\' using $$infoarg")
28+
cache(QMAKE_MAC_SDK.$${sdk}.$${info}, set stash, QMAKE_MAC_SDK.$${sdk}.$${info})
29+
}
30+
31+
--- old/qtbase/configure 2018-02-08 10:24:48.000000000 -0800
32+
+++ new/qtbase/configure 2018-03-23 05:42:29.000000000 -0700
33+
@@ -232,8 +232,13 @@
34+
35+
sdk=$(getSingleQMakeVariable "QMAKE_MAC_SDK" "$1")
36+
if [ -z "$sdk" ]; then echo "QMAKE_MAC_SDK must be set when building on Mac" >&2; exit 1; fi
37+
- sysroot=$(/usr/bin/xcrun --sdk $sdk --show-sdk-path 2>/dev/null)
38+
- if [ -z "$sysroot" ]; then echo "Failed to resolve SDK path for '$sdk'" >&2; exit 1; fi
39+
+ sysroot=$(getSingleQMakeVariable "QMAKE_MAC_SDK_PATH" "$1")
40+
+
41+
+ echo "sysroot pre-configured as $sysroot";
42+
+ if [ -z "$sysroot" ]; then
43+
+ sysroot=$(/usr/bin/xcrun --sdk $sdk --show-sdk-path 2>/dev/null)
44+
+ if [ -z "$sysroot" ]; then echo "Failed to resolve SDK path for '$sdk'" >&2; exit 1; fi
45+
+ fi
46+
47+
case "$sdk" in
48+
macosx*)
49+
50+
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
--- x/qtbase/src/plugins/platforms/cocoa/qprintengine_mac_p.h
2+
+++ y/qtbase/src/plugins/platforms/cocoa/qprintengine_mac_p.h
3+
@@ -52,6 +52,7 @@
4+
//
5+
6+
#include <QtCore/qglobal.h>
7+
+#include <qpa/qplatformprintdevice.h>
8+
9+
#ifndef QT_NO_PRINTER
10+
11+
--- x/qtbase/src/plugins/plugins.pro
12+
+++ y/qtbase/src/plugins/plugins.pro
13+
@@ -8,6 +8,3 @@ qtHaveModule(gui) {
14+
qtConfig(imageformatplugin): SUBDIRS *= imageformats
15+
!android:qtConfig(library): SUBDIRS *= generic
16+
}
17+
-
18+
-!winrt:qtHaveModule(printsupport): \
19+
- SUBDIRS += printsupport

depends/patches/qt/mac-qmake.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ QMAKE_MAC_SDK.macosx.Path = $${MAC_SDK_PATH}
1414
QMAKE_MAC_SDK.macosx.platform_name = macosx
1515
QMAKE_MAC_SDK.macosx.SDKVersion = $${MAC_SDK_VERSION}
1616
QMAKE_MAC_SDK.macosx.PlatformPath = /phony
17+
QMAKE_APPLE_DEVICE_ARCHS=x86_64
1718
!host_build: QMAKE_CFLAGS += -target $${MAC_TARGET}
1819
!host_build: QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_CFLAGS
1920
!host_build: QMAKE_CXXFLAGS += $$QMAKE_CFLAGS

depends/patches/qt/mingw-uuidof.patch

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

depends/patches/qt/pidlist_absolute.patch

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

0 commit comments

Comments
 (0)