summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Matteo Bernardini2019-08-15 07:44:53 +0200
committer Matteo Bernardini2021-02-27 11:03:14 +0100
commit6f26843a2f68341cddefd9bce87f373691eeaebe (patch)
tree6d7b3cfdfed3347aee3a426aa0ea227906083bc3
parent9aa1498acb0841d4ce656319a4de5cc157b4e2ed (diff)
downloadslackbuilds-rss-guard.tar.gz
desktop/rss-guard: Updated for version 3.5.9.rss-guard
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r--desktop/rss-guard/01_min_qt_required_is_5.9.patch56
-rw-r--r--desktop/rss-guard/02_fix_random_class_name.patch24
-rw-r--r--desktop/rss-guard/rss-guard.SlackBuild11
-rw-r--r--desktop/rss-guard/rss-guard.info6
4 files changed, 90 insertions, 7 deletions
diff --git a/desktop/rss-guard/01_min_qt_required_is_5.9.patch b/desktop/rss-guard/01_min_qt_required_is_5.9.patch
new file mode 100644
index 0000000000..e54b533774
--- /dev/null
+++ b/desktop/rss-guard/01_min_qt_required_is_5.9.patch
@@ -0,0 +1,56 @@
+diff --git a/rssguard.pro b/rssguard.pro
+index 21a897c7..f8eb8d28 100755
+--- a/rssguard.pro
++++ b/rssguard.pro
+@@ -41,8 +41,8 @@ TARGET = rssguard
+
+ message(rssguard: Welcome RSS Guard qmake script.)
+
+-lessThan(QT_MAJOR_VERSION, 5)|lessThan(QT_MINOR_VERSION, 7) {
+- warning(rssguard: At least Qt \"5.7.0\" is required!!!)
++lessThan(QT_MAJOR_VERSION, 5)|lessThan(QT_MINOR_VERSION, 9) {
++ warning(rssguard: At least Qt \"5.9.0\" is required!!!)
+ }
+
+ APP_NAME = "RSS Guard"
+diff --git a/src/miscellaneous/textfactory.cpp b/src/miscellaneous/textfactory.cpp
+index 53451d63..f371d02d 100755
+--- a/src/miscellaneous/textfactory.cpp
++++ b/src/miscellaneous/textfactory.cpp
+@@ -10,10 +10,11 @@
+
+ #include <QDir>
+ #include <QLocale>
+-#include <QRandomGenerator>
+ #include <QString>
+ #include <QStringList>
+
++#include <random>
++
+ quint64 TextFactory::s_encryptionKey = 0x0;
+
+ TextFactory::TextFactory() = default;
+@@ -128,7 +129,10 @@ quint64 TextFactory::initializeSecretEncryptionKey() {
+ QString encryption_file_path = qApp->settings()->pathName() + QDir::separator() + ENCRYPTION_FILE_NAME;
+
+ try {
+- s_encryptionKey = quint64(QString(IOFactory::readFile(encryption_file_path)).toLongLong());
++ s_encryptionKey = quint64(QString(IOFactory::readFile(encryption_file_path)).toULongLong());
++
++ auto aa = s_encryptionKey;
++ auto bb = false;
+ }
+ catch (ApplicationException&) {
+ // Well, key does not exist or is invalid, generate and save one.
+@@ -148,5 +152,10 @@ quint64 TextFactory::initializeSecretEncryptionKey() {
+ }
+
+ quint64 TextFactory::generateSecretEncryptionKey() {
+- return QRandomGenerator().generate64();
++ std::random_device rd;
++ std::mt19937 mt(rd());
++ std::uniform_int<quint64> dist(std::numeric_limits<quint64>().min() + 1000000UL,
++ std::numeric_limits<quint64>().max());
++
++ return dist(mt);
+ }
diff --git a/desktop/rss-guard/02_fix_random_class_name.patch b/desktop/rss-guard/02_fix_random_class_name.patch
new file mode 100644
index 0000000000..06c49f7aba
--- /dev/null
+++ b/desktop/rss-guard/02_fix_random_class_name.patch
@@ -0,0 +1,24 @@
+From d347ba63072ab13c0dbc1792d1a2b837af997a46 Mon Sep 17 00:00:00 2001
+From: Martin Rotter <rotter@praktik.cz>
+Date: Thu, 6 Jun 2019 11:35:25 +0200
+Subject: [PATCH] Fix random class name
+
+---
+ src/miscellaneous/textfactory.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/miscellaneous/textfactory.cpp b/src/miscellaneous/textfactory.cpp
+index 48597235..1ac6f049 100755
+--- a/src/miscellaneous/textfactory.cpp
++++ b/src/miscellaneous/textfactory.cpp
+@@ -151,8 +151,8 @@ quint64 TextFactory::initializeSecretEncryptionKey() {
+ quint64 TextFactory::generateSecretEncryptionKey() {
+ std::random_device rd;
+ std::mt19937 mt(rd());
+- std::uniform_int<quint64> dist(std::numeric_limits<quint64>().min() + 1000000UL,
+- std::numeric_limits<quint64>().max());
++ std::uniform_int_distribution<quint64> dist(std::numeric_limits<quint64>().min() + 1000000UL,
++ std::numeric_limits<quint64>().max());
+
+ return dist(mt);
+ }
diff --git a/desktop/rss-guard/rss-guard.SlackBuild b/desktop/rss-guard/rss-guard.SlackBuild
index 470d4565c4..6dee54d811 100644
--- a/desktop/rss-guard/rss-guard.SlackBuild
+++ b/desktop/rss-guard/rss-guard.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for rss-guard
#
-# Copyright 2012-2016 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
+# Copyright 2012-2019 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,7 +24,7 @@
PRGNAM=rss-guard
SRCNAM=rssguard
-VERSION=${VERSION:-3.3.5}
+VERSION=${VERSION:-3.5.9}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -70,18 +70,21 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+patch -p1 < $CWD/01_min_qt_required_is_5.9.patch
+patch -p1 < $CWD/02_fix_random_class_name.patch
+
mkdir -p build
cd build
qmake-qt5 PREFIX=/usr ..
make
- make release-install INSTALL_ROOT=$PKG
+ make install INSTALL_ROOT=$PKG
cd ..
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a $PKG/usr/share/$SRCNAM/information/* $PKG/usr/doc/$PRGNAM-$VERSION/
+cp -a *.md $PKG/usr/doc/$PRGNAM-$VERSION/
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
diff --git a/desktop/rss-guard/rss-guard.info b/desktop/rss-guard/rss-guard.info
index 4589139345..24591de685 100644
--- a/desktop/rss-guard/rss-guard.info
+++ b/desktop/rss-guard/rss-guard.info
@@ -1,8 +1,8 @@
PRGNAM="rss-guard"
-VERSION="3.3.5"
+VERSION="3.5.9"
HOMEPAGE="https://github.com/martinrotter/rssguard"
-DOWNLOAD="https://github.com/martinrotter/rssguard/archive/3.3.5.tar.gz"
-MD5SUM="9ac44a786afe7b9c5a94e1a81120ada8"
+DOWNLOAD="https://github.com/martinrotter/rssguard/archive/3.5.9/rssguard-3.5.9.tar.gz"
+MD5SUM="fb9b713a18a2bb85e7a4f7ce40a054b0"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="qt5"