summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Weißschuh2020-01-19 10:51:35 +0100
committerThomas Weißschuh2020-01-19 10:52:11 +0100
commit6a3a491fdc5a981793c57b86a47c76a81e42a39a (patch)
treee0f25fca07e12a5a1bf154a4600482d9a0b7720e
parent07636cb970452f1cea214fa8e60b442e53775c75 (diff)
downloadaur-6a3a491fdc5a981793c57b86a47c76a81e42a39a.tar.gz
upgpkg: kraft 0.90-2
-rw-r--r--7eff90f462c740b527a1484e31383ea707351180.patch52
-rw-r--r--PKGBUILD12
2 files changed, 60 insertions, 4 deletions
diff --git a/7eff90f462c740b527a1484e31383ea707351180.patch b/7eff90f462c740b527a1484e31383ea707351180.patch
new file mode 100644
index 000000000000..83ac88c09b1f
--- /dev/null
+++ b/7eff90f462c740b527a1484e31383ea707351180.patch
@@ -0,0 +1,52 @@
+From 7eff90f462c740b527a1484e31383ea707351180 Mon Sep 17 00:00:00 2001
+From: Pino Toscano <toscano.pino@tiscali.it>
+Date: Mon, 30 Dec 2019 08:24:25 +0100
+Subject: [PATCH] Check for only for Python 3 for erml2pdf.py
+
+Python 3 has been around for many years, and even not so recent distros
+ship it. Considering Python 2 is EOL since 2020, switch the search for
+the Python interpreter for erml2pdf.py to Python 3 only.
+---
+ src/reportgenerator.cpp | 14 +++++---------
+ 1 file changed, 5 insertions(+), 9 deletions(-)
+
+diff --git a/src/reportgenerator.cpp b/src/reportgenerator.cpp
+index 4547319..6ca4dcc 100644
+--- a/src/reportgenerator.cpp
++++ b/src/reportgenerator.cpp
+@@ -484,7 +484,7 @@ QStringList ReportGenerator::findTrml2Pdf( )
+ p += QLatin1String("/tools/erml2pdf.py");
+ // qDebug () << "Found erml2pdf from KRAFT_HOME: " << p;
+ if( QFile::exists( p ) ) {
+- retList << "python";
++ retList << "python3";
+ retList << p;
+ mHavePdfMerge = true;
+ }
+@@ -492,14 +492,10 @@ QStringList ReportGenerator::findTrml2Pdf( )
+ const QString ermlpy = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "kraft/tools/erml2pdf.py" );
+ // qDebug () << "Ermlpy: " << ermlpy;
+ if( ! ermlpy.isEmpty() ) {
+- // need the python interpreter
+- // First check for python2 in python3 times.
+- QString python = QStandardPaths::findExecutable(QLatin1String("python2"));
++ // need the python3 interpreter, check for it
++ QString python = QStandardPaths::findExecutable(QLatin1String("python3"));
+ if( python.isEmpty() ) {
+- python = QStandardPaths::findExecutable(QLatin1String("python"));
+- }
+- if( python.isEmpty() ) {
+- qCritical() << "ERR: Unable to find python, thats a problem";
++ qCritical() << "ERR: Unable to find python3, thats a problem";
+ } else {
+ // qDebug () << "Using python: " << python;
+ retList << python;
+@@ -543,7 +539,7 @@ void ReportGenerator::runTrml2Pdf( const QString& rmlFile, const QString& docID,
+ {
+ mErrors.clear();
+ // findTrml2Pdf returns a list of command line parts for the converter, such as
+- // /usr/bin/pyhton /usr/local/share/erml2pdf.py
++ // /usr/bin/pyhton3 /usr/local/share/erml2pdf.py
+ QStringList rmlbin = findTrml2Pdf();
+
+ if ( ! rmlbin.size() ) {
diff --git a/PKGBUILD b/PKGBUILD
index c686cad4d954..5ee098520f23 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,14 +5,17 @@
pkgname=kraft
pkgver=0.90
-pkgrel=1
+pkgrel=2
pkgdesc="A program suitable for all trades or crafts"
arch=('i686' 'x86_64')
url="http://www.volle-kraft-voraus.de/"
license=('GPL')
-depends=('boost' 'akonadi-contacts' 'ctemplate' 'python2-reportlab' 'python2-pypdf2')
+depends=('boost' 'akonadi-contacts' 'ctemplate' 'python-reportlab' 'python-pypdf2')
makedepends=('cmake' 'extra-cmake-modules')
-source=("https://github.com/dragotin/kraft/archive/v${pkgver}.tar.gz")
+source=(
+ "https://github.com/dragotin/kraft/archive/v${pkgver}.tar.gz"
+ "7eff90f462c740b527a1484e31383ea707351180.patch"
+)
prepare() {
@@ -45,4 +48,5 @@ package() {
make "DESTDIR=${pkgdir}" install
}
-sha256sums=('53d8e1afd6a0e9554a5bde44b654c11130f9ac43327759772351710ae1cb6f6b')
+sha256sums=('53d8e1afd6a0e9554a5bde44b654c11130f9ac43327759772351710ae1cb6f6b'
+ '9352224cb3461ea051c0faa7f494a772e286727a3eb029db8afa6c68a469d25a')