diff --git a/deskutils/kodaskanna/Makefile b/deskutils/kodaskanna/Makefile index 7ac0951748bc5..11db8dff00c5a 100644 --- a/deskutils/kodaskanna/Makefile +++ b/deskutils/kodaskanna/Makefile @@ -4,6 +4,9 @@ PORTREVISION= 1 CATEGORIES= deskutils MASTER_SITES= KDE/unstable/${PORTNAME}/${DISTVERSION}/src +PATCH_SITES= https://invent.kde.org/graphics/kodaskanna/-/commit/ +PATCHFILES= 1656f7e66aec20ecd4a66f041bd7fc1850721e08.diff:-p1 + MAINTAINER= adridg@FreeBSD.org COMMENT= Barcode and QR-code scanner WWW= https://invent.kde.org/graphics/kodaskanna @@ -11,7 +14,7 @@ WWW= https://invent.kde.org/graphics/kodaskanna LICENSE= LGPL21+ LICENSE_FILE= ${WRKSRC}/LICENSES/LGPL-2.1-or-later.txt -LIB_DEPENDS= libZXing.so.1:textproc/zxing-cpp +LIB_DEPENDS= libZXing.so:textproc/zxing-cpp USES= cmake compiler:c++17-lang gl kde:5 pkgconfig qt:5 tar:xz xorg USE_GL= gl diff --git a/deskutils/kodaskanna/distinfo b/deskutils/kodaskanna/distinfo index 7067c19490654..67b6e541e78d3 100644 --- a/deskutils/kodaskanna/distinfo +++ b/deskutils/kodaskanna/distinfo @@ -1,3 +1,5 @@ -TIMESTAMP = 1643278462 +TIMESTAMP = 1673343046 SHA256 (kodaskanna-0.1.0.tar.xz) = 2860cfdae922a29749421f3b4e3281ef88fc5713002345bc725082fb47cd627f SIZE (kodaskanna-0.1.0.tar.xz) = 40656 +SHA256 (1656f7e66aec20ecd4a66f041bd7fc1850721e08.diff) = 198a2f22fd574bb6a9e4b02406d04847921caacf9c709f974f1e9025438940a5 +SIZE (1656f7e66aec20ecd4a66f041bd7fc1850721e08.diff) = 463 diff --git a/deskutils/kodaskanna/files/patch-src_core_scanimagerunner.cpp b/deskutils/kodaskanna/files/patch-src_core_scanimagerunner.cpp new file mode 100644 index 0000000000000..8d3133a58c2d4 --- /dev/null +++ b/deskutils/kodaskanna/files/patch-src_core_scanimagerunner.cpp @@ -0,0 +1,27 @@ +--- src/core/scanimagerunner.cpp.orig 2022-01-24 22:35:35 UTC ++++ src/core/scanimagerunner.cpp +@@ -10,6 +10,9 @@ + #include "scanresult.hpp" + #include "scanresult_p.hpp" + // ZXing ++#include ++#define ZXING_VERSION \ ++ QT_VERSION_CHECK(ZXING_VERSION_MAJOR, ZXING_VERSION_MINOR, ZXING_VERSION_PATCH) + #include + + namespace Kodaskanna +@@ -63,8 +66,13 @@ void ScanImageRunner::run() + + resultData->isSuccess = result.isValid(); + if (resultData->isSuccess) { +- resultData->text = QString::fromStdWString(result.text()); ++#if ZXING_VERSION < QT_VERSION_CHECK(2, 0, 0) ++ resultData->text = QString::fromStdWString(result.text()); + resultData->bytes = QByteArray(reinterpret_cast(result.rawBytes().data()), result.rawBytes().size()); ++#else ++ resultData->text = QString::fromStdString(result.text()); ++ resultData->bytes = QByteArray(reinterpret_cast(result.bytes().data()), result.bytes().size()); ++#endif + } + + Q_EMIT scanFinished(scanResult);