From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1119842-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 168A3138334
	for <garchives@archives.gentoo.org>; Fri,  1 Nov 2019 18:39:38 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 304FAE0817;
	Fri,  1 Nov 2019 18:39:36 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 0AE1CE0817
	for <gentoo-commits@lists.gentoo.org>; Fri,  1 Nov 2019 18:39:36 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 1C6F834C680
	for <gentoo-commits@lists.gentoo.org>; Fri,  1 Nov 2019 18:39:35 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 3BD678A2
	for <gentoo-commits@lists.gentoo.org>; Fri,  1 Nov 2019 18:39:33 +0000 (UTC)
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" <asturm@gentoo.org>
Message-ID: <1572633562.7341b195af4dee435c8a27ed0a8601b474362292.asturm@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-apps/kitinerary/files/, kde-apps/kitinerary/
X-VCS-Repository: repo/gentoo
X-VCS-Files: kde-apps/kitinerary/files/kitinerary-19.08.2-poppler-0.82.patch kde-apps/kitinerary/kitinerary-19.08.2.ebuild
X-VCS-Directories: kde-apps/kitinerary/ kde-apps/kitinerary/files/
X-VCS-Committer: asturm
X-VCS-Committer-Name: Andreas Sturmlechner
X-VCS-Revision: 7341b195af4dee435c8a27ed0a8601b474362292
X-VCS-Branch: master
Date: Fri,  1 Nov 2019 18:39:33 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: a2d3a5e8-8e25-47de-9247-6aa6b2d46f80
X-Archives-Hash: b1c20bb06749b9460f003de9b519a64c

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)