From 5ba73533df4601b727ef835f343cf8d269248889 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Fri, 20 Sep 2024 14:17:53 +0100 Subject: [PATCH] depends: Bump Qt package up to 6.7.2 --- depends/packages/libxcb_util_cursor.mk | 31 ++++++ depends/packages/packages.mk | 6 +- depends/packages/qt.mk | 101 +++-------------- depends/packages/qttools.mk | 36 ++++++ depends/packages/qttranslations.mk | 29 +++++ depends/patches/qt/clang_18_libpng.patch | 40 ------- depends/patches/qt/darwin_no_libm.patch | 17 --- depends/patches/qt/dont_hardcode_pwd.patch | 12 +- depends/patches/qt/duplicate_lcqpafonts.patch | 104 ------------------ depends/patches/qt/fix-macos-linker.patch | 55 --------- depends/patches/qt/fix_qt_pkgconfig.patch | 11 -- depends/patches/qt/memory_resource.patch | 49 --------- depends/patches/qt/no-xlib.patch | 61 ---------- depends/patches/qt/qt.pro | 12 -- .../qt/qtbase-moc-ignore-gcc-macro.patch | 17 --- depends/patches/qt/qttools_src.pro | 6 - .../patches/qt/rcc_hardcode_timestamp.patch | 4 +- .../qt/utc_from_string_no_optimize.patch | 30 ++--- depends/patches/qt/windows_lto.patch | 4 +- depends/patches/qt/zlib-timebits64.patch | 31 ------ 20 files changed, 137 insertions(+), 519 deletions(-) create mode 100644 depends/packages/libxcb_util_cursor.mk create mode 100644 depends/packages/qttools.mk create mode 100644 depends/packages/qttranslations.mk delete mode 100644 depends/patches/qt/clang_18_libpng.patch delete mode 100644 depends/patches/qt/darwin_no_libm.patch delete mode 100644 depends/patches/qt/duplicate_lcqpafonts.patch delete mode 100644 depends/patches/qt/fix-macos-linker.patch delete mode 100644 depends/patches/qt/fix_qt_pkgconfig.patch delete mode 100644 depends/patches/qt/memory_resource.patch delete mode 100644 depends/patches/qt/no-xlib.patch delete mode 100644 depends/patches/qt/qt.pro delete mode 100644 depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch delete mode 100644 depends/patches/qt/qttools_src.pro delete mode 100644 depends/patches/qt/zlib-timebits64.patch diff --git a/depends/packages/libxcb_util_cursor.mk b/depends/packages/libxcb_util_cursor.mk new file mode 100644 index 0000000000000..b308890638de6 --- /dev/null +++ b/depends/packages/libxcb_util_cursor.mk @@ -0,0 +1,31 @@ +package=libxcb_util_cursor +$(package)_version=0.1.5 +$(package)_download_path=https://xcb.freedesktop.org/dist +$(package)_file_name=xcb-util-cursor-$($(package)_version).tar.gz +$(package)_sha256_hash=0e9c5446dc6f3beb8af6ebfcc9e27bcc6da6fe2860f7fc07b99144dfa568e93b +$(package)_dependencies=libxcb libxcb_util_render libxcb_util_image + +define $(package)_set_vars +$(package)_config_opts = --disable-static +$(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 lib/*.la +endef diff --git a/depends/packages/packages.mk b/depends/packages/packages.mk index 01ed0d7a92152..1359d2fd40bd6 100644 --- a/depends/packages/packages.mk +++ b/depends/packages/packages.mk @@ -8,9 +8,9 @@ qrencode_linux_packages = qrencode qrencode_darwin_packages = qrencode qrencode_mingw32_packages = qrencode -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 -qt_darwin_packages=qt -qt_mingw32_packages=qt +qt_linux_packages:=qt qttools qttranslations expat libxcb xcb_proto libXau xproto freetype fontconfig libxkbcommon libxcb_util libxcb_util_cursor libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm +qt_darwin_packages=qt qttools qttranslations +qt_mingw32_packages=qt qttools qttranslations bdb_packages=bdb sqlite_packages=sqlite diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index 917e17993228f..9f6bda10e4e69 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -1,51 +1,26 @@ package=qt -$(package)_version=5.15.14 -$(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)_version=6.7.2 +$(package)_download_path=https://download.qt.io/official_releases/qt/6.7/$($(package)_version)/submodules +$(package)_suffix=everywhere-src-$($(package)_version).tar.xz $(package)_file_name=qtbase-$($(package)_suffix) -$(package)_sha256_hash=500d3b390048e9538c28b5f523dfea6936f9c2e10d24ab46580ff57d430b98be -$(package)_linux_dependencies=freetype fontconfig libxcb libxkbcommon libxcb_util libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm +$(package)_sha256_hash=c5f22a5e10fb162895ded7de0963328e7307611c688487b5d152c9ee64767599 +$(package)_linux_dependencies=freetype fontconfig libxcb libxkbcommon libxcb_util libxcb_util_cursor libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm $(package)_qt_libs=corelib network widgets gui plugins testlib $(package)_linguist_tools = lrelease lupdate lconvert -$(package)_patches = qt.pro -$(package)_patches += qttools_src.pro $(package)_patches += mac-qmake.conf -$(package)_patches += fix_qt_pkgconfig.patch -$(package)_patches += no-xlib.patch $(package)_patches += dont_hardcode_pwd.patch -$(package)_patches += qtbase-moc-ignore-gcc-macro.patch $(package)_patches += no_warnings_for_symbols.patch $(package)_patches += rcc_hardcode_timestamp.patch -$(package)_patches += duplicate_lcqpafonts.patch $(package)_patches += guix_cross_lib_path.patch -$(package)_patches += fix-macos-linker.patch -$(package)_patches += memory_resource.patch -$(package)_patches += clang_18_libpng.patch $(package)_patches += utc_from_string_no_optimize.patch $(package)_patches += windows_lto.patch -$(package)_patches += darwin_no_libm.patch -$(package)_patches += zlib-timebits64.patch - -$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix) -$(package)_qttranslations_sha256_hash=5b94d1a11b566908622fcca2f8b799744d2f8a68da20be4caa5953ed63b10489 - -$(package)_qttools_file_name=qttools-$($(package)_suffix) -$(package)_qttools_sha256_hash=12061a85baf5f4de8fbc795e1d3872b706f340211b9e70962caeffc6f5e89563 - -$(package)_extra_sources = $($(package)_qttranslations_file_name) -$(package)_extra_sources += $($(package)_qttools_file_name) +$(package)_build_subdir=build define $(package)_set_vars $(package)_config_env = QT_MAC_SDK_NO_VERSION_CHECK=1 $(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++2a -$(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 @@ -54,7 +29,6 @@ $(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 @@ -68,22 +42,11 @@ $(package)_config_opts += -no-reduce-relocations $(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 -$(package)_config_opts += -no-sql-tds -$(package)_config_opts += -no-sql-mysql -$(package)_config_opts += -no-sql-odbc -$(package)_config_opts += -no-sql-psql -$(package)_config_opts += -no-sql-sqlite -$(package)_config_opts += -no-sql-sqlite2 $(package)_config_opts += -no-system-proxies $(package)_config_opts += -no-use-gold-linker $(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 += -pkg-config $(package)_config_opts += -prefix $(host_prefix) $(package)_config_opts += -qt-libpng @@ -91,31 +54,22 @@ $(package)_config_opts += -qt-pcre $(package)_config_opts += -qt-harfbuzz $(package)_config_opts += -qt-zlib $(package)_config_opts += -static -$(package)_config_opts += -v -$(package)_config_opts += -no-feature-bearermanagement +$(package)_config_opts += -no-feature-backtrace $(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-gssapi $(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-networkproxy -$(package)_config_opts += -no-feature-pdf -$(package)_config_opts += -no-feature-printdialog -$(package)_config_opts += -no-feature-printer $(package)_config_opts += -no-feature-printpreviewdialog $(package)_config_opts += -no-feature-printpreviewwidget $(package)_config_opts += -no-feature-sessionmanager $(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 @@ -126,7 +80,6 @@ $(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 @@ -189,24 +142,12 @@ $(package)_config_opts_mingw32 += -ltcg endif endef -define $(package)_fetch_cmds -$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \ -$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttranslations_file_name),$($(package)_qttranslations_file_name),$($(package)_qttranslations_sha256_hash)) && \ -$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttools_file_name),$($(package)_qttools_file_name),$($(package)_qttools_sha256_hash)) -endef - define $(package)_extract_cmds mkdir -p $($(package)_extract_dir) && \ echo "$($(package)_sha256_hash) $($(package)_source)" > $($(package)_extract_dir)/.$($(package)_file_name).hash && \ - echo "$($(package)_qttranslations_sha256_hash) $($(package)_source_dir)/$($(package)_qttranslations_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \ - echo "$($(package)_qttools_sha256_hash) $($(package)_source_dir)/$($(package)_qttools_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \ $(build_SHA256SUM) -c $($(package)_extract_dir)/.$($(package)_file_name).hash && \ mkdir qtbase && \ - $(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source) -C qtbase && \ - mkdir qttranslations && \ - $(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttranslations_file_name) -C qttranslations && \ - mkdir qttools && \ - $(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttools_file_name) -C qttools + $(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source) -C qtbase endef # Preprocessing steps work as follows: @@ -222,23 +163,12 @@ endef # # 5. In clang.conf, swap out clang & clang++, for our compiler + flags. See #17466. define $(package)_preprocess_cmds - cp $($(package)_patch_dir)/qt.pro qt.pro && \ - cp $($(package)_patch_dir)/qttools_src.pro qttools/src/src.pro && \ - patch -p1 -i $($(package)_patch_dir)/fix-macos-linker.patch && \ 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)/no-xlib.patch && \ - patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.patch && \ - patch -p1 -i $($(package)_patch_dir)/memory_resource.patch && \ patch -p1 -i $($(package)_patch_dir)/no_warnings_for_symbols.patch && \ - patch -p1 -i $($(package)_patch_dir)/clang_18_libpng.patch && \ patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch && \ - patch -p1 -i $($(package)_patch_dir)/duplicate_lcqpafonts.patch && \ patch -p1 -i $($(package)_patch_dir)/utc_from_string_no_optimize.patch && \ patch -p1 -i $($(package)_patch_dir)/guix_cross_lib_path.patch && \ patch -p1 -i $($(package)_patch_dir)/windows_lto.patch && \ - patch -p1 -i $($(package)_patch_dir)/darwin_no_libm.patch && \ - patch -p1 -i $($(package)_patch_dir)/zlib-timebits64.patch && \ mkdir -p qtbase/mkspecs/macx-clang-linux &&\ cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\ cp -f $($(package)_patch_dir)/mac-qmake.conf qtbase/mkspecs/macx-clang-linux/qmake.conf && \ @@ -257,22 +187,17 @@ define $(package)_preprocess_cmds endef define $(package)_config_cmds - cd qtbase && \ - ./configure -top-level $($(package)_config_opts) + ../qtbase/configure $($(package)_config_opts) -- -DCMAKE_CXX_STANDARD=20 --log-level=STATUS endef define $(package)_build_cmds - $(MAKE) + cmake --build . --parallel endef -# TODO: Investigate whether specific targets can be used here to minimize the amount of files/components installed. define $(package)_stage_cmds - $(MAKE) -C qtbase INSTALL_ROOT=$($(package)_staging_dir) install && \ - $(MAKE) -C qttools INSTALL_ROOT=$($(package)_staging_dir) install && \ - $(MAKE) -C qttranslations INSTALL_ROOT=$($(package)_staging_dir) install_subtargets + cmake --install . --prefix $($(package)_staging_prefix_dir) endef define $(package)_postprocess_cmds - rm -rf doc/ native/lib/ && \ - rm -f lib/lib*.la + rm -rf doc/ endef diff --git a/depends/packages/qttools.mk b/depends/packages/qttools.mk new file mode 100644 index 0000000000000..352686e860af5 --- /dev/null +++ b/depends/packages/qttools.mk @@ -0,0 +1,36 @@ +package=qttools +$(package)_version=$(qt_version) +$(package)_download_path=$(qt_download_path) +$(package)_file_name=$(package)-everywhere-src-$($(package)_version).tar.xz +$(package)_sha256_hash=58e855ad1b2533094726c8a425766b63a04a0eede2ed85086860e54593aa4b2a +$(package)_dependencies=qt +$(package)_build_subdir=build + +define $(package)_set_vars +$(package)_config_opts += -no-feature-assistant +$(package)_config_opts += -no-feature-clang +$(package)_config_opts += -no-feature-qdoc +$(package)_config_opts += -no-feature-clangcpp +$(package)_config_opts += -no-feature-designer +$(package)_config_opts += -no-feature-pixeltool +$(package)_config_opts += -no-feature-qdbus +$(package)_config_opts += -no-feature-qtattributionsscanner +$(package)_config_opts += -no-feature-qtdiag +$(package)_config_opts += -no-feature-qtplugininfo +endef + +define $(package)_config_cmds + $(host_prefix)/bin/qt-configure-module .. $($(package)_config_opts) -- -DCMAKE_CXX_STANDARD=20 --log-level=STATUS +endef + +define $(package)_build_cmds + cmake --build . --parallel +endef + +define $(package)_stage_cmds + cmake --install . --prefix $($(package)_staging_prefix_dir) +endef + +define $(package)_postprocess_cmds + rm -rf doc/ +endef diff --git a/depends/packages/qttranslations.mk b/depends/packages/qttranslations.mk new file mode 100644 index 0000000000000..2f6edbba8f66e --- /dev/null +++ b/depends/packages/qttranslations.mk @@ -0,0 +1,29 @@ +package=qttranslations +$(package)_version=$(qt_version) +$(package)_download_path=$(qt_download_path) +$(package)_file_name=$(package)-everywhere-src-$($(package)_version).tar.xz +$(package)_sha256_hash=9845780b5dc1b7279d57836db51aeaf2e4a1160c42be09750616f39157582ca9 +$(package)_dependencies=qt qttools +$(package)_build_subdir=$(package)/build + +define $(package)_extract_cmds + mkdir -p $($(package)_extract_dir) && \ + echo "$($(package)_sha256_hash) $($(package)_source)" > $($(package)_extract_dir)/.$($(package)_file_name).hash && \ + $(build_SHA256SUM) -c $($(package)_extract_dir)/.$($(package)_file_name).hash && \ + mkdir -p $(package) && \ + $(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source) -C $(package) && \ + mkdir -p qtbase && \ + $(build_TAR) --no-same-owner --strip-components=1 -xf $(qt_source) -C qtbase +endef + +define $(package)_config_cmds + $(host_prefix)/bin/qt-configure-module .. -- -DCMAKE_CXX_STANDARD=20 --log-level=STATUS +endef + +define $(package)_build_cmds + cmake --build . --parallel +endef + +define $(package)_stage_cmds + cmake --install . --prefix $($(package)_staging_prefix_dir) +endef diff --git a/depends/patches/qt/clang_18_libpng.patch b/depends/patches/qt/clang_18_libpng.patch deleted file mode 100644 index e807905b321a5..0000000000000 --- a/depends/patches/qt/clang_18_libpng.patch +++ /dev/null @@ -1,40 +0,0 @@ -fix Qt macOS build with Clang 18 - - See: - https://github.com/pnggroup/libpng/commit/893b8113f04d408cc6177c6de19c9889a48faa24. - - In a similar manner as zlib (madler/zlib#895), - libpng contains a header configuration that's no longer valid and - hasn't been exercised for the macOS target. - - - The target OS conditional macros are misused. Specifically - `TARGET_OS_MAC` covers all Apple targets, including iOS, and it - should not be checked with `#if defined` as they would always be - defined (to either 1 or 0) on Apple platforms. - - `#include ` no longer works for the macOS target and results - in a compilation failure. macOS ships all required functions in - `math.h`, and clients should use `math.h` instead. - ---- a/qtbase/src/3rdparty/libpng/pngpriv.h -+++ b/qtbase/src/3rdparty/libpng/pngpriv.h -@@ -514,18 +514,8 @@ - */ - # include - --# if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \ -- defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC) -- /* We need to check that hasn't already been included earlier -- * as it seems it doesn't agree with , yet we should really use -- * if possible. -- */ --# if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__) --# include --# endif --# else --# include --# endif -+# include -+ - # if defined(_AMIGA) && defined(__SASC) && defined(_M68881) - /* Amiga SAS/C: We must include builtin FPU functions when compiling using - * MATH=68881 diff --git a/depends/patches/qt/darwin_no_libm.patch b/depends/patches/qt/darwin_no_libm.patch deleted file mode 100644 index 38a94beeb7a69..0000000000000 --- a/depends/patches/qt/darwin_no_libm.patch +++ /dev/null @@ -1,17 +0,0 @@ -build: remove explicit -lm link from qttools - -This causes issues with at least the macOS cross build, and shouldn't -actually be required anywhere else. GCC with libstdc++ will already get libm. - ---- a/qtbase/src/corelib/tools/tools.pri -+++ b/qtbase/src/corelib/tools/tools.pri -@@ -111,9 +111,6 @@ qtConfig(easingcurve) { - tools/qtimeline.cpp - } - --# Note: libm should be present by default becaue this is C++ --unix:!macx-icc:!vxworks:!haiku:!integrity:!wasm: LIBS_PRIVATE += -lm -- - TR_EXCLUDE += ../3rdparty/* - - # MIPS DSP diff --git a/depends/patches/qt/dont_hardcode_pwd.patch b/depends/patches/qt/dont_hardcode_pwd.patch index f6955b2f20ce4..7966db82fa3fb 100644 --- a/depends/patches/qt/dont_hardcode_pwd.patch +++ b/depends/patches/qt/dont_hardcode_pwd.patch @@ -13,15 +13,15 @@ diff --git a/qtbase/configure b/qtbase/configure index 08b49a8d..faea5b55 100755 --- a/qtbase/configure +++ b/qtbase/configure -@@ -36,9 +36,9 @@ - relconf=`basename $0` +@@ -9,9 +9,9 @@ + # the directory of this script is the "source tree" - relpath=`dirname $0` + relpath=`dirname "$0"` -relpath=`(cd "$relpath"; /bin/pwd)` +relpath=`(cd "$relpath"; pwd)` # the current directory is the "build tree" or "object tree" -outpath=`/bin/pwd` +outpath=`pwd` - - WHICH="which" - + outpathPrefix=$outpath + + # do this early so we don't store it in config.status diff --git a/depends/patches/qt/duplicate_lcqpafonts.patch b/depends/patches/qt/duplicate_lcqpafonts.patch deleted file mode 100644 index c460b51dcff67..0000000000000 --- a/depends/patches/qt/duplicate_lcqpafonts.patch +++ /dev/null @@ -1,104 +0,0 @@ -QtGui: Fix duplication of logging category lcQpaFonts - -Move it to qplatformfontdatabase.h. - -Upstream commit: - - Qt 6.0: ab01885e48873fb2ad71841a3f1627fe4d9cd835 - ---- a/qtbase/src/gui/text/qplatformfontdatabase.cpp -+++ b/qtbase/src/gui/text/qplatformfontdatabase.cpp -@@ -52,6 +52,8 @@ - - QT_BEGIN_NAMESPACE - -+Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts") -+ - void qt_registerFont(const QString &familyname, const QString &stylename, - const QString &foundryname, int weight, - QFont::Style style, int stretch, bool antialiased, - ---- a/qtbase/src/gui/text/qplatformfontdatabase.h -+++ b/qtbase/src/gui/text/qplatformfontdatabase.h -@@ -50,6 +50,7 @@ - // - - #include -+#include - #include - #include - #include -@@ -62,6 +63,7 @@ - - QT_BEGIN_NAMESPACE - -+Q_DECLARE_LOGGING_CATEGORY(lcQpaFonts) - - class QWritingSystemsPrivate; - - ---- a/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm -+++ b/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm -@@ -86,8 +86,6 @@ - - QT_BEGIN_NAMESPACE - --Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts") -- - static float SYNTHETIC_ITALIC_SKEW = std::tan(14.f * std::acos(0.f) / 90.f); - - bool QCoreTextFontEngine::ct_getSfntTable(void *user_data, uint tag, uchar *buffer, uint *length) - ---- a/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h -+++ b/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h -@@ -64,8 +64,6 @@ - - QT_BEGIN_NAMESPACE - --Q_DECLARE_LOGGING_CATEGORY(lcQpaFonts) -- - class QCoreTextFontEngine : public QFontEngine - { - Q_GADGET - ---- a/qtbase/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp -+++ b/qtbase/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp -@@ -68,8 +68,6 @@ - - QT_BEGIN_NAMESPACE - --Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts") -- - #ifndef QT_NO_DIRECTWRITE - // ### fixme: Consider direct linking of dwrite.dll once Windows Vista pre SP2 is dropped (QTBUG-49711) - - ---- a/qtbase/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h -+++ b/qtbase/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h -@@ -63,8 +63,6 @@ - - QT_BEGIN_NAMESPACE - --Q_DECLARE_LOGGING_CATEGORY(lcQpaFonts) -- - class QWindowsFontEngineData - { - Q_DISABLE_COPY_MOVE(QWindowsFontEngineData) - ---- a/qtbase/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp -+++ b/qtbase/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp -@@ -40,6 +40,7 @@ - #include "qgenericunixthemes_p.h" - - #include "qpa/qplatformtheme_p.h" -+#include "qpa/qplatformfontdatabase.h" - - #include - #include -@@ -76,7 +77,6 @@ - QT_BEGIN_NAMESPACE - - Q_DECLARE_LOGGING_CATEGORY(qLcTray) --Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts") - - ResourceHelper::ResourceHelper() - { diff --git a/depends/patches/qt/fix-macos-linker.patch b/depends/patches/qt/fix-macos-linker.patch deleted file mode 100644 index e439685656550..0000000000000 --- a/depends/patches/qt/fix-macos-linker.patch +++ /dev/null @@ -1,55 +0,0 @@ -qmake: Don't error out if QMAKE_DEFAULT_LIBDIRS is empty on macOS - -The new linker in Xcode 15 doesn't provide any default linker or -framework paths when requested via -v, but still seems to use the -default paths documented in the ld man page. - -We trust that linker will do the right thing, even if we don't -know of its default linker paths. - -We also need to opt out of the default fallback logic to -set the libdirs to /lib and /usr/lib. - -This may result in UnixMakefileGenerator::findLibraries finding -different libraries than expected, if additional paths are -passed with -L, which will then take precedence for qmake, -even if the linker itself will use the library from the -SDK's default paths. This should hopefully not be an issue -in practice, as we don't turn -lFoo into absolute paths in -qmake, so the only risk is that we're picking up the wrong -prl files and adding additional dependencies that the lib -in the SDK doesn't have. - -Upstream commits: - - Qt 5.15.16: Not yet publicly available. - - Qt dev: cdf64b0e47115cc473e1afd1472b4b09e130b2a5 - -For other Qt branches see -https://codereview.qt-project.org/q/I2347b26e2df0828471373b0e15b8c9089274c65d - ---- old/qtbase/mkspecs/features/toolchain.prf -+++ new/qtbase/mkspecs/features/toolchain.prf -@@ -288,9 +288,12 @@ isEmpty($${target_prefix}.INCDIRS) { - } - } - } -- isEmpty(QMAKE_DEFAULT_LIBDIRS)|isEmpty(QMAKE_DEFAULT_INCDIRS): \ -+ isEmpty(QMAKE_DEFAULT_INCDIRS): \ - !integrity: \ -- error("failed to parse default search paths from compiler output") -+ error("failed to parse default include paths from compiler output") -+ isEmpty(QMAKE_DEFAULT_LIBDIRS): \ -+ !integrity:!darwin: \ -+ error("failed to parse default library paths from compiler output") - QMAKE_DEFAULT_LIBDIRS = $$unique(QMAKE_DEFAULT_LIBDIRS) - } else: ghs { - cmd = $$QMAKE_CXX $$QMAKE_CXXFLAGS -$${LITERAL_HASH} -o /tmp/fake_output /tmp/fake_input.cpp -@@ -412,7 +415,7 @@ isEmpty($${target_prefix}.INCDIRS) { - QMAKE_DEFAULT_INCDIRS = $$split(INCLUDE, $$QMAKE_DIRLIST_SEP) - } - -- unix:if(!cross_compile|host_build) { -+ unix:!darwin:if(!cross_compile|host_build) { - isEmpty(QMAKE_DEFAULT_INCDIRS): QMAKE_DEFAULT_INCDIRS = /usr/include /usr/local/include - isEmpty(QMAKE_DEFAULT_LIBDIRS): QMAKE_DEFAULT_LIBDIRS = /lib /usr/lib - } diff --git a/depends/patches/qt/fix_qt_pkgconfig.patch b/depends/patches/qt/fix_qt_pkgconfig.patch deleted file mode 100644 index 73f4d89f7354e..0000000000000 --- a/depends/patches/qt/fix_qt_pkgconfig.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- old/qtbase/mkspecs/features/qt_module.prf -+++ new/qtbase/mkspecs/features/qt_module.prf -@@ -269,7 +269,7 @@ load(qt_installs) - load(qt_targets) - - # this builds on top of qt_common --!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/memory_resource.patch b/depends/patches/qt/memory_resource.patch deleted file mode 100644 index 312f0669f6311..0000000000000 --- a/depends/patches/qt/memory_resource.patch +++ /dev/null @@ -1,49 +0,0 @@ -Fix unusable memory_resource on macos - -See https://bugreports.qt.io/browse/QTBUG-117484 -and https://bugreports.qt.io/browse/QTBUG-114316 - ---- a/qtbase/src/corelib/tools/qduplicatetracker_p.h -+++ b/qtbase/src/corelib/tools/qduplicatetracker_p.h -@@ -52,7 +52,7 @@ - - #include - --#if QT_HAS_INCLUDE() && __cplusplus > 201402L -+#ifdef __cpp_lib_memory_resource - # include - # include - #else - ---- a/qtbase/src/corelib/global/qcompilerdetection.h -+++ b/qtbase/src/corelib/global/qcompilerdetection.h -@@ -1055,16 +1055,22 @@ - # endif // !_HAS_CONSTEXPR - # endif // !__GLIBCXX__ && !_LIBCPP_VERSION - # endif // Q_OS_QNX --# if (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) && defined(__GNUC_LIBSTD__) \ -- && ((__GNUC_LIBSTD__-0) * 100 + __GNUC_LIBSTD_MINOR__-0 <= 402) -+# if (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) -+# if defined(__GNUC_LIBSTD__) && ((__GNUC_LIBSTD__-0) * 100 + __GNUC_LIBSTD_MINOR__-0 <= 402) - // Apple has not updated libstdc++ since 2007, which means it does not have - // or std::move. Let's disable these features --# undef Q_COMPILER_INITIALIZER_LISTS --# undef Q_COMPILER_RVALUE_REFS --# undef Q_COMPILER_REF_QUALIFIERS -+# undef Q_COMPILER_INITIALIZER_LISTS -+# undef Q_COMPILER_RVALUE_REFS -+# undef Q_COMPILER_REF_QUALIFIERS - // Also disable , since it's clearly not there --# undef Q_COMPILER_ATOMICS --# endif -+# undef Q_COMPILER_ATOMICS -+# endif -+# if defined(__cpp_lib_memory_resource) \ -+ && ((defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 140000) \ -+ || (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 170000)) -+# undef __cpp_lib_memory_resource // Only supported on macOS 14 and iOS 17 -+# endif -+# endif // (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) - # if defined(Q_CC_CLANG) && defined(Q_CC_INTEL) && Q_CC_INTEL >= 1500 - // ICC 15.x and 16.0 have their own implementation of std::atomic, which is activated when in Clang mode - // (probably because libc++'s on OS X failed to compile), but they're missing some diff --git a/depends/patches/qt/no-xlib.patch b/depends/patches/qt/no-xlib.patch deleted file mode 100644 index 0f7965d2ea8b7..0000000000000 --- a/depends/patches/qt/no-xlib.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 9563cef873ae82e06f60708d706d054717e801ce Mon Sep 17 00:00:00 2001 -From: Carl Dong -Date: Thu, 18 Jul 2019 17:22:05 -0400 -Subject: [PATCH] Wrap xlib related code blocks in #if's - -They are not necessary to compile QT. - ---- a/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp -+++ b/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp -@@ -49,7 +49,9 @@ - #include - #include - #include -+#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library) - #include -+#endif - #include - #include - -@@ -391,6 +393,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; -@@ -444,6 +447,7 @@ static int cursorIdForShape(int cshape) - } - return cursorId; - } -+#endif - - xcb_cursor_t QXcbCursor::createNonStandardCursor(int cshape) - { -@@ -558,7 +562,9 @@ static xcb_cursor_t loadCursor(void *dpy, int cshape) - xcb_cursor_t QXcbCursor::createFontCursor(int cshape) - { - xcb_connection_t *conn = xcb_connection(); -+#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library) - int cursorId = cursorIdForShape(cshape); -+#endif - xcb_cursor_t cursor = XCB_NONE; - - #if QT_CONFIG(xcb_xlib) && QT_CONFIG(library) -@@ -590,6 +596,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape) - // Non-standard X11 cursors are created from bitmaps - cursor = createNonStandardCursor(cshape); - -+#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library) - // Create a glpyh cursor if everything else failed - if (!cursor && cursorId) { - cursor = xcb_generate_id(conn); -@@ -597,6 +604,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].front(); diff --git a/depends/patches/qt/qt.pro b/depends/patches/qt/qt.pro deleted file mode 100644 index 6d8b7fdb6a2ca..0000000000000 --- a/depends/patches/qt/qt.pro +++ /dev/null @@ -1,12 +0,0 @@ -# Create the super cache so modules will add themselves to it. -cache(, super) - -!QTDIR_build: cache(CONFIG, add, $$list(QTDIR_build)) - -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 deleted file mode 100644 index f0c14a9400e12..0000000000000 --- a/depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch +++ /dev/null @@ -1,17 +0,0 @@ -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 deleted file mode 100644 index 6ef71a0942735..0000000000000 --- a/depends/patches/qt/qttools_src.pro +++ /dev/null @@ -1,6 +0,0 @@ -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 index 03f3897975646..e72f4bd037fb2 100644 --- a/depends/patches/qt/rcc_hardcode_timestamp.patch +++ b/depends/patches/qt/rcc_hardcode_timestamp.patch @@ -6,11 +6,11 @@ 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) +@@ -201,14 +201,7 @@ void RCCFileInfo::writeDataInfo(RCCResourceLibrary &lib) if (lib.formatVersion() >= 2) { // last modified time stamp -- const QDateTime lastModified = m_fileInfo.lastModified(); +- const QDateTime lastModified = m_fileInfo.lastModified(QTimeZone::UTC); - quint64 lastmod = quint64(lastModified.isValid() ? lastModified.toMSecsSinceEpoch() : 0); - static const quint64 sourceDate = 1000 * qgetenv("QT_RCC_SOURCE_DATE_OVERRIDE").toULongLong(); - if (sourceDate != 0) diff --git a/depends/patches/qt/utc_from_string_no_optimize.patch b/depends/patches/qt/utc_from_string_no_optimize.patch index 533ef59b37960..67c0b3bb3dca0 100644 --- a/depends/patches/qt/utc_from_string_no_optimize.patch +++ b/depends/patches/qt/utc_from_string_no_optimize.patch @@ -5,7 +5,7 @@ the arm64-apple-darwin HOST. --- a/qtbase/src/corelib/itemmodels/qitemselectionmodel.cpp +++ b/qtbase/src/corelib/itemmodels/qitemselectionmodel.cpp -@@ -1078,9 +1078,9 @@ void QItemSelectionModelPrivate::_q_layoutChanged(const QList &parents = QList(), QAbstractItemModel::LayoutChangeHint hint = QAbstractItemModel::NoLayoutChangeHint); -- void _q_layoutChanged(const QList &parents = QList(), QAbstractItemModel::LayoutChangeHint hint = QAbstractItemModel::NoLayoutChangeHint); -+ __attribute__ ((optnone)) void _q_layoutChanged(const QList &parents = QList(), QAbstractItemModel::LayoutChangeHint hint = QAbstractItemModel::NoLayoutChangeHint); +@@ -47,7 +47,7 @@ public: + layoutAboutToBeChanged(QList(), QAbstractItemModel::NoLayoutChangeHint); + } - inline void remove(QList &r) +- void layoutChanged(const QList &parents, QAbstractItemModel::LayoutChangeHint hint); ++ __attribute__ ((optnone)) void layoutChanged(const QList &parents, QAbstractItemModel::LayoutChangeHint hint); + void triggerLayoutChanged() { + layoutChanged(QList(), QAbstractItemModel::NoLayoutChangeHint); --- a/qtbase/src/corelib/time/qdatetimeparser_p.h +++ b/qtbase/src/corelib/time/qdatetimeparser_p.h -@@ -215,7 +215,7 @@ private: +@@ -169,7 +169,7 @@ private: : value(ok == Invalid ? -1 : val), used(read), zeroes(zs), state(ok) {} }; -- ParsedSection parseSection(const QDateTime ¤tValue, int sectionIndex, -+ __attribute__ ((optnone)) ParsedSection parseSection(const QDateTime ¤tValue, int sectionIndex, - int offset, QString *text) const; +- ParsedSection parseSection(const QDateTime ¤tValue, int sectionIndex, int offset) const; ++ __attribute__ ((optnone)) ParsedSection parseSection(const QDateTime ¤tValue, int sectionIndex, int offset) const; int findMonth(const QString &str1, int monthstart, int sectionIndex, int year, QString *monthName = nullptr, int *used = nullptr) const; + int findDay(const QString &str1, int intDaystart, int sectionIndex, --- a/qtbase/src/corelib/time/qtimezoneprivate_p.h +++ b/qtbase/src/corelib/time/qtimezoneprivate_p.h -@@ -191,7 +191,7 @@ public: +@@ -162,7 +162,7 @@ public: virtual ~QUtcTimeZonePrivate(); // Fall-back for UTC[+-]\d+(:\d+){,2} IDs. @@ -66,7 +66,7 @@ the arm64-apple-darwin HOST. --- a/qtbase/src/widgets/widgets/qcalendarwidget.cpp +++ b/qtbase/src/widgets/widgets/qcalendarwidget.cpp -@@ -329,13 +329,13 @@ class QCalendarYearValidator : public QCalendarDateSectionValidator +@@ -295,13 +295,13 @@ class QCalendarYearValidator : public QCalendarDateSectionValidator public: QCalendarYearValidator(); diff --git a/depends/patches/qt/windows_lto.patch b/depends/patches/qt/windows_lto.patch index ea379a60f14a1..86be9033a75e1 100644 --- a/depends/patches/qt/windows_lto.patch +++ b/depends/patches/qt/windows_lto.patch @@ -8,7 +8,7 @@ diff --git a/qtbase/src/widgets/accessible/simplewidgets.cpp b/qtbase/src/widget index 107fd729fe..0e61878f39 100644 --- a/qtbase/src/widgets/accessible/simplewidgets.cpp +++ b/qtbase/src/widgets/accessible/simplewidgets.cpp -@@ -109,6 +109,8 @@ QString qt_accHotKey(const QString &text); +@@ -78,6 +78,8 @@ QString qt_accHotKey(const QString &text); \ingroup accessibility */ @@ -21,7 +21,7 @@ diff --git a/qtbase/src/widgets/accessible/simplewidgets_p.h b/qtbase/src/widget index 73572e3059..658da86143 100644 --- a/qtbase/src/widgets/accessible/simplewidgets_p.h +++ b/qtbase/src/widgets/accessible/simplewidgets_p.h -@@ -155,6 +155,7 @@ class QAccessibleLineEdit : public QAccessibleWidget, public QAccessibleTextInte +@@ -122,6 +122,7 @@ class QAccessibleLineEdit : public QAccessibleWidget, public QAccessibleTextInte public: explicit QAccessibleLineEdit(QWidget *o, const QString &name = QString()); diff --git a/depends/patches/qt/zlib-timebits64.patch b/depends/patches/qt/zlib-timebits64.patch deleted file mode 100644 index 139c1dfa77f3e..0000000000000 --- a/depends/patches/qt/zlib-timebits64.patch +++ /dev/null @@ -1,31 +0,0 @@ -From a566e156b3fa07b566ddbf6801b517a9dba04fa3 Mon Sep 17 00:00:00 2001 -From: Mark Adler -Date: Sat, 29 Jul 2023 22:13:09 -0700 -Subject: [PATCH] Avoid compiler complaints if _TIME_BITS defined when building - zlib. - -zlib does not use time_t, so _TIME_BITS is irrelevant. However it -may be defined anyway as part of a sledgehammer indiscriminately -applied to all builds. - -From https://github.com/madler/zlib/commit/a566e156b3fa07b566ddbf6801b517a9dba04fa3.patch ---- - qtbase/src/3rdparty/zlib/src/gzguts.h | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/qtbase/src/3rdparty/zlib/src/gzguts.h b/qtbase/src/3rdparty/zlib/src/gzguts.h -index e23f831f5..f9375047e 100644 ---- a/qtbase/src/3rdparty/zlib/src/gzguts.h -+++ b/qtbase/src/3rdparty/zlib/src/gzguts.h -@@ -26,9 +26,8 @@ - # ifndef _LARGEFILE_SOURCE - # define _LARGEFILE_SOURCE 1 - # endif --# ifdef _FILE_OFFSET_BITS --# undef _FILE_OFFSET_BITS --# endif -+# undef _FILE_OFFSET_BITS -+# undef _TIME_BITS - #endif - - #ifdef HAVE_HIDDEN