From 06a34c661279bcefa1ccdeb3c51783513dd9b02a Mon Sep 17 00:00:00 2001 From: tobtoht Date: Sat, 2 Nov 2024 19:03:44 +0100 Subject: [PATCH] depends: qt: update to 6.8.0 --- CMakeLists.txt | 7 - contrib/depends/packages/native_qt.mk | 14 +- contrib/depends/packages/qt.mk | 170 ++++++++++-------- contrib/depends/packages/zlib.mk | 12 +- .../depends/patches/qt/disable-qmake.patch | 47 +++++ .../patches/qt/macos-available-qtbase.patch | 12 +- .../patches/qt/qtmultimedia-fixes.patch | 71 +++----- contrib/depends/patches/qt/toolchain.cmake | 2 + .../depends/patches/zlib/win-lib-name.patch | 23 +++ src/CMakeLists.txt | 3 + 10 files changed, 215 insertions(+), 146 deletions(-) create mode 100644 contrib/depends/patches/qt/disable-qmake.patch create mode 100644 contrib/depends/patches/zlib/win-lib-name.patch diff --git a/CMakeLists.txt b/CMakeLists.txt index 78bfbb6f..19826640 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,13 +79,6 @@ get_directory_property(OPENBSD DIRECTORY "monero" DEFINITION OPENBSD) get_directory_property(FREEBSD DIRECTORY "monero" DEFINITION FREEBSD) get_directory_property(DRAGONFLY DIRECTORY "monero" DEFINITION DRAGONFLY) -# libXau -# workaround for: undefined reference to `XauGetBestAuthByAddr' -if (DEPENDS AND UNIX AND NOT APPLE) - find_library(LIBXAU_LIBRARY Xau) - message(STATUS "libXau: libraries at ${LIBXAU_LIBRARY}") -endif() - # pthread find_package(Threads REQUIRED) diff --git a/contrib/depends/packages/native_qt.mk b/contrib/depends/packages/native_qt.mk index f63868f0..ddda112f 100644 --- a/contrib/depends/packages/native_qt.mk +++ b/contrib/depends/packages/native_qt.mk @@ -1,9 +1,9 @@ package=native_qt -$(package)_version=6.7.3 -$(package)_download_path=https://download.qt.io/official_releases/qt/6.7/$($(package)_version)/submodules +$(package)_version=6.8.0 +$(package)_download_path=https://download.qt.io/official_releases/qt/6.8/$($(package)_version)/submodules $(package)_suffix=everywhere-src-$($(package)_version).tar.xz $(package)_file_name=qtbase-$($(package)_suffix) -$(package)_sha256_hash=8ccbb9ab055205ac76632c9eeddd1ed6fc66936fc56afc2ed0fd5d9e23da3097 +$(package)_sha256_hash=1bad481710aa27f872de6c9f72651f89a6107f0077003d0ebfcc9fd15cba3c75 $(package)_qt_libs=corelib network widgets gui plugins testlib $(package)_patches = dont_hardcode_pwd.patch $(package)_patches += fast_fixed_dtoa_no_optimize.patch @@ -13,16 +13,16 @@ $(package)_patches += rcc_hardcode_timestamp.patch $(package)_patches += root_CMakeLists.txt $(package)_qttools_file_name=qttools-$($(package)_suffix) -$(package)_qttools_sha256_hash=f03bb7df619cd9ac9dba110e30b7bcab5dd88eb8bdc9cc752563b4367233203f +$(package)_qttools_sha256_hash=403115d8268503c6cc6e43310c8ae28eb9e605072a5d04e4a2de8b6af39981f7 $(package)_qtsvg_file_name=qtsvg-$($(package)_suffix) -$(package)_qtsvg_sha256_hash=40142cb71fb1e07ad612bc361b67f5d54cd9367f9979ae6b86124a064deda06b +$(package)_qtsvg_sha256_hash=cf7a593d5e520f8177240610d9e55d5b75b0887fe5f385554ff64377f1646199 $(package)_qtmultimedia_file_name=qtmultimedia-$($(package)_suffix) -$(package)_qtmultimedia_sha256_hash=304d28b8e592435293893b0110d5f3534407604d1e04d8a0b0e5b34afe577303 +$(package)_qtmultimedia_sha256_hash=28766aa562fa7aa7dfa8420defd6ece90a891a0496b8d8a4c51958182d73cfcd $(package)_qtshadertools_file_name=qtshadertools-$($(package)_suffix) -$(package)_qtshadertools_sha256_hash=74e512798c7ddbda354a2d8d975211454bbabb47afb7e598892067a5828c0995 +$(package)_qtshadertools_sha256_hash=44692dc93482374bf3b39e96c881fa08275f0bf82958b68a7e3c796b76d4c4cb $(package)_extra_sources += $($(package)_qttools_file_name) $(package)_extra_sources += $($(package)_qtsvg_file_name) diff --git a/contrib/depends/packages/qt.mk b/contrib/depends/packages/qt.mk index 4f5c7249..f2cb0a31 100644 --- a/contrib/depends/packages/qt.mk +++ b/contrib/depends/packages/qt.mk @@ -1,9 +1,9 @@ package=qt -$(package)_version=6.7.3 -$(package)_download_path=https://download.qt.io/official_releases/qt/6.7/$($(package)_version)/submodules +$(package)_version=6.8.0 +$(package)_download_path=https://download.qt.io/official_releases/qt/6.8/$($(package)_version)/submodules $(package)_suffix=everywhere-src-$($(package)_version).tar.xz $(package)_file_name=qtbase-$($(package)_suffix) -$(package)_sha256_hash=8ccbb9ab055205ac76632c9eeddd1ed6fc66936fc56afc2ed0fd5d9e23da3097 +$(package)_sha256_hash=1bad481710aa27f872de6c9f72651f89a6107f0077003d0ebfcc9fd15cba3c75 $(package)_darwin_dependencies=openssl native_qt $(package)_mingw32_dependencies=openssl native_qt $(package)_linux_dependencies=openssl native_qt freetype fontconfig libxcb libxkbcommon libxcb_util libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm libxcb_util_cursor dbus @@ -27,19 +27,19 @@ $(package)_patches += macos-available-qtmultimedia.patch #$(package)_patches += fix-static-fontconfig-static-linking.patch $(package)_qttools_file_name=qttools-$($(package)_suffix) -$(package)_qttools_sha256_hash=f03bb7df619cd9ac9dba110e30b7bcab5dd88eb8bdc9cc752563b4367233203f +$(package)_qttools_sha256_hash=403115d8268503c6cc6e43310c8ae28eb9e605072a5d04e4a2de8b6af39981f7 $(package)_qtsvg_file_name=qtsvg-$($(package)_suffix) -$(package)_qtsvg_sha256_hash=40142cb71fb1e07ad612bc361b67f5d54cd9367f9979ae6b86124a064deda06b +$(package)_qtsvg_sha256_hash=cf7a593d5e520f8177240610d9e55d5b75b0887fe5f385554ff64377f1646199 $(package)_qtwebsockets_file_name=qtwebsockets-$($(package)_suffix) -$(package)_qtwebsockets_sha256_hash=ba03007db7ee68a5bc3e3bd1d71e11f3e1f84e470bcb8c54cd7c01bbe1c5990e +$(package)_qtwebsockets_sha256_hash=c14be05c46b71c2a89865987ffe0a8d40d8ecb01d48dcdca7fc02ba83a5eaf6f $(package)_qtmultimedia_file_name=qtmultimedia-$($(package)_suffix) -$(package)_qtmultimedia_sha256_hash=304d28b8e592435293893b0110d5f3534407604d1e04d8a0b0e5b34afe577303 +$(package)_qtmultimedia_sha256_hash=28766aa562fa7aa7dfa8420defd6ece90a891a0496b8d8a4c51958182d73cfcd $(package)_qtshadertools_file_name=qtshadertools-$($(package)_suffix) -$(package)_qtshadertools_sha256_hash=74e512798c7ddbda354a2d8d975211454bbabb47afb7e598892067a5828c0995 +$(package)_qtshadertools_sha256_hash=44692dc93482374bf3b39e96c881fa08275f0bf82958b68a7e3c796b76d4c4cb $(package)_extra_sources += $($(package)_qttools_file_name) $(package)_extra_sources += $($(package)_qtsvg_file_name) @@ -56,91 +56,105 @@ $(package)_config_opts += -DINSTALL_LIBEXECDIR=$(build_prefix)/bin $(package)_config_opts += -DQT_BUILD_EXAMPLES=FALSE $(package)_config_opts += -DQT_BUILD_TESTS=FALSE $(package)_config_opts += -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake -$(package)_config_opts += -DINPUT_cups=no -$(package)_config_opts += -DINPUT_egl=no -$(package)_config_opts += -DINPUT_eglfs=no -$(package)_config_opts += -DINPUT_evdev=no -$(package)_config_opts += -DINPUT_gif=no -$(package)_config_opts += -DINPUT_glib=no -$(package)_config_opts += -DINPUT_icu=no -$(package)_config_opts += -DINPUT_ico=no -$(package)_config_opts += -DINPUT_kms=no -$(package)_config_opts += -DINPUT_linuxfb=no -$(package)_config_opts += -DINPUT_libudev=no -$(package)_config_opts += -DINPUT_mtdev=no -$(package)_config_opts += -DINPUT_openssl=linked -$(package)_config_opts += -DINPUT_openvg=no -$(package)_config_opts += -DINPUT_permissions=yes -$(package)_config_opts += -DINPUT_reduce_relocations=no -$(package)_config_opts += -DINPUT_schannel=no -$(package)_config_opts += -DINPUT_sctp=no -$(package)_config_opts += -DINPUT_securetransport=no -$(package)_config_opts += -DINPUT_system_proxies=no -$(package)_config_opts += -DINPUT_use_gold_linker_alias=no -$(package)_config_opts += -DINPUT_zstd=no -$(package)_config_opts += -DINPUT_pkg_config=yes -$(package)_config_opts += -DINPUT_libpng=qt -$(package)_config_opts += -DINPUT_pcre=qt -$(package)_config_opts += -DINPUT_harfbuzz=qt -$(package)_config_opts += -DINPUT_system_zlib=no -$(package)_config_opts += -DINPUT_colordialog=no -$(package)_config_opts += -DINPUT_dial=no -$(package)_config_opts += -DINPUT_fontcombobox=no -$(package)_config_opts += -DINPUT_image_heuristic_mask=no -$(package)_config_opts += -DINPUT_keysequenceedit=no -$(package)_config_opts += -DINPUT_lcdnumber=no -$(package)_config_opts += -DINPUT_networkdiskcache=no -$(package)_config_opts += -DINPUT_pdf=no -$(package)_config_opts += -DINPUT_printdialog=no -$(package)_config_opts += -DINPUT_printer=no -$(package)_config_opts += -DINPUT_printpreviewdialog=no -$(package)_config_opts += -DINPUT_printpreviewwidget=no -$(package)_config_opts += -DINPUT_printsupport=no -$(package)_config_opts += -DINPUT_sessionmanager=no -$(package)_config_opts += -DINPUT_spatialaudio=no -$(package)_config_opts += -DINPUT_sql=no -$(package)_config_opts += -DINPUT_syntaxhighlighter=no -$(package)_config_opts += -DINPUT_textmarkdownwriter=no -$(package)_config_opts += -DINPUT_textodfwriter=no -$(package)_config_opts += -DINPUT_topleveldomain=no -$(package)_config_opts += -DINPUT_undocommand=no -$(package)_config_opts += -DINPUT_undogroup=no -$(package)_config_opts += -DINPUT_undostack=no -$(package)_config_opts += -DINPUT_undoview=no -$(package)_config_opts += -DINPUT_vnc=no +$(package)_config_opts += -DQT_FEATURE_cups=OFF +$(package)_config_opts += -DQT_FEATURE_qmake=OFF +$(package)_config_opts += -DQT_FEATURE_egl=OFF +$(package)_config_opts += -DQT_FEATURE_egl_x11=OFF +$(package)_config_opts += -DQT_FEATURE_xcb_egl_plugin=OFF +$(package)_config_opts += -DQT_FEATURE_xcb_glx_plugin=OFF +$(package)_config_opts += -DQT_FEATURE_eglfs=OFF +$(package)_config_opts += -DQT_FEATURE_evdev=OFF +$(package)_config_opts += -DQT_FEATURE_gif=OFF +$(package)_config_opts += -DQT_FEATURE_glib=OFF +$(package)_config_opts += -DQT_FEATURE_icu=OFF +$(package)_config_opts += -DQT_FEATURE_ico=OFF +$(package)_config_opts += -DQT_FEATURE_kms=OFF +$(package)_config_opts += -DQT_FEATURE_linuxfb=OFF +$(package)_config_opts += -DQT_FEATURE_libudev=OFF +$(package)_config_opts += -DQT_FEATURE_mtdev=OFF +$(package)_config_opts += -DQT_FEATURE_openssl=ON +$(package)_config_opts += -DQT_FEATURE_openssl_linked=ON +$(package)_config_opts += -DQT_FEATURE_openvg=OFF +$(package)_config_opts += -DQT_FEATURE_permissions=ON +$(package)_config_opts += -DQT_FEATURE_reduce_relocations=OFF +$(package)_config_opts += -DQT_FEATURE_schannel=OFF +$(package)_config_opts += -DQT_FEATURE_sctp=OFF +$(package)_config_opts += -DQT_FEATURE_securetransport=OFF +$(package)_config_opts += -DQT_FEATURE_system_proxies=OFF +$(package)_config_opts += -DQT_FEATURE_use_gold_linker_alias=OFF +$(package)_config_opts += -DQT_FEATURE_zstd=OFF +$(package)_config_opts += -DQT_FEATURE_pkg_config=ON +$(package)_config_opts += -DQT_FEATURE_system_png=OFF +$(package)_config_opts += -DQT_FEATURE_system_pcre2=OFF +$(package)_config_opts += -DQT_FEATURE_system_harfbuzz=OFF +$(package)_config_opts += -DQT_FEATURE_system_zlib=OFF +$(package)_config_opts += -DQT_FEATURE_colordialog=OFF +$(package)_config_opts += -DQT_FEATURE_dial=OFF +$(package)_config_opts += -DQT_FEATURE_fontcombobox=OFF +$(package)_config_opts += -DQT_FEATURE_image_heuristic_mask=OFF +$(package)_config_opts += -DQT_FEATURE_keysequenceedit=OFF +$(package)_config_opts += -DQT_FEATURE_lcdnumber=OFF +$(package)_config_opts += -DQT_FEATURE_networkdiskcache=OFF +$(package)_config_opts += -DQT_FEATURE_pdf=OFF +$(package)_config_opts += -DQT_FEATURE_printdialog=OFF +$(package)_config_opts += -DQT_FEATURE_printer=OFF +$(package)_config_opts += -DQT_FEATURE_printpreviewdialog=OFF +$(package)_config_opts += -DQT_FEATURE_printpreviewwidget=OFF +$(package)_config_opts += -DQT_FEATURE_printsupport=OFF +$(package)_config_opts += -DQT_FEATURE_sessionmanager=OFF +$(package)_config_opts += -DQT_FEATURE_spatialaudio=OFF +$(package)_config_opts += -DQT_FEATURE_sql=OFF +$(package)_config_opts += -DQT_FEATURE_syntaxhighlighter=OFF +$(package)_config_opts += -DQT_FEATURE_tabletevent=OFF +$(package)_config_opts += -DQT_FEATURE_textmarkdownwriter=OFF +$(package)_config_opts += -DQT_FEATURE_textodfwriter=OFF +$(package)_config_opts += -DQT_FEATURE_topleveldomain=OFF +$(package)_config_opts += -DQT_FEATURE_undocommand=OFF +$(package)_config_opts += -DQT_FEATURE_undogroup=OFF +$(package)_config_opts += -DQT_FEATURE_undostack=OFF +$(package)_config_opts += -DQT_FEATURE_undoview=OFF +$(package)_config_opts += -DQT_FEATURE_vnc=OFF $(package)_config_opts_linux += -DQT_QMAKE_TARGET_MKSPEC=linux-g++ -$(package)_config_opts_linux += -DINPUT_xcb=yes -$(package)_config_opts_linux += -DINPUT_xcb_xlib=no -$(package)_config_opts_linux += -DINPUT_xlib=no -$(package)_config_opts_linux += -DINPUT_freetype=system -$(package)_config_opts_linux += -DINPUT_fontconfig=yes +$(package)_config_opts_linux += -DQT_FEATURE_xcb=ON +$(package)_config_opts_linux += -DQT_FEATURE_xcb_xlib=OFF +$(package)_config_opts_linux += -DQT_FEATURE_xlib=OFF +$(package)_config_opts_linux += -DQT_FEATURE_freetype=ON +$(package)_config_opts_linux += -DQT_FEATURE_system_freetype=ON +$(package)_config_opts_linux += -DQT_FEATURE_fontconfig=ON $(package)_config_opts_linux += -DINPUT_opengl=no -$(package)_config_opts_linux += -DINPUT_vulkan=no -$(package)_config_opts_linux += -DINPUT_backtrace=no -$(package)_config_opts_linux += -DINPUT_dbus=linked +$(package)_config_opts_linux += -DQT_FEATURE_opengl=OFF +$(package)_config_opts_linux += -DQT_FEATURE_opengles2=OFF +$(package)_config_opts_linux += -DQT_FEATURE_opengles3=OFF +$(package)_config_opts_linux += -DQT_FEATURE_opengles31=OFF +$(package)_config_opts_linux += -DQT_FEATURE_opengles32=OFF +$(package)_config_opts_linux += -DQT_FEATURE_opengl_desktop=OFF +$(package)_config_opts_linux += -DQT_FEATURE_vulkan=OFF +$(package)_config_opts_linux += -DQT_FEATURE_backtrace=OFF +$(package)_config_opts_linux += -DQT_FEATURE_dbus=ON +$(package)_config_opts_linux += -DQT_FEATURE_dbus_linked=ON $(package)_config_opts_linux += -DBUILD_WITH_PCH=OFF $(package)_config_opts_mingw32 += -DQT_QMAKE_TARGET_MKSPEC=win32-g++ $(package)_config_opts_mingw32 += -DINPUT_opengl=no -$(package)_config_opts_mingw32 += -DINPUT_dbus=no -$(package)_config_opts_mingw32 += -DINPUT_freetype=no -$(package)_config_opts_mingw32 += -DINPUT_ffmpeg=no -$(package)_config_opts_mingw32 += -DINPUT_wmf=yes +$(package)_config_opts_mingw32 += -DQT_FEATURE_dbus=OFF +$(package)_config_opts_mingw32 += -DQT_FEATURE_freetype=OFF +$(package)_config_opts_mingw32 += -DQT_FEATURE_ffmpeg=OFF +$(package)_config_opts_mingw32 += -DQT_FEATURE_wmf=ON $(package)_config_opts_mingw32 += -DBUILD_WITH_PCH=ON $(package)_config_opts_darwin += -DQT_QMAKE_TARGET_MKSPEC=macx-clang # see #138 -$(package)_config_opts_darwin += -DINPUT_accessibility=no -$(package)_config_opts_darwin += -DINPUT_dbus=no -$(package)_config_opts_darwin += -DINPUT_freetype=no -$(package)_config_opts_darwin += -DINPUT_ffmpeg=no +$(package)_config_opts_darwin += -DQT_FEATURE_accessibility=OFF +$(package)_config_opts_darwin += -DQT_FEATURE_dbus=OFF +$(package)_config_opts_darwin += -DQT_FEATURE_freetype=OFF +$(package)_config_opts_darwin += -DQT_FEATURE_ffmpeg=OFF $(package)_config_opts_darwin += -DQMAKE_MACOSX_DEPLOYMENT_TARGET=11.0 $(package)_config_opts_darwin += -DBUILD_WITH_PCH=OFF $(package)_config_opts_darwin += '-DQT_QMAKE_DEVICE_OPTIONS=MAC_SDK_PATH=$(host_prefix)/native/SDK;MAC_SDK_VERSION=$(OSX_SDK_VERSION);CROSS_COMPILE=$(host)-;MAC_TARGET=$(host);XCODE_VERSION=$(XCODE_VERSION)' $(package)_config_opts_darwin += -DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON # work around a build issue in qfutex_mac_p.h -$(package)_config_opts_darwin += -DINPUT_appstore_compliant=yes +$(package)_config_opts_darwin += -DQT_FEATURE_appstore_compliant=ON $(package)_config_opts += -G Ninja @@ -205,11 +219,11 @@ define $(package)_preprocess_cmds cd ../qtmultimedia && \ patch -p1 -i $($(package)_patch_dir)/qtmultimedia-fixes.patch && \ patch -p1 -i $($(package)_patch_dir)/v4l2.patch && \ - patch -p1 -i $($(package)_patch_dir)/no-resonance-audio.patch && \ patch -p1 -i $($(package)_patch_dir)/revert-f67ee7c39.patch && \ patch -p1 -i $($(package)_patch_dir)/macos-available-qtmultimedia.patch endef + define $(package)_config_cmds export OPENSSL_LIBS=${$(package)_openssl_flags_$(host_os)} \ export PKG_CONFIG_SYSROOT_DIR=/ && \ diff --git a/contrib/depends/packages/zlib.mk b/contrib/depends/packages/zlib.mk index f85a0d28..3eed9fbc 100644 --- a/contrib/depends/packages/zlib.mk +++ b/contrib/depends/packages/zlib.mk @@ -3,9 +3,14 @@ $(package)_version=1.3.1 $(package)_download_path=https://github.com/madler/zlib/releases/download/v$($(package)_version)/ $(package)_file_name=$(package)-$($(package)_version).tar.xz $(package)_sha256_hash=38ef96b8dfe510d42707d9c781877914792541133e1870841463bfa73f883e32 +$(package)_patches=win-lib-name.patch + +define $(package)_preprocess_cmds + patch -p1 < $($(package)_patch_dir)/win-lib-name.patch +endef define $(package)_config_cmds - $($(package)_cmake) + $($(package)_cmake) -DBUILD_SHARED_LIBS=OFF -DZLIB_BUILD_EXAMPLES=OFF endef define $(package)_build_cmds @@ -15,3 +20,8 @@ endef define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) install endef + +define $(package)_postprocess_cmds + rm -f lib/libz.so* lib/libz.dll* && \ + rm -rf bin +endef diff --git a/contrib/depends/patches/qt/disable-qmake.patch b/contrib/depends/patches/qt/disable-qmake.patch new file mode 100644 index 00000000..b2fb46ca --- /dev/null +++ b/contrib/depends/patches/qt/disable-qmake.patch @@ -0,0 +1,47 @@ +diff --git a/cmake/QtBaseHelpers.cmake b/cmake/QtBaseHelpers.cmake +index 4b48f8f176..63e445e346 100644 +--- a/cmake/QtBaseHelpers.cmake ++++ b/cmake/QtBaseHelpers.cmake +@@ -212,7 +212,7 @@ macro(qt_internal_qtbase_build_repo) + endif() + + if(NOT QT_INTERNAL_BUILD_STANDALONE_PARTS) +- if(QT_FEATURE_settings) ++ if(QT_WILL_BUILD_TOOLS AND QT_FEATURE_settings) + add_subdirectory(qmake) + endif() + +diff --git a/qmake/CMakeLists.txt b/qmake/CMakeLists.txt +index 9334ca72ab..801b4f7647 100644 +--- a/qmake/CMakeLists.txt ++++ b/qmake/CMakeLists.txt +@@ -112,19 +112,6 @@ qt_internal_add_tool(${target_name} + generators/win32/msvc_objectmodel.cpp # xml symbols clash with generators/win32/msbuild_objectmodel.cpp + library/qmakeparser.cpp # struct statics clashes with qmakeevaluator_p.h + ) +- +-# When we don't build tools, we still want to be able to build the documentation. +-# Add a fake interface library to make sure the documentation target is created. +-# We use the direct name rather than ${target_name} to ensure the doc target keeps +-# the original name even when cross-building. +-if(NOT TARGET qmake) +- add_library(qmake INTERFACE) +-endif() +- +-qt_internal_add_docs(qmake +- doc/qmake.qdocconf +-) +- + qt_internal_return_unless_building_tools() + + #### Keys ignored in scope 1:.:.:qmake.pro:: +@@ -154,3 +141,6 @@ set_target_properties(${target_name} PROPERTIES + qt_internal_apply_gc_binaries(${target_name} PRIVATE) + qt_skip_warnings_are_errors(${target_name}) + ++qt_internal_add_docs(${target_name} ++ doc/qmake.qdocconf ++) +-- +2.46.2 + diff --git a/contrib/depends/patches/qt/macos-available-qtbase.patch b/contrib/depends/patches/qt/macos-available-qtbase.patch index a85db9b1..4e8c00df 100644 --- a/contrib/depends/patches/qt/macos-available-qtbase.patch +++ b/contrib/depends/patches/qt/macos-available-qtbase.patch @@ -1,5 +1,5 @@ diff --git a/src/gui/platform/darwin/qappleiconengine.mm b/src/gui/platform/darwin/qappleiconengine.mm -index a346c4d1f1..a1d02a97cb 100644 +index d99da6da84..c6cd8ffe87 100644 --- a/src/gui/platform/darwin/qappleiconengine.mm +++ b/src/gui/platform/darwin/qappleiconengine.mm @@ -362,15 +362,6 @@ auto *configuredImage(const NSImage *image, const QColor &color) @@ -19,10 +19,10 @@ index a346c4d1f1..a1d02a97cb 100644 return [image imageWithSymbolConfiguration:config]; } diff --git a/src/gui/rhi/qrhimetal.mm b/src/gui/rhi/qrhimetal.mm -index 232b2374b3..d28d966ad1 100644 +index 3046b76427..8c1e7fd13f 100644 --- a/src/gui/rhi/qrhimetal.mm +++ b/src/gui/rhi/qrhimetal.mm -@@ -4685,10 +4685,6 @@ id QRhiMetalData::createMetalLib(const QShader &shader, QShader::Var +@@ -4710,10 +4710,6 @@ id QRhiMetalData::createMetalLib(const QShader &shader, QShader::Var QString *error, QByteArray *entryPoint, QShaderKey *activeKey) { QVarLengthArray versions; @@ -30,6 +30,6 @@ index 232b2374b3..d28d966ad1 100644 - versions << 30; - if (@available(macOS 12, iOS 15, *)) - versions << 24; - if (@available(macOS 11, iOS 14, *)) - versions << 23; - if (@available(macOS 10.15, iOS 13, *)) + versions << 23 << 22 << 21 << 20 << 12; + + const QList shaders = shader.availableShaders(); diff --git a/contrib/depends/patches/qt/qtmultimedia-fixes.patch b/contrib/depends/patches/qt/qtmultimedia-fixes.patch index 01b2f545..321b1a4c 100644 --- a/contrib/depends/patches/qt/qtmultimedia-fixes.patch +++ b/contrib/depends/patches/qt/qtmultimedia-fixes.patch @@ -1,58 +1,35 @@ -From 677c6d3e58064e9d10472e5ca75380b31631d12a Mon Sep 17 00:00:00 2001 -From: tobtoht -Date: Tue, 3 Jan 2023 13:00:51 +0100 -Subject: [PATCH] qtmultimedia fixes - ---- - src/multimedia/configure.cmake | 3 +-- - src/multimedia/windows/qwindowsmediadevices.cpp | 2 +- - src/multimedia/windows/qwindowsresampler.cpp | 2 +- - src/plugins/multimedia/darwin/qdarwinintegration.mm | 3 +-- - src/plugins/multimedia/windows/common/mfmetadata_p.h | 2 +- - .../windows/decoder/mfaudiodecodercontrol.cpp | 2 +- - .../windows/mediacapture/qwindowsmediadevicereader_p.h | 4 ++-- - .../windows/mediacapture/qwindowsmediaencoder.cpp | 2 +- - .../multimedia/windows/player/mfplayercontrol_p.h | 2 +- - .../multimedia/windows/player/mfplayersession.cpp | 2 +- - src/plugins/multimedia/windows/player/mftvideo.cpp | 2 +- - .../multimedia/windows/qwindowsvideodevices.cpp | 4 ++-- - 13 files changed, 19 insertions(+), 21 deletions(-) - diff --git a/src/multimedia/configure.cmake b/src/multimedia/configure.cmake -index 609806507..40b1b9b36 100644 +index bbad7f94b..c7d382592 100644 --- a/src/multimedia/configure.cmake +++ b/src/multimedia/configure.cmake -@@ -24,7 +24,6 @@ qt_find_package(WrapPulseAudio PROVIDED_TARGETS WrapPulseAudio::WrapPulseAudio M - qt_find_package(WMF PROVIDED_TARGETS WMF::WMF MODULE_NAME multimedia QMAKE_LIB wmf) - qt_find_package(EGL) - +@@ -33,21 +33,6 @@ if(TARGET EGL::EGL) + endif() + qt_find_package(EGL PROVIDED_TARGETS EGL::EGL) + +- -qt_find_package(FFmpeg OPTIONAL_COMPONENTS AVCODEC AVFORMAT AVUTIL SWRESAMPLE SWSCALE PROVIDED_TARGETS FFmpeg::avcodec FFmpeg::avformat FFmpeg::avutil FFmpeg::swresample FFmpeg::swscale MODULE_NAME multimedia QMAKE_LIB ffmpeg) +-qt_find_package_extend_sbom( +- TARGETS +- FFmpeg::avcodec +- FFmpeg::avformat +- FFmpeg::avutil +- FFmpeg::swresample +- FFmpeg::swscale +- ATTRIBUTION_FILE_DIR_PATHS +- # Need to pass an absolute path here, otherwise the file will be relative to the root of +- # the source tree, not the current dir, because system libraries are processed in the +- # source root directory. +- ${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty/ffmpeg +-) + qt_find_package(PipeWire PROVIDED_TARGETS PipeWire::PipeWire MODULE_NAME multimedia QMAKE_LIB pipewire) qt_find_package(VAAPI COMPONENTS VA DRM PROVIDED_TARGETS VAAPI::VAAPI MODULE_NAME multimedia QMAKE_LIB vaapi) - - #### Tests -@@ -76,7 +75,7 @@ qt_feature("ffmpeg" PRIVATE + +@@ -100,7 +85,7 @@ qt_feature("ffmpeg" PRIVATE LABEL "FFmpeg" ENABLE INPUT_ffmpeg STREQUAL 'yes' DISABLE INPUT_ffmpeg STREQUAL 'no' - CONDITION FFmpeg_FOUND AND (APPLE OR WIN32 OR ANDROID OR QNX OR QT_FEATURE_pulseaudio) + CONDITION UNIX OR WIN32 ) - qt_feature("alsa" PUBLIC PRIVATE - LABEL "ALSA (experimental)" -diff --git a/src/plugins/multimedia/darwin/qdarwinintegration.mm b/src/plugins/multimedia/darwin/qdarwinintegration.mm -index 5e26fe5c4..3e82655b0 100644 ---- a/src/plugins/multimedia/darwin/qdarwinintegration.mm -+++ b/src/plugins/multimedia/darwin/qdarwinintegration.mm -@@ -39,8 +39,7 @@ public: - QDarwinIntegration::QDarwinIntegration() - { - #if defined(Q_OS_MACOS) && QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_11_0) -- if (__builtin_available(macOS 11.0, *)) -- VTRegisterSupplementalVideoDecoderIfAvailable(kCMVideoCodecType_VP9); -+ VTRegisterSupplementalVideoDecoderIfAvailable(kCMVideoCodecType_VP9); - #endif - m_videoDevices = new QAVFVideoDevices(this); - } --- -2.39.0 - + qt_feature("pipewire" PRIVATE + LABEL "PipeWire" diff --git a/contrib/depends/patches/qt/toolchain.cmake b/contrib/depends/patches/qt/toolchain.cmake index 73e96027..896a147c 100644 --- a/contrib/depends/patches/qt/toolchain.cmake +++ b/contrib/depends/patches/qt/toolchain.cmake @@ -9,6 +9,8 @@ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH @host_prefix@) + if(CMAKE_SYSTEM_NAME STREQUAL "Windows") set(CMAKE_FIND_ROOT_PATH @host_prefix@;@wmf_libs@) endif() diff --git a/contrib/depends/patches/zlib/win-lib-name.patch b/contrib/depends/patches/zlib/win-lib-name.patch new file mode 100644 index 00000000..ba49004d --- /dev/null +++ b/contrib/depends/patches/zlib/win-lib-name.patch @@ -0,0 +1,23 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 15ceebe..58414f6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -167,15 +167,9 @@ if(NOT CYGWIN) + set_target_properties(zlib PROPERTIES VERSION ${ZLIB_FULL_VERSION}) + endif() + +-if(UNIX) +- # On unix-like platforms the library is almost always called libz +- set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z) +- if(NOT APPLE AND NOT(CMAKE_SYSTEM_NAME STREQUAL AIX)) +- set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"") +- endif() +-elseif(BUILD_SHARED_LIBS AND WIN32) +- # Creates zlib1.dll when building shared library version +- set_target_properties(zlib PROPERTIES SUFFIX "1.dll") ++set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z) ++if(NOT APPLE AND NOT(CMAKE_SYSTEM_NAME STREQUAL AIX)) ++ set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"") + endif() + + if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 245d62a5..059d9965 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -301,6 +301,9 @@ if(STATIC AND UNIX AND NOT APPLE) endif() if(DEPENDS AND UNIX AND NOT APPLE) + # workaround for: undefined reference to `XauGetBestAuthByAddr' + find_library(LIBXAU_LIBRARY Xau REQUIRED) + message(STATUS "libXau: libraries at ${LIBXAU_LIBRARY}") target_link_libraries(XCB::XCB INTERFACE ${LIBXAU_LIBRARY}) endif()