Skip to content

Commit ab399c4

Browse files
committed
depends: Add native_qt package
Unlike Qt 5, Qt 6 requires a separate native Qt build for cross-building. See: https://www.qt.io/blog/qt-6-build-system.
1 parent 248613e commit ab399c4

File tree

5 files changed

+215
-20
lines changed

5 files changed

+215
-20
lines changed

depends/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ libevent_packages_$(NO_LIBEVENT) = $(libevent_packages)
157157
qrencode_packages_$(NO_QR) = $(qrencode_$(host_os)_packages)
158158

159159
qt_packages_$(NO_QT) = $(qt_packages) $(qt_$(host_os)_packages) $(qt_$(host_arch)_$(host_os)_packages) $(qrencode_packages_)
160+
qt_native_packages_$(NO_QT) = $(qt_native_packages)
160161

161162
bdb_packages_$(NO_BDB) = $(bdb_packages)
162163
wallet_packages_$(NO_WALLET) = $(bdb_packages_) $(sqlite_packages)
@@ -166,7 +167,7 @@ multiprocess_packages_$(MULTIPROCESS) = $(multiprocess_packages)
166167
usdt_packages_$(NO_USDT) = $(usdt_$(host_os)_packages)
167168

168169
packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(boost_packages_) $(libevent_packages_) $(qt_packages_) $(wallet_packages_) $(usdt_packages_)
169-
native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages)
170+
native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages) $(qt_native_packages_)
170171

171172
ifneq ($(zmq_packages_),)
172173
packages += $(zmq_packages)

depends/packages/native_qt.mk

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
package=native_qt
2+
include packages/qt_details.mk
3+
$(package)_version=$(qt_details_version)
4+
$(package)_download_path=$(qt_details_download_path)
5+
$(package)_file_name=$(qt_details_qtbase_file_name)
6+
$(package)_sha256_hash=$(qt_details_qtbase_sha256_hash)
7+
$(package)_patches_path := $(qt_details_patches_path)
8+
$(package)_patches := dont_hardcode_pwd.patch
9+
$(package)_patches += qtbase-moc-ignore-gcc-macro.patch
10+
$(package)_patches += qtbase_skip_tools.patch
11+
$(package)_patches += rcc_hardcode_timestamp.patch
12+
$(package)_patches += qttools_skip_dependencies.patch
13+
14+
$(package)_qttranslations_file_name=$(qt_details_qttranslations_file_name)
15+
$(package)_qttranslations_sha256_hash=$(qt_details_qttranslations_sha256_hash)
16+
17+
$(package)_qttools_file_name=$(qt_details_qttools_file_name)
18+
$(package)_qttools_sha256_hash=$(qt_details_qttools_sha256_hash)
19+
20+
$(package)_extra_sources := $($(package)_qttranslations_file_name)
21+
$(package)_extra_sources += $($(package)_qttools_file_name)
22+
23+
$(package)_top_download_path=$(qt_details_top_download_path)
24+
$(package)_top_cmakelists_file_name=$(qt_details_top_cmakelists_file_name)
25+
$(package)_top_cmakelists_download_file=$(qt_details_top_cmakelists_download_file)
26+
$(package)_top_cmakelists_sha256_hash=$(qt_details_top_cmakelists_sha256_hash)
27+
$(package)_top_cmake_download_path=$(qt_details_top_cmake_download_path)
28+
$(package)_top_cmake_ecmoptionaladdsubdirectory_file_name=$(qt_details_top_cmake_ecmoptionaladdsubdirectory_file_name)
29+
$(package)_top_cmake_ecmoptionaladdsubdirectory_download_file=$(qt_details_top_cmake_ecmoptionaladdsubdirectory_download_file)
30+
$(package)_top_cmake_ecmoptionaladdsubdirectory_sha256_hash=$(qt_details_top_cmake_ecmoptionaladdsubdirectory_sha256_hash)
31+
$(package)_top_cmake_qttoplevelhelpers_file_name=$(qt_details_top_cmake_qttoplevelhelpers_file_name)
32+
$(package)_top_cmake_qttoplevelhelpers_download_file=$(qt_details_top_cmake_qttoplevelhelpers_download_file)
33+
$(package)_top_cmake_qttoplevelhelpers_sha256_hash=$(qt_details_top_cmake_qttoplevelhelpers_sha256_hash)
34+
35+
$(package)_extra_sources += $($(package)_top_cmakelists_file_name)-$($(package)_version)
36+
$(package)_extra_sources += $($(package)_top_cmake_ecmoptionaladdsubdirectory_file_name)-$($(package)_version)
37+
$(package)_extra_sources += $($(package)_top_cmake_qttoplevelhelpers_file_name)-$($(package)_version)
38+
39+
define $(package)_set_vars
40+
# Build options.
41+
$(package)_config_opts := -release
42+
$(package)_config_opts += -make tools
43+
$(package)_config_opts += -no-pkg-config
44+
$(package)_config_opts += -no-reduce-relocations
45+
$(package)_config_opts += -no-use-gold-linker
46+
$(package)_config_opts += -prefix $(host_prefix)
47+
$(package)_config_opts += -static
48+
49+
# Modules.
50+
$(package)_config_opts += -no-feature-concurrent
51+
$(package)_config_opts += -no-feature-network
52+
$(package)_config_opts += -no-feature-printsupport
53+
$(package)_config_opts += -no-feature-sql
54+
$(package)_config_opts += -no-feature-testlib
55+
$(package)_config_opts += -no-feature-xml
56+
$(package)_config_opts += -no-gui
57+
$(package)_config_opts += -no-widgets
58+
59+
$(package)_config_opts += -no-glib
60+
$(package)_config_opts += -no-icu
61+
$(package)_config_opts += -no-libudev
62+
$(package)_config_opts += -no-openssl
63+
$(package)_config_opts += -no-zstd
64+
$(package)_config_opts += -qt-pcre
65+
$(package)_config_opts += -qt-zlib
66+
$(package)_config_opts += -no-feature-backtrace
67+
$(package)_config_opts += -no-feature-permissions
68+
$(package)_config_opts += -no-feature-process
69+
$(package)_config_opts += -no-feature-settings
70+
71+
# Core tools.
72+
$(package)_config_opts += -no-feature-androiddeployqt
73+
$(package)_config_opts += -no-feature-macdeployqt
74+
$(package)_config_opts += -no-feature-windeployqt
75+
$(package)_config_opts += -no-feature-qmake
76+
77+
# Qt Tools module.
78+
$(package)_config_opts += -feature-linguist
79+
$(package)_config_opts += -no-feature-assistant
80+
$(package)_config_opts += -no-feature-clang
81+
$(package)_config_opts += -no-feature-clangcpp
82+
$(package)_config_opts += -no-feature-designer
83+
$(package)_config_opts += -no-feature-pixeltool
84+
$(package)_config_opts += -no-feature-qdoc
85+
$(package)_config_opts += -no-feature-qtattributionsscanner
86+
$(package)_config_opts += -no-feature-qtdiag
87+
$(package)_config_opts += -no-feature-qtplugininfo
88+
89+
$(package)_config_env := CC="$$(build_CC)"
90+
$(package)_config_env += CXX="$$(build_CXX)"
91+
92+
$(package)_cmake_opts := -DCMAKE_EXE_LINKER_FLAGS="$$(build_LDFLAGS)"
93+
ifneq ($(V),)
94+
$(package)_cmake_opts += --log-level=STATUS
95+
endif
96+
endef
97+
98+
define $(package)_fetch_cmds
99+
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
100+
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttranslations_file_name),$($(package)_qttranslations_file_name),$($(package)_qttranslations_sha256_hash)) && \
101+
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttools_file_name),$($(package)_qttools_file_name),$($(package)_qttools_sha256_hash)) && \
102+
$(call fetch_file,$(package),$($(package)_top_download_path),$($(package)_top_cmakelists_download_file),$($(package)_top_cmakelists_file_name)-$($(package)_version),$($(package)_top_cmakelists_sha256_hash)) && \
103+
$(call fetch_file,$(package),$($(package)_top_cmake_download_path),$($(package)_top_cmake_ecmoptionaladdsubdirectory_download_file),$($(package)_top_cmake_ecmoptionaladdsubdirectory_file_name)-$($(package)_version),$($(package)_top_cmake_ecmoptionaladdsubdirectory_sha256_hash)) && \
104+
$(call fetch_file,$(package),$($(package)_top_cmake_download_path),$($(package)_top_cmake_qttoplevelhelpers_download_file),$($(package)_top_cmake_qttoplevelhelpers_file_name)-$($(package)_version),$($(package)_top_cmake_qttoplevelhelpers_sha256_hash))
105+
endef
106+
107+
define $(package)_extract_cmds
108+
mkdir -p $($(package)_extract_dir) && \
109+
echo "$($(package)_sha256_hash) $($(package)_source)" > $($(package)_extract_dir)/.$($(package)_file_name).hash && \
110+
echo "$($(package)_qttranslations_sha256_hash) $($(package)_source_dir)/$($(package)_qttranslations_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
111+
echo "$($(package)_qttools_sha256_hash) $($(package)_source_dir)/$($(package)_qttools_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
112+
echo "$($(package)_top_cmakelists_sha256_hash) $($(package)_source_dir)/$($(package)_top_cmakelists_file_name)-$($(package)_version)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
113+
echo "$($(package)_top_cmake_ecmoptionaladdsubdirectory_sha256_hash) $($(package)_source_dir)/$($(package)_top_cmake_ecmoptionaladdsubdirectory_file_name)-$($(package)_version)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
114+
echo "$($(package)_top_cmake_qttoplevelhelpers_sha256_hash) $($(package)_source_dir)/$($(package)_top_cmake_qttoplevelhelpers_file_name)-$($(package)_version)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
115+
$(build_SHA256SUM) -c $($(package)_extract_dir)/.$($(package)_file_name).hash && \
116+
mkdir qtbase && \
117+
$(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source) -C qtbase && \
118+
mkdir qttranslations && \
119+
$(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttranslations_file_name) -C qttranslations && \
120+
mkdir qttools && \
121+
$(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttools_file_name) -C qttools && \
122+
cp $($(package)_source_dir)/$($(package)_top_cmakelists_file_name)-$($(package)_version) ./$($(package)_top_cmakelists_file_name) && \
123+
mkdir cmake && \
124+
cp $($(package)_source_dir)/$($(package)_top_cmake_ecmoptionaladdsubdirectory_file_name)-$($(package)_version) cmake/$($(package)_top_cmake_ecmoptionaladdsubdirectory_file_name) && \
125+
cp $($(package)_source_dir)/$($(package)_top_cmake_qttoplevelhelpers_file_name)-$($(package)_version) cmake/$($(package)_top_cmake_qttoplevelhelpers_file_name)
126+
endef
127+
128+
define $(package)_preprocess_cmds
129+
patch -p1 -i $($(package)_patch_dir)/dont_hardcode_pwd.patch && \
130+
patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.patch && \
131+
patch -p1 -i $($(package)_patch_dir)/qtbase_skip_tools.patch && \
132+
patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch && \
133+
patch -p1 -i $($(package)_patch_dir)/qttools_skip_dependencies.patch
134+
endef
135+
136+
define $(package)_config_cmds
137+
cd qtbase && \
138+
./configure -top-level $($(package)_config_opts) -- $($(package)_cmake_opts)
139+
endef
140+
141+
define $(package)_build_cmds
142+
cmake --build . -- $$(filter -j%,$$(MAKEFLAGS))
143+
endef
144+
145+
define $(package)_stage_cmds
146+
cmake --install . --prefix $($(package)_staging_prefix_dir)
147+
endef
148+
149+
define $(package)_postprocess_cmds
150+
rm -rf doc/ && \
151+
mv -t .. translations/
152+
endef

depends/packages/packages.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ qrencode_mingw32_packages = qrencode
1111
qt_linux_packages:=qt expat libxcb xcb_proto libXau xproto freetype fontconfig libxkbcommon libxcb_util libxcb_util_cursor libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm
1212
qt_darwin_packages=qt
1313
qt_mingw32_packages=qt
14+
ifneq ($(host),$(build))
15+
qt_native_packages := native_qt
16+
endif
1417

1518
bdb_packages=bdb
1619
sqlite_packages=sqlite

depends/packages/qt.mk

Lines changed: 56 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ $(package)_version=$(qt_details_version)
44
$(package)_download_path=$(qt_details_download_path)
55
$(package)_file_name=$(qt_details_qtbase_file_name)
66
$(package)_sha256_hash=$(qt_details_qtbase_sha256_hash)
7+
ifneq ($(host),$(build))
8+
$(package)_dependencies := native_$(package)
9+
endif
710
$(package)_linux_dependencies=freetype fontconfig libxcb libxkbcommon libxcb_util libxcb_util_cursor libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm
11+
$(package)_patches_path := $(qt_details_patches_path)
812
$(package)_patches := dont_hardcode_pwd.patch
913
$(package)_patches += qtbase-moc-ignore-gcc-macro.patch
1014
$(package)_patches += qtbase_avoid_native_float16.patch
@@ -71,6 +75,9 @@ $(package)_config_opts += -nomake tests
7175
$(package)_config_opts += -prefix $(host_prefix)
7276
$(package)_config_opts += -qt-doubleconversion
7377
$(package)_config_opts += -qt-harfbuzz
78+
ifneq ($(host),$(build))
79+
$(package)_config_opts += -qt-host-path $(build_prefix)
80+
endif
7481
$(package)_config_opts += -qt-libpng
7582
$(package)_config_opts += -qt-pcre
7683
$(package)_config_opts += -qt-zlib
@@ -109,6 +116,7 @@ $(package)_config_opts += -no-feature-macdeployqt
109116
$(package)_config_opts += -no-feature-qmake
110117
$(package)_config_opts += -no-feature-windeployqt
111118

119+
ifeq ($(host),$(build))
112120
# Qt Tools module.
113121
$(package)_config_opts += -feature-linguist
114122
$(package)_config_opts += -no-feature-assistant
@@ -120,25 +128,12 @@ $(package)_config_opts += -no-feature-qdoc
120128
$(package)_config_opts += -no-feature-qtattributionsscanner
121129
$(package)_config_opts += -no-feature-qtdiag
122130
$(package)_config_opts += -no-feature-qtplugininfo
123-
124-
$(package)_config_opts_darwin = -no-pkg-config
125-
$(package)_config_opts_darwin += -no-dbus
126-
$(package)_config_opts_darwin += -no-freetype
127-
$(package)_config_opts_darwin += QMAKE_MACOSX_DEPLOYMENT_TARGET=$(OSX_MIN_VERSION)
128-
129-
ifneq ($(build_os),darwin)
130-
$(package)_config_opts_darwin += -xplatform macx-clang-linux
131-
$(package)_config_opts_darwin += -device-option MAC_SDK_PATH=$(OSX_SDK)
132-
$(package)_config_opts_darwin += -device-option MAC_SDK_VERSION=$(OSX_SDK_VERSION)
133-
$(package)_config_opts_darwin += -device-option CROSS_COMPILE="llvm-"
134-
$(package)_config_opts_darwin += -device-option MAC_TARGET=$(host)
135-
$(package)_config_opts_darwin += -device-option XCODE_VERSION=$(XCODE_VERSION)
136131
endif
137132

138-
ifneq ($(build_arch),$(host_arch))
139-
$(package)_config_opts_aarch64_darwin += -device-option QMAKE_APPLE_DEVICE_ARCHS=arm64
140-
$(package)_config_opts_x86_64_darwin += -device-option QMAKE_APPLE_DEVICE_ARCHS=x86_64
141-
endif
133+
$(package)_config_opts_darwin := -no-dbus
134+
$(package)_config_opts_darwin += -no-feature-printsupport
135+
$(package)_config_opts_darwin += -no-freetype
136+
$(package)_config_opts_darwin += -no-pkg-config
142137

143138
$(package)_config_opts_linux := -dbus-runtime
144139
$(package)_config_opts_linux += -fontconfig
@@ -162,6 +157,8 @@ endif
162157
# CMake build options.
163158
$(package)_config_env := CC="$$($(package)_cc)"
164159
$(package)_config_env += CXX="$$($(package)_cxx)"
160+
$(package)_config_env_darwin := OBJC="$$($(package)_cc)"
161+
$(package)_config_env_darwin += OBJCXX="$$($(package)_cxx)"
165162

166163
$(package)_cmake_opts := -DCMAKE_PREFIX_PATH=$(host_prefix)
167164
$(package)_cmake_opts += -DQT_FEATURE_cxx20=ON
@@ -177,9 +174,30 @@ $(package)_cmake_opts += -DCMAKE_C_FLAGS_DEBUG="$$($$($(package)_type)_debug_CFL
177174
$(package)_cmake_opts += -DCMAKE_CXX_FLAGS="$$($(package)_cppflags) $$($$($(package)_type)_CXXFLAGS) -ffile-prefix-map=$$($(package)_extract_dir)=/usr"
178175
$(package)_cmake_opts += -DCMAKE_CXX_FLAGS_RELEASE="$$($$($(package)_type)_release_CXXFLAGS)"
179176
$(package)_cmake_opts += -DCMAKE_CXX_FLAGS_DEBUG="$$($$($(package)_type)_debug_CXXFLAGS)"
177+
ifeq ($(host_os),darwin)
178+
$(package)_cmake_opts += -DCMAKE_OBJC_FLAGS="$$($(package)_cppflags) $$($$($(package)_type)_CFLAGS) -ffile-prefix-map=$$($(package)_extract_dir)=/usr"
179+
$(package)_cmake_opts += -DCMAKE_OBJC_FLAGS_RELEASE="$$($$($(package)_type)_release_CFLAGS)"
180+
$(package)_cmake_opts += -DCMAKE_OBJC_FLAGS_DEBUG="$$($$($(package)_type)_debug_CFLAGS)"
181+
$(package)_cmake_opts += -DCMAKE_OBJCXX_FLAGS="$$($(package)_cppflags) $$($$($(package)_type)_CXXFLAGS) -ffile-prefix-map=$$($(package)_extract_dir)=/usr"
182+
$(package)_cmake_opts += -DCMAKE_OBJCXX_FLAGS_RELEASE="$$($$($(package)_type)_release_CXXFLAGS)"
183+
$(package)_cmake_opts += -DCMAKE_OBJCXX_FLAGS_DEBUG="$$($$($(package)_type)_debug_CXXFLAGS)"
184+
endif
180185
$(package)_cmake_opts += -DCMAKE_EXE_LINKER_FLAGS="$$($$($(package)_type)_LDFLAGS)"
181186
$(package)_cmake_opts += -DCMAKE_EXE_LINKER_FLAGS_RELEASE="$$($$($(package)_type)_release_LDFLAGS)"
182187
$(package)_cmake_opts += -DCMAKE_EXE_LINKER_FLAGS_DEBUG="$$($$($(package)_type)_debug_LDFLAGS)"
188+
189+
ifneq ($(host),$(build))
190+
$(package)_cmake_opts += -DCMAKE_SYSTEM_NAME=$($(host_os)_cmake_system_name)
191+
$(package)_cmake_opts += -DCMAKE_SYSTEM_VERSION=$($(host_os)_cmake_system_version)
192+
$(package)_cmake_opts += -DCMAKE_SYSTEM_PROCESSOR=$(host_arch)
193+
endif
194+
ifeq ($(host_os),darwin)
195+
$(package)_cmake_opts += -DCMAKE_INSTALL_NAME_TOOL=true
196+
$(package)_cmake_opts += -DCMAKE_FRAMEWORK_PATH=$(OSX_SDK)/System/Library/Frameworks
197+
$(package)_cmake_opts += -DQT_INTERNAL_APPLE_SDK_VERSION=$(OSX_SDK_VERSION)
198+
$(package)_cmake_opts += -DQT_INTERNAL_XCODE_VERSION=$(XCODE_VERSION)
199+
$(package)_cmake_opts += -DQT_NO_APPLE_SDK_MAX_VERSION_CHECK=ON
200+
endif
183201
endef
184202

185203
define $(package)_fetch_cmds
@@ -191,6 +209,7 @@ $(call fetch_file,$(package),$($(package)_top_cmake_download_path),$($(package)_
191209
$(call fetch_file,$(package),$($(package)_top_cmake_download_path),$($(package)_top_cmake_qttoplevelhelpers_download_file),$($(package)_top_cmake_qttoplevelhelpers_file_name)-$($(package)_version),$($(package)_top_cmake_qttoplevelhelpers_sha256_hash))
192210
endef
193211

212+
ifeq ($(host),$(build))
194213
define $(package)_extract_cmds
195214
mkdir -p $($(package)_extract_dir) && \
196215
echo "$($(package)_sha256_hash) $($(package)_source)" > $($(package)_extract_dir)/.$($(package)_file_name).hash && \
@@ -211,6 +230,22 @@ define $(package)_extract_cmds
211230
cp $($(package)_source_dir)/$($(package)_top_cmake_ecmoptionaladdsubdirectory_file_name)-$($(package)_version) cmake/$($(package)_top_cmake_ecmoptionaladdsubdirectory_file_name) && \
212231
cp $($(package)_source_dir)/$($(package)_top_cmake_qttoplevelhelpers_file_name)-$($(package)_version) cmake/$($(package)_top_cmake_qttoplevelhelpers_file_name)
213232
endef
233+
else
234+
define $(package)_extract_cmds
235+
mkdir -p $($(package)_extract_dir) && \
236+
echo "$($(package)_sha256_hash) $($(package)_source)" > $($(package)_extract_dir)/.$($(package)_file_name).hash && \
237+
echo "$($(package)_top_cmakelists_sha256_hash) $($(package)_source_dir)/$($(package)_top_cmakelists_file_name)-$($(package)_version)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
238+
echo "$($(package)_top_cmake_ecmoptionaladdsubdirectory_sha256_hash) $($(package)_source_dir)/$($(package)_top_cmake_ecmoptionaladdsubdirectory_file_name)-$($(package)_version)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
239+
echo "$($(package)_top_cmake_qttoplevelhelpers_sha256_hash) $($(package)_source_dir)/$($(package)_top_cmake_qttoplevelhelpers_file_name)-$($(package)_version)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
240+
$(build_SHA256SUM) -c $($(package)_extract_dir)/.$($(package)_file_name).hash && \
241+
mkdir qtbase && \
242+
$(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source) -C qtbase && \
243+
cp $($(package)_source_dir)/$($(package)_top_cmakelists_file_name)-$($(package)_version) ./$($(package)_top_cmakelists_file_name) && \
244+
mkdir cmake && \
245+
cp $($(package)_source_dir)/$($(package)_top_cmake_ecmoptionaladdsubdirectory_file_name)-$($(package)_version) cmake/$($(package)_top_cmake_ecmoptionaladdsubdirectory_file_name) && \
246+
cp $($(package)_source_dir)/$($(package)_top_cmake_qttoplevelhelpers_file_name)-$($(package)_version) cmake/$($(package)_top_cmake_qttoplevelhelpers_file_name)
247+
endef
248+
endif
214249

215250
define $(package)_preprocess_cmds
216251
patch -p1 -i $($(package)_patch_dir)/dont_hardcode_pwd.patch && \
@@ -220,9 +255,11 @@ define $(package)_preprocess_cmds
220255
patch -p1 -i $($(package)_patch_dir)/qtbase_platformsupport.patch && \
221256
patch -p1 -i $($(package)_patch_dir)/qtbase_plugins_cocoa.patch && \
222257
patch -p1 -i $($(package)_patch_dir)/qtbase_skip_tools.patch && \
223-
patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch && \
224-
patch -p1 -i $($(package)_patch_dir)/qttools_skip_dependencies.patch
258+
patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch
225259
endef
260+
ifeq ($(host),$(build))
261+
$(package)_preprocess_cmds += && patch -p1 -i $($(package)_patch_dir)/qttools_skip_dependencies.patch
262+
endif
226263

227264
define $(package)_config_cmds
228265
cd qtbase && \

depends/packages/qt_details.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ qt_details_qttranslations_sha256_hash := dcc762acac043b9bb5e4d369b6d6f53e0ecfcf7
1111
qt_details_qttools_file_name := qttools-$(qt_details_suffix)
1212
qt_details_qttools_sha256_hash := f03bb7df619cd9ac9dba110e30b7bcab5dd88eb8bdc9cc752563b4367233203f
1313

14+
qt_details_patches_path := $(PATCHES_PATH)/qt
15+
1416
qt_details_top_download_path := https://code.qt.io/cgit/qt/qt5.git/plain
1517
qt_details_top_cmakelists_file_name := CMakeLists.txt
1618
qt_details_top_cmakelists_download_file := $(qt_details_top_cmakelists_file_name)?h=$(qt_details_version)

0 commit comments

Comments
 (0)