From d09e1237317ef79d7a629cb72d141c9cb9396a20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Mon, 13 May 2024 08:41:51 +0700 Subject: [PATCH] neochat: update to 24.02.2. --- .../patches/delegatesizehelpertest_fix.patch | 38 ------------------- .../patches/empty_image.source_crash.patch | 25 ------------ srcpkgs/neochat/template | 38 ++++++++++++------- 3 files changed, 24 insertions(+), 77 deletions(-) delete mode 100644 srcpkgs/neochat/patches/delegatesizehelpertest_fix.patch delete mode 100644 srcpkgs/neochat/patches/empty_image.source_crash.patch diff --git a/srcpkgs/neochat/patches/delegatesizehelpertest_fix.patch b/srcpkgs/neochat/patches/delegatesizehelpertest_fix.patch deleted file mode 100644 index 947e3541860..00000000000 --- a/srcpkgs/neochat/patches/delegatesizehelpertest_fix.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 6305359b3c515e030c2bfd35b6ee62ad36ebe497 Mon Sep 17 00:00:00 2001 -From: Tobias Fella -Date: Sun, 27 Aug 2023 01:46:50 +0200 -Subject: [PATCH] Use round instead of ceil in delegatesizehelper - -Fixes #592 ---- - src/delegatesizehelper.cpp | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/delegatesizehelper.cpp b/src/delegatesizehelper.cpp -index 7c4d6dec0..aae61fa06 100644 ---- a/src/delegatesizehelper.cpp -+++ b/src/delegatesizehelper.cpp -@@ -124,7 +124,7 @@ int DelegateSizeHelper::calculateCurrentPercentageWidth() const - int maxPercentWidth = endPercentBigger ? m_endPercentWidth : m_startPercentWidth; - int minPercentWidth = endPercentBigger ? m_startPercentWidth : m_endPercentWidth; - -- int calcPercentWidth = std::ceil(m * m_parentWidth + c); -+ int calcPercentWidth = std::round(m * m_parentWidth + c); - return std::clamp(calcPercentWidth, minPercentWidth, maxPercentWidth); - } - -@@ -146,9 +146,9 @@ qreal DelegateSizeHelper::currentWidth() const - - qreal absoluteWidth = m_parentWidth * percentWidth * 0.01; - if (m_maxWidth < 0.0) { -- return std::ceil(absoluteWidth); -+ return std::round(absoluteWidth); - } else { -- return std::ceil(std::min(absoluteWidth, m_maxWidth)); -+ return std::round(std::min(absoluteWidth, m_maxWidth)); - } - } - --- -GitLab - diff --git a/srcpkgs/neochat/patches/empty_image.source_crash.patch b/srcpkgs/neochat/patches/empty_image.source_crash.patch deleted file mode 100644 index efc03cf5a72..00000000000 --- a/srcpkgs/neochat/patches/empty_image.source_crash.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 0d5929b4bc3ca8c55a9e27121782efb19e4d829e Mon Sep 17 00:00:00 2001 -From: Laurent Montel -Date: Mon, 4 Sep 2023 19:03:06 +0000 -Subject: [PATCH] Fix enable/disable save button when image.source is empty. - Otherwise it will crash - ---- - src/qml/Settings/EmoticonEditorPage.qml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/qml/Settings/EmoticonEditorPage.qml b/src/qml/Settings/EmoticonEditorPage.qml -index c55e9178e..1f003d24e 100644 ---- a/src/qml/Settings/EmoticonEditorPage.qml -+++ b/src/qml/Settings/EmoticonEditorPage.qml -@@ -119,8 +119,8 @@ - MobileForm.FormButtonDelegate { - id: save - text: i18n("Save") -- icon.name: "document-save" -- enabled: !root.newEmoticon || (image.source && shortcode.text && description.text) -+ icon.name: "document-save" -+ enabled: !root.newEmoticon || (image.source.toString().length > 0 && shortcode.text && description.text) - onClicked: { - if (root.newEmoticon) { - model.addEmoticon(image.source, shortcode.text, description.text, emoticonType === EmoticonFormCard.Stickers ? "sticker" : "emoticon") diff --git a/srcpkgs/neochat/template b/srcpkgs/neochat/template index 32f54054872..6977b880ea2 100644 --- a/srcpkgs/neochat/template +++ b/srcpkgs/neochat/template @@ -1,27 +1,37 @@ # Template file for 'neochat' pkgname=neochat -version=23.08.5 +version=24.02.2 revision=1 build_style=cmake -hostmakedepends="extra-cmake-modules gettext pkg-config qt5-qmake - qt5-host-tools kcoreaddons kconfig AppStream" -makedepends="kquickimageeditor-devel libQuotient-devel qtkeychain-qt5-devel - qt5-multimedia-devel kirigami2-devel ki18n-devel cmark-devel - knotifications-devel kconfig-devel kcoreaddons-devel qqc2-desktop-style-devel - sonnet-devel kitemmodels-devel kirigami-addons kconfigwidgets-devel kio-devel - qcoro-qt5-devel olm-devel qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql - qt5-plugin-sqlite qt5-plugin-tds" -depends="kquickimageeditor kitemmodels kirigami2 kirigami-addons kquickcharts - qt5-location" +configure_args="-DBUILD_TESTING=OFF -DKF6_HOST_TOOLING=/usr/lib/cmake + -DKDE_INSTALL_QTPLUGINDIR=lib/qt6/plugins" +hostmakedepends="extra-cmake-modules gettext pkg-config qt6-base qt6-tools + kf6-kcoreaddons kf6-kconfig python3 kf6-kdoctools qt6-declarative-host-tools" +makedepends="kquickimageeditor-devel libQuotient-devel qtkeychain-qt6-devel + qt6-multimedia-devel kf6-kirigami-devel kf6-ki18n-devel cmark-devel + kf6-knotifications-devel kf6-kconfig-devel kf6-kcoreaddons-devel + kf6-kstatusnotifieritem-devel kf6-qqc2-desktop-style-devel + kf6-sonnet-devel kf6-kitemmodels-devel kirigami-addons + kf6-kconfigwidgets-devel kf6-kio-devel kirigami-addons-devel + qcoro-qt6-devel olm-devel qt6-plugin-sqlite kquickimageeditor + $(vopt_if webview qt6-webview-devel)" +depends="kquickimageeditor kf6-kitemmodels kf6-kirigami kirigami-addons + kf6-syntax-highlighting + kf6-kquickcharts qt6-location" short_desc="Client for matrix from KDE" maintainer="Orphaned " license="GPL-3.0-only, GPL-3.0-or-later, GPL-2.0-or-later, BSD-2-Clause" homepage="https://apps.kde.org/en/neochat" distfiles="${KDE_SITE}/release-service/${version}/src/neochat-${version}.tar.xz" -checksum=d300c6d8eb1dcc96b853c61a43e058ae923b939e3991755ddce1d9f210904632 +checksum=b6dce8f96be12bab0d762694f50c49cea18d6155e1e46549f0bf97046f04741e -if [ "$CROSS_BUILD" ]; then - hostmakedepends+=" kdoctools" +build_options="webview" +desc_option_webview="Use Qt6 WebView" + +if [ "$XBPS_TARGET_ENDIAN" = "le" ] && + [ "64" = "$XBPS_WORDSIZE" ] && + [ "$XBPS_TARGET_WORDSIZE" = "$XBPS_WORDSIZE" ]; then + build_options_default="webview" fi post_install() {