* [gentoo-commits] repo/gentoo:master commit in: kde-apps/kitinerary/files/, kde-apps/kitinerary/
@ 2019-11-01 18:39 Andreas Sturmlechner
0 siblings, 0 replies; 4+ messages in thread
From: Andreas Sturmlechner @ 2019-11-01 18:39 UTC (permalink / raw
To: gentoo-commits
commit: 7341b195af4dee435c8a27ed0a8601b474362292
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 1 17:55:29 2019 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Nov 1 18:39:22 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7341b195
kde-apps/kitinerary: Fix build with poppler-0.82.0
Package-Manager: Portage-2.3.78, Repoman-2.3.17
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../files/kitinerary-19.08.2-poppler-0.82.patch | 127 +++++++++++++++++++++
kde-apps/kitinerary/kitinerary-19.08.2.ebuild | 2 +
2 files changed, 129 insertions(+)
diff --git a/kde-apps/kitinerary/files/kitinerary-19.08.2-poppler-0.82.patch b/kde-apps/kitinerary/files/kitinerary-19.08.2-poppler-0.82.patch
new file mode 100644
index 00000000000..be2152dafef
--- /dev/null
+++ b/kde-apps/kitinerary/files/kitinerary-19.08.2-poppler-0.82.patch
@@ -0,0 +1,127 @@
+From 0f8b2babcc69c490ae6548bda7ceeb1ffd27a9e3 Mon Sep 17 00:00:00 2001
+From: Volker Krause <vkrause@kde.org>
+Date: Sun, 29 Sep 2019 12:51:57 +0200
+Subject: Fix compatibility with Poppler 0.82
+
+---
+ CMakeLists.txt | 17 ++++++-----------
+ src/config-kitinerary.h.cmake | 1 +
+ src/pdf/pdfextractoroutputdevice.cpp | 2 +-
+ src/pdf/pdfextractoroutputdevice_p.h | 3 ++-
+ src/pdf/popplertypes_p.h | 30 ++++++++++++++++++++++++++++++
+ 5 files changed, 40 insertions(+), 13 deletions(-)
+ create mode 100644 src/pdf/popplertypes_p.h
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index cb222d9..1d66d3b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -62,17 +62,12 @@ if(TARGET Poppler::Core)
+ if (${Poppler_VERSION} VERSION_GREATER 0.68)
+ set(HAVE_POPPLER_0_69 ON)
+ endif()
+- set(CMAKE_REQUIRED_LIBRARIES Poppler::Core Qt5::Core)
+- check_cxx_source_compiles("
+- #include <goo/GooString.h>
+- #include <QString>
+- int main()
+- {
+- GooString s;
+- QString val = QString::fromUtf8(s.c_str());
+- return 0;
+- }
+- " HAVE_POPPLER_0_72)
++ if (${Poppler_VERSION} VERSION_GREATER 0.71)
++ set(HAVE_POPPLER_0_72 ON)
++ endif()
++ if (${Poppler_VERSION} VERSION_GREATER 0.81)
++ set(HAVE_POPPLER_0_82 ON)
++ endif()
+ endif()
+
+ if (TARGET ZXing::Core)
+diff --git a/src/config-kitinerary.h.cmake b/src/config-kitinerary.h.cmake
+index b0bda20..6d3b156 100644
+--- a/src/config-kitinerary.h.cmake
++++ b/src/config-kitinerary.h.cmake
+@@ -24,6 +24,7 @@
+ #cmakedefine HAVE_POPPLER_0_58
+ #cmakedefine HAVE_POPPLER_0_69
+ #cmakedefine HAVE_POPPLER_0_72
++#cmakedefine HAVE_POPPLER_0_82
+
+ #cmakedefine HAVE_ZXING
+
+diff --git a/src/pdf/pdfextractoroutputdevice.cpp b/src/pdf/pdfextractoroutputdevice.cpp
+index 2a06c82..0027cad 100644
+--- a/src/pdf/pdfextractoroutputdevice.cpp
++++ b/src/pdf/pdfextractoroutputdevice.cpp
+@@ -30,7 +30,7 @@ PdfExtractorOutputDevice::PdfExtractorOutputDevice()
+ {
+ }
+
+-void PdfExtractorOutputDevice::drawImage(GfxState* state, Object* ref, Stream* str, int width, int height, GfxImageColorMap* colorMap, bool interpolate, int* maskColors, bool inlineImg)
++void PdfExtractorOutputDevice::drawImage(GfxState* state, Object* ref, Stream* str, int width, int height, GfxImageColorMap* colorMap, bool interpolate, PopplerMaskColors* maskColors, bool inlineImg)
+ {
+ Q_UNUSED(str);
+ Q_UNUSED(interpolate);
+diff --git a/src/pdf/pdfextractoroutputdevice_p.h b/src/pdf/pdfextractoroutputdevice_p.h
+index 9241f9f..5d448d3 100644
+--- a/src/pdf/pdfextractoroutputdevice_p.h
++++ b/src/pdf/pdfextractoroutputdevice_p.h
+@@ -21,6 +21,7 @@
+ #include <config-kitinerary.h>
+
+ #include "pdfvectorpicture_p.h"
++#include "popplertypes_p.h"
+
+ #ifdef HAVE_POPPLER
+ #include <TextOutputDev.h>
+@@ -43,7 +44,7 @@ public:
+ void finalize();
+
+ bool needNonText() override { return true; }
+- void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, bool interpolate, int *maskColors, bool inlineImg) override;
++ void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, bool interpolate, PopplerMaskColors *maskColors, bool inlineImg) override;
+
+ // operations used to detect vector barcodes
+ void saveState(GfxState *state) override;
+diff --git a/src/pdf/popplertypes_p.h b/src/pdf/popplertypes_p.h
+new file mode 100644
+index 0000000..f9d844a
+--- /dev/null
++++ b/src/pdf/popplertypes_p.h
+@@ -0,0 +1,30 @@
++/*
++ Copyright (C) 2019 Volker Krause <vkrause@kde.org>
++
++ This program is free software; you can redistribute it and/or modify it
++ under the terms of the GNU Library General Public License as published by
++ the Free Software Foundation; either version 2 of the License, or (at your
++ option) any later version.
++
++ This program is distributed in the hope that it will be useful, but WITHOUT
++ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
++ License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program. If not, see <https://www.gnu.org/licenses/>.
++*/
++
++#ifndef KITINERARY_POPPLERTYPES_P_H
++#define KITINERARY_POPPLERTYPES_P_H
++
++#include <config-kitinerary.h>
++
++#ifdef HAVE_POPPLER_0_82
++using PopplerMaskColors = const int;
++#else
++using PopplerMaskColors = int;
++#endif
++
++#endif // KITINERARY_POPPLERTYPES_P_H
++
+--
+cgit v1.1
+
diff --git a/kde-apps/kitinerary/kitinerary-19.08.2.ebuild b/kde-apps/kitinerary/kitinerary-19.08.2.ebuild
index c813a4246b4..3ad5d865506 100644
--- a/kde-apps/kitinerary/kitinerary-19.08.2.ebuild
+++ b/kde-apps/kitinerary/kitinerary-19.08.2.ebuild
@@ -31,6 +31,8 @@ RDEPEND="${DEPEND}
!<kde-apps/kdepim-addons-18.07.80
"
+PATCHES=( "${FILESDIR}"/${P}-poppler-0.82.patch )
+
src_configure() {
local mycmakeargs=(
$(cmake-utils_use_find_package barcode ZXing)
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-apps/kitinerary/files/, kde-apps/kitinerary/
@ 2022-07-14 9:27 Andreas Sturmlechner
0 siblings, 0 replies; 4+ messages in thread
From: Andreas Sturmlechner @ 2022-07-14 9:27 UTC (permalink / raw
To: gentoo-commits
commit: f04d8f9baae0e45840a16248cff6a9ab127fc725
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 14 08:26:12 2022 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Jul 14 09:27:39 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f04d8f9b
kde-apps/kitinerary: Slot op, build w/ media-libs/zxing-cpp-1.4.0
Upstream commit e60195421aa159462353892ed32bf46ac8c57d19
Backported to 22.04.3.
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../files/kitinerary-22.04.3-zxing-cpp-1.4.0.patch | 68 ++++++++++++++++++++++
kde-apps/kitinerary/kitinerary-22.04.3-r1.ebuild | 53 +++++++++++++++++
2 files changed, 121 insertions(+)
diff --git a/kde-apps/kitinerary/files/kitinerary-22.04.3-zxing-cpp-1.4.0.patch b/kde-apps/kitinerary/files/kitinerary-22.04.3-zxing-cpp-1.4.0.patch
new file mode 100644
index 000000000000..a208d2bfaed7
--- /dev/null
+++ b/kde-apps/kitinerary/files/kitinerary-22.04.3-zxing-cpp-1.4.0.patch
@@ -0,0 +1,68 @@
+From bf83f8bd974925aec07a2e8dbfd50ad39995b428 Mon Sep 17 00:00:00 2001
+From: Volker Krause <vkrause@kde.org>
+Date: Fri, 8 Jul 2022 16:04:19 +0200
+Subject: [PATCH] Support ZXing 1.4.0
+
+The previous code crashes (if it builds at all) with ZXing 1.4.0, so
+distributions updating to 1.4.0 would need to apply this patch on top
+of 22.04.3 as well.
+
+(cherry picked from commit e60195421aa159462353892ed32bf46ac8c57d19)
+---
+ src/lib/barcodedecoder.cpp | 26 ++++++++++++++++++++++++++
+ 1 file changed, 26 insertions(+)
+
+diff --git a/src/lib/barcodedecoder.cpp b/src/lib/barcodedecoder.cpp
+index b38140a..40e0c64 100644
+--- a/src/lib/barcodedecoder.cpp
++++ b/src/lib/barcodedecoder.cpp
+@@ -15,6 +15,7 @@
+ #include <QString>
+
+ #ifdef HAVE_ZXING
++#define ZX_USE_UTF8 1
+ #ifdef ZXING_USE_READBARCODE
+ #include <ZXing/ReadBarcode.h>
+ #else
+@@ -244,6 +245,30 @@ void BarcodeDecoder::decodeZxing(const QImage &img, BarcodeDecoder::BarcodeTypes
+ #endif
+
+ if (res.isValid()) {
++#if ZXING_VERSION >= QT_VERSION_CHECK(1, 4, 0)
++ // detect content type
++ std::string zxUtf8Text;
++ if (res.contentType() == ZXing::ContentType::Text) {
++ result.contentType = Result::Any;
++ zxUtf8Text = res.text();
++ // check if the text is ASCII-only (in which case we allow access as byte array as well)
++ if (std::any_of(zxUtf8Text.begin(), zxUtf8Text.end(), [](unsigned char c) { return c > 0x7F; })) {
++ result.contentType &= ~Result::ByteArray;
++ }
++ } else {
++ result.contentType = Result::ByteArray;
++ }
++
++ // decode content
++ if (result.contentType & Result::ByteArray) {
++ QByteArray b;
++ b.resize(res.bytes().size());
++ std::copy(res.bytes().begin(), res.bytes().end(), b.begin());
++ result.content = b;
++ } else {
++ result.content = QString::fromStdString(zxUtf8Text);
++ }
++#else
+ // detect content type
+ result.contentType = Result::Any;
+ if (std::any_of(res.text().begin(), res.text().end(), [](const auto c) { return c > 255; })) {
+@@ -262,6 +287,7 @@ void BarcodeDecoder::decodeZxing(const QImage &img, BarcodeDecoder::BarcodeTypes
+ } else {
+ result.content = QString::fromStdWString(res.text());
+ }
++#endif
+ result.positive |= formatToType(res.format());
+ } else {
+ result.negative |= format;
+--
+2.35.1
+
diff --git a/kde-apps/kitinerary/kitinerary-22.04.3-r1.ebuild b/kde-apps/kitinerary/kitinerary-22.04.3-r1.ebuild
new file mode 100644
index 000000000000..75600a759039
--- /dev/null
+++ b/kde-apps/kitinerary/kitinerary-22.04.3-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_QTHELP="true"
+ECM_TEST="true"
+PVCUT=$(ver_cut 1-3)
+KFMIN=5.92.0
+QTMIN=5.15.4
+VIRTUALX_REQUIRED="test"
+inherit ecm gear.kde.org
+
+DESCRIPTION="Data Model and Extraction System for Travel Reservation information"
+HOMEPAGE="https://apps.kde.org/kontact/"
+
+LICENSE="LGPL-2.1+"
+SLOT="5"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+IUSE="+barcode pdf"
+
+REQUIRED_USE="test? ( pdf )"
+
+DEPEND="
+ dev-libs/libphonenumber
+ dev-libs/libxml2:2
+ dev-libs/openssl:=
+ >=dev-qt/qtdeclarative-${QTMIN}:5
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=kde-apps/kmime-${PVCUT}:5
+ >=kde-apps/kpkpass-${PVCUT}:5
+ >=kde-frameworks/karchive-${KFMIN}:5
+ >=kde-frameworks/kcalendarcore-${KFMIN}:5
+ >=kde-frameworks/kcontacts-${KFMIN}:5
+ >=kde-frameworks/ki18n-${KFMIN}:5
+ sys-libs/zlib
+ barcode? ( >=media-libs/zxing-cpp-1.1.0:= )
+ pdf? ( app-text/poppler:=[qt5] )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="x11-misc/shared-mime-info"
+
+PATCHES=( "${FILESDIR}/${P}-zxing-cpp-1.4.0.patch" )
+
+src_configure() {
+ local mycmakeargs=(
+ # sci-geosciences/osmctools; TODO: useful at all?
+ -DCMAKE_DISABLE_FIND_PACKAGE_OsmTools=ON
+ $(cmake_use_find_package barcode ZXing)
+ $(cmake_use_find_package pdf Poppler)
+ )
+ ecm_src_configure
+}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-apps/kitinerary/files/, kde-apps/kitinerary/
@ 2022-12-11 16:39 Sam James
0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2022-12-11 16:39 UTC (permalink / raw
To: gentoo-commits
commit: f8d5d904f7c1ecb8b45633ceda8d621d7b35f322
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 11 16:32:51 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Dec 11 16:32:51 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8d5d904
kde-apps/kitinerary: fix build w/ gcc 13
Closes: https://bugs.gentoo.org/885423
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/kitinerary-22.12.0-gcc13.patch | 24 ++++++++++++++++++++++
kde-apps/kitinerary/kitinerary-22.12.0.ebuild | 4 ++++
2 files changed, 28 insertions(+)
diff --git a/kde-apps/kitinerary/files/kitinerary-22.12.0-gcc13.patch b/kde-apps/kitinerary/files/kitinerary-22.12.0-gcc13.patch
new file mode 100644
index 000000000000..09c88c8b5250
--- /dev/null
+++ b/kde-apps/kitinerary/files/kitinerary-22.12.0-gcc13.patch
@@ -0,0 +1,24 @@
+https://invent.kde.org/pim/kitinerary/-/commit/0ef772c3e0ff8f049f299ad14b3c65327e4fe69e
+
+From: Sam James <sam@gentoo.org>
+Date: Sun, 11 Dec 2022 13:29:11 +0000
+Subject: [PATCH] asn1: Fix build with GCC 13 (add missing <cstdint> include)
+
+GCC 13 (as usual for new compiler releases) shuffles around some
+internal includes and so <cstdint> is no longer transitively included.
+
+Explicitly include <cstdint> for uint8_t.
+
+Bug: https://bugs.gentoo.org/885423
+--- a/src/lib/asn1/bitvectorview.h
++++ b/src/lib/asn1/bitvectorview.h
+@@ -8,6 +8,7 @@
+
+ #include <bitset>
+ #include <cassert>
++#include <cstdint>
+ #include <string_view>
+ #include <type_traits>
+
+--
+GitLab
diff --git a/kde-apps/kitinerary/kitinerary-22.12.0.ebuild b/kde-apps/kitinerary/kitinerary-22.12.0.ebuild
index 4a1fc4ec13ff..a3c4d410f6f1 100644
--- a/kde-apps/kitinerary/kitinerary-22.12.0.ebuild
+++ b/kde-apps/kitinerary/kitinerary-22.12.0.ebuild
@@ -38,6 +38,10 @@ DEPEND="
RDEPEND="${DEPEND}"
BDEPEND="x11-misc/shared-mime-info"
+PATCHES=(
+ "${FILESDIR}"/${PN}-22.12.0-gcc13.patch
+)
+
src_configure() {
local mycmakeargs=(
# sci-geosciences/osmctools; TODO: useful at all?
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-apps/kitinerary/files/, kde-apps/kitinerary/
@ 2024-05-31 5:47 Andreas Sturmlechner
0 siblings, 0 replies; 4+ messages in thread
From: Andreas Sturmlechner @ 2024-05-31 5:47 UTC (permalink / raw
To: gentoo-commits
commit: 281f676e87afb3bbe312fb59c84663bb8b75a01e
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri May 31 05:44:54 2024 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri May 31 05:46:33 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=281f676e
kde-apps/kitinerary: Fix build with >=app-text/poppler-24.05
Closes: https://bugs.gentoo.org/933219
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../files/kitinerary-23.08.5-poppler-24.05.patch | 37 ++++++++++++++++++++++
kde-apps/kitinerary/kitinerary-23.08.5.ebuild | 2 ++
2 files changed, 39 insertions(+)
diff --git a/kde-apps/kitinerary/files/kitinerary-23.08.5-poppler-24.05.patch b/kde-apps/kitinerary/files/kitinerary-23.08.5-poppler-24.05.patch
new file mode 100644
index 000000000000..969e19e79df2
--- /dev/null
+++ b/kde-apps/kitinerary/files/kitinerary-23.08.5-poppler-24.05.patch
@@ -0,0 +1,37 @@
+From 6a0a4f455d58b96b8965667a7eb057abd244d87e Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <aacid@kde.org>
+Date: Sun, 21 Apr 2024 11:14:42 +0200
+Subject: [PATCH] Compile with newer poppler
+
+And remove ancient poppler ifdefs
+---
+ src/lib/pdf/pdfdocument.cpp | 5 +++++
+ 1 file changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/src/lib/pdf/pdfdocument.cpp b/src/lib/pdf/pdfdocument.cpp
+index 417a0b85..f829e645 100644
+--- a/src/lib/pdf/pdfdocument.cpp
++++ b/src/lib/pdf/pdfdocument.cpp
+@@ -22,6 +22,7 @@
+ #include <PDFDoc.h>
+ #include <PDFDocEncoding.h>
+ #include <Stream.h>
++#include <UTF.h>
+
+ #include <cmath>
+
+@@ -330,7 +307,11 @@ QString gooStringToUnicode(const std::unique_ptr<GooString> &s)
+ return {};
+ }
+
++#if KPOPPLER_VERSION >= QT_VERSION_CHECK(24, 5, 0)
++ if (hasUnicodeByteOrderMark(s->toStr()) || hasUnicodeByteOrderMarkLE(s->toStr())) {
++#else
+ if (s->hasUnicodeMarker() || s->hasUnicodeMarkerLE()) {
++#endif
+ return QString::fromUtf16(reinterpret_cast<const char16_t*>(s->toStr().c_str()), s->toStr().size() / 2);
+ } else {
+ int len = 0;
+--
+GitLab
+
diff --git a/kde-apps/kitinerary/kitinerary-23.08.5.ebuild b/kde-apps/kitinerary/kitinerary-23.08.5.ebuild
index 0f5a2ef14317..f67e43bb771f 100644
--- a/kde-apps/kitinerary/kitinerary-23.08.5.ebuild
+++ b/kde-apps/kitinerary/kitinerary-23.08.5.ebuild
@@ -39,6 +39,8 @@ DEPEND="
RDEPEND="${DEPEND}"
BDEPEND="x11-misc/shared-mime-info"
+PATCHES=( "${FILESDIR}/${P}-poppler-24.05.patch" ) # bug 933219
+
src_configure() {
local mycmakeargs=(
# sci-geosciences/osmctools; TODO: useful at all?
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-05-31 5:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-31 5:47 [gentoo-commits] repo/gentoo:master commit in: kde-apps/kitinerary/files/, kde-apps/kitinerary/ Andreas Sturmlechner
-- strict thread matches above, loose matches on Subject: below --
2022-12-11 16:39 Sam James
2022-07-14 9:27 Andreas Sturmlechner
2019-11-01 18:39 Andreas Sturmlechner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox