diff options
-rw-r--r-- | 7eff90f462c740b527a1484e31383ea707351180.patch | 52 | ||||
-rw-r--r-- | PKGBUILD | 12 |
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() ) { @@ -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') |