dash/depends/packages/qt.mk

269 lines
14 KiB
Makefile
Raw Normal View History

PACKAGE=qt
$(package)_version=5.12.11
2021-11-25 05:02:50 +01:00
$(package)_download_path=https://download.qt.io/official_releases/qt/5.12/$($(package)_version)/submodules
$(package)_suffix=everywhere-src-$($(package)_version).tar.xz
2015-07-24 01:07:03 +02:00
$(package)_file_name=qtbase-$($(package)_suffix)
$(package)_sha256_hash=1c1b4e33137ca77881074c140d54c3c9747e845a31338cfe8680f171f0bc3a39
2021-11-25 05:02:50 +01:00
$(package)_linux_dependencies=freetype fontconfig libxcb libxkbcommon
$(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+= fix_android_qmake_conf.patch fix_android_jni_static.patch dont_hardcode_pwd.patch
$(package)_patches+= no_sdk_version_check.patch
$(package)_patches+= fix_qpainter_non_determinism.patch fix_lib_paths.patch fix_android_pch.patch
$(package)_patches+= fix_limits_header.patch
$(package)_patches+= fix_montery_include.patch
2022-02-20 23:59:29 +01:00
$(package)_patches += glibc_compatibility.patch
2015-07-24 01:07:03 +02:00
# Update OSX_QT_TRANSLATIONS when this is updated
2015-07-24 01:07:03 +02:00
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
$(package)_qttranslations_sha256_hash=577b0668a777eb2b451c61e8d026d79285371597ce9df06b6dee6c814164b7c3
2015-07-24 01:07:03 +02:00
$(package)_qttools_file_name=qttools-$($(package)_suffix)
$(package)_qttools_sha256_hash=98b2aaca230458f65996f3534fd471d2ffd038dd58ac997c0589c06dc2385b4f
2015-07-24 01:07:03 +02:00
$(package)_extra_sources = $($(package)_qttranslations_file_name)
$(package)_extra_sources += $($(package)_qttools_file_name)
define $(package)_set_vars
$(package)_config_opts_release = -release
2020-11-23 14:04:09 +01:00
$(package)_config_opts_release += -silent
$(package)_config_opts_debug = -debug
2021-11-25 05:02:50 +01:00
$(package)_config_opts_debug += -optimized-tools
$(package)_config_opts += -bindir $(build_prefix)/bin
2020-11-23 14:04:09 +01:00
$(package)_config_opts += -c++std c++1z
$(package)_config_opts += -confirm-license
$(package)_config_opts += -hostprefix $(build_prefix)
Merge #14849: depends: qt 5.9.7 a46c8476e9598742e52944b6270b1854c8f500a2 depends: disable unused qt features (fanquake) 73b46eeb7ea78cab051d770e3fe8a0c0fbb43ef9 depends: qt 5.9.7 (fanquake) 095e765975c2204f7e730bc8f0716227e480caa5 depends: expat 2.2.6 (fanquake) Pull request description: This PR upgrades `expat` and `qt` in depends. The intention is to upgrade Qt in master to the latest point release of the current Qt LTS. This change can then be back-ported to the 0.17 branch (wether it makes it into 0.17.1 or not). Then, sometime before the 0.18.0 release, we could move to using Qt 5.12+ in depends (which is also LTS). That discussion, as well as minimum supported Qt versions is in #13478. ### Qt 5.9.7 [Release announcement](https://blog.qt.io/blog/2018/10/23/qt-5-9-7-released/) [Changelog](https://bugreports.qt.io/browse/QTBUG-70888?filter=20149) ### Expat 2.2.6 * Avoid doing arithmetic with NULL pointers in XML_GetBuffer * Fix 2.2.5 regression with suspend-resume while parsing a document like <root/> Full changelog [here](https://github.com/libexpat/libexpat/blob/R_2_2_6/expat/Changes) https://github.com/bitcoin/bitcoin/pull/14849/commits/a46c8476e9598742e52944b6270b1854c8f500a2 disables a bunch of qt features we aren't currently using. This speeds up the qt depends build slightly (also decreases the size of the built `qt-5.9.7` tar by about 2%). The disabling is somewhat unintuitive, hence `[wip]` until after a travis run and gitian build. Tree-SHA512: f3d51d0c7dabe5b7043ef23f264abf2aba3e94e55ffc9d5c323b153b6852d9161368e1591db3ba28f3498f0613bac77d40b855bd0465296f52be03f9230656de
2018-12-13 14:32:41 +01:00
$(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-gif
$(package)_config_opts += -no-glib
$(package)_config_opts += -no-icu
$(package)_config_opts += -no-ico
$(package)_config_opts += -no-iconv
$(package)_config_opts += -no-kms
$(package)_config_opts += -no-linuxfb
$(package)_config_opts += -no-libudev
$(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-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
$(package)_config_opts += -no-use-gold-linker
$(package)_config_opts += -nomake examples
$(package)_config_opts += -nomake tests
$(package)_config_opts += -nomake tools
$(package)_config_opts += -opensource
$(package)_config_opts += -pkg-config
$(package)_config_opts += -prefix $(host_prefix)
$(package)_config_opts += -qt-libpng
$(package)_config_opts += -qt-libjpeg
$(package)_config_opts += -qt-pcre
$(package)_config_opts += -qt-harfbuzz
2021-11-25 05:02:50 +01:00
$(package)_config_opts += -qt-zlib
$(package)_config_opts += -static
$(package)_config_opts += -v
$(package)_config_opts += -no-feature-bearermanagement
$(package)_config_opts += -no-feature-colordialog
$(package)_config_opts += -no-feature-commandlineparser
$(package)_config_opts += -no-feature-concurrent
Merge #14849: depends: qt 5.9.7 a46c8476e9598742e52944b6270b1854c8f500a2 depends: disable unused qt features (fanquake) 73b46eeb7ea78cab051d770e3fe8a0c0fbb43ef9 depends: qt 5.9.7 (fanquake) 095e765975c2204f7e730bc8f0716227e480caa5 depends: expat 2.2.6 (fanquake) Pull request description: This PR upgrades `expat` and `qt` in depends. The intention is to upgrade Qt in master to the latest point release of the current Qt LTS. This change can then be back-ported to the 0.17 branch (wether it makes it into 0.17.1 or not). Then, sometime before the 0.18.0 release, we could move to using Qt 5.12+ in depends (which is also LTS). That discussion, as well as minimum supported Qt versions is in #13478. ### Qt 5.9.7 [Release announcement](https://blog.qt.io/blog/2018/10/23/qt-5-9-7-released/) [Changelog](https://bugreports.qt.io/browse/QTBUG-70888?filter=20149) ### Expat 2.2.6 * Avoid doing arithmetic with NULL pointers in XML_GetBuffer * Fix 2.2.5 regression with suspend-resume while parsing a document like <root/> Full changelog [here](https://github.com/libexpat/libexpat/blob/R_2_2_6/expat/Changes) https://github.com/bitcoin/bitcoin/pull/14849/commits/a46c8476e9598742e52944b6270b1854c8f500a2 disables a bunch of qt features we aren't currently using. This speeds up the qt depends build slightly (also decreases the size of the built `qt-5.9.7` tar by about 2%). The disabling is somewhat unintuitive, hence `[wip]` until after a travis run and gitian build. Tree-SHA512: f3d51d0c7dabe5b7043ef23f264abf2aba3e94e55ffc9d5c323b153b6852d9161368e1591db3ba28f3498f0613bac77d40b855bd0465296f52be03f9230656de
2018-12-13 14:32:41 +01:00
$(package)_config_opts += -no-feature-dial
$(package)_config_opts += -no-feature-fontcombobox
Merge #14849: depends: qt 5.9.7 a46c8476e9598742e52944b6270b1854c8f500a2 depends: disable unused qt features (fanquake) 73b46eeb7ea78cab051d770e3fe8a0c0fbb43ef9 depends: qt 5.9.7 (fanquake) 095e765975c2204f7e730bc8f0716227e480caa5 depends: expat 2.2.6 (fanquake) Pull request description: This PR upgrades `expat` and `qt` in depends. The intention is to upgrade Qt in master to the latest point release of the current Qt LTS. This change can then be back-ported to the 0.17 branch (wether it makes it into 0.17.1 or not). Then, sometime before the 0.18.0 release, we could move to using Qt 5.12+ in depends (which is also LTS). That discussion, as well as minimum supported Qt versions is in #13478. ### Qt 5.9.7 [Release announcement](https://blog.qt.io/blog/2018/10/23/qt-5-9-7-released/) [Changelog](https://bugreports.qt.io/browse/QTBUG-70888?filter=20149) ### Expat 2.2.6 * Avoid doing arithmetic with NULL pointers in XML_GetBuffer * Fix 2.2.5 regression with suspend-resume while parsing a document like <root/> Full changelog [here](https://github.com/libexpat/libexpat/blob/R_2_2_6/expat/Changes) https://github.com/bitcoin/bitcoin/pull/14849/commits/a46c8476e9598742e52944b6270b1854c8f500a2 disables a bunch of qt features we aren't currently using. This speeds up the qt depends build slightly (also decreases the size of the built `qt-5.9.7` tar by about 2%). The disabling is somewhat unintuitive, hence `[wip]` until after a travis run and gitian build. Tree-SHA512: f3d51d0c7dabe5b7043ef23f264abf2aba3e94e55ffc9d5c323b153b6852d9161368e1591db3ba28f3498f0613bac77d40b855bd0465296f52be03f9230656de
2018-12-13 14:32:41 +01:00
$(package)_config_opts += -no-feature-ftp
$(package)_config_opts += -no-feature-image_heuristic_mask
$(package)_config_opts += -no-feature-keysequenceedit
Merge #14849: depends: qt 5.9.7 a46c8476e9598742e52944b6270b1854c8f500a2 depends: disable unused qt features (fanquake) 73b46eeb7ea78cab051d770e3fe8a0c0fbb43ef9 depends: qt 5.9.7 (fanquake) 095e765975c2204f7e730bc8f0716227e480caa5 depends: expat 2.2.6 (fanquake) Pull request description: This PR upgrades `expat` and `qt` in depends. The intention is to upgrade Qt in master to the latest point release of the current Qt LTS. This change can then be back-ported to the 0.17 branch (wether it makes it into 0.17.1 or not). Then, sometime before the 0.18.0 release, we could move to using Qt 5.12+ in depends (which is also LTS). That discussion, as well as minimum supported Qt versions is in #13478. ### Qt 5.9.7 [Release announcement](https://blog.qt.io/blog/2018/10/23/qt-5-9-7-released/) [Changelog](https://bugreports.qt.io/browse/QTBUG-70888?filter=20149) ### Expat 2.2.6 * Avoid doing arithmetic with NULL pointers in XML_GetBuffer * Fix 2.2.5 regression with suspend-resume while parsing a document like <root/> Full changelog [here](https://github.com/libexpat/libexpat/blob/R_2_2_6/expat/Changes) https://github.com/bitcoin/bitcoin/pull/14849/commits/a46c8476e9598742e52944b6270b1854c8f500a2 disables a bunch of qt features we aren't currently using. This speeds up the qt depends build slightly (also decreases the size of the built `qt-5.9.7` tar by about 2%). The disabling is somewhat unintuitive, hence `[wip]` until after a travis run and gitian build. Tree-SHA512: f3d51d0c7dabe5b7043ef23f264abf2aba3e94e55ffc9d5c323b153b6852d9161368e1591db3ba28f3498f0613bac77d40b855bd0465296f52be03f9230656de
2018-12-13 14:32:41 +01:00
$(package)_config_opts += -no-feature-lcdnumber
$(package)_config_opts += -no-feature-pdf
$(package)_config_opts += -no-feature-printdialog
$(package)_config_opts += -no-feature-printer
$(package)_config_opts += -no-feature-printpreviewdialog
$(package)_config_opts += -no-feature-printpreviewwidget
$(package)_config_opts += -no-feature-sessionmanager
Merge #14849: depends: qt 5.9.7 a46c8476e9598742e52944b6270b1854c8f500a2 depends: disable unused qt features (fanquake) 73b46eeb7ea78cab051d770e3fe8a0c0fbb43ef9 depends: qt 5.9.7 (fanquake) 095e765975c2204f7e730bc8f0716227e480caa5 depends: expat 2.2.6 (fanquake) Pull request description: This PR upgrades `expat` and `qt` in depends. The intention is to upgrade Qt in master to the latest point release of the current Qt LTS. This change can then be back-ported to the 0.17 branch (wether it makes it into 0.17.1 or not). Then, sometime before the 0.18.0 release, we could move to using Qt 5.12+ in depends (which is also LTS). That discussion, as well as minimum supported Qt versions is in #13478. ### Qt 5.9.7 [Release announcement](https://blog.qt.io/blog/2018/10/23/qt-5-9-7-released/) [Changelog](https://bugreports.qt.io/browse/QTBUG-70888?filter=20149) ### Expat 2.2.6 * Avoid doing arithmetic with NULL pointers in XML_GetBuffer * Fix 2.2.5 regression with suspend-resume while parsing a document like <root/> Full changelog [here](https://github.com/libexpat/libexpat/blob/R_2_2_6/expat/Changes) https://github.com/bitcoin/bitcoin/pull/14849/commits/a46c8476e9598742e52944b6270b1854c8f500a2 disables a bunch of qt features we aren't currently using. This speeds up the qt depends build slightly (also decreases the size of the built `qt-5.9.7` tar by about 2%). The disabling is somewhat unintuitive, hence `[wip]` until after a travis run and gitian build. Tree-SHA512: f3d51d0c7dabe5b7043ef23f264abf2aba3e94e55ffc9d5c323b153b6852d9161368e1591db3ba28f3498f0613bac77d40b855bd0465296f52be03f9230656de
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
Merge #14849: depends: qt 5.9.7 a46c8476e9598742e52944b6270b1854c8f500a2 depends: disable unused qt features (fanquake) 73b46eeb7ea78cab051d770e3fe8a0c0fbb43ef9 depends: qt 5.9.7 (fanquake) 095e765975c2204f7e730bc8f0716227e480caa5 depends: expat 2.2.6 (fanquake) Pull request description: This PR upgrades `expat` and `qt` in depends. The intention is to upgrade Qt in master to the latest point release of the current Qt LTS. This change can then be back-ported to the 0.17 branch (wether it makes it into 0.17.1 or not). Then, sometime before the 0.18.0 release, we could move to using Qt 5.12+ in depends (which is also LTS). That discussion, as well as minimum supported Qt versions is in #13478. ### Qt 5.9.7 [Release announcement](https://blog.qt.io/blog/2018/10/23/qt-5-9-7-released/) [Changelog](https://bugreports.qt.io/browse/QTBUG-70888?filter=20149) ### Expat 2.2.6 * Avoid doing arithmetic with NULL pointers in XML_GetBuffer * Fix 2.2.5 regression with suspend-resume while parsing a document like <root/> Full changelog [here](https://github.com/libexpat/libexpat/blob/R_2_2_6/expat/Changes) https://github.com/bitcoin/bitcoin/pull/14849/commits/a46c8476e9598742e52944b6270b1854c8f500a2 disables a bunch of qt features we aren't currently using. This speeds up the qt depends build slightly (also decreases the size of the built `qt-5.9.7` tar by about 2%). The disabling is somewhat unintuitive, hence `[wip]` until after a travis run and gitian build. Tree-SHA512: f3d51d0c7dabe5b7043ef23f264abf2aba3e94e55ffc9d5c323b153b6852d9161368e1591db3ba28f3498f0613bac77d40b855bd0465296f52be03f9230656de
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
$(package)_config_opts += -no-feature-textodfwriter
$(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
Merge #14849: depends: qt 5.9.7 a46c8476e9598742e52944b6270b1854c8f500a2 depends: disable unused qt features (fanquake) 73b46eeb7ea78cab051d770e3fe8a0c0fbb43ef9 depends: qt 5.9.7 (fanquake) 095e765975c2204f7e730bc8f0716227e480caa5 depends: expat 2.2.6 (fanquake) Pull request description: This PR upgrades `expat` and `qt` in depends. The intention is to upgrade Qt in master to the latest point release of the current Qt LTS. This change can then be back-ported to the 0.17 branch (wether it makes it into 0.17.1 or not). Then, sometime before the 0.18.0 release, we could move to using Qt 5.12+ in depends (which is also LTS). That discussion, as well as minimum supported Qt versions is in #13478. ### Qt 5.9.7 [Release announcement](https://blog.qt.io/blog/2018/10/23/qt-5-9-7-released/) [Changelog](https://bugreports.qt.io/browse/QTBUG-70888?filter=20149) ### Expat 2.2.6 * Avoid doing arithmetic with NULL pointers in XML_GetBuffer * Fix 2.2.5 regression with suspend-resume while parsing a document like <root/> Full changelog [here](https://github.com/libexpat/libexpat/blob/R_2_2_6/expat/Changes) https://github.com/bitcoin/bitcoin/pull/14849/commits/a46c8476e9598742e52944b6270b1854c8f500a2 disables a bunch of qt features we aren't currently using. This speeds up the qt depends build slightly (also decreases the size of the built `qt-5.9.7` tar by about 2%). The disabling is somewhat unintuitive, hence `[wip]` until after a travis run and gitian build. Tree-SHA512: f3d51d0c7dabe5b7043ef23f264abf2aba3e94e55ffc9d5c323b153b6852d9161368e1591db3ba28f3498f0613bac77d40b855bd0465296f52be03f9230656de
2018-12-13 14:32:41 +01:00
$(package)_config_opts += -no-feature-wizard
$(package)_config_opts += -no-feature-xml
$(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 += QMAKE_MACOSX_DEPLOYMENT_TARGET=$(OSX_MIN_VERSION)
ifneq ($(build_os),darwin)
$(package)_config_opts_darwin += -xplatform macx-clang-linux
$(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)
$(package)_config_opts_darwin += -device-option CROSS_COMPILE="$(host)-"
$(package)_config_opts_darwin += -device-option MAC_TARGET=$(host)
$(package)_config_opts_darwin += -device-option XCODE_VERSION=$(XCODE_VERSION)
endif
# for macOS on Apple Silicon (ARM) see https://bugreports.qt.io/browse/QTBUG-85279
$(package)_config_opts_aarch64_darwin += -device-option QMAKE_APPLE_DEVICE_ARCHS=arm64
2021-11-25 05:02:50 +01:00
$(package)_config_opts_linux = -qt-xcb
Merge #16408: depends: Prune X packages 0c55d8b58186ba69fffc147cd02b174450dac578 depends: qt: Patch to remove dep on libX11 (Carl Dong) 222e6cc52075cf6f866ce4a2e5900f0d6358f903 gitignore: Actually pay attention to depends patches (Carl Dong) 65f8da08df601ac98bad6f638392343fd564c0b9 symbol-check: Disallow libX11-*.so.* shared libraries (Carl Dong) 924569914e6079763fd1692bed372ded2c63d685 depends: libXext isn't needed by anyone (Carl Dong) 689d3b4a030675b6de87a55463a8e155843293fb build-aux: Remove check for x11-xcb (Carl Dong) aa53cb7a2f04a59a4722c662e67b7a6ec04e32b5 depends: libX11: Make package headers-only (Carl Dong) 9a01ab04e1125b37618266d7fd1c3a6e3bb7e3f8 depends: qt: Explicitly stop using Xlib/libX11 (Carl Dong) 1ec30b8fbe4a162d6e2e6a9711d83f1bafd9b645 depends: xproto is only directly needed by libXau (Carl Dong) Pull request description: Related to: #16150 We noticed that we could build QT without using XLib/libX11 as a library. XLib/libX11's headers are still used, and a minimal `configure.ac` has been added to eliminate overly-enthusiastic configure-time dependencies that aren't actually required to obtain the headers. This also means that we eliminate XLib/libX11 as required shared libraries at runtime, which is desirable. See commit messages for more details. --- Reviewers: I am least sure about the minimal `configure.ac`, as I'm not too familiar with the autoconf syntax. Any improvements w/re robustness would be welcome. ACKs for top commit: theuni: ACK 0c55d8b58186ba69fffc147cd02b174450dac578 fanquake: ACK 0c55d8b58186ba69fffc147cd02b174450dac578 Tree-SHA512: 41f653a0f91bc0e0faac49713c0c6dfd8cb605f9c4e34eb75a790dd808ebf3e5c160f1dd40bc8fbc911ee718ea319313b526d63733c98ff62d8dffecb58caa01
2019-07-23 08:22:06 +02:00
$(package)_config_opts_linux += -no-xcb-xlib
$(package)_config_opts_linux += -no-feature-xlib
$(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
2022-02-20 23:59:29 +01:00
$(package)_config_opts_linux += -no-feature-getentropy
$(package)_config_opts_linux += -no-feature-renameat2
$(package)_config_opts_linux += -dbus-runtime
$(package)_config_opts_arm_linux += -platform linux-g++ -xplatform bitcoin-linux-g++
$(package)_config_opts_i686_linux = -xplatform linux-g++-32
ifneq (,$(findstring -stdlib=libc++,$($(1)_cxx)))
$(package)_config_opts_x86_64_linux = -xplatform linux-clang-libc++
else
$(package)_config_opts_x86_64_linux = -xplatform linux-g++-64
endif
$(package)_config_opts_aarch64_linux = -xplatform linux-aarch64-gnu-g++
$(package)_config_opts_riscv64_linux = -platform linux-g++ -xplatform bitcoin-linux-g++
$(package)_config_opts_mingw32 = -no-opengl
$(package)_config_opts_mingw32 += -no-dbus
$(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)'"
$(package)_config_opts_mingw32 += "QMAKE_LFLAGS = '$($(package)_ldflags)'"
$(package)_config_opts_mingw32 += -device-option CROSS_COMPILE="$(host)-"
$(package)_config_opts_mingw32 += -pch
$(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 += -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
$(package)_config_opts_android += -no-fontconfig
$(package)_config_opts_android += -L $(host_prefix)/lib
$(package)_config_opts_android += -I $(host_prefix)/include
$(package)_config_opts_android += -pch
$(package)_config_opts_android += -no-feature-vulkan
$(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
$(package)_config_opts_i686_android += -android-arch i686
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 && \
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 && \
tar --no-same-owner --strip-components=1 -xf $($(package)_source) -C qtbase && \
2015-07-24 01:07:03 +02:00
mkdir qttranslations && \
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 && \
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
# Preprocessing steps work as follows:
#
# 1. Apply our patches to the extracted source. See each patch for more info.
#
# 2. Create a macOS-Clang-Linux mkspec using our mac-qmake.conf.
#
# 3. After making a copy of the mkspec for the linux-arm-gnueabi host, named
# 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.
#
# 4. Put our C, CXX and LD FLAGS into gcc-base.conf. Only used for non-host builds.
#
# 5. Do similar for the win32-g++ mkspec.
#
# 6. In clang.conf, swap out clang & clang++, for our compiler + flags. See #17466.
#
# 7. Adjust a regex in toolchain.prf, to accommodate Guix's usage of
# CROSS_LIBRARY_PATH. See #15277.
define $(package)_preprocess_cmds
cp $($(package)_patch_dir)/qt.pro qt.pro && \
cp $($(package)_patch_dir)/qttools_src.pro qttools/src/src.pro && \
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)/fix_android_qmake_conf.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)/fix_qpainter_non_determinism.patch &&\
2021-11-25 05:02:50 +01:00
patch -p1 -i $($(package)_patch_dir)/no_sdk_version_check.patch && \
patch -p1 -i $($(package)_patch_dir)/fix_lib_paths.patch && \
patch -p1 -i $($(package)_patch_dir)/fix_limits_header.patch && \
patch -p1 -i $($(package)_patch_dir)/fix_montery_include.patch && \
2022-02-20 23:59:29 +01:00
patch -p1 -i $($(package)_patch_dir)/glibc_compatibility.patch && \
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 && \
cp -r qtbase/mkspecs/linux-arm-gnueabi-g++ qtbase/mkspecs/bitcoin-linux-g++ && \
sed -i.old "s/arm-linux-gnueabi-/$(host)-/g" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \
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 && \
sed -i.old "s|QMAKE_CXX = \$$$$\$$$${CROSS_COMPILE}clang++|QMAKE_CXX = $($(package)_cxx)|" qtbase/mkspecs/common/clang.conf && \
sed -i.old "s/error(\"failed to parse default search paths from compiler output\")/\!darwin: error(\"failed to parse default search paths from compiler output\")/g" qtbase/mkspecs/features/toolchain.prf
endef
define $(package)_config_cmds
export PKG_CONFIG_SYSROOT_DIR=/ && \
export PKG_CONFIG_LIBDIR=$(host_prefix)/lib/pkgconfig && \
export PKG_CONFIG_PATH=$(host_prefix)/share/pkgconfig && \
cd qtbase && \
./configure -top-level $($(package)_config_opts)
endef
define $(package)_build_cmds
$(MAKE)
endef
define $(package)_stage_cmds
$(MAKE) -C qtbase/src INSTALL_ROOT=$($(package)_staging_dir) $(addsuffix -install_subtargets,$(addprefix sub-,$($(package)_qt_libs))) && \
$(MAKE) -C qttools/src/linguist INSTALL_ROOT=$($(package)_staging_dir) $(addsuffix -install_subtargets,$(addprefix sub-,$($(package)_linguist_tools))) && \
$(MAKE) -C qttranslations INSTALL_ROOT=$($(package)_staging_dir) install_subtargets
endef
define $(package)_postprocess_cmds
2015-07-24 01:07:03 +02:00
rm -rf native/mkspecs/ native/lib/ lib/cmake/ && \
rm -f lib/lib*.la
endef