From 4355d354aaab50a469fe8298c48de6842c30db02 Mon Sep 17 00:00:00 2001 From: uglyside Date: Sat, 19 Apr 2025 21:43:44 +0300 Subject: [PATCH] clamav-gui-1.1.3(Qt6). --- util/antivirus/clamav-gui/actions.py | 18 +-- util/antivirus/clamav-gui/files/qregexp.patch | 125 ++++++++++++++++++ util/antivirus/clamav-gui/files/qt5.patch | 22 --- util/antivirus/clamav-gui/pspec.xml | 37 +++--- 4 files changed, 153 insertions(+), 49 deletions(-) create mode 100644 util/antivirus/clamav-gui/files/qregexp.patch delete mode 100644 util/antivirus/clamav-gui/files/qt5.patch diff --git a/util/antivirus/clamav-gui/actions.py b/util/antivirus/clamav-gui/actions.py index dab563f87b..fa8c499952 100644 --- a/util/antivirus/clamav-gui/actions.py +++ b/util/antivirus/clamav-gui/actions.py @@ -2,22 +2,18 @@ # -*- coding: utf-8 -*- # # Licensed under the GNU General Public License, version 3. -# See the file http://www.gnu.org/licenses/gpl.txt +# See the file https://www.gnu.org/licenses/gpl-3.0.txt -from pisi.actionsapi import shelltools -from pisi.actionsapi import qt5 -from pisi.actionsapi import pisitools -from pisi.actionsapi import autotools -from pisi.actionsapi import get - - -#WorkDir = "ClamAV-GUI/" +from pisi.actionsapi import shelltools, autotools, pisitools, get def setup(): - shelltools.system("qmake -r PREFIX=/usr clamav-gui.pro") - + shelltools.system("sed -i '/^documents.*doc/s/ClamAV-GUI/clamav-gui/' clamav-gui.pro") + shelltools.system("qmake-qt6 PREFIX=/usr clamav-gui.pro") + def build(): autotools.make() def install(): autotools.rawInstall("INSTALL_ROOT=%s" % get.installDIR()) + + pisitools.dodoc("LICENSE") diff --git a/util/antivirus/clamav-gui/files/qregexp.patch b/util/antivirus/clamav-gui/files/qregexp.patch new file mode 100644 index 0000000000..4e04cde7df --- /dev/null +++ b/util/antivirus/clamav-gui/files/qregexp.patch @@ -0,0 +1,125 @@ +diff --git a/src/highlighter.cpp b/src/highlighter.cpp +index 7b8bf23..bdc4732 100644 +--- a/src/highlighter.cpp ++++ b/src/highlighter.cpp +@@ -29,7 +29,7 @@ highlighter::highlighter(QTextDocument * parent) : QSyntaxHighlighter(parent) + + singleLineCommentFormat.setForeground(Qt::blue); + singleLineCommentFormat.setBackground(Qt::white); +- rule.pattern = QRegExp("^Downloading.*|^ClamInotif:|.-> .*|^/.*|^Database updated.*|^ClamAV update process started.*|^---.*|.Testing database:*|.Database Test passed."); ++ rule.pattern = QRegularExpression("^Downloading.*|^ClamInotif:|.-> .*|^/.*|^Database updated.*|^ClamAV update process started.*|^---.*|.Testing database:*|.Database Test passed."); + singleLineCommentFormat.setFontWeight(QFont::Normal); + rule.format = singleLineCommentFormat; + highlightingRules.append(rule); +@@ -37,52 +37,55 @@ highlighter::highlighter(QTextDocument * parent) : QSyntaxHighlighter(parent) + singleLineCommentFormat.setForeground(QColor(0x4f,0x7e,0x8a,0xff)); + singleLineCommentFormat.setBackground(Qt::white); + singleLineCommentFormat.setFontWeight(QFont::Bold); +- rule.pattern = QRegExp("^Known viruses:.|^Engine version:.|^Data scanned:.|^Data read:.|^Time:.|^Start Date:.|^End Date:."); ++ rule.pattern = QRegularExpression("^Known viruses:.|^Engine version:.|^Data scanned:.|^Data read:.|^Time:.|^Start Date:.|^End Date:."); + rule.format = singleLineCommentFormat; + highlightingRules.append(rule); + + singleLineCommentFormat.setForeground(Qt::darkGreen); + singleLineCommentFormat.setBackground(Qt::white); + singleLineCommentFormat.setFontWeight(QFont::Normal); +- rule.pattern = QRegExp("LOCAL:|OLE2:|Phishing:|Heuristic:|Structured:|Local:|Limits:|.enabled|.disabled|.watching .*|^daily.cvd.*|^daily.cld.*|^bytecode.cvd.*|^main.cvd.*|^freshclam deamon.*|. OK|^Scanned directories:.|^Scanned files:.|^Infected files: 0"); ++ rule.pattern = QRegularExpression("LOCAL:|OLE2:|Phishing:|Heuristic:|Structured:|Local:|Limits:|.enabled|.disabled|.watching .*|^daily.cvd.*|^daily.cld.*|^bytecode.cvd.*|^main.cvd.*|^freshclam deamon.*|. OK|^Scanned directories:.|^Scanned files:.|^Infected files: 0"); + rule.format = singleLineCommentFormat; + highlightingRules.append(rule); + + singleLineCommentFormat.setForeground(Qt::darkYellow); + singleLineCommentFormat.setBackground(Qt::white); + singleLineCommentFormat.setFontWeight(QFont::Normal); +- rule.pattern = QRegExp(".Pid file removed.|. Started at.*|. Stopped at.*|.Socket file removed."); ++ rule.pattern = QRegularExpression(".Pid file removed.|. Started at.*|. Stopped at.*|.Socket file removed."); + rule.format = singleLineCommentFormat; + highlightingRules.append(rule); + + singleLineCommentFormat.setForeground(Qt::red); + singleLineCommentFormat.setBackground(Qt::white); + singleLineCommentFormat.setFontWeight(QFont::Normal); +- rule.pattern = QRegExp("^ERROR: ClamCom:|.Empty file|^WARN.*|.FOUND *|.ERROR:.*|.WARNING:.*|^Can't connect to port.*|.Access denied|^Infected files:.|^Total errors:.*"); ++ rule.pattern = QRegularExpression("^ERROR: ClamCom:|.Empty file|^WARN.*|.FOUND *|.ERROR:.*|.WARNING:.*|^Can't connect to port.*|.Access denied|^Infected files:.|^Total errors:.*"); + rule.format = singleLineCommentFormat; + highlightingRules.append(rule); + + multiLineCommentFormat.setForeground(Qt::red); + singleLineCommentFormat.setBackground(Qt::white); + singleLineCommentFormat.setFontWeight(QFont::Normal); +- commentStartExpression = QRegExp("START"); +- commentEndExpression = QRegExp("ENDE"); ++ commentStartExpression = QRegularExpression("START"); ++ commentEndExpression = QRegularExpression("ENDE"); + + } + + void highlighter::highlightBlock(const QString &text) + { + foreach (const HighlightingRule &rule, highlightingRules) { +- QRegExp expression(rule.pattern); +- int index = expression.indexIn(text); +- while (index >= 0) { +- int length = expression.matchedLength(); ++ QRegularExpression expression(rule.pattern); ++ QRegularExpressionMatchIterator iterator = expression.globalMatch(text); ++ ++ while (iterator.hasNext()) { ++ QRegularExpressionMatch match = iterator.next(); ++ int length = match.capturedLength(); ++ int index = match.capturedStart(); + setFormat(index, length, rule.format); +- index = expression.indexIn(text, index + length); + } + } +- +- setCurrentBlockState(0); ++ ++// Es scheint, als wäre der restliche Block obsolet .... ++/* setCurrentBlockState(0); + + int startIndex = 0; + if (previousBlockState() != 1) startIndex = commentStartExpression.indexIn(text); +@@ -94,10 +97,9 @@ void highlighter::highlightBlock(const QString &text) + setCurrentBlockState(1); + commentLength = text.length() - startIndex; + } else { +- commentLength = endIndex - startIndex +- + commentEndExpression.matchedLength(); ++ commentLength = endIndex - startIndex + commentEndExpression.matchedLength(); + } + startIndex = commentStartExpression.indexIn(text, startIndex + commentLength); +- } ++ }*/ + } + // +diff --git a/src/highlighter.h b/src/highlighter.h +index 93782c9..b7aa26f 100644 +--- a/src/highlighter.h ++++ b/src/highlighter.h +@@ -22,6 +22,7 @@ + #define HIGHLIGHTER_H + // + #include ++#include + // + class highlighter : public QSyntaxHighlighter + { +@@ -34,14 +35,13 @@ public: + private: + struct HighlightingRule + { +- QRegExp pattern; ++ QRegularExpression pattern; + QTextCharFormat format; + }; +- + QVector highlightingRules; + +- QRegExp commentStartExpression; +- QRegExp commentEndExpression; ++ QRegularExpression commentStartExpression; ++ QRegularExpression commentEndExpression; + + QTextCharFormat keywordFormat; + QTextCharFormat classFormat; diff --git a/util/antivirus/clamav-gui/files/qt5.patch b/util/antivirus/clamav-gui/files/qt5.patch deleted file mode 100644 index d2464d2ef4..0000000000 --- a/util/antivirus/clamav-gui/files/qt5.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -Nuar a/src/qroundprogressbar.cpp b/src/qroundprogressbar.cpp ---- a/src/qroundprogressbar.cpp 2018-03-10 14:17:40.000000000 +0300 -+++ b/src/qroundprogressbar.cpp 2021-02-01 11:19:45.693950956 +0300 -@@ -20,6 +20,7 @@ - #include "qroundprogressbar.h" - - #include -+#include - - - QRoundProgressBar::QRoundProgressBar(QWidget *parent) : -diff -Nuar a/src/qroundprogressbar.h b/src/qroundprogressbar.h ---- a/src/qroundprogressbar.h 2018-03-10 14:17:40.000000000 +0300 -+++ b/src/qroundprogressbar.h 2021-02-01 11:18:48.379955092 +0300 -@@ -20,6 +20,7 @@ - #define QROUNDPROGRESSBAR_H - - #include -+#include - - /** - * @brief The QRoundProgressBar class represents a circular progress bar and maintains its API diff --git a/util/antivirus/clamav-gui/pspec.xml b/util/antivirus/clamav-gui/pspec.xml index d45b8013b3..76627201f6 100644 --- a/util/antivirus/clamav-gui/pspec.xml +++ b/util/antivirus/clamav-gui/pspec.xml @@ -1,24 +1,26 @@ - + clamav-gui + https://github.com/wusel1007/clamav-gui - Ali Cengiz Kurt - alicengizkurt@gmail.com + Kamil Atlı + suvari@pisilinux.org - GPLv3+ app:gui - ClamAV-Gui. - ClamAV-Gui is a graphical interface for ClamAV antivirus software - GPL3 - https://sourceforge.net/projects/pisilinux/files/source/ClamAV-GUI-0.4.2.tgz/download + GPLv3 + util.anivirus + Front-End for ClamAV. + ClamAV-Gui is a graphical interface for ClamAV antivirus software. + https://github.com/wusel1007/clamav-gui/archive/v1.1.3/clamav-gui-1.1.3.tar.gz clamav-devel - qt5-base-devel + qt6-base-devel - qt5.patch + + qregexp.patch @@ -27,20 +29,23 @@ clamav-gui clamav - qt5-base libgcc + qt6-base /usr/bin - /usr/share/icons - /usr/share/applications - /usr/share/doc - /usr/share/man - /usr/share/clamav-gui + /usr/share + + 2025-04-19 + 1.1.3 + Version bump. + Kamil Atlı + suvari@pisilinux.org + 2021-01-31 0.4.2