From 54a17628752ff05e3317ec9583143ba198065aaf Mon Sep 17 00:00:00 2001 From: "barnell@lll" Date: Tue, 30 Apr 2024 13:01:21 -0400 Subject: [PATCH] Release Name: Energy Radiant Node version 1.3.0 (Energy) is now available. --- .gitlab-ci.yml | 2 +- contrib/gitian-descriptors/gitian-linux.yml | 2 +- contrib/gitian-descriptors/gitian-win.yml | 2 +- depends/Makefile | 2 +- depends/README.md | 80 ++++--- depends/description.md | 2 +- depends/hosts/darwin.mk | 4 +- depends/hosts/default.mk | 3 +- depends/packages/libevent.mk | 12 +- depends/packages/libxcb.mk | 34 ++- depends/packages/libxcb_util.mk | 32 +++ depends/packages/libxcb_util_image.mk | 31 +++ depends/packages/libxcb_util_keysyms.mk | 31 +++ depends/packages/libxcb_util_render.mk | 31 +++ depends/packages/libxcb_util_wm.mk | 31 +++ depends/packages/libxkbcommon.mk | 37 +++ depends/packages/native_cctools.mk | 17 +- depends/packages/openssl.mk | 27 +-- depends/packages/packages.mk | 2 +- depends/packages/qt.mk | 220 ++++++++++++------ depends/packages/xcb_proto.mk | 18 +- ...dd-OpenSSL-termios-fix-for-musl-libc.patch | 17 -- depends/patches/qt/disable_xinerama.patch | 220 ++++++++++++++++++ depends/patches/qt/dont_hardcode_x86_64.patch | 119 ++++++++++ .../qt/dont_use_glibc_getentropy.patch | 12 + .../patches/qt/dont_use_statx_renameat2.patch | 59 +++++ .../patches/qt/drop_lrelease_dependency.patch | 20 -- .../patches/qt/fix_android_jni_static.patch | 18 ++ depends/patches/qt/fix_configure_mac.patch | 50 ---- depends/patches/qt/fix_limits_header.patch | 41 ++++ depends/patches/qt/fix_montery_include.patch | 21 ++ depends/patches/qt/fix_no_printer.patch | 4 +- .../qt/fix_qpainter_non_determinism.patch | 41 ++++ depends/patches/qt/fix_qt_pkgconfig.patch | 6 +- depends/patches/qt/fix_rcc_determinism.patch | 15 -- depends/patches/qt/mac-qmake.conf | 8 +- depends/patches/qt/no-xlib.patch | 14 +- depends/patches/qt/qt.pro | 16 ++ .../qt/qtbase-moc-ignore-gcc-macro.patch | 17 ++ depends/patches/qt/qttools_src.pro | 6 + .../patches/qt/rcc_hardcode_timestamp.patch | 24 ++ depends/patches/qt/use_android_ndk23.patch | 13 ++ depends/patches/qt/xkb-default.patch | 26 --- doc/build-freebsd.md | 2 +- doc/build-osx.md | 2 +- doc/build-unix-alpine.md | 2 +- doc/build-unix-arch.md | 2 +- doc/build-unix-deb.md | 2 +- doc/build-unix-rpm.md | 2 +- doc/build-unix.md | 2 +- doc/functional-tests.md | 2 +- doc/zmq.md | 4 +- src/config/CMakeLists.txt | 2 +- test/config.ini.cmake.in | 2 +- 54 files changed, 1086 insertions(+), 325 deletions(-) create mode 100644 depends/packages/libxcb_util.mk create mode 100644 depends/packages/libxcb_util_image.mk create mode 100644 depends/packages/libxcb_util_keysyms.mk create mode 100644 depends/packages/libxcb_util_render.mk create mode 100644 depends/packages/libxcb_util_wm.mk create mode 100644 depends/packages/libxkbcommon.mk delete mode 100644 depends/patches/openssl/0001-Add-OpenSSL-termios-fix-for-musl-libc.patch create mode 100644 depends/patches/qt/disable_xinerama.patch create mode 100644 depends/patches/qt/dont_hardcode_x86_64.patch create mode 100644 depends/patches/qt/dont_use_glibc_getentropy.patch create mode 100644 depends/patches/qt/dont_use_statx_renameat2.patch delete mode 100644 depends/patches/qt/drop_lrelease_dependency.patch create mode 100644 depends/patches/qt/fix_android_jni_static.patch delete mode 100644 depends/patches/qt/fix_configure_mac.patch create mode 100644 depends/patches/qt/fix_limits_header.patch create mode 100644 depends/patches/qt/fix_montery_include.patch create mode 100644 depends/patches/qt/fix_qpainter_non_determinism.patch delete mode 100644 depends/patches/qt/fix_rcc_determinism.patch create mode 100644 depends/patches/qt/qt.pro create mode 100644 depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch create mode 100644 depends/patches/qt/qttools_src.pro create mode 100644 depends/patches/qt/rcc_hardcode_timestamp.patch create mode 100644 depends/patches/qt/use_android_ndk23.patch delete mode 100644 depends/patches/qt/xkb-default.patch diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f771a0f391..cce5d16836 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -667,7 +667,7 @@ build-aarch64: # The following tests are excluded: # - radn-rpc-getblocktemplate-sigops - OOM issues for aarch64 (see #211) - cmake -GNinja .. -DENABLE_MAN=OFF - -DBUILD_BITCOIN_ZMQ=OFF + -DBUILD_RADIANT_ZMQ=OFF -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/LinuxAArch64.cmake -DCMAKE_CROSSCOMPILING_EMULATOR=$(command -v qemu-aarch64-static) -DEXCLUDE_FUNCTIONAL_TESTS=radn-rpc-getblocktemplate-sigops diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml index 9adae70b06..22265b7c3f 100644 --- a/contrib/gitian-descriptors/gitian-linux.yml +++ b/contrib/gitian-descriptors/gitian-linux.yml @@ -131,7 +131,7 @@ script: | pushd source_package cmake -GNinja .. \ -DBUILD_RADIANT_WALLET=OFF \ - -DBUILD_BITCOIN_ZMQ=OFF \ + -DBUILD_RADIANT_ZMQ=OFF \ -DBUILD_RADIANT_SEEDER=OFF \ -DBUILD_RADIANT_CLI=OFF \ -DBUILD_RADIANT_TX=OFF \ diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml index 514a464335..9e33eb1ce3 100644 --- a/contrib/gitian-descriptors/gitian-win.yml +++ b/contrib/gitian-descriptors/gitian-win.yml @@ -136,7 +136,7 @@ script: | pushd source_package cmake -GNinja .. \ -DBUILD_RADIANT_WALLET=OFF \ - -DBUILD_BITCOIN_ZMQ=OFF \ + -DBUILD_RADIANT_ZMQ=OFF \ -DBUILD_RADIANT_SEEDER=OFF \ -DBUILD_RADIANT_CLI=OFF \ -DBUILD_RADIANT_TX=OFF \ diff --git a/depends/Makefile b/depends/Makefile index 63a0db0c52..203d045b4a 100644 --- a/depends/Makefile +++ b/depends/Makefile @@ -15,7 +15,7 @@ NO_WALLET ?= NO_ZMQ ?= NO_UPNP ?= NO_JEMALLOC ?= -FALLBACK_DOWNLOAD_PATH ?= https://download.radiantblockchain.org/depends-sources +FALLBACK_DOWNLOAD_PATH ?= https://download.bitcoincashnode.org/depends-sources BUILD = $(shell ./config.guess) HOST ?= $(BUILD) diff --git a/depends/README.md b/depends/README.md index c4a31b6494..77424b8b53 100644 --- a/depends/README.md +++ b/depends/README.md @@ -4,7 +4,9 @@ To build dependencies for the current architecture + OS: - make +```sh +make +``` To build for another architecture/OS, you may need to install some required packages first. Please have a look at the section @@ -14,7 +16,9 @@ target platform. Once you have the required packages installed and done any necessary preparation, run - make build- +```sh +make build- +``` Where `` is one of the following: @@ -27,17 +31,21 @@ Where `` is one of the following: For example, building the dependencies for Linux on ARM: - make build-linux-arm +```sh +make build-linux-arm +``` -To use the dependencies for building Radiant Node, you need to set +To use the dependencies for building Bitcoin Cash Node, you need to set the platform file to be used by `cmake`. The platform files are located under `cmake/platforms/`. For example, cross-building for Linux on ARM (run from the project root): - mkdir build_arm - cd build_arm - cmake -GNinja .. -DENABLE_MAN=OFF -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/LinuxARM.cmake - ninja +```sh +mkdir build_arm +cd build_arm +cmake -GNinja .. -DENABLE_MAN=OFF -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/LinuxARM.cmake +ninja +``` Note that it will use all the CPU cores available on the machine by default. This behavior can be changed by setting the `JOBS` environment variable (see @@ -48,18 +56,22 @@ the suitable SDK (how to obtain this SDK can be found in the `gitian-building.md document). Once the SDK has been obtained, the dependency building can be done like this: - make download - mkdir SDKs - tar -C SDKs -xf /path/to/MacOSX10.14.sdk.tar.xz - make build-osx HOST=x86_64-apple-darwin16 +```sh +make download +mkdir SDKs +tar -C SDKs -xf /path/to/MacOSX10.15.sdk.tar.xz +make build-osx HOST=x86_64-apple-darwin16 +``` Building the node against these dependencies is again a matter of (starting from the project root): - mkdir build_osx - cd build_osx - cmake -GNinja .. -DENABLE_MAN=OFF -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/OSX.cmake - ninja +```sh +mkdir build_osx +cd build_osx +cmake -GNinja .. -DENABLE_MAN=OFF -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/OSX.cmake +ninja +``` No other options are needed, the paths are automatically configured. @@ -67,13 +79,17 @@ No other options are needed, the paths are automatically configured. ### Common to all arch/OS - sudo apt-get install build-essential autoconf automake cmake curl git libtool ninja-build patch pkg-config python3 +```sh +sudo apt-get install build-essential autoconf automake cmake curl git libtool ninja-build patch pkg-config python3 bison +``` ### For macOS cross compilation Install the following packages: - sudo apt-get install imagemagick libbz2-dev libcap-dev librsvg2-bin libtiff-tools python3-setuptools +```sh +sudo apt-get install imagemagick libbz2-dev libcap-dev librsvg2-bin libtiff-tools python3-setuptools +``` Obtain the same SDK packge that is used in the gitian build (refer to `gitian-building.md` for download instructions). Create an `SDKs` folder within the `depends` folder, if it does not already exist. @@ -87,26 +103,36 @@ Unpack the SDK tarball there. Common linux dependencies: - sudo apt-get install gperf +```sh +sudo apt-get install gperf +``` For linux 32 bits cross compilation: First add the i386 architecture to `dpkg`: - sudo dpkg --add-architecture i386 - sudo apt-get update +```sh +sudo dpkg --add-architecture i386 +sudo apt-get update +``` Then install the dependencies: - sudo apt-get install lib32stdc++-8-dev libc6-dev:i386 +```sh +sudo apt-get install lib32stdc++-8-dev libc6-dev:i386 +``` For linux ARM cross compilation: - sudo apt-get install g++-arm-linux-gnueabihf +```sh +sudo apt-get install g++-arm-linux-gnueabihf +``` For linux AARCH64 cross compilation: - sudo apt-get install g++-aarch64-linux-gnu +```sh +sudo apt-get install g++-aarch64-linux-gnu +``` ## Dependency Options @@ -131,12 +157,12 @@ The following can be set when running make: make FOO=bar If some packages are not built, for example by building the depends with `make NO_WALLET=1`, the appropriate options should be set when building Bitcoin Cash Node using these dependencies. -In this example, `-DBUILD_RADIANT_WALLET=OFF` should be passed to the `cmake` +In this example, `-DBUILD_BITCOIN_WALLET=OFF` should be passed to the `cmake` command line to ensure that the build will not fail due to missing dependencies. NOTE: The SDK_PATH should be set to the parent folder in which the -`MacOSX10.14.sdk/` is located. Alternatively, you can unpack the SDK within -the `depends/SDKs/` folder or create a symbolic link named `MacOSX10.14.sdk/` +`MacOSX10.15.sdk/` is located. Alternatively, you can unpack the SDK within +the `depends/SDKs/` folder or create a symbolic link named `MacOSX10.15.sdk/` to it from there. Additional targets: diff --git a/depends/description.md b/depends/description.md index 7412014bfa..d20c2bd53b 100644 --- a/depends/description.md +++ b/depends/description.md @@ -14,7 +14,7 @@ Linux or macOS. ## No reliance on timestamps File presence is used to determine what needs to be built. This makes the -results distributable and easily digestable by automated builders. +results distributable and easily digestible by automated builders. ## Each build only has its specified dependencies available at build-time diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk index 1bc4fb8189..dd3f387c40 100644 --- a/depends/hosts/darwin.mk +++ b/depends/hosts/darwin.mk @@ -1,5 +1,5 @@ -OSX_MIN_VERSION=10.12 -OSX_SDK_VERSION=10.14 +OSX_MIN_VERSION=10.14 +OSX_SDK_VERSION=10.15 OSX_SDK=$(SDK_PATH)/MacOSX$(OSX_SDK_VERSION).sdk darwin_CC=clang -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) darwin_CXX=clang++ -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -stdlib=libc++ diff --git a/depends/hosts/default.mk b/depends/hosts/default.mk index 6f60d6b3fd..639f647d6b 100644 --- a/depends/hosts/default.mk +++ b/depends/hosts/default.mk @@ -7,6 +7,7 @@ default_host_LIBTOOL = $(host_toolchain)libtool default_host_INSTALL_NAME_TOOL = $(host_toolchain)install_name_tool default_host_OTOOL = $(host_toolchain)otool default_host_NM = $(host_toolchain)nm +default_host_WINDRES = $(host_toolchain)windres define add_host_tool_func $(host_os)_$1?=$$(default_host_$1) @@ -22,5 +23,5 @@ host_$1 = $$($(host_arch)_$(host_os)_$1) host_$(release_type)_$1 = $$($(host_arch)_$(host_os)_$(release_type)_$1) endef -$(foreach tool,CC CXX AR RANLIB STRIP NM LIBTOOL OTOOL INSTALL_NAME_TOOL,$(eval $(call add_host_tool_func,$(tool)))) +$(foreach tool,CC CXX AR RANLIB STRIP NM LIBTOOL OTOOL INSTALL_NAME_TOOL WINDRES,$(eval $(call add_host_tool_func,$(tool)))) $(foreach flags,CFLAGS CXXFLAGS CPPFLAGS LDFLAGS, $(eval $(call add_host_flags_func,$(flags)))) diff --git a/depends/packages/libevent.mk b/depends/packages/libevent.mk index 368c3ca411..9b8a62df03 100644 --- a/depends/packages/libevent.mk +++ b/depends/packages/libevent.mk @@ -1,12 +1,8 @@ package=libevent -$(package)_version=2.1.8-stable -$(package)_download_path=https://github.com/libevent/libevent/archive/ -$(package)_file_name=release-$($(package)_version).tar.gz -$(package)_sha256_hash=316ddb401745ac5d222d7c529ef1eada12f58f6376a66c1118eee803cb70f83d - -define $(package)_preprocess_cmds - ./autogen.sh -endef +$(package)_version=2.1.12-stable +$(package)_download_path=https://github.com/libevent/libevent/releases/download/release-$($(package)_version)/ +$(package)_file_name=$(package)-$($(package)_version).tar.gz +$(package)_sha256_hash=92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb define $(package)_set_vars $(package)_config_opts=--disable-shared --disable-openssl --disable-libevent-regress --disable-samples diff --git a/depends/packages/libxcb.mk b/depends/packages/libxcb.mk index 97ab9da96c..19187fc334 100644 --- a/depends/packages/libxcb.mk +++ b/depends/packages/libxcb.mk @@ -1,38 +1,30 @@ package=libxcb -$(package)_version=1.10 +$(package)_version=1.14 $(package)_download_path=https://xcb.freedesktop.org/dist -$(package)_file_name=$(package)-$($(package)_version).tar.bz2 -$(package)_sha256_hash=98d9ab05b636dd088603b64229dd1ab2d2cc02ab807892e107d674f9c3f2d5b5 +$(package)_file_name=$(package)-$($(package)_version).tar.xz +$(package)_sha256_hash=a55ed6db98d43469801262d81dc2572ed124edc3db31059d4e9916eb9f844c34 $(package)_dependencies=xcb_proto libXau define $(package)_set_vars -$(package)_config_opts=--disable-static --disable-build-docs --without-doxygen --without-launchd +$(package)_config_opts=--disable-static --disable-devel-docs --without-doxygen --without-launchd $(package)_config_opts += --disable-dependency-tracking --enable-option-checking -# Because we pass -qt-xcb to Qt, it will compile in a set of xcb helper libraries and extensions, -# so we skip building all of the extensions here. -# More info is available from: https://doc.qt.io/qt-5.9/linux-requirements.html +# Disable unneeded extensions. +# More info is available from: https://doc.qt.io/qt-5.15/linux-requirements.html $(package)_config_opts += --disable-composite --disable-damage --disable-dpms $(package)_config_opts += --disable-dri2 --disable-dri3 --disable-glx -$(package)_config_opts += --disable-present --disable-randr --disable-record -$(package)_config_opts += --disable-render --disable-resource --disable-screensaver -$(package)_config_opts += --disable-shape --disable-shm --disable-sync -$(package)_config_opts += --disable-xevie --disable-xfixes --disable-xfree86-dri -$(package)_config_opts += --disable-xinerama --disable-xinput --disable-xkb -$(package)_config_opts += --disable-xprint --disable-selinux --disable-xtest -$(package)_config_opts += --disable-xv --disable-xvmc +$(package)_config_opts += --disable-present --disable-record --disable-resource +$(package)_config_opts += --disable-screensaver --disable-xevie --disable-xfree86-dri +$(package)_config_opts += --disable-xinput --disable-xprint --disable-selinux +$(package)_config_opts += --disable-xtest --disable-xv --disable-xvmc endef define $(package)_preprocess_cmds + cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux && \ sed "s/pthread-stubs//" -i configure endef -# Don't install xcb headers to the default path in order to work around a qt -# build issue: https://bugreports.qt.io/browse/QTBUG-34748 -# When using qt's internal libxcb, it may end up finding the real headers in -# depends staging. Use a non-default path to avoid that. - define $(package)_config_cmds - $($(package)_autoconf) --includedir=$(host_prefix)/include/xcb-shared + $($(package)_autoconf) endef define $(package)_build_cmds @@ -44,5 +36,5 @@ define $(package)_stage_cmds endef define $(package)_postprocess_cmds - rm -rf share/man share/doc lib/*.la + rm -rf share lib/*.la endef diff --git a/depends/packages/libxcb_util.mk b/depends/packages/libxcb_util.mk new file mode 100644 index 0000000000..6f1b9cd7c6 --- /dev/null +++ b/depends/packages/libxcb_util.mk @@ -0,0 +1,32 @@ +package=libxcb_util +$(package)_version=0.4.0 +$(package)_download_path=https://xcb.freedesktop.org/dist +$(package)_file_name=xcb-util-$($(package)_version).tar.bz2 +$(package)_sha256_hash=46e49469cb3b594af1d33176cd7565def2be3fa8be4371d62271fabb5eae50e9 +$(package)_dependencies=libxcb + +define $(package)_set_vars +$(package)_config_opts = --disable-shared --disable-devel-docs --without-doxygen +$(package)_config_opts += --disable-dependency-tracking --enable-option-checking +$(package)_config_opts += --with-pic +endef + +define $(package)_preprocess_cmds + cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub . +endef + +define $(package)_config_cmds + $($(package)_autoconf) +endef + +define $(package)_build_cmds + $(MAKE) +endef + +define $(package)_stage_cmds + $(MAKE) DESTDIR=$($(package)_staging_dir) install +endef + +define $(package)_postprocess_cmds + rm -rf share/man share/doc lib/*.la +endef diff --git a/depends/packages/libxcb_util_image.mk b/depends/packages/libxcb_util_image.mk new file mode 100644 index 0000000000..d12d67e8e8 --- /dev/null +++ b/depends/packages/libxcb_util_image.mk @@ -0,0 +1,31 @@ +package=libxcb_util_image +$(package)_version=0.4.0 +$(package)_download_path=https://xcb.freedesktop.org/dist +$(package)_file_name=xcb-util-image-$($(package)_version).tar.bz2 +$(package)_sha256_hash=2db96a37d78831d643538dd1b595d7d712e04bdccf8896a5e18ce0f398ea2ffc +$(package)_dependencies=libxcb libxcb_util + +define $(package)_set_vars +$(package)_config_opts=--disable-static --disable-devel-docs --without-doxygen +$(package)_config_opts+= --disable-dependency-tracking --enable-option-checking +endef + +define $(package)_preprocess_cmds + cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub . +endef + +define $(package)_config_cmds + $($(package)_autoconf) +endef + +define $(package)_build_cmds + $(MAKE) +endef + +define $(package)_stage_cmds + $(MAKE) DESTDIR=$($(package)_staging_dir) install +endef + +define $(package)_postprocess_cmds + rm -rf share/man share/doc lib/*.la +endef diff --git a/depends/packages/libxcb_util_keysyms.mk b/depends/packages/libxcb_util_keysyms.mk new file mode 100644 index 0000000000..d4f72dedbe --- /dev/null +++ b/depends/packages/libxcb_util_keysyms.mk @@ -0,0 +1,31 @@ +package=libxcb_util_keysyms +$(package)_version=0.4.0 +$(package)_download_path=https://xcb.freedesktop.org/dist +$(package)_file_name=xcb-util-keysyms-$($(package)_version).tar.bz2 +$(package)_sha256_hash=0ef8490ff1dede52b7de533158547f8b454b241aa3e4dcca369507f66f216dd9 +$(package)_dependencies=libxcb xproto + +define $(package)_set_vars +$(package)_config_opts=--disable-static --disable-devel-docs --without-doxygen +$(package)_config_opts += --disable-dependency-tracking --enable-option-checking +endef + +define $(package)_preprocess_cmds + cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub . +endef + +define $(package)_config_cmds + $($(package)_autoconf) +endef + +define $(package)_build_cmds + $(MAKE) +endef + +define $(package)_stage_cmds + $(MAKE) DESTDIR=$($(package)_staging_dir) install +endef + +define $(package)_postprocess_cmds + rm -rf share/man share/doc lib/*.la +endef diff --git a/depends/packages/libxcb_util_render.mk b/depends/packages/libxcb_util_render.mk new file mode 100644 index 0000000000..28f1fb073c --- /dev/null +++ b/depends/packages/libxcb_util_render.mk @@ -0,0 +1,31 @@ +package=libxcb_util_render +$(package)_version=0.3.9 +$(package)_download_path=https://xcb.freedesktop.org/dist +$(package)_file_name=xcb-util-renderutil-$($(package)_version).tar.bz2 +$(package)_sha256_hash=c6e97e48fb1286d6394dddb1c1732f00227c70bd1bedb7d1acabefdd340bea5b +$(package)_dependencies=libxcb + +define $(package)_set_vars +$(package)_config_opts=--disable-static --disable-devel-docs --without-doxygen +$(package)_config_opts += --disable-dependency-tracking --enable-option-checking +endef + +define $(package)_preprocess_cmds + cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub . +endef + +define $(package)_config_cmds + $($(package)_autoconf) +endef + +define $(package)_build_cmds + $(MAKE) +endef + +define $(package)_stage_cmds + $(MAKE) DESTDIR=$($(package)_staging_dir) install +endef + +define $(package)_postprocess_cmds + rm -rf share/man share/doc lib/*.la +endef diff --git a/depends/packages/libxcb_util_wm.mk b/depends/packages/libxcb_util_wm.mk new file mode 100644 index 0000000000..3b905ba4ec --- /dev/null +++ b/depends/packages/libxcb_util_wm.mk @@ -0,0 +1,31 @@ +package=libxcb_util_wm +$(package)_version=0.4.1 +$(package)_download_path=https://xcb.freedesktop.org/dist +$(package)_file_name=xcb-util-wm-$($(package)_version).tar.bz2 +$(package)_sha256_hash=28bf8179640eaa89276d2b0f1ce4285103d136be6c98262b6151aaee1d3c2a3f +$(package)_dependencies=libxcb + +define $(package)_set_vars +$(package)_config_opts=--disable-static --disable-devel-docs --without-doxygen +$(package)_config_opts += --disable-dependency-tracking --enable-option-checking +endef + +define $(package)_preprocess_cmds + cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub . +endef + +define $(package)_config_cmds + $($(package)_autoconf) +endef + +define $(package)_build_cmds + $(MAKE) +endef + +define $(package)_stage_cmds + $(MAKE) DESTDIR=$($(package)_staging_dir) install +endef + +define $(package)_postprocess_cmds + rm -rf share/man share/doc lib/*.la +endef diff --git a/depends/packages/libxkbcommon.mk b/depends/packages/libxkbcommon.mk new file mode 100644 index 0000000000..bcdcf671f7 --- /dev/null +++ b/depends/packages/libxkbcommon.mk @@ -0,0 +1,37 @@ +package=libxkbcommon +$(package)_version=0.8.4 +$(package)_download_path=https://xkbcommon.org/download/ +$(package)_file_name=$(package)-$($(package)_version).tar.xz +$(package)_sha256_hash=60ddcff932b7fd352752d51a5c4f04f3d0403230a584df9a2e0d5ed87c486c8b +$(package)_dependencies=libxcb + +# This package explicitly enables -Werror=array-bounds, which causes build failures +# with GCC 12.1+. Work around that by turning errors back into warnings. +# This workaround would be dropped if the package was updated, as that would require +# a different build system (Meson) +define $(package)_set_vars +$(package)_config_opts = --enable-option-checking --disable-dependency-tracking +$(package)_config_opts += --disable-static --disable-docs +$(package)_cflags += -Wno-error=array-bounds +endef + +define $(package)_preprocess_cmds + cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux +endef + +define $(package)_config_cmds + $($(package)_autoconf) +endef + +define $(package)_build_cmds + $(MAKE) +endef + +define $(package)_stage_cmds + $(MAKE) DESTDIR=$($(package)_staging_dir) install +endef + +define $(package)_postprocess_cmds + rm lib/*.la +endef + diff --git a/depends/packages/native_cctools.mk b/depends/packages/native_cctools.mk index ab926da182..6e7b53b3c2 100644 --- a/depends/packages/native_cctools.mk +++ b/depends/packages/native_cctools.mk @@ -1,16 +1,16 @@ package=native_cctools -$(package)_version=3764b223c011574971ee3ae09ce968ba5dc2f00f +$(package)_version=55562e4073dea0fbfd0b20e0bf69ffe6390c7f97 $(package)_download_path=https://github.com/tpoechtrager/cctools-port/archive $(package)_file_name=$($(package)_version).tar.gz -$(package)_sha256_hash=3e35907bf376269a844df08e03cbb43e345c88125374f2228e03724b5f9a2a04 +$(package)_sha256_hash=e51995a843533a3dac155dd0c71362dd471597a2d23f13dff194c6285362f875 $(package)_build_subdir=cctools $(package)_patches=ld64_disable_threading.patch -$(package)_clang_version=6.0.1 +$(package)_clang_version=8.0.0 $(package)_clang_download_path=https://releases.llvm.org/$($(package)_clang_version) $(package)_clang_download_file=clang+llvm-$($(package)_clang_version)-x86_64-linux-gnu-ubuntu-16.04.tar.xz $(package)_clang_file_name=clang-llvm-$($(package)_clang_version)-x86_64-linux-gnu-ubuntu-16.04.tar.xz -$(package)_clang_sha256_hash=7ea204ecd78c39154d72dfc0d4a79f7cce1b2264da2551bb2eef10e266d54d91 +$(package)_clang_sha256_hash=87b88d620284d1f0573923e6f7cc89edccf11d19ebaec1cfb83b4f09ac5db09c $(package)_libtapi_version=3efb201881e7a76a21e0554906cf306432539cef $(package)_libtapi_download_path=https://github.com/tpoechtrager/apple-libtapi/archive @@ -18,8 +18,8 @@ $(package)_libtapi_download_file=$($(package)_libtapi_version).tar.gz $(package)_libtapi_file_name=$($(package)_libtapi_version).tar.gz $(package)_libtapi_sha256_hash=380c1ca37cfa04a8699d0887a8d3ee1ad27f3d08baba78887c73b09485c0fbd3 -$(package)_extra_sources=$($(package)_clang_file_name) -$(package)_extra_sources += $($(package)_libtapi_file_name) +$(package)_extra_sources=$($(package)_libtapi_file_name) +$(package)_extra_sources += $($(package)_clang_file_name) define $(package)_fetch_cmds $(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \ @@ -42,8 +42,9 @@ define $(package)_extract_cmds endef define $(package)_set_vars - $(package)_config_opts=--target=$(host) --disable-lto-support --with-libtapi=$($(package)_extract_dir) + $(package)_config_opts=--target=$(host) --with-libtapi=$($(package)_extract_dir) $(package)_ldflags+=-Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib + $(package)_config_opts+=--enable-lto-support --with-llvm-config=$($(package)_extract_dir)/toolchain/bin/llvm-config $(package)_cc=$($(package)_extract_dir)/toolchain/bin/clang $(package)_cxx=$($(package)_extract_dir)/toolchain/bin/clang++ endef @@ -74,7 +75,7 @@ define $(package)_stage_cmds cp -P bin/clang++ $($(package)_staging_prefix_dir)/bin/ &&\ cp lib/libLTO.so $($(package)_staging_prefix_dir)/lib/ && \ cp -rf lib/clang/$($(package)_clang_version)/include/* $($(package)_staging_prefix_dir)/lib/clang/$($(package)_clang_version)/include/ && \ - cp bin/llvm-dsymutil $($(package)_staging_prefix_dir)/bin/$(host)-dsymutil && \ + cp bin/dsymutil $($(package)_staging_prefix_dir)/bin/$(host)-dsymutil && \ if `test -d include/c++/`; then cp -rf include/c++/ $($(package)_staging_prefix_dir)/include/; fi && \ if `test -d lib/c++/`; then cp -rf lib/c++/ $($(package)_staging_prefix_dir)/lib/; fi endef diff --git a/depends/packages/openssl.mk b/depends/packages/openssl.mk index 5ed837ef2e..c29d60b56e 100644 --- a/depends/packages/openssl.mk +++ b/depends/packages/openssl.mk @@ -1,9 +1,8 @@ package=openssl -$(package)_version=1.0.1k +$(package)_version=1.1.1n $(package)_download_path=https://www.openssl.org/source $(package)_file_name=$(package)-$($(package)_version).tar.gz -$(package)_sha256_hash=8f9faeaebad088e772f4ef5e38252d472be4d878c6b3a2718c10a4fcebe7a41c -$(package)_patches=0001-Add-OpenSSL-termios-fix-for-musl-libc.patch +$(package)_sha256_hash=40dceb51a4f6a5275bde0e6bf20ef4b91bfc32ed57c0552e2e8e15463372b17a define $(package)_set_vars $(package)_config_env=AR="$($(package)_ar)" RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)" @@ -15,36 +14,31 @@ $(package)_config_opts+=no-comp $(package)_config_opts+=no-dso $(package)_config_opts+=no-dtls1 $(package)_config_opts+=no-ec_nistp_64_gcc_128 +$(package)_config_opts+=no-engine $(package)_config_opts+=no-gost -$(package)_config_opts+=no-gmp $(package)_config_opts+=no-heartbeats $(package)_config_opts+=no-idea -$(package)_config_opts+=no-jpake -$(package)_config_opts+=no-krb5 -$(package)_config_opts+=no-libunbound $(package)_config_opts+=no-md2 $(package)_config_opts+=no-mdc2 $(package)_config_opts+=no-rc4 $(package)_config_opts+=no-rc5 $(package)_config_opts+=no-rdrand $(package)_config_opts+=no-rfc3779 -$(package)_config_opts+=no-rsax $(package)_config_opts+=no-sctp $(package)_config_opts+=no-seed -$(package)_config_opts+=no-sha0 $(package)_config_opts+=no-shared +$(package)_config_opts+=no-sock $(package)_config_opts+=no-ssl-trace $(package)_config_opts+=no-ssl2 $(package)_config_opts+=no-ssl3 -$(package)_config_opts+=no-static_engine -$(package)_config_opts+=no-store +$(package)_config_opts+=no-tests $(package)_config_opts+=no-unit-test $(package)_config_opts+=no-weak-ssl-ciphers $(package)_config_opts+=no-whirlpool $(package)_config_opts+=no-zlib $(package)_config_opts+=no-zlib-dynamic $(package)_config_opts+=$($(package)_cflags) $($(package)_cppflags) -$(package)_config_opts_linux=-fPIC -Wa,--noexecstack +$(package)_config_opts_linux=-fPIC -Wa,--noexecstack --with-rand-seed=devrandom $(package)_config_opts_x86_64_linux=linux-x86_64 $(package)_config_opts_i686_linux=linux-generic32 $(package)_config_opts_arm_linux=linux-generic32 @@ -58,13 +52,11 @@ $(package)_config_opts_i686_mingw32=mingw endef define $(package)_preprocess_cmds - patch -p1 < $($(package)_patch_dir)/0001-Add-OpenSSL-termios-fix-for-musl-libc.patch && \ - sed -i.old "/define DATE/d" util/mkbuildinf.pl && \ - sed -i.old "s|engines apps test|engines|" Makefile.org + sed -i.old "s/define DATE .*/define DATE \"\"/g" util/mkbuildinf.pl endef define $(package)_config_cmds - ./Configure $($(package)_config_opts) + WINDRES=$($(host_os)_WINDRES) ./Configure $($(package)_config_opts) endef define $(package)_build_cmds @@ -72,7 +64,8 @@ define $(package)_build_cmds endef define $(package)_stage_cmds - $(MAKE) INSTALL_PREFIX=$($(package)_staging_dir) -j1 install_sw + sed -i.old "s/^INSTALLTOP=/INSTALLTOP?=/g" Makefile && \ + $($(package)_stage_env) $(MAKE) -j1 INSTALLTOP=$($(package)_staging_dir)/$(host_prefix) install_sw endef define $(package)_postprocess_cmds diff --git a/depends/packages/packages.mk b/depends/packages/packages.mk index 6b3bccb12d..a916aac66d 100644 --- a/depends/packages/packages.mk +++ b/depends/packages/packages.mk @@ -5,7 +5,7 @@ protobuf_packages = protobuf qt_packages = qrencode zlib -qt_linux_packages:=qt expat libxcb xcb_proto libXau xproto freetype fontconfig +qt_linux_packages:=qt expat libxcb xcb_proto libXau xproto freetype fontconfig libxkbcommon libxcb_util libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm rapidcheck_packages = rapidcheck diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index c3a827ab46..0d6485e81c 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -1,51 +1,64 @@ -PACKAGE=qt -$(package)_version=5.9.7 -$(package)_download_path=https://download.qt.io/archive/qt/5.9/$($(package)_version)/submodules -$(package)_suffix=opensource-src-$($(package)_version).tar.xz +package=qt +$(package)_version=5.15.3 +$(package)_download_path=https://download.qt.io/official_releases/qt/5.15/$($(package)_version)/submodules +$(package)_suffix=everywhere-opensource-src-$($(package)_version).tar.xz $(package)_file_name=qtbase-$($(package)_suffix) -$(package)_sha256_hash=36dd9574f006eaa1e5af780e4b33d11fe39d09fd7c12f3b9d83294174bd28f00 -$(package)_dependencies=openssl zlib -$(package)_linux_dependencies=freetype fontconfig libxcb -$(package)_build_subdir=qtbase +$(package)_sha256_hash=26394ec9375d52c1592bd7b689b1619c6b8dbe9b6f91fdd5c355589787f3a0b6 +$(package)_dependencies=openssl +$(package)_linux_dependencies=freetype fontconfig libxcb libxkbcommon libxcb_util libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm $(package)_qt_libs=corelib network widgets gui plugins testlib -$(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_configure_mac.patch fix_no_printer.patch -$(package)_patches+= fix_rcc_determinism.patch xkb-default.patch no-xlib.patch dont_hardcode_pwd.patch -$(package)_patches+= drop_lrelease_dependency.patch - +$(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 += dont_hardcode_x86_64.patch fix_montery_include.patch +$(package)_patches += fix_android_jni_static.patch dont_hardcode_pwd.patch +$(package)_patches += qtbase-moc-ignore-gcc-macro.patch fix_limits_header.patch +$(package)_patches += use_android_ndk23.patch +$(package)_patches += rcc_hardcode_timestamp.patch +$(package)_patches += fix_qpainter_non_determinism.patch +$(package)_patches += disable_xinerama.patch +$(package)_patches += dont_use_glibc_getentropy.patch +$(package)_patches += dont_use_statx_renameat2.patch $(package)_qttranslations_file_name=qttranslations-$($(package)_suffix) -$(package)_qttranslations_sha256_hash=b36da7d93c3ab6fca56b32053bb73bc619c8b192bb89b74e3bcde2705f1c2a14 +$(package)_qttranslations_sha256_hash=5d7869f670a135ad0986e266813b9dd5bbae2b09577338f9cdf8904d4af52db0 $(package)_qttools_file_name=qttools-$($(package)_suffix) -$(package)_qttools_sha256_hash=d62e0f70d99645d6704dbb8976fb2222443061743689943d40970c52c49367a1 +$(package)_qttools_sha256_hash=463b2fe71a085e7ab4e39333ae360ab0ec857b966d7a08f752c427e5df55f90d $(package)_extra_sources = $($(package)_qttranslations_file_name) $(package)_extra_sources += $($(package)_qttools_file_name) define $(package)_set_vars $(package)_config_opts_release = -release +$(package)_config_opts_release += -silent $(package)_config_opts_debug = -debug +$(package)_config_opts_debug += -optimized-tools $(package)_config_opts += -bindir $(build_prefix)/bin -$(package)_config_opts += -c++std c++11 +$(package)_config_opts += -c++std c++17 $(package)_config_opts += -confirm-license $(package)_config_opts += -hostprefix $(build_prefix) $(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-evdev $(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-libjpeg +$(package)_config_opts += -no-libproxy $(package)_config_opts += -no-libudev $(package)_config_opts += -no-mtdev -$(package)_config_opts += -no-opengl $(package)_config_opts += -no-openvg $(package)_config_opts += -no-reduce-relocations -$(package)_config_opts += -no-qml-debug +$(package)_config_opts += -no-schannel +$(package)_config_opts += -no-sctp +$(package)_config_opts += -no-securetransport $(package)_config_opts += -no-sql-db2 $(package)_config_opts += -no-sql-ibase $(package)_config_opts += -no-sql-oci @@ -55,68 +68,130 @@ $(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-system-proxies $(package)_config_opts += -no-use-gold-linker -$(package)_config_opts += -no-xinput2 +$(package)_config_opts += -no-zstd $(package)_config_opts += -nomake examples $(package)_config_opts += -nomake tests +$(package)_config_opts += -nomake tools $(package)_config_opts += -opensource $(package)_config_opts += -openssl-linked -$(package)_config_opts += -optimized-qmake -$(package)_config_opts += -pch $(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 -$(package)_config_opts += -system-zlib +$(package)_config_opts += -qt-zlib $(package)_config_opts += -static -$(package)_config_opts += -silent $(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 $(package)_config_opts += -no-feature-dial +$(package)_config_opts += -no-feature-fontcombobox $(package)_config_opts += -no-feature-ftp +$(package)_config_opts += -no-feature-http +$(package)_config_opts += -no-feature-image_heuristic_mask +$(package)_config_opts += -no-feature-keysequenceedit $(package)_config_opts += -no-feature-lcdnumber +$(package)_config_opts += -no-feature-networkdiskcache $(package)_config_opts += -no-feature-pdf -$(package)_config_opts += -no-feature-printer $(package)_config_opts += -no-feature-printdialog -$(package)_config_opts += -no-feature-concurrent +$(package)_config_opts += -no-feature-printer +$(package)_config_opts += -no-feature-printpreviewdialog +$(package)_config_opts += -no-feature-printpreviewwidget +$(package)_config_opts += -no-feature-sessionmanager +$(package)_config_opts += -no-feature-socks5 $(package)_config_opts += -no-feature-sql +$(package)_config_opts += -no-feature-sqlmodel $(package)_config_opts += -no-feature-statemachine $(package)_config_opts += -no-feature-syntaxhighlighter $(package)_config_opts += -no-feature-textbrowser +$(package)_config_opts += -no-feature-textmarkdownwriter $(package)_config_opts += -no-feature-textodfwriter +$(package)_config_opts += -no-feature-topleveldomain $(package)_config_opts += -no-feature-udpsocket +$(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 $(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 += -no-freetype +$(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) $(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_MIN_VERSION=$(OSX_MIN_VERSION) $(package)_config_opts_darwin += -device-option MAC_TARGET=$(host) +$(package)_config_opts_darwin += -device-option XCODE_VERSION=$(XCODE_VERSION) endif -$(package)_config_opts_linux = -qt-xkbcommon-x11 -$(package)_config_opts_linux += -qt-xcb +ifneq ($(build_arch),$(host_arch)) +$(package)_config_opts_aarch64_darwin += -device-option QMAKE_APPLE_DEVICE_ARCHS=arm64 +$(package)_config_opts_x86_64_darwin += -device-option QMAKE_APPLE_DEVICE_ARCHS=x86_64 +endif + +$(package)_config_opts_linux = -xcb $(package)_config_opts_linux += -no-xcb-xlib $(package)_config_opts_linux += -no-feature-xlib $(package)_config_opts_linux += -system-freetype -$(package)_config_opts_linux += -no-feature-sessionmanager $(package)_config_opts_linux += -fontconfig +$(package)_config_opts_linux += -no-opengl +$(package)_config_opts_linux += -no-feature-vulkan $(package)_config_opts_linux += -dbus-runtime +$(package)_config_opts_linux += OPENSSL_LIBS="-lssl -lcrypto -lpthread" $(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_mingw32 = -no-dbus +$(package)_config_opts_powerpc64_linux = -platform linux-g++ -xplatform bitcoin-linux-g++ +$(package)_config_opts_powerpc64le_linux = -platform linux-g++ -xplatform bitcoin-linux-g++ +$(package)_config_opts_riscv64_linux = -platform linux-g++ -xplatform bitcoin-linux-g++ +$(package)_config_opts_s390x_linux = -platform linux-g++ -xplatform bitcoin-linux-g++ + +$(package)_config_opts_mingw32 = -no-opengl +$(package)_config_opts_mingw32 += -no-dbus +$(package)_config_opts_mingw32 += -no-freetype $(package)_config_opts_mingw32 += -xplatform win32-g++ +$(package)_config_opts_mingw32 += "QMAKE_CFLAGS = '$($(package)_cflags) $($(package)_cppflags)'" +$(package)_config_opts_mingw32 += "QMAKE_CXX = '$($(package)_cxx)'" +$(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)_build_env = QT_RCC_TEST=1 -$(package)_build_env += QT_RCC_SOURCE_DATE_OVERRIDE=1 +$(package)_config_opts_mingw32 += -pch +$(package)_config_opts_mingw32 += OPENSSL_LIBS="-lssl -lcrypto -lws2_32" + +$(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 += -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 endef define $(package)_fetch_cmds @@ -139,59 +214,74 @@ define $(package)_extract_cmds tar --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttools_file_name) -C qttools 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 - sed -i.old "s|updateqm.commands = \$$$$\$$$$LRELEASE|updateqm.commands = $($(package)_extract_dir)/qttools/bin/lrelease|" qttranslations/translations/translations.pro && \ - patch -p1 -i $($(package)_patch_dir)/drop_lrelease_dependency.patch && \ - patch -p1 -i $($(package)_patch_dir)/dont_hardcode_pwd.patch &&\ + 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_jni_static.patch && \ + patch -p1 -i $($(package)_patch_dir)/no-xlib.patch && \ + patch -p1 -i $($(package)_patch_dir)/dont_hardcode_x86_64.patch && \ + patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.patch && \ + patch -p1 -i $($(package)_patch_dir)/fix_limits_header.patch && \ + patch -p1 -i $($(package)_patch_dir)/fix_montery_include.patch && \ + patch -p1 -i $($(package)_patch_dir)/use_android_ndk23.patch && \ + patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch && \ + patch -p1 -i $($(package)_patch_dir)/fix_qpainter_non_determinism.patch && \ + patch -p1 -i $($(package)_patch_dir)/disable_xinerama.patch && \ + patch -p1 -i $($(package)_patch_dir)/dont_use_glibc_getentropy.patch && \ + patch -p1 -i $($(package)_patch_dir)/dont_use_statx_renameat2.patch && \ mkdir -p qtbase/mkspecs/macx-clang-linux &&\ - cp -f qtbase/mkspecs/macx-clang/Info.plist.lib qtbase/mkspecs/macx-clang-linux/ &&\ - cp -f qtbase/mkspecs/macx-clang/Info.plist.app 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 && \ - patch -p1 -i $($(package)_patch_dir)/fix_qt_pkgconfig.patch &&\ - patch -p1 -i $($(package)_patch_dir)/fix_configure_mac.patch &&\ - patch -p1 -i $($(package)_patch_dir)/fix_no_printer.patch &&\ - patch -p1 -i $($(package)_patch_dir)/fix_rcc_determinism.patch &&\ - patch -p1 -i $($(package)_patch_dir)/xkb-default.patch &&\ 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 && \ - patch -p1 -i $($(package)_patch_dir)/no-xlib.patch &&\ - echo "QMAKE_LINK_OBJECT_MAX = 10" >> qtbase/mkspecs/win32-g++/qmake.conf &&\ - echo "QMAKE_LINK_OBJECT_SCRIPT = object_script" >> qtbase/mkspecs/win32-g++/qmake.conf &&\ - sed -i.old "s|QMAKE_CFLAGS = |!host_build: QMAKE_CFLAGS = $($(package)_cflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \ - sed -i.old "s|QMAKE_LFLAGS = |!host_build: QMAKE_LFLAGS = $($(package)_ldflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \ - sed -i.old "s|QMAKE_CXXFLAGS = |!host_build: QMAKE_CXXFLAGS = $($(package)_cxxflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf + 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/LIBRARY_PATH/(CROSS_)?\0/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 && \ - ./configure $($(package)_config_opts) && \ - echo "host_build: QT_CONFIG ~= s/system-zlib/zlib" >> mkspecs/qconfig.pri && \ - echo "CONFIG += force_bootstrap" >> mkspecs/qconfig.pri && \ - $(MAKE) sub-src-clean && \ - cd ../qttranslations && ../qtbase/bin/qmake qttranslations.pro -o Makefile && \ - cd translations && ../../qtbase/bin/qmake translations.pro -o Makefile && cd ../.. && \ - cd qttools/src/linguist && ../../../qtbase/bin/qmake linguist.pro -o Makefile && \ - cd lconvert && ../../../../qtbase/bin/qmake lconvert.pro -o Makefile && cd .. && \ - cd lrelease && ../../../../qtbase/bin/qmake lrelease.pro -o Makefile && cd .. && \ - cd lupdate && ../../../../qtbase/bin/qmake lupdate.pro -o Makefile && cd ../../../.. + export QT_MAC_SDK_NO_VERSION_CHECK=1 && \ + cd qtbase && \ + ./configure -top-level $($(package)_config_opts) endef define $(package)_build_cmds $(MAKE) -j$(JOBS) && \ - $(MAKE) -j$(JOBS) -C ../qttools/src/linguist/lconvert && \ - $(MAKE) -j$(JOBS) -C ../qttools/src/linguist/lrelease && \ - $(MAKE) -j$(JOBS) -C ../qttools/src/linguist/lupdate && \ - $(MAKE) -j$(JOBS) -C ../qttranslations + $(MAKE) -j$(JOBS) -C qttools/src/linguist/lconvert && \ + $(MAKE) -j$(JOBS) -C qttools/src/linguist/lrelease && \ + $(MAKE) -j$(JOBS) -C qttools/src/linguist/lupdate && \ + $(MAKE) -j$(JOBS) -C qttranslations endef define $(package)_stage_cmds - $(MAKE) INSTALL_ROOT=$($(package)_staging_dir) install && cd .. && \ + $(MAKE) INSTALL_ROOT=$($(package)_staging_dir) install && \ $(MAKE) -C qttools/src/linguist/lconvert INSTALL_ROOT=$($(package)_staging_dir) install && \ $(MAKE) -C qttools/src/linguist/lrelease INSTALL_ROOT=$($(package)_staging_dir) install && \ $(MAKE) -C qttools/src/linguist/lupdate INSTALL_ROOT=$($(package)_staging_dir) install && \ diff --git a/depends/packages/xcb_proto.mk b/depends/packages/xcb_proto.mk index d86392e794..9be822506d 100644 --- a/depends/packages/xcb_proto.mk +++ b/depends/packages/xcb_proto.mk @@ -1,20 +1,15 @@ package=xcb_proto -$(package)_version=1.10 -$(package)_download_path=https://xcb.freedesktop.org/dist -$(package)_file_name=xcb-proto-$($(package)_version).tar.bz2 -$(package)_sha256_hash=7ef40ddd855b750bc597d2a435da21e55e502a0fefa85b274f2c922800baaf05 - -define $(package)_set_vars - $(package)_config_opts=--disable-shared --enable-option-checking - $(package)_config_opts_linux=--with-pic -endef +$(package)_version=1.14.1 +$(package)_download_path=https://xorg.freedesktop.org/archive/individual/proto +$(package)_file_name=xcb-proto-$($(package)_version).tar.xz +$(package)_sha256_hash=f04add9a972ac334ea11d9d7eb4fc7f8883835da3e4859c9afa971efdf57fcc3 define $(package)_config_cmds $($(package)_autoconf) endef define $(package)_build_cmds - $(MAKE) -j$(JOBS) + $(MAKE) endef define $(package)_stage_cmds @@ -22,6 +17,5 @@ define $(package)_stage_cmds endef define $(package)_postprocess_cmds - find -name "*.pyc" -delete && \ - find -name "*.pyo" -delete + rm -rf lib/python*/site-packages/xcbgen/__pycache__ endef diff --git a/depends/patches/openssl/0001-Add-OpenSSL-termios-fix-for-musl-libc.patch b/depends/patches/openssl/0001-Add-OpenSSL-termios-fix-for-musl-libc.patch deleted file mode 100644 index 003099bdc2..0000000000 --- a/depends/patches/openssl/0001-Add-OpenSSL-termios-fix-for-musl-libc.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/crypto/ui/ui_openssl.c b/crypto/ui/ui_openssl.c -index a38c758..d99edc2 100644 ---- a/crypto/ui/ui_openssl.c -+++ b/crypto/ui/ui_openssl.c -@@ -190,9 +190,9 @@ - # undef SGTTY - #endif - --#if defined(linux) && !defined(TERMIO) --# undef TERMIOS --# define TERMIO -+#if defined(linux) -+# define TERMIOS -+# undef TERMIO - # undef SGTTY - #endif - diff --git a/depends/patches/qt/disable_xinerama.patch b/depends/patches/qt/disable_xinerama.patch new file mode 100644 index 0000000000..59086688f6 --- /dev/null +++ b/depends/patches/qt/disable_xinerama.patch @@ -0,0 +1,220 @@ +From: Ieb57d9035e1659fc22bf8333247fc3573fb62992 +From: Tor Arne +Date: Sep 04, 2020 +Subject: xcb: drop Xinerama support + +See: https://bugreports.qt.io/browse/QTBUG-89364 +Original qtbase patch: https://codereview.qt-project.org/c/qt/qtbase/+/311432 + +Added to BCHN repository by Calin Culianu +diff -urN a/qtbase/src/gui/configure.json b/qtbase/src/gui/configure.json +--- a/qtbase/src/gui/configure.json 2021-03-18 17:29:29.000000000 +0200 ++++ b/qtbase/src/gui/configure.json 2022-03-31 01:34:04.854406448 +0300 +@@ -673,15 +673,6 @@ + ], + "use": "xcb" + }, +- "xcb_xinerama": { +- "label": "XCB Xinerama", +- "headers": "xcb/xinerama.h", +- "sources": [ +- { "type": "pkgConfig", "args": "xcb-xinerama" }, +- "-lxcb-xinerama" +- ], +- "use": "xcb" +- }, + "xcb_xlib": { + "label": "XCB Xlib", + "test": { +@@ -1064,7 +1055,6 @@ + "xcb/shm.h", + "xcb/sync.h", + "xcb/xfixes.h", +- "xcb/xinerama.h", + "xcb/xcb_icccm.h", + "xcb/xcb_renderutil.h", + "xcb/xkb.h" +@@ -1087,7 +1077,7 @@ + "xcb_xkb_get_kbd_by_name_replies_key_names_value_list_sizeof(nullptr, 0, 0, 0, 0, 0, 0, 0, 0);" + ] + }, +- "use": "xcb_icccm xcb_image xcb_keysyms xcb_randr xcb_render xcb_renderutil xcb_shape xcb_shm xcb_sync xcb_xfixes xcb_xinerama xcb_xkb xcb" ++ "use": "xcb_icccm xcb_image xcb_keysyms xcb_randr xcb_render xcb_renderutil xcb_shape xcb_shm xcb_sync xcb_xfixes xcb_xkb xcb" + }, + "x11prefix": { + "label": "X11 prefix", +diff -urN a/qtbase/src/plugins/platforms/xcb/qxcbconnection_basic.cpp b/qtbase/src/plugins/platforms/xcb/qxcbconnection_basic.cpp +--- a/qtbase/src/plugins/platforms/xcb/qxcbconnection_basic.cpp 2021-03-18 17:29:29.000000000 +0200 ++++ b/qtbase/src/plugins/platforms/xcb/qxcbconnection_basic.cpp 2022-03-31 01:35:53.253826619 +0300 +@@ -43,7 +43,6 @@ + #include + #include + #include +-#include + #include + #include + #define explicit dont_use_cxx_explicit +@@ -145,8 +144,6 @@ + initializeShm(); + if (!qEnvironmentVariableIsSet("QT_XCB_NO_XRANDR")) + initializeXRandr(); +- if (!m_hasXRandr) +- initializeXinerama(); + initializeXFixes(); + initializeXRender(); + if (!qEnvironmentVariableIsSet("QT_XCB_NO_XI2")) +@@ -307,17 +304,6 @@ + m_xrenderVersion.second = xrenderQuery->minor_version; + } + +-void QXcbBasicConnection::initializeXinerama() +-{ +- const xcb_query_extension_reply_t *reply = xcb_get_extension_data(m_xcbConnection, &xcb_xinerama_id); +- if (!reply || !reply->present) +- return; +- +- auto xineramaActive = Q_XCB_REPLY(xcb_xinerama_is_active, m_xcbConnection); +- if (xineramaActive && xineramaActive->state) +- m_hasXinerama = true; +-} +- + void QXcbBasicConnection::initializeXFixes() + { + const xcb_query_extension_reply_t *reply = xcb_get_extension_data(m_xcbConnection, &xcb_xfixes_id); +diff -urN a/qtbase/src/plugins/platforms/xcb/qxcbconnection_basic.h b/qtbase/src/plugins/platforms/xcb/qxcbconnection_basic.h +--- a/qtbase/src/plugins/platforms/xcb/qxcbconnection_basic.h 2021-03-18 17:29:29.000000000 +0200 ++++ b/qtbase/src/plugins/platforms/xcb/qxcbconnection_basic.h 2022-03-31 01:35:01.317827609 +0300 +@@ -96,7 +96,6 @@ + bool hasShm() const { return m_hasShm; } + bool hasShmFd() const { return m_hasShmFd; } + bool hasXSync() const { return m_hasXSync; } +- bool hasXinerama() const { return m_hasXinerama; } + bool hasBigRequest() const; + + bool isAtLeastXI21() const { return m_xi2Enabled && m_xi2Minor >= 1; } +@@ -113,7 +112,6 @@ + void initializeXFixes(); + void initializeXRender(); + void initializeXRandr(); +- void initializeXinerama(); + void initializeXShape(); + void initializeXKB(); + void initializeXSync(); +@@ -130,7 +128,6 @@ + QXcbAtom m_xcbAtom; + + bool m_hasXFixes = false; +- bool m_hasXinerama = false; + bool m_hasXhape = false; + bool m_hasInputShape; + bool m_hasXRandr = false; +diff -urN a/qtbase/src/plugins/platforms/xcb/qxcbconnection_screens.cpp b/qtbase/src/plugins/platforms/xcb/qxcbconnection_screens.cpp +--- a/qtbase/src/plugins/platforms/xcb/qxcbconnection_screens.cpp 2021-03-18 17:29:29.000000000 +0200 ++++ b/qtbase/src/plugins/platforms/xcb/qxcbconnection_screens.cpp 2022-03-31 01:36:52.689825486 +0300 +@@ -46,8 +46,6 @@ + + #include + +-#include +- + void QXcbConnection::xrandrSelectEvents() + { + xcb_screen_iterator_t rootIter = xcb_setup_roots_iterator(setup()); +@@ -360,22 +358,7 @@ + } + } + } +- } else if (hasXinerama()) { +- // Xinerama is available +- auto screens = Q_XCB_REPLY(xcb_xinerama_query_screens, xcb_connection()); +- if (screens) { +- xcb_xinerama_screen_info_iterator_t it = xcb_xinerama_query_screens_screen_info_iterator(screens.get()); +- while (it.rem) { +- xcb_xinerama_screen_info_t *screen_info = it.data; +- QXcbScreen *screen = new QXcbScreen(this, virtualDesktop, +- XCB_NONE, nullptr, +- screen_info, it.index); +- siblings << screen; +- m_screens << screen; +- xcb_xinerama_screen_info_next(&it); +- } +- } +- } ++ } + if (siblings.isEmpty()) { + // If there are no XRandR outputs or XRandR extension is missing, + // then create a fake/legacy screen. +diff -urN a/qtbase/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/qtbase/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp +--- a/qtbase/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp 2021-03-18 17:29:29.000000000 +0200 ++++ b/qtbase/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp 2022-03-31 01:41:39.061820029 +0300 +@@ -608,9 +608,7 @@ + bool QXcbConnection::xi2MouseEventsDisabled() const + { + static bool xi2MouseDisabled = qEnvironmentVariableIsSet("QT_XCB_NO_XI2_MOUSE"); +- // FIXME: Don't use XInput2 mouse events when Xinerama extension +- // is enabled, because it causes problems with multi-monitor setup. +- return xi2MouseDisabled || hasXinerama(); ++ return xi2MouseDisabled; + } + + bool QXcbConnection::isTouchScreen(int id) +diff -urN a/qtbase/src/plugins/platforms/xcb/qxcbscreen.cpp b/qtbase/src/plugins/platforms/xcb/qxcbscreen.cpp +--- a/qtbase/src/plugins/platforms/xcb/qxcbscreen.cpp 2021-03-18 17:29:29.000000000 +0200 ++++ b/qtbase/src/plugins/platforms/xcb/qxcbscreen.cpp 2022-03-31 01:38:38.545823469 +0300 +@@ -518,8 +518,7 @@ + } + + QXcbScreen::QXcbScreen(QXcbConnection *connection, QXcbVirtualDesktop *virtualDesktop, +- xcb_randr_output_t outputId, xcb_randr_get_output_info_reply_t *output, +- const xcb_xinerama_screen_info_t *xineramaScreenInfo, int xineramaScreenIdx) ++ xcb_randr_output_t outputId, xcb_randr_get_output_info_reply_t *output) + : QXcbObject(connection) + , m_virtualDesktop(virtualDesktop) + , m_output(outputId) +@@ -535,13 +534,6 @@ + updateGeometry(QRect(crtc->x, crtc->y, crtc->width, crtc->height), crtc->rotation); + updateRefreshRate(crtc->mode); + } +- } else if (xineramaScreenInfo) { +- m_geometry = QRect(xineramaScreenInfo->x_org, xineramaScreenInfo->y_org, +- xineramaScreenInfo->width, xineramaScreenInfo->height); +- m_availableGeometry = m_virtualDesktop->availableGeometry(m_geometry); +- m_sizeMillimeters = sizeInMillimeters(m_geometry.size(), m_virtualDesktop->dpi()); +- if (xineramaScreenIdx > -1) +- m_outputName += QLatin1Char('-') + QString::number(xineramaScreenIdx); + } + + if (m_geometry.isEmpty()) +diff -urN a/qtbase/src/plugins/platforms/xcb/qxcbscreen.h b/qtbase/src/plugins/platforms/xcb/qxcbscreen.h +--- a/qtbase/src/plugins/platforms/xcb/qxcbscreen.h 2021-03-18 17:29:29.000000000 +0200 ++++ b/qtbase/src/plugins/platforms/xcb/qxcbscreen.h 2022-03-31 01:37:54.493824309 +0300 +@@ -46,7 +46,6 @@ + #include + #include + #include +-#include + + #include "qxcbobject.h" + #include "qxcbscreen.h" +@@ -143,8 +142,7 @@ + { + public: + QXcbScreen(QXcbConnection *connection, QXcbVirtualDesktop *virtualDesktop, +- xcb_randr_output_t outputId, xcb_randr_get_output_info_reply_t *outputInfo, +- const xcb_xinerama_screen_info_t *xineramaScreenInfo = nullptr, int xineramaScreenIdx = -1); ++ xcb_randr_output_t outputId, xcb_randr_get_output_info_reply_t *outputInfo); + ~QXcbScreen(); + + QString getOutputName(xcb_randr_get_output_info_reply_t *outputInfo); +diff -urN a/qtbase/src/plugins/platforms/xcb/xcb_qpa_lib.pro b/qtbase/src/plugins/platforms/xcb/xcb_qpa_lib.pro +--- a/qtbase/src/plugins/platforms/xcb/xcb_qpa_lib.pro 2021-03-18 17:29:29.000000000 +0200 ++++ b/qtbase/src/plugins/platforms/xcb/xcb_qpa_lib.pro 2022-03-31 01:39:28.697822513 +0300 +@@ -93,7 +93,7 @@ + + QMAKE_USE += \ + xcb xcb_icccm xcb_image xcb_keysyms xcb_randr xcb_render xcb_renderutil \ +- xcb_shape xcb_shm xcb_sync xcb_xfixes xcb_xinerama xcb_xkb xkbcommon xkbcommon_x11 ++ xcb_shape xcb_shm xcb_sync xcb_xfixes xcb_xkb xkbcommon xkbcommon_x11 + + qtConfig(system-xcb-xinput) { + QMAKE_USE += xcb_xinput diff --git a/depends/patches/qt/dont_hardcode_x86_64.patch b/depends/patches/qt/dont_hardcode_x86_64.patch new file mode 100644 index 0000000000..5c1e030fa4 --- /dev/null +++ b/depends/patches/qt/dont_hardcode_x86_64.patch @@ -0,0 +1,119 @@ +macOS: Don't hard-code x86_64 as the architecture when using qmake + +Upstream commit: + - Qt 6.1: 9082cc8e8d5a6441dabe5e7a95bc0cd9085b95fe + +For other Qt branches see +https://codereview.qt-project.org/q/I70db7e4c27f0d3da5d0af33cb491d72c312d3fa8 + + +--- old/qtbase/configure.json ++++ new/qtbase/configure.json +@@ -244,11 +244,18 @@ + + "testTypeDependencies": { + "linkerSupportsFlag": [ "use_bfd_linker", "use_gold_linker", "use_lld_linker" ], +- "verifySpec": [ "shared", "use_bfd_linker", "use_gold_linker", "use_lld_linker", "compiler-flags", "qmakeargs", "commit" ], ++ "verifySpec": [ ++ "shared", ++ "use_bfd_linker", "use_gold_linker", "use_lld_linker", ++ "compiler-flags", "qmakeargs", ++ "simulator_and_device", ++ "thread", ++ "commit" ], + "compile": [ "verifyspec" ], + "detectPkgConfig": [ "cross_compile", "machineTuple" ], + "library": [ "pkg-config", "compiler-flags" ], +- "getPkgConfigVariable": [ "pkg-config" ] ++ "getPkgConfigVariable": [ "pkg-config" ], ++ "architecture" : [ "verifyspec" ] + }, + + "testTypeAliases": { +@@ -762,7 +769,7 @@ + }, + "architecture": { + "label": "Architecture", +- "output": [ "architecture" ] ++ "output": [ "architecture", "commitConfig" ] + }, + "pkg-config": { + "label": "Using pkg-config", +diff --git a/configure.pri b/configure.pri +index 49755f7abfd..8be9b10d7d4 100644 +--- old/qtbase/configure.pri ++++ new/qtbase/configure.pri +@@ -662,6 +662,13 @@ defineTest(qtConfOutput_commitOptions) { + write_file($$QT_BUILD_TREE/mkspecs/qdevice.pri, $${currentConfig}.output.devicePro)|error() + } + ++# Output is written after configuring each Qt module, ++# but some tests within a module might depend on the ++# configuration output of previous tests. ++defineTest(qtConfOutput_commitConfig) { ++ qtConfProcessOutput() ++} ++ + # type (empty or 'host'), option name, default value + defineTest(processQtPath) { + out_var = config.rel_input.$${2} +diff --git a/mkspecs/common/macx.conf b/mkspecs/common/macx.conf +index d16b77acb8e..4ba0a8eaa36 100644 +--- old/qtbase/mkspecs/common/macx.conf ++++ new/qtbase/mkspecs/common/macx.conf +@@ -6,7 +6,6 @@ QMAKE_PLATFORM += macos osx macx + QMAKE_MAC_SDK = macosx + + QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.13 +-QMAKE_APPLE_DEVICE_ARCHS = x86_64 + + # Should be 10.15, but as long as the CI builds with + # older SDKs we have to keep this. +diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf +index 92a9112bca6..d888731ec8d 100644 +--- old/qtbase/mkspecs/features/mac/default_post.prf ++++ new/qtbase/mkspecs/features/mac/default_post.prf +@@ -90,6 +90,11 @@ app_extension_api_only { + QMAKE_LFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION + } + ++# Non-universal builds do not set QMAKE_APPLE_DEVICE_ARCHS, ++# so we pick it up from what the arch test resolved instead. ++isEmpty(QMAKE_APPLE_DEVICE_ARCHS): \ ++ QMAKE_APPLE_DEVICE_ARCHS = $$QT_ARCH ++ + macx-xcode { + qmake_pkginfo_typeinfo.name = QMAKE_PKGINFO_TYPEINFO + !isEmpty(QMAKE_PKGINFO_TYPEINFO): \ +@@ -145,9 +150,6 @@ macx-xcode { + simulator: VALID_SIMULATOR_ARCHS = $$QMAKE_APPLE_SIMULATOR_ARCHS + VALID_ARCHS = $$VALID_DEVICE_ARCHS $$VALID_SIMULATOR_ARCHS + +- isEmpty(VALID_ARCHS): \ +- error("QMAKE_APPLE_DEVICE_ARCHS or QMAKE_APPLE_SIMULATOR_ARCHS must contain at least one architecture") +- + single_arch: VALID_ARCHS = $$first(VALID_ARCHS) + + ACTIVE_ARCHS = $(filter $(EXPORT_VALID_ARCHS), $(ARCHS)) +diff --git a/mkspecs/features/toolchain.prf b/mkspecs/features/toolchain.prf +index efbe7c1e55b..8add6dc8043 100644 +--- old/qtbase/mkspecs/features/toolchain.prf ++++ new/qtbase/mkspecs/features/toolchain.prf +@@ -182,9 +182,14 @@ isEmpty($${target_prefix}.INCDIRS) { + # UIKit simulator platforms will see the device SDK's sysroot in + # QMAKE_DEFAULT_*DIRS, because they're handled in a single build pass. + darwin { +- # Clang doesn't pick up the architecture from the sysroot, and will +- # default to the host architecture, so we need to manually set it. +- cxx_flags += -arch $$QMAKE_APPLE_DEVICE_ARCHS ++ uikit { ++ # Clang doesn't automatically pick up the architecture, just because ++ # we're passing the iOS sysroot below, and we will end up building the ++ # test for the host architecture, resulting in linker errors when ++ # linking against the iOS libraries. We work around this by passing ++ # the architecture explicitly. ++ cxx_flags += -arch $$first(QMAKE_APPLE_DEVICE_ARCHS) ++ } + + uikit:macx-xcode: \ + cxx_flags += -isysroot $$sdk_path_device.value diff --git a/depends/patches/qt/dont_use_glibc_getentropy.patch b/depends/patches/qt/dont_use_glibc_getentropy.patch new file mode 100644 index 0000000000..889e87aecc --- /dev/null +++ b/depends/patches/qt/dont_use_glibc_getentropy.patch @@ -0,0 +1,12 @@ +diff -urN a/qtbase/src/corelib/configure.json b/qtbase/src/corelib/configure.json +--- a/qtbase/src/corelib/configure.json 2021-03-18 17:29:29.000000000 +0200 ++++ b/qtbase/src/corelib/configure.json 2022-03-28 21:54:10.039845941 +0300 +@@ -417,7 +417,7 @@ + "include": "unistd.h", + "main": [ + "char buf[32];", +- "(void) getentropy(buf, sizeof(buf));" ++ "(void) z_dont_use_getentropy(buf, sizeof(buf));" + ] + } + }, diff --git a/depends/patches/qt/dont_use_statx_renameat2.patch b/depends/patches/qt/dont_use_statx_renameat2.patch new file mode 100644 index 0000000000..1eb0b2d282 --- /dev/null +++ b/depends/patches/qt/dont_use_statx_renameat2.patch @@ -0,0 +1,59 @@ +From: Calin Culianu + +This disables the use of GLIBC 2.28 functions statx and renameat2 so that Qt runs +against older libc 2.27, such as is found on stock Ubuntu 18.04 systems. +diff -urN a/qtbase/src/corelib/configure.json b/qtbase/src/corelib/configure.json +--- a/qtbase/src/corelib/configure.json 2021-03-18 17:29:29.000000000 +0200 ++++ b/qtbase/src/corelib/configure.json 2022-03-31 03:05:48.382200062 +0300 +@@ -521,7 +521,7 @@ + "test": { + "head": "#define _ATFILE_SOURCE 1", + "include": [ "fcntl.h", "stdio.h" ], +- "main": "renameat2(AT_FDCWD, argv[1], AT_FDCWD, argv[2], RENAME_NOREPLACE | RENAME_WHITEOUT);" ++ "main": "z_dont_use_renameat2(AT_FDCWD, argv[1], AT_FDCWD, argv[2], RENAME_NOREPLACE | RENAME_WHITEOUT);" + } + }, + "statx": { +@@ -533,7 +533,7 @@ + "main": [ + "struct statx statxbuf;", + "unsigned int mask = STATX_BASIC_STATS;", +- "return statx(AT_FDCWD, \"\", AT_STATX_SYNC_AS_STAT, mask, &statxbuf);" ++ "return z_dont_use_statx(AT_FDCWD, \"\", AT_STATX_SYNC_AS_STAT, mask, &statxbuf);" + ] + } + }, +diff -urN a/qtbase/src/corelib/global/qconfig-bootstrapped.h b/qtbase/src/corelib/global/qconfig-bootstrapped.h +--- a/qtbase/src/corelib/global/qconfig-bootstrapped.h 2021-03-18 17:29:29.000000000 +0200 ++++ b/qtbase/src/corelib/global/qconfig-bootstrapped.h 2022-03-31 04:26:07.164455720 +0300 +@@ -114,11 +114,7 @@ + #define QT_FEATURE_sharedmemory -1 + #define QT_FEATURE_signaling_nan -1 + #define QT_FEATURE_slog2 -1 +-#ifdef __GLIBC_PREREQ +-# define QT_FEATURE_statx (__GLIBC_PREREQ(2, 28) ? 1 : -1) +-#else +-# define QT_FEATURE_statx -1 +-#endif ++#define QT_FEATURE_statx -1 + #define QT_FEATURE_syslog -1 + #define QT_NO_SYSTEMLOCALE + #define QT_FEATURE_systemsemaphore -1 +diff -urN a/qtbase/src/corelib/io/qfilesystemengine_unix.cpp b/qtbase/src/corelib/io/qfilesystemengine_unix.cpp +--- a/qtbase/src/corelib/io/qfilesystemengine_unix.cpp 2021-03-18 17:29:29.000000000 +0200 ++++ b/qtbase/src/corelib/io/qfilesystemengine_unix.cpp 2022-03-31 04:30:36.239934457 +0300 +@@ -100,12 +100,8 @@ + #endif + #endif + +-#if defined(Q_OS_ANDROID) +-// statx() is disabled on Android because quite a few systems +-// come with sandboxes that kill applications that make system calls outside a +-// whitelist and several Android vendors can't be bothered to update the list. +-# undef STATX_BASIC_STATS +-#endif ++// BCHN patch: statx() is disabled so we can be compatible with GLIBC 2.27 always ++#undef STATX_BASIC_STATS + + #ifndef STATX_ALL + struct statx { mode_t stx_mode; }; // dummy diff --git a/depends/patches/qt/drop_lrelease_dependency.patch b/depends/patches/qt/drop_lrelease_dependency.patch deleted file mode 100644 index f6b2c9fc80..0000000000 --- a/depends/patches/qt/drop_lrelease_dependency.patch +++ /dev/null @@ -1,20 +0,0 @@ -commit 67b3ed7406e1d0762188dbad2c44a06824ba0778 -Author: fanquake -Date: Tue Aug 18 15:24:01 2020 +0800 - - Drop dependency on lrelease - - Qts buildsystem insists on using the installed lrelease, but gets - confused about how to find it. Since we manually control the build - order, just drop the dependency. - - See #9469 - -diff --git a/qttranslations/translations/translations.pro b/qttranslations/translations/translations.pro -index 694544c..eff339d 100644 ---- a/qttranslations/translations/translations.pro -+++ b/qttranslations/translations/translations.pro -@@ -109,3 +109,2 @@ updateqm.commands = $$LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT} - silent:updateqm.commands = @echo lrelease ${QMAKE_FILE_IN} && $$updateqm.commands --updateqm.depends = $$LRELEASE_EXE - updateqm.name = LRELEASE ${QMAKE_FILE_IN} diff --git a/depends/patches/qt/fix_android_jni_static.patch b/depends/patches/qt/fix_android_jni_static.patch new file mode 100644 index 0000000000..22a4d5ab0e --- /dev/null +++ b/depends/patches/qt/fix_android_jni_static.patch @@ -0,0 +1,18 @@ +--- old/qtbase/src/plugins/platforms/android/androidjnimain.cpp ++++ new/qtbase/src/plugins/platforms/android/androidjnimain.cpp +@@ -934,6 +934,14 @@ Q_DECL_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void */*reserved*/) + __android_log_print(ANDROID_LOG_FATAL, "Qt", "registerNatives failed"); + return -1; + } ++ ++ const jint ret = QT_PREPEND_NAMESPACE(QtAndroidPrivate::initJNI(vm, env)); ++ if (ret != 0) ++ { ++ __android_log_print(ANDROID_LOG_FATAL, "Qt", "initJNI failed"); ++ return ret; ++ } ++ + QWindowSystemInterfacePrivate::TabletEvent::setPlatformSynthesizesMouse(false); + + m_javaVM = vm; + diff --git a/depends/patches/qt/fix_configure_mac.patch b/depends/patches/qt/fix_configure_mac.patch deleted file mode 100644 index 0d7dd647de..0000000000 --- a/depends/patches/qt/fix_configure_mac.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- old/qtbase/mkspecs/features/mac/sdk.prf 2018-02-08 10:24:48.000000000 -0800 -+++ new/qtbase/mkspecs/features/mac/sdk.prf 2018-03-23 10:38:56.000000000 -0700 -@@ -8,21 +8,21 @@ - defineReplace(xcodeSDKInfo) { - info = $$1 - equals(info, "Path"): \ -- info = --show-sdk-path -+ infoarg = --show-sdk-path - equals(info, "PlatformPath"): \ -- info = --show-sdk-platform-path -+ infoarg = --show-sdk-platform-path - equals(info, "SDKVersion"): \ -- info = --show-sdk-version -+ infoarg = --show-sdk-version - sdk = $$2 - isEmpty(sdk): \ - sdk = $$QMAKE_MAC_SDK - - isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}) { -- QMAKE_MAC_SDK.$${sdk}.$${info} = $$system("/usr/bin/xcrun --sdk $$sdk $$info 2>/dev/null") -+ QMAKE_MAC_SDK.$${sdk}.$${info} = $$system("/usr/bin/xcrun --sdk $$sdk $$infoarg 2>/dev/null") - # --show-sdk-platform-path won't work for Command Line Tools; this is fine - # only used by the XCTest backend to testlib -- isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}):if(!isEmpty(QMAKE_XCODEBUILD_PATH)|!equals(info, "--show-sdk-platform-path")): \ -- error("Could not resolve SDK $$info for \'$$sdk\'") -+ isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}):if(!isEmpty(QMAKE_XCODEBUILD_PATH)|!equals(infoarg, "--show-sdk-platform-path")): \ -+ error("Could not resolve SDK $$info for \'$$sdk\' using $$infoarg") - cache(QMAKE_MAC_SDK.$${sdk}.$${info}, set stash, QMAKE_MAC_SDK.$${sdk}.$${info}) - } - ---- old/qtbase/configure 2018-02-08 10:24:48.000000000 -0800 -+++ new/qtbase/configure 2018-03-23 05:42:29.000000000 -0700 -@@ -232,8 +232,13 @@ - - sdk=$(getSingleQMakeVariable "QMAKE_MAC_SDK" "$1") - if [ -z "$sdk" ]; then echo "QMAKE_MAC_SDK must be set when building on Mac" >&2; exit 1; fi -- sysroot=$(/usr/bin/xcrun --sdk $sdk --show-sdk-path 2>/dev/null) -- if [ -z "$sysroot" ]; then echo "Failed to resolve SDK path for '$sdk'" >&2; exit 1; fi -+ sysroot=$(getSingleQMakeVariable "QMAKE_MAC_SDK_PATH" "$1") -+ -+ echo "sysroot pre-configured as $sysroot"; -+ if [ -z "$sysroot" ]; then -+ sysroot=$(/usr/bin/xcrun --sdk $sdk --show-sdk-path 2>/dev/null) -+ if [ -z "$sysroot" ]; then echo "Failed to resolve SDK path for '$sdk'" >&2; exit 1; fi -+ fi - - case "$sdk" in - macosx*) - - diff --git a/depends/patches/qt/fix_limits_header.patch b/depends/patches/qt/fix_limits_header.patch new file mode 100644 index 0000000000..2f15a50fbc --- /dev/null +++ b/depends/patches/qt/fix_limits_header.patch @@ -0,0 +1,41 @@ +Fix compiling with GCC 11 + +See: https://bugreports.qt.io/browse/QTBUG-90395. + +Upstream commits: + - Qt 5.15 - not backported yet + - Qt 6.0: b2af6332ea37e45ab230a7a5d2d278f86d961b83 + - Qt 6.1: 9c56d4da2ff631a8c1c30475bd792f6c86bda53c + +--- old/qtbase/src/tools/moc/generator.cpp ++++ new/qtbase/src/tools/moc/generator.cpp +@@ -40,6 +40,8 @@ + #include + #include + ++#include ++ + #include + #include + +--- old/qtbase/src/corelib/text/qbytearraymatcher.h ++++ new/qtbase/src/corelib/text/qbytearraymatcher.h +@@ -42,6 +42,8 @@ + + #include + ++#include ++ + QT_BEGIN_NAMESPACE + + +--- old/qtbase/src/corelib/tools/qoffsetstringarray_p.h ++++ new/qtbase/src/corelib/tools/qoffsetstringarray_p.h +@@ -55,6 +55,7 @@ + + #include + #include ++#include + + QT_BEGIN_NAMESPACE + diff --git a/depends/patches/qt/fix_montery_include.patch b/depends/patches/qt/fix_montery_include.patch new file mode 100644 index 0000000000..38b700addf --- /dev/null +++ b/depends/patches/qt/fix_montery_include.patch @@ -0,0 +1,21 @@ +From dece6f5840463ae2ddf927d65eb1b3680e34a547 +From: Øystein Heskestad +Date: Wed, 27 Oct 2021 13:07:46 +0200 +Subject: [PATCH] Add missing macOS header file that was indirectly included before + +See: https://bugreports.qt.io/browse/QTBUG-97855 + +Upstream Commits: + - Qt 6.2: c884bf138a21dd7320e35cef34d24e22e74d7ce0 + +diff --git a/qtbase/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h b/qtbase/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h +index e070ba97..07c75b04 100644 +--- a/qtbase/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h ++++ b/qtbase/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h +@@ -40,6 +40,7 @@ + #ifndef QIOSURFACEGRAPHICSBUFFER_H + #define QIOSURFACEGRAPHICSBUFFER_H + ++#include + #include + #include diff --git a/depends/patches/qt/fix_no_printer.patch b/depends/patches/qt/fix_no_printer.patch index f868ca2577..1372356138 100644 --- a/depends/patches/qt/fix_no_printer.patch +++ b/depends/patches/qt/fix_no_printer.patch @@ -10,10 +10,10 @@ --- x/qtbase/src/plugins/plugins.pro +++ y/qtbase/src/plugins/plugins.pro -@@ -8,6 +8,3 @@ qtHaveModule(gui) { - qtConfig(imageformatplugin): SUBDIRS *= imageformats +@@ -9,6 +9,3 @@ qtHaveModule(gui) { !android:qtConfig(library): SUBDIRS *= generic } + qtHaveModule(widgets): SUBDIRS += styles - -!winrt:qtHaveModule(printsupport): \ - SUBDIRS += printsupport diff --git a/depends/patches/qt/fix_qpainter_non_determinism.patch b/depends/patches/qt/fix_qpainter_non_determinism.patch new file mode 100644 index 0000000000..8c90788dba --- /dev/null +++ b/depends/patches/qt/fix_qpainter_non_determinism.patch @@ -0,0 +1,41 @@ +diff -urN a/qtbase/src/gui/painting/qpaintengine_raster.cpp b/qtbase/src/gui/painting/qpaintengine_raster.cpp +--- a/qtbase/src/gui/painting/qpaintengine_raster.cpp 2021-03-18 10:29:29.000000000 -0500 ++++ b/qtbase/src/gui/painting/qpaintengine_raster.cpp 2022-03-27 14:53:41.000000000 -0500 +@@ -4103,22 +4103,23 @@ + const QSpan *clipEnd = clip->m_spans + clip->count; + + while (available && spans < end ) { ++ const short spans_y = spans->y; + if (clipSpans >= clipEnd) { + spans = end; + break; + } +- if (clipSpans->y > spans->y) { ++ if (clipSpans->y > spans_y) { + ++spans; + continue; + } +- if (spans->y != clipSpans->y) { +- if (spans->y < clip->count && clip->m_clipLines[spans->y].spans) +- clipSpans = clip->m_clipLines[spans->y].spans; ++ if (spans_y != clipSpans->y) { ++ if (spans_y < clip->count && clip->m_clipLines[spans_y].spans) ++ clipSpans = clip->m_clipLines[spans_y].spans; + else + ++clipSpans; + continue; + } +- Q_ASSERT(spans->y == clipSpans->y); ++ Q_ASSERT(spans_y == clipSpans->y); + + int sx1 = spans->x; + int sx2 = sx1 + spans->len; +@@ -4137,7 +4138,7 @@ + if (len) { + out->x = qMax(sx1, cx1); + out->len = qMin(sx2, cx2) - out->x; +- out->y = spans->y; ++ out->y = spans_y; + out->coverage = qt_div_255(spans->coverage * clipSpans->coverage); + ++out; + --available; diff --git a/depends/patches/qt/fix_qt_pkgconfig.patch b/depends/patches/qt/fix_qt_pkgconfig.patch index 34302a9f2d..73f4d89f73 100644 --- a/depends/patches/qt/fix_qt_pkgconfig.patch +++ b/depends/patches/qt/fix_qt_pkgconfig.patch @@ -1,11 +1,11 @@ --- old/qtbase/mkspecs/features/qt_module.prf +++ new/qtbase/mkspecs/features/qt_module.prf -@@ -245,7 +245,7 @@ +@@ -269,7 +269,7 @@ load(qt_installs) load(qt_targets) # this builds on top of qt_common --!internal_module:!lib_bundle:if(unix|mingw) { -+unix|mingw { +-!internal_module:if(unix|mingw):!if(darwin:debug_and_release:CONFIG(debug, debug|release)) { ++if(unix|mingw):!if(darwin:debug_and_release:CONFIG(debug, debug|release)) { CONFIG += create_pc QMAKE_PKGCONFIG_DESTDIR = pkgconfig host_build: \ diff --git a/depends/patches/qt/fix_rcc_determinism.patch b/depends/patches/qt/fix_rcc_determinism.patch deleted file mode 100644 index c1b07fe23a..0000000000 --- a/depends/patches/qt/fix_rcc_determinism.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- old/qtbase/src/tools/rcc/rcc.cpp -+++ new/qtbase/src/tools/rcc/rcc.cpp -@@ -207,7 +207,11 @@ void RCCFileInfo::writeDataInfo(RCCResourceLibrary &lib) - if (lib.formatVersion() >= 2) { - // last modified time stamp - const QDateTime lastModified = m_fileInfo.lastModified(); -- lib.writeNumber8(quint64(lastModified.isValid() ? lastModified.toMSecsSinceEpoch() : 0)); -+ quint64 lastmod = quint64(lastModified.isValid() ? lastModified.toMSecsSinceEpoch() : 0); -+ static const quint64 sourceDate = 1000 * qgetenv("QT_RCC_SOURCE_DATE_OVERRIDE").toULongLong(); -+ if (sourceDate != 0) -+ lastmod = sourceDate; -+ lib.writeNumber8(lastmod); - if (text || pass1) - lib.writeChar('\n'); - } diff --git a/depends/patches/qt/mac-qmake.conf b/depends/patches/qt/mac-qmake.conf index 4cd96df29f..543407f853 100644 --- a/depends/patches/qt/mac-qmake.conf +++ b/depends/patches/qt/mac-qmake.conf @@ -1,26 +1,22 @@ MAKEFILE_GENERATOR = UNIX -CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname absolute_library_soname +CONFIG += app_bundle incremental lib_version_first absolute_library_soname QMAKE_INCREMENTAL_STYLE = sublib include(../common/macx.conf) include(../common/gcc-base-mac.conf) include(../common/clang.conf) include(../common/clang-mac.conf) QMAKE_MAC_SDK_PATH=$${MAC_SDK_PATH} -QMAKE_XCODE_VERSION=4.3 +QMAKE_XCODE_VERSION = $${XCODE_VERSION} QMAKE_XCODE_DEVELOPER_PATH=/Developer -QMAKE_MACOSX_DEPLOYMENT_TARGET = $${MAC_MIN_VERSION} QMAKE_MAC_SDK=macosx QMAKE_MAC_SDK.macosx.Path = $${MAC_SDK_PATH} QMAKE_MAC_SDK.macosx.platform_name = macosx QMAKE_MAC_SDK.macosx.SDKVersion = $${MAC_SDK_VERSION} QMAKE_MAC_SDK.macosx.PlatformPath = /phony -QMAKE_APPLE_DEVICE_ARCHS=x86_64 !host_build: QMAKE_CFLAGS += -target $${MAC_TARGET} !host_build: QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_CFLAGS !host_build: QMAKE_CXXFLAGS += $$QMAKE_CFLAGS !host_build: QMAKE_LFLAGS += -target $${MAC_TARGET} QMAKE_AR = $${CROSS_COMPILE}ar cq QMAKE_RANLIB=$${CROSS_COMPILE}ranlib -QMAKE_LIBTOOL=$${CROSS_COMPILE}libtool -QMAKE_INSTALL_NAME_TOOL=$${CROSS_COMPILE}install_name_tool load(qt_config) diff --git a/depends/patches/qt/no-xlib.patch b/depends/patches/qt/no-xlib.patch index fe82c2c73c..d6846aaca2 100644 --- a/depends/patches/qt/no-xlib.patch +++ b/depends/patches/qt/no-xlib.patch @@ -22,15 +22,15 @@ index 7c62c2e2b3..c05c6c0a07 100644 #include #include -@@ -384,6 +386,7 @@ void QXcbCursor::changeCursor(QCursor *cursor, QWindow *widget) - w->setCursor(c, isBitmapCursor); +@@ -391,6 +391,7 @@ void QXcbCursor::changeCursor(QCursor *cursor, QWindow *window) + xcb_flush(xcb_connection()); } +#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library) static int cursorIdForShape(int cshape) { int cursorId = 0; -@@ -437,6 +440,7 @@ static int cursorIdForShape(int cshape) +@@ -444,6 +445,7 @@ static int cursorIdForShape(int cshape) } return cursorId; } @@ -38,7 +38,7 @@ index 7c62c2e2b3..c05c6c0a07 100644 xcb_cursor_t QXcbCursor::createNonStandardCursor(int cshape) { -@@ -558,7 +562,9 @@ static xcb_cursor_t loadCursor(void *dpy, int cshape) +@@ -556,7 +558,9 @@ static xcb_cursor_t loadCursor(void *dpy, int cshape) xcb_cursor_t QXcbCursor::createFontCursor(int cshape) { xcb_connection_t *conn = xcb_connection(); @@ -48,7 +48,7 @@ index 7c62c2e2b3..c05c6c0a07 100644 xcb_cursor_t cursor = XCB_NONE; // Try Xcursor first -@@ -589,6 +595,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape) +@@ -586,6 +590,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape) // Non-standard X11 cursors are created from bitmaps cursor = createNonStandardCursor(cshape); @@ -56,14 +56,14 @@ index 7c62c2e2b3..c05c6c0a07 100644 // Create a glpyh cursor if everything else failed if (!cursor && cursorId) { cursor = xcb_generate_id(conn); -@@ -596,6 +603,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape) +@@ -593,6 +598,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape) cursorId, cursorId + 1, 0xFFFF, 0xFFFF, 0xFFFF, 0, 0, 0); } +#endif if (cursor && cshape >= 0 && cshape < Qt::LastCursor && connection()->hasXFixes()) { - const char *name = cursorNames[cshape]; + const char *name = cursorNames[cshape].front(); -- 2.22.0 diff --git a/depends/patches/qt/qt.pro b/depends/patches/qt/qt.pro new file mode 100644 index 0000000000..a72bc100f4 --- /dev/null +++ b/depends/patches/qt/qt.pro @@ -0,0 +1,16 @@ +# Create the super cache so modules will add themselves to it. +cache(, super) + +!QTDIR_build: cache(CONFIG, add, $$list(QTDIR_build)) + +prl = create_prl +CONFIG += $$prl +cache(CONFIG, add stash, prl) + +TEMPLATE = subdirs +SUBDIRS = qtbase qttools qttranslations + +qttools.depends = qtbase +qttranslations.depends = qttools + +load(qt_configure) diff --git a/depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch b/depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch new file mode 100644 index 0000000000..f0c14a9400 --- /dev/null +++ b/depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch @@ -0,0 +1,17 @@ +The moc executable loops through headers on CPLUS_INCLUDE_PATH and stumbles +on the GCC internal _GLIBCXX_VISIBILITY macro. Tell it to ignore it as it is +not supposed to be looking there to begin with. + +Upstream report: https://bugreports.qt.io/browse/QTBUG-83160 + +diff --git a/qtbase/src/tools/moc/main.cpp b/qtbase/src/tools/moc/main.cpp +--- a/qtbase/src/tools/moc/main.cpp ++++ b/qtbase/src/tools/moc/main.cpp +@@ -238,6 +238,7 @@ int runMoc(int argc, char **argv) + dummyVariadicFunctionMacro.arguments += Symbol(0, PP_IDENTIFIER, "__VA_ARGS__"); + pp.macros["__attribute__"] = dummyVariadicFunctionMacro; + pp.macros["__declspec"] = dummyVariadicFunctionMacro; ++ pp.macros["_GLIBCXX_VISIBILITY"] = dummyVariadicFunctionMacro; + + QString filename; + QString output; diff --git a/depends/patches/qt/qttools_src.pro b/depends/patches/qt/qttools_src.pro new file mode 100644 index 0000000000..6ef71a0942 --- /dev/null +++ b/depends/patches/qt/qttools_src.pro @@ -0,0 +1,6 @@ +TEMPLATE = subdirs +SUBDIRS = linguist + +fb = force_bootstrap +CONFIG += $$fb +cache(CONFIG, add, fb) diff --git a/depends/patches/qt/rcc_hardcode_timestamp.patch b/depends/patches/qt/rcc_hardcode_timestamp.patch new file mode 100644 index 0000000000..03f3897975 --- /dev/null +++ b/depends/patches/qt/rcc_hardcode_timestamp.patch @@ -0,0 +1,24 @@ +Hardcode last modified timestamp in Qt RCC + +This change allows the already built qt package to be reused even with +the SOURCE_DATE_EPOCH variable set, e.g., for Guix builds. + + +--- old/qtbase/src/tools/rcc/rcc.cpp ++++ new/qtbase/src/tools/rcc/rcc.cpp +@@ -227,14 +227,7 @@ void RCCFileInfo::writeDataInfo(RCCResourceLibrary &lib) + + if (lib.formatVersion() >= 2) { + // last modified time stamp +- const QDateTime lastModified = m_fileInfo.lastModified(); +- quint64 lastmod = quint64(lastModified.isValid() ? lastModified.toMSecsSinceEpoch() : 0); +- static const quint64 sourceDate = 1000 * qgetenv("QT_RCC_SOURCE_DATE_OVERRIDE").toULongLong(); +- if (sourceDate != 0) +- lastmod = sourceDate; +- static const quint64 sourceDate2 = 1000 * qgetenv("SOURCE_DATE_EPOCH").toULongLong(); +- if (sourceDate2 != 0) +- lastmod = sourceDate2; ++ quint64 lastmod = quint64(1); + lib.writeNumber8(lastmod); + if (text || pass1) + lib.writeChar('\n'); diff --git a/depends/patches/qt/use_android_ndk23.patch b/depends/patches/qt/use_android_ndk23.patch new file mode 100644 index 0000000000..f22367d527 --- /dev/null +++ b/depends/patches/qt/use_android_ndk23.patch @@ -0,0 +1,13 @@ +Use Android NDK r23 LTS + +--- old/qtbase/mkspecs/features/android/default_pre.prf ++++ new/qtbase/mkspecs/features/android/default_pre.prf +@@ -76,7 +76,7 @@ else: equals(QT_ARCH, x86_64): CROSS_COMPILE = $$NDK_LLVM_PATH/bin/x86_64-linux- + else: equals(QT_ARCH, arm64-v8a): CROSS_COMPILE = $$NDK_LLVM_PATH/bin/aarch64-linux-android- + else: CROSS_COMPILE = $$NDK_LLVM_PATH/bin/arm-linux-androideabi- + +-QMAKE_RANLIB = $${CROSS_COMPILE}ranlib ++QMAKE_RANLIB = $$NDK_LLVM_PATH/bin/llvm-ranlib + QMAKE_LINK_SHLIB = $$QMAKE_LINK + QMAKE_LFLAGS = + diff --git a/depends/patches/qt/xkb-default.patch b/depends/patches/qt/xkb-default.patch deleted file mode 100644 index 165abf3e2e..0000000000 --- a/depends/patches/qt/xkb-default.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- old/qtbase/src/gui/configure.pri 2018-06-06 17:28:10.000000000 -0400 -+++ new/qtbase/src/gui/configure.pri 2018-08-17 18:43:01.589384567 -0400 -@@ -43,18 +43,11 @@ - } - - defineTest(qtConfTest_xkbConfigRoot) { -- qtConfTest_getPkgConfigVariable($${1}): return(true) -- -- for (dir, $$list("/usr/share/X11/xkb", "/usr/local/share/X11/xkb")) { -- exists($$dir) { -- $${1}.value = $$dir -- export($${1}.value) -- $${1}.cache += value -- export($${1}.cache) -- return(true) -- } -- } -- return(false) -+ $${1}.value = "/usr/share/X11/xkb" -+ export($${1}.value) -+ $${1}.cache += value -+ export($${1}.cache) -+ return(true) - } - - defineTest(qtConfTest_qpaDefaultPlatform) { diff --git a/doc/build-freebsd.md b/doc/build-freebsd.md index 2adaf559b1..02be62ab6a 100644 --- a/doc/build-freebsd.md +++ b/doc/build-freebsd.md @@ -31,7 +31,7 @@ To enable ZeroMQ: pkg install libzmq4 ``` -If not installed, ZeroMQ support should be disabled by passing `-DBUILD_BITCOIN_ZMQ=OFF` +If not installed, ZeroMQ support should be disabled by passing `-DBUILD_RADIANT_ZMQ=OFF` to `cmake`. In order to run the test suite (recommended), you will need to have Python 3: diff --git a/doc/build-osx.md b/doc/build-osx.md index ad7db04209..61ed77550c 100644 --- a/doc/build-osx.md +++ b/doc/build-osx.md @@ -14,7 +14,7 @@ brew install berkeley-db boost cmake libevent librsvg miniupnpc ninja openssl pr ``` You can do without the `miniupnpc`, `zeromq`, and `help2man` packages, then you -just need to respectively pass `-DENABLE_UPNP=OFF`, `-DBUILD_BITCOIN_ZMQ=OFF`, +just need to respectively pass `-DENABLE_UPNP=OFF`, `-DBUILD_RADIANT_ZMQ=OFF`, or `-DENABLE_MAN=OFF` on the `cmake` command line. You can do without the `librsvg`, `qrencode` and `qt5` packages, if you don't diff --git a/doc/build-unix-alpine.md b/doc/build-unix-alpine.md index 6bca984c61..a0fc4c1349 100644 --- a/doc/build-unix-alpine.md +++ b/doc/build-unix-alpine.md @@ -15,7 +15,7 @@ NOTE: Since alpine 3.12, `ninja` was replaced with `samurai`, which is not fully the build system, hence the need for installing it with `pip` You can do without the `db-dev`, `miniupnpc-dev`, `zeromq-dev`, and `help2man & bash` packages, then you -just need to respectively pass `-DBUILD_RADIANT_WALLET=OFF`, `-DENABLE_UPNP=OFF`, `-DBUILD_BITCOIN_ZMQ=OFF`, +just need to respectively pass `-DBUILD_RADIANT_WALLET=OFF`, `-DENABLE_UPNP=OFF`, `-DBUILD_RADIANT_ZMQ=OFF`, or `-DENABLE_MAN=OFF` on the `cmake` command line. If you want to build the GUI client `bitcoin-qt` Qt 5 is necessary. diff --git a/doc/build-unix-arch.md b/doc/build-unix-arch.md index c1279f21ad..004e0158ae 100644 --- a/doc/build-unix-arch.md +++ b/doc/build-unix-arch.md @@ -9,7 +9,7 @@ You will need the following dependencies: ``` You can do without the `miniupnpc`, `zeromq`, and `help2man` packages, then you -just need to respectively pass `-DENABLE_UPNP=OFF`, `-DBUILD_BITCOIN_ZMQ=OFF`, +just need to respectively pass `-DENABLE_UPNP=OFF`, `-DBUILD_RADIANT_ZMQ=OFF`, or `-DENABLE_MAN=OFF` on the `cmake` command line. If you want to build the GUI client `bitcoin-qt` Qt 5 is necessary. diff --git a/doc/build-unix-deb.md b/doc/build-unix-deb.md index 8947ae20c7..e49567f295 100644 --- a/doc/build-unix-deb.md +++ b/doc/build-unix-deb.md @@ -14,7 +14,7 @@ Minimal build requirements You can do without the `libminiupnpc-dev`, `libzmq3-dev`, and `help2man` packages, then you just need to respectively pass `-DENABLE_UPNP=OFF`, -`-DBUILD_BITCOIN_ZMQ=OFF`, or `-DENABLE_MAN=OFF` on the `cmake` command line. +`-DBUILD_RADIANT_ZMQ=OFF`, or `-DENABLE_MAN=OFF` on the `cmake` command line. BerkeleyDB 5.3 or later is required for the wallet. This can be installed with: diff --git a/doc/build-unix-rpm.md b/doc/build-unix-rpm.md index ac7510d567..8e135c00ae 100644 --- a/doc/build-unix-rpm.md +++ b/doc/build-unix-rpm.md @@ -12,7 +12,7 @@ sudo dnf install boost-devel cmake gcc-c++ git libevent-devel miniupnpc-devel ni You can do without the `miniupnpc-devel`, `zeromq-devel`, and `help2man` packages, then you just need to respectively pass `-DENABLE_UPNP=OFF`, -`-DBUILD_BITCOIN_ZMQ=OFF`, or `-DENABLE_MAN=OFF` on the `cmake` command line. +`-DBUILD_RADIANT_ZMQ=OFF`, or `-DENABLE_MAN=OFF` on the `cmake` command line. BerkeleyDB 5.3 or later is required for the wallet. This can be installed with: diff --git a/doc/build-unix.md b/doc/build-unix.md index cdb15df79c..0d980af5b8 100644 --- a/doc/build-unix.md +++ b/doc/build-unix.md @@ -102,7 +102,7 @@ make build-linux-aarch64 cd .. mkdir build cd build -cmake -GNinja .. -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/LinuxAArch64.cmake -DBUILD_BITCOIN_ZMQ=OFF +cmake -GNinja .. -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/LinuxAArch64.cmake -DBUILD_RADIANT_ZMQ=OFF ninja ``` diff --git a/doc/functional-tests.md b/doc/functional-tests.md index 52df1c5627..5db1417232 100644 --- a/doc/functional-tests.md +++ b/doc/functional-tests.md @@ -344,7 +344,7 @@ In your `build` directory, run: cmake -GNinja .. \ -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/LinuxAArch64.cmake \ -DCMAKE_CROSSCOMPILING_EMULATOR=$(command -v qemu-aarch64-static) \ - -DBUILD_BITCOIN_ZMQ=OFF + -DBUILD_RADIANT_ZMQ=OFF ``` To run functional tests: diff --git a/doc/zmq.md b/doc/zmq.md index 1e7a709fec..3e087bf19a 100644 --- a/doc/zmq.md +++ b/doc/zmq.md @@ -46,9 +46,9 @@ operation. ## Enabling By default, the ZeroMQ feature is automatically compiled. -To disable, use -DBUILD_BITCOIN_ZMQ=OFF to `cmake` when building radiantd: +To disable, use -DBUILD_RADIANT_ZMQ=OFF to `cmake` when building radiantd: - cmake -GNinja .. -DBUILD_BITCOIN_ZMQ=OFF [...] + cmake -GNinja .. -DBUILD_RADIANT_ZMQ=OFF [...] To actually enable operation, one must set the appropriate options on the command line or in the configuration file. diff --git a/src/config/CMakeLists.txt b/src/config/CMakeLists.txt index a45b573bec..2b5f64601d 100644 --- a/src/config/CMakeLists.txt +++ b/src/config/CMakeLists.txt @@ -200,7 +200,7 @@ endif() set(ENABLE_WALLET ${BUILD_RADIANT_WALLET}) # Activate ZeroMQ -set(ENABLE_ZMQ ${BUILD_BITCOIN_ZMQ}) +set(ENABLE_ZMQ ${BUILD_RADIANT_ZMQ}) # Try to find libqrencode # Only used in the wallet GUI diff --git a/test/config.ini.cmake.in b/test/config.ini.cmake.in index 56f8c777ed..27022b80a3 100644 --- a/test/config.ini.cmake.in +++ b/test/config.ini.cmake.in @@ -20,4 +20,4 @@ ENABLE_WALLET=${BUILD_RADIANT_WALLET} ENABLE_CLI=${BUILD_RADIANT_CLI} ENABLE_BITCOIND=ON ENABLE_FUZZ=${ENABLE_FUZZ} -ENABLE_ZMQ=${BUILD_BITCOIN_ZMQ} +ENABLE_ZMQ=${BUILD_RADIANT_ZMQ}