2023-08-03 13:45:17 +02:00
|
|
|
package=qt
|
2023-08-03 13:53:29 +02:00
|
|
|
$(package)_version=5.15.5
|
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-08-03 13:53:29 +02:00
|
|
|
$(package)_sha256_hash=0c42c799aa7c89e479a07c451bf5a301e291266ba789e81afc18f95049524edc
|
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 += dont_hardcode_x86_64.patch
|
|
|
|
$(package)_patches += fix_montery_include.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
|
2015-07-24 01:07:03 +02:00
|
|
|
|
|
|
|
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
|
2023-08-03 13:53:29 +02:00
|
|
|
$(package)_qttranslations_sha256_hash=c92af4171397a0ed272330b4fa0669790fcac8d050b07c8b8cc565ebeba6735e
|
2015-07-24 01:07:03 +02:00
|
|
|
|
|
|
|
$(package)_qttools_file_name=qttools-$($(package)_suffix)
|
2023-08-03 13:53:29 +02:00
|
|
|
$(package)_qttools_sha256_hash=6d0778b71b2742cb527561791d1d3d255366163d54a10f78c683a398f09ffc6c
|
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
|
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
|
|
|
|
2022-08-13 13:42:23 +02:00
|
|
|
# Optimizing using > -O1 causes non-determinism when building across arches.
|
|
|
|
$(package)_config_opts_aarch64_darwin += "QMAKE_CFLAGS_OPTIMIZE_FULL = -O1"
|
|
|
|
|
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
|
2018-07-17 13:06:41 +02:00
|
|
|
$(package)_config_opts_arm_linux += -platform linux-g++ -xplatform bitcoin-linux-g++
|
2014-07-23 07:31:30 +02:00
|
|
|
$(package)_config_opts_i686_linux = -xplatform linux-g++-32
|
2021-12-30 04:32:24 +01:00
|
|
|
ifneq (,$(findstring -stdlib=libc++,$($(1)_cxx)))
|
|
|
|
$(package)_config_opts_x86_64_linux = -xplatform linux-clang-libc++
|
|
|
|
else
|
2018-05-19 16:22:47 +02:00
|
|
|
$(package)_config_opts_x86_64_linux = -xplatform linux-g++-64
|
2021-12-30 04:32:24 +01:00
|
|
|
endif
|
2018-08-05 19:22:11 +02:00
|
|
|
$(package)_config_opts_aarch64_linux = -xplatform linux-aarch64-gnu-g++
|
2019-12-09 18:48:45 +01:00
|
|
|
$(package)_config_opts_powerpc64_linux = -platform linux-g++ -xplatform bitcoin-linux-g++
|
|
|
|
$(package)_config_opts_powerpc64le_linux = -platform linux-g++ -xplatform bitcoin-linux-g++
|
2018-07-19 07:04:00 +02:00
|
|
|
$(package)_config_opts_riscv64_linux = -platform linux-g++ -xplatform bitcoin-linux-g++
|
2019-12-09 18:48:45 +01:00
|
|
|
$(package)_config_opts_s390x_linux = -platform linux-g++ -xplatform bitcoin-linux-g++
|
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)'"
|
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
|
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
|
2020-09-04 02:23:19 +02:00
|
|
|
# bitcoin-linux-g++, replace instances of linux-arm-gnueabi with $(host). This
|
|
|
|
# way we can generically support hosts like riscv64-linux-gnu, which Qt doesn't
|
|
|
|
# ship a mkspec for. See it's usage in config_opts_* above.
|
|
|
|
#
|
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
|
|
|
#
|
2021-06-10 05:02:27 +02:00
|
|
|
# 5. Do similar for the win32-g++ mkspec.
|
2020-09-04 02:23:19 +02:00
|
|
|
#
|
2021-06-10 05:02:27 +02:00
|
|
|
# 6. In clang.conf, swap out clang & clang++, for our compiler + flags. See #17466.
|
2020-09-04 02:23:19 +02:00
|
|
|
#
|
2021-06-10 05:02:27 +02:00
|
|
|
# 7. Adjust a regex in toolchain.prf, to accommodate Guix's usage of
|
2020-09-04 02:23:19 +02:00
|
|
|
# CROSS_LIBRARY_PATH. See #15277.
|
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-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-11-24 16:00:43 +01:00
|
|
|
patch -p1 -i $($(package)_patch_dir)/dont_hardcode_x86_64.patch && \
|
2022-04-26 17:06:53 +02:00
|
|
|
patch -p1 -i $($(package)_patch_dir)/fix_montery_include.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 && \
|
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++ && \
|
2018-07-25 12:59:08 +02:00
|
|
|
sed -i.old "s/arm-linux-gnueabi-/$(host)-/g" 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-18 03:23:04 +01:00
|
|
|
export PKG_CONFIG_SYSROOT_DIR=/ && \
|
2014-07-23 07:31:30 +02:00
|
|
|
export PKG_CONFIG_LIBDIR=$(host_prefix)/lib/pkgconfig && \
|
2021-11-28 19:56:54 +01:00
|
|
|
export QT_MAC_SDK_NO_VERSION_CHECK=1 && \
|
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
|