From 04d946b84894596b44117bcc182fa116d6192f26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sun, 23 Jun 2024 10:44:30 +0700 Subject: [PATCH] qt6-tools: update to 6.7.2. --- srcpkgs/qt6-tools-private-devel | 1 + srcpkgs/qt6-tools/patches/gumbo.patch | 15 ---- .../qt6-tools/patches/no-litehtml-test.patch | 11 --- srcpkgs/qt6-tools/patches/qdoc-location.patch | 89 ++++++++++++++++--- srcpkgs/qt6-tools/template | 35 ++++++-- 5 files changed, 109 insertions(+), 42 deletions(-) create mode 120000 srcpkgs/qt6-tools-private-devel delete mode 100644 srcpkgs/qt6-tools/patches/gumbo.patch delete mode 100644 srcpkgs/qt6-tools/patches/no-litehtml-test.patch diff --git a/srcpkgs/qt6-tools-private-devel b/srcpkgs/qt6-tools-private-devel new file mode 120000 index 00000000000..d2de59aba45 --- /dev/null +++ b/srcpkgs/qt6-tools-private-devel @@ -0,0 +1 @@ +qt6-tools \ No newline at end of file diff --git a/srcpkgs/qt6-tools/patches/gumbo.patch b/srcpkgs/qt6-tools/patches/gumbo.patch deleted file mode 100644 index 42c8e40203c..00000000000 --- a/srcpkgs/qt6-tools/patches/gumbo.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- qttools-everywhere-src-6.4.0/src/assistant/qlitehtml/src/CMakeLists.txt 2022-09-23 13:50:40.000000000 +0200 -+++ - 2022-11-03 01:17:21.262108484 +0100 -@@ -30,12 +30,6 @@ - PROPERTIES - QT_COMPILE_OPTIONS_DISABLE_WARNINGS ON - ) -- set_target_properties( -- gumbo -- PROPERTIES -- QT_COMPILE_OPTIONS_DISABLE_WARNINGS ON -- ) -- - set(CMAKE_POSITION_INDEPENDENT_CODE "${ORIG_FPIC}") - set(BUILD_SHARED_LIBS ${ORIG_BUILD_SHARED_LIBS}) - # force optimized litehtml even in debug diff --git a/srcpkgs/qt6-tools/patches/no-litehtml-test.patch b/srcpkgs/qt6-tools/patches/no-litehtml-test.patch deleted file mode 100644 index 2cbfac5de82..00000000000 --- a/srcpkgs/qt6-tools/patches/no-litehtml-test.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- qt6-tools-6.4.2.orig/src/assistant/qlitehtml/src/3rdparty/litehtml/CMakeLists.txt -+++ qt6-tools-6.4.2/src/assistant/qlitehtml/src/3rdparty/litehtml/CMakeLists.txt -@@ -191,7 +191,7 @@ set_source_files_properties(${CMAKE_CURR - - # Tests - --if (BUILD_TESTING) -+if (FALSE) - include(FetchContent) - FetchContent_Declare( - googletest diff --git a/srcpkgs/qt6-tools/patches/qdoc-location.patch b/srcpkgs/qt6-tools/patches/qdoc-location.patch index 6d7c0ea3453..8e4df56a00b 100644 --- a/srcpkgs/qt6-tools/patches/qdoc-location.patch +++ b/srcpkgs/qt6-tools/patches/qdoc-location.patch @@ -1,14 +1,83 @@ ---- qt6-tools-6.4.2.orig/tests/auto/qdoc/generatedoutput/tst_generatedoutput.cpp -+++ qt6-tools-6.4.2/tests/auto/qdoc/generatedoutput/tst_generatedoutput.cpp -@@ -74,7 +74,10 @@ private: - void tst_generatedOutput::initTestCase() +--- a/tests/auto/linguist/lconvert/tst_lconvert.cpp ++++ b/tests/auto/linguist/lconvert/tst_lconvert.cpp +@@ -4,6 +4,16 @@ + #include + #include + ++namespace { ++QString xbinpath() ++{ ++ char *build_binpath = getenv("QT_BUILD_BIN_PATH"); ++ if (build_binpath && *build_binpath) ++ return build_binpath; ++ return QLibraryInfo::path(QLibraryInfo::BinariesPath); ++} ++} ++ + class tst_lconvert : public QObject { - // Build the path to the QDoc binary the same way moc tests do for moc. -- const auto binpath = QLibraryInfo::path(QLibraryInfo::BinariesPath); + Q_OBJECT +@@ -11,7 +21,7 @@ class tst_lconvert : public QObject + public: + tst_lconvert() + : dataDir(QFINDTESTDATA("data/")) +- , lconvert(QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/lconvert") {} ++ , lconvert(xbinpath() + QStringLiteral("/lconvert")) {} + + private slots: + void initTestCase(); +--- a/tests/auto/linguist/lrelease/tst_lrelease.cpp ++++ b/tests/auto/linguist/lrelease/tst_lrelease.cpp +@@ -8,13 +8,22 @@ + + #include + ++namespace { ++QString xbinpath() ++{ ++ char *build_binpath = getenv("QT_BUILD_BIN_PATH"); ++ if (build_binpath && *build_binpath) ++ return build_binpath; ++ return QLibraryInfo::path(QLibraryInfo::BinariesPath); ++} ++} + class tst_lrelease : public QObject + { + Q_OBJECT + + public: + tst_lrelease() +- : lrelease(QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/lrelease") ++ : lrelease(xbinpath() + QStringLiteral("/lrelease")) + , dataDir(QFINDTESTDATA("testdata/")) + {} + +--- a/tests/auto/linguist/lupdate/tst_lupdate.cpp ++++ b/tests/auto/linguist/lupdate/tst_lupdate.cpp +@@ -44,7 +44,10 @@ private: + + tst_lupdate::tst_lupdate() + { +- QString binPath = QLibraryInfo::path(QLibraryInfo::BinariesPath); ++ auto binPath = QLibraryInfo::path(QLibraryInfo::BinariesPath); ++ char *build_binpath = getenv("QT_BUILD_BIN_PATH"); ++ if (build_binpath && *build_binpath) ++ binPath = build_binpath; + m_cmdLupdate = binPath + QLatin1String("/lupdate"); + m_basePath = QFINDTESTDATA("testdata/"); + } +--- a/tests/auto/qtdiag/tst_qtdiag.cpp ++++ b/tests/auto/qtdiag/tst_qtdiag.cpp +@@ -21,7 +21,11 @@ private: + + void tst_QtDiag::initTestCase() + { +- QString binary = QLibraryInfo::path(QLibraryInfo::BinariesPath) + QStringLiteral("/qtdiag"); + auto binpath = QLibraryInfo::path(QLibraryInfo::BinariesPath); + char *build_binpath = getenv("QT_BUILD_BIN_PATH"); + if (build_binpath && *build_binpath) -+ binpath = build_binpath; - const auto extension = QSysInfo::productType() == "windows" ? ".exe" : ""; - m_qdoc = binpath + QLatin1String("/qdoc") + extension; - m_expectedDir.setPath(QFINDTESTDATA("expected_output")); ++ binpath = build_binpath; ++ QString binary = binpath + QStringLiteral("/qtdiag"); + # ifdef Q_OS_WIN + binary += QStringLiteral(".exe"); + # endif diff --git a/srcpkgs/qt6-tools/template b/srcpkgs/qt6-tools/template index 986db5dffd2..5fde45439cd 100644 --- a/srcpkgs/qt6-tools/template +++ b/srcpkgs/qt6-tools/template @@ -1,33 +1,42 @@ # Template file for 'qt6-tools' pkgname=qt6-tools -version=6.6.0 -revision=2 +version=6.7.2 +revision=1 build_style=cmake configure_args="-DEXTERNAL_GUMBO=ON -DLITEHTML_UTF8=ON -DUSE_ICU=ON -DQT_BUILD_SHARED_LIBS=ON -DQT_FEATURE_assistant=ON - -DQT_FEATURE_pixeltool=ON + -DQT_FEATURE_pixeltool=ON -DLITEHTML_BUILD_TESTING=OFF -DQT_FEATURE_distancefieldgenerator=ON" hostmakedepends="qt6-base perl qt6-plugin-sqlite clang17 clang-tools-extra17 qt6-declarative-host-tools" -makedepends="qt6-base-devel qt6-plugin-sqlite qt6-declarative-devel +makedepends="qt6-base-private-devel qt6-plugin-sqlite qt6-declarative-private-devel gumbo-parser-devel icu-devel llvm17-devel" short_desc="Cross-platform application and UI framework (QT6) - qt6-tools component" maintainer="John " license="custom:GPL-3.0-only-with-Qt-GPL-exception-1.0, LGPL-3.0-only, GPL-2.0-or-later" homepage="https://qt.io/" distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qttools-everywhere-src-${version}.tar.xz" -checksum=4e9feebc142bbb6e453e1dc3277e09ec45c8ef081b5ee2a029e6684b5905ba99 +checksum=58e855ad1b2533094726c8a425766b63a04a0eede2ed85086860e54593aa4b2a if [ "$CROSS_BUILD" ]; then configure_args+=" -DQT_FORCE_BUILD_TOOLS=TRUE" hostmakedepends+=" qt6-tools" fi - +case "$XBPS_TARGET_MACHINE" in + x86_64*|aarch64*) + makedepends+=" libomp-devel" ;; +esac if [ "$XBPS_CHECK_PKGS" ]; then configure_args+=" -DQT_BUILD_TESTS=ON" fi +subpackages="qt6-designer qt6-help qt6-ui-tools qt6-tools-private-devel qt6-tools-devel" + +post_patch() { + vsed -i -e 's/gumbo/litehtml/' src/assistant/qlitehtml/src/CMakeLists.txt +} + post_install() { vlicense LICENSES/Qt-GPL-exception-1.0.txt } @@ -65,6 +74,20 @@ qt6-ui-tools_package() { } } +qt6-tools-private-devel_package() { + depends="qt6-tools-devel>=${version}_${revision}" + short_desc+=" - private development files" + pkg_install() { + for dir in $(cd ${DESTDIR} && find usr/include -type d -name private); do + vmove "$dir" + done + vmove "usr/lib/cmake/*Private" + vmove "usr/lib/qt6/metatypes/*private_*_metatypes.json" + vmove "usr/lib/qt6/mkspecs/modules/*_private.pri" + vmove "usr/lib/qt6/modules/*Private.json" + } +} + qt6-tools-devel_package() { depends="${sourcepkg}>=${version}_${revision} qt6-base-devel>=${version}_1" short_desc+=" - development files"