public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: kde-apps/kitinerary/, kde-apps/kitinerary/files/
@ 2019-02-22 18:17 Andreas Sturmlechner
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Sturmlechner @ 2019-02-22 18:17 UTC (permalink / raw
  To: gentoo-commits

commit:     7d15eb052fba4619ccbdbf1238ad40f98cbdaf11
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 22 18:16:56 2019 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Feb 22 18:17:13 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d15eb05

kde-apps/kitinerary: Fix build with poppler-0.72

Closes: https://bugs.gentoo.org/678584
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 .../files/kitinerary-18.08.3-poppler-0.72.patch    | 68 ++++++++++++++++++++++
 kde-apps/kitinerary/kitinerary-18.08.3.ebuild      |  4 +-
 2 files changed, 71 insertions(+), 1 deletion(-)

diff --git a/kde-apps/kitinerary/files/kitinerary-18.08.3-poppler-0.72.patch b/kde-apps/kitinerary/files/kitinerary-18.08.3-poppler-0.72.patch
new file mode 100644
index 00000000000..904e7b23191
--- /dev/null
+++ b/kde-apps/kitinerary/files/kitinerary-18.08.3-poppler-0.72.patch
@@ -0,0 +1,68 @@
+From f2dee911572a6ec93c63b9b4e376f841bb91e306 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Fri, 22 Feb 2019 19:13:11 +0100
+Subject: [PATCH] Fix build against poppler-0.72
+
+---
+ CMakeLists.txt                | 3 +++
+ src/config-kitinerary.h.cmake | 1 +
+ src/pdfdocument.cpp           | 8 ++++++++
+ 3 files changed, 12 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index bdc2e2b..b970de7 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -42,6 +42,9 @@ if(TARGET Poppler::Core)
+     if (${Poppler_VERSION} VERSION_GREATER 0.57)
+         set(HAVE_POPPLER_0_58 ON)
+     endif()
++    if (${Poppler_VERSION} VERSION_GREATER 0.71)
++        set(HAVE_POPPLER_0_72 ON)
++    endif()
+ endif()
+ if (TARGET zxing::libzxing)
+     set(HAVE_ZXING ON)
+diff --git a/src/config-kitinerary.h.cmake b/src/config-kitinerary.h.cmake
+index 4576266..0dc8969 100644
+--- a/src/config-kitinerary.h.cmake
++++ b/src/config-kitinerary.h.cmake
+@@ -22,6 +22,7 @@
+ 
+ #cmakedefine HAVE_POPPLER
+ #cmakedefine HAVE_POPPLER_0_58
++#cmakedefine HAVE_POPPLER_0_72
+ #cmakedefine HAVE_ZXING
+ #cmakedefine HAVE_KCAL
+ #cmakedefine HAVE_KCONTACTS
+diff --git a/src/pdfdocument.cpp b/src/pdfdocument.cpp
+index fb4b98b..9f23645 100644
+--- a/src/pdfdocument.cpp
++++ b/src/pdfdocument.cpp
+@@ -306,7 +306,11 @@ QString PdfPage::textInRect(double left, double top, double right, double bottom
+     const auto pageRect = d->m_doc->m_popplerDoc->getPage(d->m_pageNum + 1)->getCropBox();
+     std::unique_ptr<GooString> s(device->getText(ratio(pageRect->x1, pageRect->x2, left), ratio(pageRect->y1, pageRect->y2, top),
+                                                  ratio(pageRect->x1, pageRect->x2, right), ratio(pageRect->y1, pageRect->y2, bottom)));
++#ifdef HAVE_POPPLER_0_58
++    return QString::fromUtf8(s->c_str());
++#else
+     return QString::fromUtf8(s->getCString());
++#endif
+ #else
+     Q_UNUSED(left);
+     Q_UNUSED(top);
+@@ -440,7 +444,11 @@ PdfDocument* PdfDocument::fromData(const QByteArray &data, QObject *parent)
+         PdfPage page;
+         page.d->m_pageNum = i;
+         page.d->m_doc = doc->d.get();
++#ifdef HAVE_POPPLER_0_72
++        page.d->m_text = QString::fromUtf8(s->c_str());
++#else
+         page.d->m_text = QString::fromUtf8(s->getCString());
++#endif
+         page.d->m_images = std::move(device->m_images);
+         for (auto it = page.d->m_images.begin(); it != page.d->m_images.end(); ++it) {
+             (*it).d->m_page = page.d.data();
+-- 
+2.19.2
+

diff --git a/kde-apps/kitinerary/kitinerary-18.08.3.ebuild b/kde-apps/kitinerary/kitinerary-18.08.3.ebuild
index d76e3c54a6e..bcf656b1713 100644
--- a/kde-apps/kitinerary/kitinerary-18.08.3.ebuild
+++ b/kde-apps/kitinerary/kitinerary-18.08.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -30,6 +30,8 @@ RDEPEND="${DEPEND}
 	!<kde-apps/kdepim-addons-18.07.80
 "
 
+PATCHES=( "${FILESDIR}/${P}-poppler-0.72.patch" )
+
 src_configure() {
 	local mycmakeargs=(
 		$(cmake-utils_use_find_package pdf Poppler)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: kde-apps/kitinerary/, kde-apps/kitinerary/files/
@ 2020-08-06 20:13 Andreas Sturmlechner
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Sturmlechner @ 2020-08-06 20:13 UTC (permalink / raw
  To: gentoo-commits

commit:     e962c62ea9d93dd3e2f0850206d5894b66d45f0b
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Aug  6 15:12:47 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Aug  6 20:13:32 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e962c62e

kde-apps/kitinerary: Fix build against poppler-20.08

Closes: https://bugs.gentoo.org/735800
Package-Manager: Portage-3.0.1, Repoman-2.3.23
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/kitinerary-20.04.3-poppler-20.08.patch   | 32 ++++++++++++++++++++++
 kde-apps/kitinerary/kitinerary-20.04.3.ebuild      |  2 ++
 2 files changed, 34 insertions(+)

diff --git a/kde-apps/kitinerary/files/kitinerary-20.04.3-poppler-20.08.patch b/kde-apps/kitinerary/files/kitinerary-20.04.3-poppler-20.08.patch
new file mode 100644
index 00000000000..768cf5dc509
--- /dev/null
+++ b/kde-apps/kitinerary/files/kitinerary-20.04.3-poppler-20.08.patch
@@ -0,0 +1,32 @@
+From 7098c8be9a5e7fabf74543308bfaf11a2ebe5484 Mon Sep 17 00:00:00 2001
+From: Volker Krause <vkrause@kde.org>
+Date: Wed, 5 Aug 2020 17:18:13 +0200
+Subject: [PATCH] Fix build with latest Poppler
+
+That now has a leading 0 in its minor version number.
+---
+ CMakeLists.txt | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e4d40f2..37787d8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -71,10 +71,10 @@ if(TARGET Poppler::Core)
+     endif()
+ endif()
+ if (HAVE_POPPLER)
+-    string(REPLACE "." ";" _poppler_version_components ${Poppler_VERSION})
+-    list(GET _poppler_version_components 0 POPPLER_VERSION_MAJOR)
+-    list(GET _poppler_version_components 1 POPPLER_VERSION_MINOR)
+-    list(GET _poppler_version_components 2 POPPLER_VERSION_PATCH)
++    string(REGEX MATCH "([0-9]+)\.0*([0-9]+)\.0*([0-9]+)" _match ${Poppler_VERSION})
++    set(POPPLER_VERSION_MAJOR ${CMAKE_MATCH_1})
++    set(POPPLER_VERSION_MINOR ${CMAKE_MATCH_2})
++    set(POPPLER_VERSION_PATCH ${CMAKE_MATCH_3})
+ endif()
+ 
+ if (TARGET ZXing::ZXing OR TARGET ZXing::Core)
+-- 
+GitLab
+

diff --git a/kde-apps/kitinerary/kitinerary-20.04.3.ebuild b/kde-apps/kitinerary/kitinerary-20.04.3.ebuild
index c4ff13c3714..2026a8ac89f 100644
--- a/kde-apps/kitinerary/kitinerary-20.04.3.ebuild
+++ b/kde-apps/kitinerary/kitinerary-20.04.3.ebuild
@@ -35,6 +35,8 @@ RDEPEND="${DEPEND}
 	!<kde-apps/kdepim-addons-18.07.80
 "
 
+PATCHES=( "${FILESDIR}/${P}-poppler-20.08.patch" ) # bug 735800
+
 src_configure() {
 	local mycmakeargs=(
 		$(cmake_use_find_package barcode ZXing)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-06 20:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-06 20:13 [gentoo-commits] repo/gentoo:master commit in: kde-apps/kitinerary/, kde-apps/kitinerary/files/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2019-02-22 18:17 Andreas Sturmlechner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox