2023-08-03 13:45:17 +02:00
|
|
|
package=qt
|
2023-11-02 10:50:39 +01:00
|
|
|
$(package)_version=5.15.11
|
2023-08-03 13:45:17 +02:00
|
|
|
$(package)_download_path=https://download.qt.io/official_releases/qt/5.15/$($(package)_version)/submodules
|
2023-06-30 17:43:54 +02:00
|
|
|
$(package)_suffix=everywhere-opensource-src-$($(package)_version).tar.xz
|
2015-07-24 01:07:03 +02:00
|
|
|
$(package)_file_name=qtbase-$($(package)_suffix)
|
2023-11-02 10:50:39 +01:00
|
|
|
$(package)_sha256_hash=425ad301acd91ca66c10c0dabee0704e2d0cd2801a6b670115800cbb95f84846
|
2023-08-03 13:45:17 +02:00
|
|
|
$(package)_linux_dependencies=freetype fontconfig libxcb libxkbcommon libxcb_util libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm
|
2014-07-23 07:31:30 +02:00
|
|
|
$(package)_qt_libs=corelib network widgets gui plugins testlib
|
2021-06-10 05:02:27 +02:00
|
|
|
$(package)_linguist_tools = lrelease lupdate lconvert
|
2023-06-30 17:43:54 +02:00
|
|
|
$(package)_patches = qt.pro
|
|
|
|
$(package)_patches += qttools_src.pro
|
|
|
|
$(package)_patches += mac-qmake.conf
|
|
|
|
$(package)_patches += fix_qt_pkgconfig.patch
|
2023-10-04 16:47:08 +02:00
|
|
|
$(package)_patches += fix_qt_placeholders.patch
|
2023-06-30 17:43:54 +02:00
|
|
|
$(package)_patches += no-xlib.patch
|
|
|
|
$(package)_patches += fix_android_jni_static.patch
|
|
|
|
$(package)_patches += dont_hardcode_pwd.patch
|
|
|
|
$(package)_patches += qtbase-moc-ignore-gcc-macro.patch
|
|
|
|
$(package)_patches += use_android_ndk23.patch
|
|
|
|
$(package)_patches += rcc_hardcode_timestamp.patch
|
|
|
|
$(package)_patches += duplicate_lcqpafonts.patch
|
2023-08-03 13:53:29 +02:00
|
|
|
$(package)_patches += guix_cross_lib_path.patch
|
2023-06-27 20:51:37 +02:00
|
|
|
$(package)_patches += fast_fixed_dtoa_no_optimize.patch
|
2023-10-03 11:20:11 +02:00
|
|
|
$(package)_patches += fix-macos-linker.patch
|
2023-10-03 16:53:37 +02:00
|
|
|
$(package)_patches += memory_resource.patch
|
2023-10-06 11:20:08 +02:00
|
|
|
$(package)_patches += windows_lto.patch
|
2023-12-01 21:28:03 +01:00
|
|
|
$(package)_patches += fix-minimum-macos.patch
|
2015-07-24 01:07:03 +02:00
|
|
|
|
|
|
|
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
|
2023-11-02 10:50:39 +01:00
|
|
|
$(package)_qttranslations_sha256_hash=a31785948c640b7c66d9fe2db4993728ca07f64e41c560b3625ad191b276ff20
|
2015-07-24 01:07:03 +02:00
|
|
|
|
|
|
|
$(package)_qttools_file_name=qttools-$($(package)_suffix)
|
2023-11-02 10:50:39 +01:00
|
|
|
$(package)_qttools_sha256_hash=7cd847ae6ff09416df617136eadcaf0eb98e3bc9b89979219a3ea8111fb8d339
|
2015-07-24 01:07:03 +02:00
|
|
|
|
|
|
|
$(package)_extra_sources = $($(package)_qttranslations_file_name)
|
|
|
|
$(package)_extra_sources += $($(package)_qttools_file_name)
|
2014-07-23 07:31:30 +02:00
|
|
|
|
|
|
|
define $(package)_set_vars
|
Merge bitcoin/bitcoin#24279: build: Make `$(package)_*_env` available to all `$(package)_*_cmds`
affbf58a1e52a8e60c830be6a9e0347e0ff4c28e build: Move environment variables into `$(package)_config_env` (Hennadii Stepanov)
d44fcd3c976572883bbf7f386bc88e2610dc1a58 build: Make $(package)_*_env available to all $(package)_*_cmds (Hennadii Stepanov)
Pull request description:
On master (1e7564eca8a688f39c75540877ec3bdfdde766b1) the depends build system, which is based on pure GNU Make, works, but it lacks robustness, and in some corner cases it fails. For example, see bitcoin/bitcoin#22552.
Another [bug](https://github.com/bitcoin/bitcoin/issues/22719) in the depends build system has already become a problem at least two times in the past (https://github.com/bitcoin/bitcoin/pull/16883#issuecomment-683817472 and https://github.com/bitcoin/bitcoin/pull/24134). Each time the problem was solved with other means.
The initial [solution](https://github.com/bitcoin/bitcoin/pull/19882) had some discussion. Also it was discussed on the IRC meeting in #bitcoin-core-builds channel. This PR, actually, is a resurrection of it, as the bug silently struck pretty [recently](https://github.com/bitcoin/bitcoin/pull/24134).
The bug is well described in bitcoin/bitcoin#22719.
Here is another, a bit simpler description, which requires only basic shell (bash, dash etc) experience.
After creating targets by this code:https://github.com/bitcoin/bitcoin/blob/1e7564eca8a688f39c75540877ec3bdfdde766b1/depends/funcs.mk#L280 a "draft" line of recipe like `$($(1)_config_env) $(call $(1)_config_cmds, $(1))` becomes a shell command sequence `VAR1=foo VAR2=bar command1 && command2` which is supposed to be executed in a [new sub-shell](https://www.gnu.org/software/make/manual/html_node/Execution.html#Execution).
Please note that `VAR1=foo VAR2=bar` part is visible for the first `command1` only (for details see shell docs). Example:
```sh
$ VAR1="foo" VAR2="bar" echo "begin" && printenv VAR1 && printenv VAR2 && echo "end"
begin
$ echo $?
1
```
Using the `export` command is a trivial solution:
```sh
$ export VAR1="foo" VAR2="bar"; echo "begin" && printenv VAR1 && printenv VAR2 && echo "end"
begin
foo
bar
end
$ echo $?
0
```
As a [new sub-shell](https://www.gnu.org/software/make/manual/html_node/Execution.html#Execution) is invoked for each line of the recipe, there are no side effects of using `export`. It means this solution should not be considered invasive.
Fixes bitcoin/bitcoin#22719.
---
Also this PR removes no longer needed crutch from `qt.mk`.
ACKs for top commit:
fanquake:
ACK affbf58a1e52a8e60c830be6a9e0347e0ff4c28e
Tree-SHA512: 0ce2cf82870a7774bdf1592fac50857126ae47da902e349f1092d50109223be9d6a8efd5e92ec08c2ca775b17516482aabaf232378950ade36484a883acc177b
2022-12-08 17:41:31 +01:00
|
|
|
$(package)_config_env = QT_MAC_SDK_NO_VERSION_CHECK=1
|
2014-09-23 23:41:42 +02:00
|
|
|
$(package)_config_opts_release = -release
|
2020-11-23 14:04:09 +01:00
|
|
|
$(package)_config_opts_release += -silent
|
2017-01-15 06:41:39 +01:00
|
|
|
$(package)_config_opts_debug = -debug
|
2021-11-25 05:02:50 +01:00
|
|
|
$(package)_config_opts_debug += -optimized-tools
|
2016-06-20 13:31:17 +02:00
|
|
|
$(package)_config_opts += -bindir $(build_prefix)/bin
|
2023-08-03 13:45:17 +02:00
|
|
|
$(package)_config_opts += -c++std c++17
|
2016-06-20 13:31:17 +02:00
|
|
|
$(package)_config_opts += -confirm-license
|
|
|
|
$(package)_config_opts += -hostprefix $(build_prefix)
|
2018-12-13 14:32:41 +01:00
|
|
|
$(package)_config_opts += -no-compile-examples
|
2016-06-20 13:31:17 +02:00
|
|
|
$(package)_config_opts += -no-cups
|
|
|
|
$(package)_config_opts += -no-egl
|
|
|
|
$(package)_config_opts += -no-eglfs
|
2023-08-03 13:45:17 +02:00
|
|
|
$(package)_config_opts += -no-evdev
|
2016-06-20 13:31:17 +02:00
|
|
|
$(package)_config_opts += -no-gif
|
2015-06-12 19:49:47 +02:00
|
|
|
$(package)_config_opts += -no-glib
|
|
|
|
$(package)_config_opts += -no-icu
|
2019-07-25 22:01:43 +02:00
|
|
|
$(package)_config_opts += -no-ico
|
2015-06-12 19:49:47 +02:00
|
|
|
$(package)_config_opts += -no-iconv
|
2016-06-20 13:31:17 +02:00
|
|
|
$(package)_config_opts += -no-kms
|
|
|
|
$(package)_config_opts += -no-linuxfb
|
2022-06-13 21:03:26 +02:00
|
|
|
$(package)_config_opts += -no-libjpeg
|
2019-12-16 13:25:07 +01:00
|
|
|
$(package)_config_opts += -no-libproxy
|
2016-06-20 13:31:17 +02:00
|
|
|
$(package)_config_opts += -no-libudev
|
2022-09-10 10:52:04 +02:00
|
|
|
$(package)_config_opts += -no-mimetype-database
|
2016-06-20 13:31:17 +02:00
|
|
|
$(package)_config_opts += -no-mtdev
|
2022-04-25 11:01:47 +02:00
|
|
|
$(package)_config_opts += -no-openssl
|
2016-06-20 13:31:17 +02:00
|
|
|
$(package)_config_opts += -no-openvg
|
|
|
|
$(package)_config_opts += -no-reduce-relocations
|
2023-08-03 13:45:17 +02:00
|
|
|
$(package)_config_opts += -no-schannel
|
2019-12-16 13:25:07 +01:00
|
|
|
$(package)_config_opts += -no-sctp
|
2022-06-13 21:03:26 +02:00
|
|
|
$(package)_config_opts += -no-securetransport
|
2015-06-12 19:49:47 +02:00
|
|
|
$(package)_config_opts += -no-sql-db2
|
|
|
|
$(package)_config_opts += -no-sql-ibase
|
|
|
|
$(package)_config_opts += -no-sql-oci
|
|
|
|
$(package)_config_opts += -no-sql-tds
|
|
|
|
$(package)_config_opts += -no-sql-mysql
|
|
|
|
$(package)_config_opts += -no-sql-odbc
|
|
|
|
$(package)_config_opts += -no-sql-psql
|
|
|
|
$(package)_config_opts += -no-sql-sqlite
|
|
|
|
$(package)_config_opts += -no-sql-sqlite2
|
2019-12-16 13:25:07 +01:00
|
|
|
$(package)_config_opts += -no-system-proxies
|
2016-06-20 13:31:17 +02:00
|
|
|
$(package)_config_opts += -no-use-gold-linker
|
2023-08-03 13:45:17 +02:00
|
|
|
$(package)_config_opts += -no-zstd
|
2016-06-20 13:31:17 +02:00
|
|
|
$(package)_config_opts += -nomake examples
|
|
|
|
$(package)_config_opts += -nomake tests
|
2021-06-10 05:02:27 +02:00
|
|
|
$(package)_config_opts += -nomake tools
|
2016-06-20 13:31:17 +02:00
|
|
|
$(package)_config_opts += -opensource
|
2015-06-12 19:49:47 +02:00
|
|
|
$(package)_config_opts += -pkg-config
|
2016-06-20 13:31:17 +02:00
|
|
|
$(package)_config_opts += -prefix $(host_prefix)
|
2015-06-12 19:49:47 +02:00
|
|
|
$(package)_config_opts += -qt-libpng
|
|
|
|
$(package)_config_opts += -qt-pcre
|
2019-03-01 16:29:48 +01:00
|
|
|
$(package)_config_opts += -qt-harfbuzz
|
2021-11-25 05:02:50 +01:00
|
|
|
$(package)_config_opts += -qt-zlib
|
2016-06-20 13:31:17 +02:00
|
|
|
$(package)_config_opts += -static
|
|
|
|
$(package)_config_opts += -v
|
2019-07-25 22:01:43 +02:00
|
|
|
$(package)_config_opts += -no-feature-bearermanagement
|
|
|
|
$(package)_config_opts += -no-feature-colordialog
|
|
|
|
$(package)_config_opts += -no-feature-commandlineparser
|
|
|
|
$(package)_config_opts += -no-feature-concurrent
|
2018-12-13 14:32:41 +01:00
|
|
|
$(package)_config_opts += -no-feature-dial
|
2019-07-25 22:01:43 +02:00
|
|
|
$(package)_config_opts += -no-feature-fontcombobox
|
2018-12-13 14:32:41 +01:00
|
|
|
$(package)_config_opts += -no-feature-ftp
|
2019-12-16 13:25:07 +01:00
|
|
|
$(package)_config_opts += -no-feature-http
|
2019-07-25 22:01:43 +02:00
|
|
|
$(package)_config_opts += -no-feature-image_heuristic_mask
|
|
|
|
$(package)_config_opts += -no-feature-keysequenceedit
|
2018-12-13 14:32:41 +01:00
|
|
|
$(package)_config_opts += -no-feature-lcdnumber
|
2019-12-16 13:25:07 +01:00
|
|
|
$(package)_config_opts += -no-feature-networkdiskcache
|
|
|
|
$(package)_config_opts += -no-feature-networkproxy
|
2018-12-13 14:32:41 +01:00
|
|
|
$(package)_config_opts += -no-feature-pdf
|
2017-01-26 10:30:36 +01:00
|
|
|
$(package)_config_opts += -no-feature-printdialog
|
2019-07-25 22:01:43 +02:00
|
|
|
$(package)_config_opts += -no-feature-printer
|
|
|
|
$(package)_config_opts += -no-feature-printpreviewdialog
|
|
|
|
$(package)_config_opts += -no-feature-printpreviewwidget
|
|
|
|
$(package)_config_opts += -no-feature-sessionmanager
|
2019-12-16 13:25:07 +01:00
|
|
|
$(package)_config_opts += -no-feature-socks5
|
2018-12-13 14:32:41 +01:00
|
|
|
$(package)_config_opts += -no-feature-sql
|
2021-11-25 05:02:50 +01:00
|
|
|
$(package)_config_opts += -no-feature-sqlmodel
|
2018-12-13 14:32:41 +01:00
|
|
|
$(package)_config_opts += -no-feature-statemachine
|
|
|
|
$(package)_config_opts += -no-feature-syntaxhighlighter
|
|
|
|
$(package)_config_opts += -no-feature-textbrowser
|
2023-08-03 13:45:17 +02:00
|
|
|
$(package)_config_opts += -no-feature-textmarkdownwriter
|
2018-12-13 14:32:41 +01:00
|
|
|
$(package)_config_opts += -no-feature-textodfwriter
|
2019-07-25 22:01:43 +02:00
|
|
|
$(package)_config_opts += -no-feature-topleveldomain
|
|
|
|
$(package)_config_opts += -no-feature-undocommand
|
|
|
|
$(package)_config_opts += -no-feature-undogroup
|
|
|
|
$(package)_config_opts += -no-feature-undostack
|
|
|
|
$(package)_config_opts += -no-feature-undoview
|
|
|
|
$(package)_config_opts += -no-feature-vnc
|
2018-12-13 14:32:41 +01:00
|
|
|
$(package)_config_opts += -no-feature-wizard
|
2018-05-19 16:22:47 +02:00
|
|
|
$(package)_config_opts += -no-feature-xml
|
2014-07-23 07:31:30 +02:00
|
|
|
|
2019-12-01 04:46:05 +01:00
|
|
|
$(package)_config_opts_darwin = -no-dbus
|
2019-12-09 10:05:20 +01:00
|
|
|
$(package)_config_opts_darwin += -no-opengl
|
2020-11-27 18:56:24 +01:00
|
|
|
$(package)_config_opts_darwin += -pch
|
2021-03-21 22:45:26 +01:00
|
|
|
$(package)_config_opts_darwin += -no-feature-corewlan
|
2023-08-03 13:45:17 +02:00
|
|
|
$(package)_config_opts_darwin += -no-freetype
|
2021-06-10 05:02:27 +02:00
|
|
|
$(package)_config_opts_darwin += QMAKE_MACOSX_DEPLOYMENT_TARGET=$(OSX_MIN_VERSION)
|
2019-12-01 04:46:05 +01:00
|
|
|
|
2014-07-23 07:31:30 +02:00
|
|
|
ifneq ($(build_os),darwin)
|
2019-12-01 04:46:05 +01:00
|
|
|
$(package)_config_opts_darwin += -xplatform macx-clang-linux
|
2015-06-12 19:49:47 +02:00
|
|
|
$(package)_config_opts_darwin += -device-option MAC_SDK_PATH=$(OSX_SDK)
|
2015-07-24 01:07:03 +02:00
|
|
|
$(package)_config_opts_darwin += -device-option MAC_SDK_VERSION=$(OSX_SDK_VERSION)
|
2015-06-12 19:49:47 +02:00
|
|
|
$(package)_config_opts_darwin += -device-option CROSS_COMPILE="$(host)-"
|
|
|
|
$(package)_config_opts_darwin += -device-option MAC_TARGET=$(host)
|
2020-09-04 02:23:19 +02:00
|
|
|
$(package)_config_opts_darwin += -device-option XCODE_VERSION=$(XCODE_VERSION)
|
2014-07-23 07:31:30 +02:00
|
|
|
endif
|
|
|
|
|
2021-11-24 16:00:43 +01:00
|
|
|
ifneq ($(build_arch),$(host_arch))
|
2021-06-03 15:04:16 +02:00
|
|
|
$(package)_config_opts_aarch64_darwin += -device-option QMAKE_APPLE_DEVICE_ARCHS=arm64
|
2021-11-24 16:00:43 +01:00
|
|
|
$(package)_config_opts_x86_64_darwin += -device-option QMAKE_APPLE_DEVICE_ARCHS=x86_64
|
|
|
|
endif
|
2020-12-07 10:07:43 +01:00
|
|
|
|
2023-08-03 13:45:17 +02:00
|
|
|
$(package)_config_opts_linux = -xcb
|
2019-07-23 08:22:06 +02:00
|
|
|
$(package)_config_opts_linux += -no-xcb-xlib
|
|
|
|
$(package)_config_opts_linux += -no-feature-xlib
|
2015-06-12 19:49:47 +02:00
|
|
|
$(package)_config_opts_linux += -system-freetype
|
|
|
|
$(package)_config_opts_linux += -fontconfig
|
|
|
|
$(package)_config_opts_linux += -no-opengl
|
2021-11-25 05:02:50 +01:00
|
|
|
$(package)_config_opts_linux += -no-feature-vulkan
|
2019-12-01 04:46:05 +01:00
|
|
|
$(package)_config_opts_linux += -dbus-runtime
|
2022-06-21 18:16:46 +02:00
|
|
|
ifneq ($(LTO),)
|
|
|
|
$(package)_config_opts_linux += -ltcg
|
|
|
|
endif
|
2024-11-04 14:06:47 +01:00
|
|
|
$(package)_config_opts_linux += -platform linux-g++ -xplatform bitcoin-linux-g++
|
2021-12-30 04:32:24 +01:00
|
|
|
ifneq (,$(findstring -stdlib=libc++,$($(1)_cxx)))
|
|
|
|
$(package)_config_opts_x86_64_linux = -xplatform linux-clang-libc++
|
|
|
|
endif
|
2019-12-01 04:46:05 +01:00
|
|
|
|
|
|
|
$(package)_config_opts_mingw32 = -no-opengl
|
|
|
|
$(package)_config_opts_mingw32 += -no-dbus
|
2023-08-03 13:45:17 +02:00
|
|
|
$(package)_config_opts_mingw32 += -no-freetype
|
2019-12-01 04:46:05 +01:00
|
|
|
$(package)_config_opts_mingw32 += -xplatform win32-g++
|
2021-05-12 06:24:23 +02:00
|
|
|
$(package)_config_opts_mingw32 += "QMAKE_CFLAGS = '$($(package)_cflags) $($(package)_cppflags)'"
|
2023-06-30 17:51:07 +02:00
|
|
|
$(package)_config_opts_mingw32 += "QMAKE_CXX = '$($(package)_cxx)'"
|
2023-06-30 17:51:52 +02:00
|
|
|
$(package)_config_opts_mingw32 += "QMAKE_CXXFLAGS = '$($(package)_cxxflags) $($(package)_cppflags)'"
|
2024-03-27 17:16:28 +01:00
|
|
|
$(package)_config_opts_mingw32 += "QMAKE_LINK = '$($(package)_cxx)'"
|
2021-05-12 06:24:23 +02:00
|
|
|
$(package)_config_opts_mingw32 += "QMAKE_LFLAGS = '$($(package)_ldflags)'"
|
2023-06-30 17:53:40 +02:00
|
|
|
$(package)_config_opts_mingw32 += "QMAKE_LIB = '$($(package)_ar) rc'"
|
2019-12-01 04:46:05 +01:00
|
|
|
$(package)_config_opts_mingw32 += -device-option CROSS_COMPILE="$(host)-"
|
2020-11-27 18:56:24 +01:00
|
|
|
$(package)_config_opts_mingw32 += -pch
|
2023-10-06 11:20:08 +02:00
|
|
|
ifneq ($(LTO),)
|
|
|
|
$(package)_config_opts_mingw32 += -ltcg
|
|
|
|
endif
|
2021-11-24 05:32:59 +01:00
|
|
|
|
|
|
|
$(package)_config_opts_android = -xplatform android-clang
|
|
|
|
$(package)_config_opts_android += -android-sdk $(ANDROID_SDK)
|
|
|
|
$(package)_config_opts_android += -android-ndk $(ANDROID_NDK)
|
|
|
|
$(package)_config_opts_android += -android-ndk-platform android-$(ANDROID_API_LEVEL)
|
|
|
|
$(package)_config_opts_android += -egl
|
|
|
|
$(package)_config_opts_android += -qpa xcb
|
2019-12-01 04:46:05 +01:00
|
|
|
$(package)_config_opts_android += -no-dbus
|
2021-11-24 05:32:59 +01:00
|
|
|
$(package)_config_opts_android += -opengl es2
|
|
|
|
$(package)_config_opts_android += -qt-freetype
|
|
|
|
$(package)_config_opts_android += -no-fontconfig
|
|
|
|
$(package)_config_opts_android += -L $(host_prefix)/lib
|
|
|
|
$(package)_config_opts_android += -I $(host_prefix)/include
|
2020-11-27 18:56:24 +01:00
|
|
|
$(package)_config_opts_android += -pch
|
2021-03-21 16:50:25 +01:00
|
|
|
$(package)_config_opts_android += -no-feature-vulkan
|
2021-11-24 05:32:59 +01:00
|
|
|
|
|
|
|
$(package)_config_opts_aarch64_android += -android-arch arm64-v8a
|
|
|
|
$(package)_config_opts_armv7a_android += -android-arch armeabi-v7a
|
|
|
|
$(package)_config_opts_x86_64_android += -android-arch x86_64
|
2014-07-23 07:31:30 +02:00
|
|
|
endef
|
|
|
|
|
2015-07-24 01:07:03 +02:00
|
|
|
define $(package)_fetch_cmds
|
|
|
|
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
|
|
|
|
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttranslations_file_name),$($(package)_qttranslations_file_name),$($(package)_qttranslations_sha256_hash)) && \
|
|
|
|
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttools_file_name),$($(package)_qttools_file_name),$($(package)_qttools_sha256_hash))
|
|
|
|
endef
|
|
|
|
|
|
|
|
define $(package)_extract_cmds
|
|
|
|
mkdir -p $($(package)_extract_dir) && \
|
|
|
|
echo "$($(package)_sha256_hash) $($(package)_source)" > $($(package)_extract_dir)/.$($(package)_file_name).hash && \
|
2016-04-15 08:55:38 +02:00
|
|
|
echo "$($(package)_qttranslations_sha256_hash) $($(package)_source_dir)/$($(package)_qttranslations_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
|
|
|
|
echo "$($(package)_qttools_sha256_hash) $($(package)_source_dir)/$($(package)_qttools_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
|
2015-07-24 01:07:03 +02:00
|
|
|
$(build_SHA256SUM) -c $($(package)_extract_dir)/.$($(package)_file_name).hash && \
|
|
|
|
mkdir qtbase && \
|
2023-06-30 18:00:24 +02:00
|
|
|
$(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source) -C qtbase && \
|
2015-07-24 01:07:03 +02:00
|
|
|
mkdir qttranslations && \
|
2023-06-30 18:00:24 +02:00
|
|
|
$(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttranslations_file_name) -C qttranslations && \
|
2015-07-24 01:07:03 +02:00
|
|
|
mkdir qttools && \
|
2023-06-30 18:00:24 +02:00
|
|
|
$(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttools_file_name) -C qttools
|
2015-07-24 01:07:03 +02:00
|
|
|
endef
|
|
|
|
|
2020-09-04 02:23:19 +02:00
|
|
|
# Preprocessing steps work as follows:
|
|
|
|
#
|
|
|
|
# 1. Apply our patches to the extracted source. See each patch for more info.
|
|
|
|
#
|
2021-06-10 05:02:27 +02:00
|
|
|
# 2. Create a macOS-Clang-Linux mkspec using our mac-qmake.conf.
|
2020-09-04 02:23:19 +02:00
|
|
|
#
|
2021-06-10 05:02:27 +02:00
|
|
|
# 3. After making a copy of the mkspec for the linux-arm-gnueabi host, named
|
2024-11-04 14:06:47 +01:00
|
|
|
# bitcoin-linux-g++, replace tool names with $($($(package)_type)_TOOL).
|
2020-09-04 02:23:19 +02:00
|
|
|
#
|
2021-06-10 05:02:27 +02:00
|
|
|
# 4. Put our C, CXX and LD FLAGS into gcc-base.conf. Only used for non-host builds.
|
2020-09-04 02:23:19 +02:00
|
|
|
#
|
2024-11-04 14:06:47 +01:00
|
|
|
# 5. In clang.conf, swap out clang & clang++, for our compiler + flags. See #17466.
|
2014-07-23 07:31:30 +02:00
|
|
|
define $(package)_preprocess_cmds
|
2021-06-10 05:02:27 +02:00
|
|
|
cp $($(package)_patch_dir)/qt.pro qt.pro && \
|
|
|
|
cp $($(package)_patch_dir)/qttools_src.pro qttools/src/src.pro && \
|
2023-12-01 21:28:03 +01:00
|
|
|
patch -p1 -i $($(package)_patch_dir)/fix-minimum-macos.patch && \
|
2023-10-03 11:20:11 +02:00
|
|
|
patch -p1 -i $($(package)_patch_dir)/fix-macos-linker.patch && \
|
2020-09-04 02:23:19 +02:00
|
|
|
patch -p1 -i $($(package)_patch_dir)/dont_hardcode_pwd.patch && \
|
|
|
|
patch -p1 -i $($(package)_patch_dir)/fix_qt_pkgconfig.patch && \
|
2023-10-04 16:47:08 +02:00
|
|
|
patch -p1 -i $($(package)_patch_dir)/fix_qt_placeholders.patch && \
|
2020-09-04 02:23:19 +02:00
|
|
|
patch -p1 -i $($(package)_patch_dir)/fix_android_jni_static.patch && \
|
|
|
|
patch -p1 -i $($(package)_patch_dir)/no-xlib.patch && \
|
2021-12-04 22:11:32 +01:00
|
|
|
patch -p1 -i $($(package)_patch_dir)/use_android_ndk23.patch && \
|
2023-10-03 16:53:37 +02:00
|
|
|
patch -p1 -i $($(package)_patch_dir)/memory_resource.patch && \
|
2021-12-24 22:14:34 +01:00
|
|
|
patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch && \
|
2023-05-09 18:05:32 +02:00
|
|
|
patch -p1 -i $($(package)_patch_dir)/duplicate_lcqpafonts.patch && \
|
2021-04-06 00:59:11 +02:00
|
|
|
patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.patch && \
|
2023-06-27 20:51:37 +02:00
|
|
|
patch -p1 -i $($(package)_patch_dir)/fast_fixed_dtoa_no_optimize.patch && \
|
2023-08-03 13:53:29 +02:00
|
|
|
patch -p1 -i $($(package)_patch_dir)/guix_cross_lib_path.patch && \
|
2023-10-06 11:20:08 +02:00
|
|
|
patch -p1 -i $($(package)_patch_dir)/windows_lto.patch && \
|
2014-07-23 07:31:30 +02:00
|
|
|
mkdir -p qtbase/mkspecs/macx-clang-linux &&\
|
|
|
|
cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\
|
|
|
|
cp -f $($(package)_patch_dir)/mac-qmake.conf qtbase/mkspecs/macx-clang-linux/qmake.conf && \
|
2018-07-17 13:06:41 +02:00
|
|
|
cp -r qtbase/mkspecs/linux-arm-gnueabi-g++ qtbase/mkspecs/bitcoin-linux-g++ && \
|
2024-11-04 14:06:47 +01:00
|
|
|
sed -i.old "s|arm-linux-gnueabi-gcc|$($($(package)_type)_CC)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \
|
|
|
|
sed -i.old "s|arm-linux-gnueabi-g++|$($($(package)_type)_CXX)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \
|
|
|
|
sed -i.old "s|arm-linux-gnueabi-ar|$($($(package)_type)_AR)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \
|
|
|
|
sed -i.old "s|arm-linux-gnueabi-objcopy|$($($(package)_type)_OBJCOPY)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \
|
|
|
|
sed -i.old "s|arm-linux-gnueabi-nm|$($($(package)_type)_NM)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \
|
|
|
|
sed -i.old "s|arm-linux-gnueabi-strip|$($($(package)_type)_STRIP)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \
|
2017-01-30 09:00:51 +01:00
|
|
|
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 && \
|
2021-11-25 05:02:50 +01:00
|
|
|
sed -i.old "s|QMAKE_CC = \$$$$\$$$${CROSS_COMPILE}clang|QMAKE_CC = $($(package)_cc)|" qtbase/mkspecs/common/clang.conf && \
|
2023-10-03 21:45:08 +02:00
|
|
|
sed -i.old "s|QMAKE_CXX = \$$$$\$$$${CROSS_COMPILE}clang++|QMAKE_CXX = $($(package)_cxx)|" qtbase/mkspecs/common/clang.conf
|
2014-07-23 07:31:30 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define $(package)_config_cmds
|
2020-12-25 03:54:23 +01:00
|
|
|
cd qtbase && \
|
2021-06-10 05:02:27 +02:00
|
|
|
./configure -top-level $($(package)_config_opts)
|
2014-07-23 07:31:30 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define $(package)_build_cmds
|
2021-06-10 05:02:27 +02:00
|
|
|
$(MAKE)
|
2014-07-23 07:31:30 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define $(package)_stage_cmds
|
2020-12-25 03:54:23 +01:00
|
|
|
$(MAKE) -C qtbase/src INSTALL_ROOT=$($(package)_staging_dir) $(addsuffix -install_subtargets,$(addprefix sub-,$($(package)_qt_libs))) && \
|
2021-06-10 05:02:27 +02:00
|
|
|
$(MAKE) -C qttools/src/linguist INSTALL_ROOT=$($(package)_staging_dir) $(addsuffix -install_subtargets,$(addprefix sub-,$($(package)_linguist_tools))) && \
|
2020-12-16 13:58:59 +01:00
|
|
|
$(MAKE) -C qttranslations INSTALL_ROOT=$($(package)_staging_dir) install_subtargets
|
2014-07-23 07:31:30 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define $(package)_postprocess_cmds
|
2015-07-24 01:07:03 +02:00
|
|
|
rm -rf native/mkspecs/ native/lib/ lib/cmake/ && \
|
2021-06-10 05:02:27 +02:00
|
|
|
rm -f lib/lib*.la
|
2014-07-23 07:31:30 +02:00
|
|
|
endef
|