From 61ca21f8ee1a039833ed06edb7865d4aff0ab9e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Fri, 17 Feb 2023 11:43:09 +0700 Subject: [PATCH] qt6-base: update to 6.4.2. --- srcpkgs/qt6-base/patches/complex-text.patch | 0 srcpkgs/qt6-base/patches/feenableexcept.patch | 6 +- srcpkgs/qt6-base/patches/markdown-musl.patch | 25 +----- srcpkgs/qt6-base/patches/musl-limits.patch | 12 +-- .../qt6-base/patches/musl-test-image.patch | 19 ++++ .../qt6-base/patches/musl-usr-path-hack.patch | 10 +-- ...urce-root-dir-last-modified-is-valid.patch | 6 +- .../qt6-base/patches/x86-qround-passed.patch | 8 +- srcpkgs/qt6-base/patches/zfs-storage.patch | 6 +- srcpkgs/qt6-base/template | 87 ++++++++++++------- 10 files changed, 102 insertions(+), 77 deletions(-) delete mode 100644 srcpkgs/qt6-base/patches/complex-text.patch create mode 100644 srcpkgs/qt6-base/patches/musl-test-image.patch diff --git a/srcpkgs/qt6-base/patches/complex-text.patch b/srcpkgs/qt6-base/patches/complex-text.patch deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/srcpkgs/qt6-base/patches/feenableexcept.patch b/srcpkgs/qt6-base/patches/feenableexcept.patch index 1b561731b63..9b268bc95d3 100644 --- a/srcpkgs/qt6-base/patches/feenableexcept.patch +++ b/srcpkgs/qt6-base/patches/feenableexcept.patch @@ -1,6 +1,6 @@ ---- a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp -+++ b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp -@@ -1453,8 +1453,10 @@ void tst_QLocale::fpExceptions() +--- qt6-base-6.4.2.orig/tests/auto/corelib/text/qlocale/tst_qlocale.cpp ++++ qt6-base-6.4.2/tests/auto/corelib/text/qlocale/tst_qlocale.cpp +@@ -1502,8 +1502,10 @@ void tst_QLocale::fpExceptions() fenv_t envp; fegetenv(&envp); feclearexcept(FE_ALL_EXCEPT); diff --git a/srcpkgs/qt6-base/patches/markdown-musl.patch b/srcpkgs/qt6-base/patches/markdown-musl.patch index d29977b7d33..5c16b3fbb3e 100644 --- a/srcpkgs/qt6-base/patches/markdown-musl.patch +++ b/srcpkgs/qt6-base/patches/markdown-musl.patch @@ -1,10 +1,10 @@ ---- a/tests/auto/gui/text/qtextmarkdownimporter/tst_qtextmarkdownimporter.cpp -+++ b/tests/auto/gui/text/qtextmarkdownimporter/tst_qtextmarkdownimporter.cpp -@@ -229,9 +229,11 @@ void tst_QTextMarkdownImporter::lists_da +--- qt6-base-6.4.2.orig/tests/auto/gui/text/qtextmarkdownimporter/tst_qtextmarkdownimporter.cpp ++++ qt6-base-6.4.2/tests/auto/gui/text/qtextmarkdownimporter/tst_qtextmarkdownimporter.cpp +@@ -204,9 +204,11 @@ void tst_QTextMarkdownImporter::lists_da QTest::newRow("numeric lists nested in empty lists") << "- \n 1. a\n 2. b\n- c\n 1.\n + d\n" << 4 << false << "- \n 1. a\n 2. b\n- c 1. + d\n"; -+#if 0 ++#ifdef __GLIC__ QTest::newRow("styled spans in list items") << "1. normal text\n2. **bold** text\n3. `code` in the item\n4. *italic* text\n5. _underlined_ text\n" << 5 << false << "1. normal text\n2. **bold** text\n3. `code` in the item\n4. *italic* text\n5. _underlined_ text\n"; @@ -12,20 +12,3 @@ } void tst_QTextMarkdownImporter::lists() ---- a/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp -+++ b/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp -@@ -1776,11 +1776,14 @@ void tst_QGraphicsWidget::updateFocusCha - const QPoint center(view.viewport()->width() / 2, view.viewport()->height() / 2); - QTest::mouseMove(view.viewport(), center); - QTest::mouseClick(view.viewport(), Qt::LeftButton, {}, center); -+#if 0 -+ // Same sympton with QTBUG-23699 - #ifdef Q_OS_MAC - QEXPECT_FAIL("", "QTBUG-23699", Continue); - #endif - QTRY_COMPARE(qApp->activeWindow(), static_cast(&view)); - QTRY_COMPARE(scene.focusItem(), static_cast(w)); -+#endif - } - - void tst_QGraphicsWidget::sizeHint_data() diff --git a/srcpkgs/qt6-base/patches/musl-limits.patch b/srcpkgs/qt6-base/patches/musl-limits.patch index 5a75f4fe38a..da6d272d99d 100644 --- a/srcpkgs/qt6-base/patches/musl-limits.patch +++ b/srcpkgs/qt6-base/patches/musl-limits.patch @@ -1,6 +1,6 @@ ---- a/qmake/library/ioutils.cpp 2020-09-24 17:55:53.000000000 +0200 -+++ b/qmake/library/ioutils.cpp 2020-09-24 17:55:53.000000000 +0200 -@@ -40,6 +40,7 @@ +--- qt6-base-6.4.2.orig/qmake/library/ioutils.cpp ++++ qt6-base-6.4.2/qmake/library/ioutils.cpp +@@ -15,6 +15,7 @@ # include # include # include @@ -8,9 +8,9 @@ # include #endif ---- a/src/corelib/io/qstorageinfo_unix.cpp 2020-09-24 17:55:53.000000000 +0200 -+++ b/src/corelib/io/qstorageinfo_unix.cpp 2020-09-24 17:55:53.000000000 +0200 -@@ -58,6 +58,7 @@ +--- qt6-base-6.4.2.orig/src/corelib/io/qstorageinfo_unix.cpp ++++ qt6-base-6.4.2/src/corelib/io/qstorageinfo_unix.cpp +@@ -23,6 +23,7 @@ # include # include #elif defined(Q_OS_LINUX) || defined(Q_OS_HURD) diff --git a/srcpkgs/qt6-base/patches/musl-test-image.patch b/srcpkgs/qt6-base/patches/musl-test-image.patch new file mode 100644 index 00000000000..b966a22c12a --- /dev/null +++ b/srcpkgs/qt6-base/patches/musl-test-image.patch @@ -0,0 +1,19 @@ +--- qt6-base-6.4.2.orig/tests/auto/gui/image/qimage/tst_qimage.cpp ++++ qt6-base-6.4.2/tests/auto/gui/image/qimage/tst_qimage.cpp +@@ -1806,6 +1806,8 @@ void tst_QImage::smoothScale2() + QRgb expected = opaque ? qRgb(63, 127, 255) : qRgba(31, 63, 127, 127); + img.fill(expected); + ++#ifdef __GLIBC__ ++ // broken on musl, unknown reason + // scale x down, y down + QImage scaled = img.scaled(QSize(1, 1), Qt::IgnoreAspectRatio, Qt::SmoothTransformation); + QRgb pixel = scaled.pixel(0, 0); +@@ -1869,6 +1871,7 @@ void tst_QImage::smoothScale2() + QCOMPARE(qBlue(pixel), qBlue(expected)); + } + } ++#endif + } + + static inline int rand8() diff --git a/srcpkgs/qt6-base/patches/musl-usr-path-hack.patch b/srcpkgs/qt6-base/patches/musl-usr-path-hack.patch index a2ec7550e7b..92eae8431ae 100644 --- a/srcpkgs/qt6-base/patches/musl-usr-path-hack.patch +++ b/srcpkgs/qt6-base/patches/musl-usr-path-hack.patch @@ -6,11 +6,9 @@ This breaks qt6-webengine's search path for translations. Using realpath instead would probably be a more correct solution. --- -diff --git qtbasesrc/corelib/global/qlibraryinfo.cpp qtbasesrc/corelib/global/qlibraryinfo.cpp -index 8bcf67e73d..28d7355310 100644 ---- a/src/corelib/global/qlibraryinfo.cpp -+++ b/src/corelib/global/qlibraryinfo.cpp -@@ -558,6 +558,12 @@ static QString getRelocatablePrefix() +--- qt6-base-6.4.2.orig/src/corelib/global/qlibraryinfo.cpp ++++ qt6-base-6.4.2/src/corelib/global/qlibraryinfo.cpp +@@ -358,6 +358,12 @@ static QString getRelocatablePrefix(QLib int result = dladdr(reinterpret_cast(&QLibraryInfo::isDebugBuild), &info); if (result > 0 && info.dli_fname) prefixPath = prefixFromQtCoreLibraryHelper(QString::fromLocal8Bit(info.dli_fname)); @@ -21,5 +19,5 @@ index 8bcf67e73d..28d7355310 100644 + } +#endif #elif defined(Q_OS_WIN) + Q_UNUSED(usageMode); HMODULE hModule = getWindowsModuleHandle(); - const int kBufferSize = 4096; diff --git a/srcpkgs/qt6-base/patches/resource-root-dir-last-modified-is-valid.patch b/srcpkgs/qt6-base/patches/resource-root-dir-last-modified-is-valid.patch index f1436df42d8..282b583330c 100644 --- a/srcpkgs/qt6-base/patches/resource-root-dir-last-modified-is-valid.patch +++ b/srcpkgs/qt6-base/patches/resource-root-dir-last-modified-is-valid.patch @@ -1,6 +1,6 @@ ---- a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp -+++ b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp -@@ -607,7 +607,10 @@ void tst_QResourceEngine::lastModified() +--- qt6-base-6.4.2.orig/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp ++++ qt6-base-6.4.2/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp +@@ -592,7 +592,10 @@ void tst_QResourceEngine::lastModified() { QFileInfo fi(":/"); QVERIFY(fi.exists()); diff --git a/srcpkgs/qt6-base/patches/x86-qround-passed.patch b/srcpkgs/qt6-base/patches/x86-qround-passed.patch index 9ff90d103eb..f658ed833e4 100644 --- a/srcpkgs/qt6-base/patches/x86-qround-passed.patch +++ b/srcpkgs/qt6-base/patches/x86-qround-passed.patch @@ -1,6 +1,6 @@ ---- a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp -+++ b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp -@@ -624,18 +624,14 @@ void tst_QGlobal::qRoundFloats() { +--- qt6-base-6.4.2.orig/tests/auto/corelib/global/qglobal/tst_qglobal.cpp ++++ qt6-base-6.4.2/tests/auto/corelib/global/qglobal/tst_qglobal.cpp +@@ -599,18 +599,14 @@ void tst_QGlobal::qRoundFloats() { QFETCH(float, expected); #if !(defined(Q_PROCESSOR_ARM_64) && (__has_builtin(__builtin_round) || defined(Q_CC_GNU)) && !defined(Q_CC_CLANG)) @@ -23,7 +23,7 @@ } void tst_QGlobal::qRoundDoubles_data() { -@@ -653,18 +649,14 @@ void tst_QGlobal::qRoundDoubles() { +@@ -628,18 +624,14 @@ void tst_QGlobal::qRoundDoubles() { QFETCH(double, expected); #if !(defined(Q_PROCESSOR_ARM_64) && (__has_builtin(__builtin_round) || defined(Q_CC_GNU)) && !defined(Q_CC_CLANG)) diff --git a/srcpkgs/qt6-base/patches/zfs-storage.patch b/srcpkgs/qt6-base/patches/zfs-storage.patch index 3e772549451..0473836ba7d 100644 --- a/srcpkgs/qt6-base/patches/zfs-storage.patch +++ b/srcpkgs/qt6-base/patches/zfs-storage.patch @@ -1,6 +1,6 @@ ---- a/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp 2022-11-03 00:05:49.281737775 +0100 -+++ - 2022-11-03 00:07:52.538145369 +0100 -@@ -165,6 +165,8 @@ +--- qt6-base-6.4.2.orig/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp ++++ qt6-base-6.4.2/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp +@@ -165,6 +165,8 @@ void tst_QStorageInfo::tempFile() #ifdef Q_OS_LINUX if (storage1.fileSystemType() == "btrfs") QSKIP("This test doesn't work on btrfs, probably due to a btrfs bug"); diff --git a/srcpkgs/qt6-base/template b/srcpkgs/qt6-base/template index c2d6443ddda..204d2c68ae0 100644 --- a/srcpkgs/qt6-base/template +++ b/srcpkgs/qt6-base/template @@ -1,6 +1,6 @@ # Template file for 'qt6-base' pkgname=qt6-base -version=6.4.0 +version=6.4.2 revision=1 build_style=cmake configure_args="-DINSTALL_DATADIR=share/qt6 @@ -13,6 +13,8 @@ configure_args="-DINSTALL_DATADIR=share/qt6 -DINSTALL_SYSCONFDIR=/etc/xdg -DQT_FEATURE_openssl_linked=ON -DQT_FEATURE_system_sqlite=ON + -DQT_FEATURE_libproxy=ON + -DQT_FEATURE_qmake=ON -DBUILD_WITH_PCH=OFF" hostmakedepends="perl pkg-config xmlstarlet" makedepends="zlib-devel libzstd-devel dbus-devel @@ -30,13 +32,13 @@ maintainer="John " license="GPL-3.0-only WITH Qt-GPL-exception-1.0, LGPL-3.0-only, GPL-2.0-or-later" homepage="https://www.qt.io" distfiles="https://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtbase-everywhere-src-${version}.tar.xz" -checksum=cb6475a0bd8567c49f7ffbb072a05516ee6671171bed55db75b22b94ead9b37d +checksum=a88bc6cedbb34878a49a622baa79cace78cfbad4f95fdbd3656ddb21c705525d python_version=3 if [ "$CROSS_BUILD" ]; then - hostmakedepends+=" qt6-base-devel" + hostmakedepends+=" qt6-base" # QtSetup fails native builds if this is set - configure_args+="-DQT_FORCE_BUILD_TOOLS=true" + configure_args+=" -DQT_FORCE_BUILD_TOOLS=true" fi # It is currently expected that quite a few patches do fail @@ -47,47 +49,66 @@ fi do_check() { cd build export QT_QPA_PLATFORM=offscreen + export QMAKESPEC=$wrksrc/mkspecs/linux-g++ local failing_tests="tst_selftests tst_qmake tst_moc tst_rcc tst_qfile tst_qstandardpaths tst_qtemporarydir tst_qtemporaryfile tst_qdir tst_qpluginloader tst_qlibrary tst_qtextstream - tst_qdate tst_qdatetime tst_qtimezone - test_umbrella_config test_wrap_cpp_and_resources - test_dependent_modules test_needsquoting_dirname - test_add_resource_options test_wrap_cpp_options - test_platform_defs_include test_qtmainwin_library - test_dbus_module test_multiple_find_package - test_add_resources_delayed_file test_QTBUG-63422 - test_add_binary_resources_delayed_file - test_private_includes test_private_targets - test_testlib_definitions test_json_plugin_includes - test_testlib_no_link_gui test_testlib_no_link_widgets - module_includes test_concurrent_module test_opengl_lib + test_build_simple_widget_app_qmake test_interface test_interface_link_libraries - test_moc_macro_target test_add_big_resource - test_versionless_targets test_add_resources_binary_generated - test_plugin_flavor_static test_plugin_flavor_shared - test_plugin_flavor_derived_from_qt_type - tst_qaddpreroutine tst_qfont tst_qfontdatabase + tst_qfont tst_qfontdatabase tst_qfontmetrics tst_qglyphrun tst_qrawfont tst_qtextdocumentlayout tst_qopenglconfig - tst_qopengl tst_qdnslookup tst_qfiledialog + tst_qopengl tst_qfiledialog tst_qgraphicsview tst_qapplication tst_qfontcombobox tst_qlineedit tst_qmenubar tst_qopenglwidget tst_qx11info tst_qcomplextext - test_QFINDTESTDATA run_test_QFINDTESTDATA" + tst_qaddpreroutine tst_qtextcursor" # Unknown platform linux-g++ :/ failing_tests+=" mockplugins test_import_plugins - test_static_resources test_generating_cpp_exports" + test_static_resources test_generating_cpp_exports" failing_tests+=" tst_qstorageinfo" - # broken with -O, passed with -O0, probably broken floating point code. - failing_tests+=" tst_qvectornd" + if [ "$XBPS_TARGET_LIBC" = musl ]; then + # Some glibc specific DNS Lookup + failing_tests+=" tst_qdnslookup" + fi + if [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then + # failing on i686, not checked on arm + failing_tests+=" tst_qvectorrnd" + fi local ctest_exclude="(" for failure in $failing_tests; do ctest_exclude+="$failure|" done ctest_exclude="${ctest_exclude%|})" + if [ ! -e "$wrksrc/build/include/qt6" ]; then + ln -s .. "$wrksrc/build/include/qt6" + fi ctest -E "$ctest_exclude" + rm "$wrksrc/build/include/qt6" +} + +post_install() { + rm -rf ${DESTDIR}/usr/tests + cat <<-EOF >${DESTDIR}/usr/lib/qt6/bin/target_qt.conf + [Paths] + Prefix=../../../ + HostPrefix=/usr + Binaries=lib/qt6/bin + HostBinaries=lib/qt6/bin + Libraries=lib + HostLibraries=lib + LibraryExecutables=lib/qt6/libexec + HostLibraryExecutables=lib/qt6/libexec + ArchData=lib/qt6 + HostArchData=lib/qt6 + Data=share/qt6 + HostData=share/qt6 + Sysroot= + SysrootifyPrefix=false + TargetSpec=linux-g++ + HostSpec=linux-g++ + EOF } qt6-gui_package() { @@ -231,11 +252,9 @@ qt6-plugin-tls-qcertonly_package() { } qt6-plugin-networkinformation_package() { - short_desc+=" - Networkinformation plugin" + short_desc+=" - NetworkInformation plugin" pkg_install() { - vmove usr/lib/qt6/plugins/networkinformation/libqnetworkmanager.so - vmove usr/lib/qt6/plugins/networkinformation/libqglib.so - + vmove usr/lib/qt6/plugins/networkinformation } } @@ -261,8 +280,8 @@ qt6-base-devel_package() { qt6-plugin-networkinformation>=${version}_${revision} ${makedepends}" pkg_install() { + local _f vmove usr/include - vmove usr/lib/cmake vmove usr/lib/metatypes vmove usr/lib/pkgconfig vmove usr/lib/qt6/mkspecs @@ -270,5 +289,11 @@ qt6-base-devel_package() { vmove "usr/lib/*.so" vmove "usr/lib/*.prl" vmove usr/share/qt6/modules + for _f in ${DESTDIR}/usr/lib/cmake/*; do + case "$_f" in + *Tools|*HostInfo) ;; + *) vmove "usr/lib/cmake/${_f##*/}" ;; + esac + done } }