From owner-svn-ports-head@freebsd.org Sat Oct 26 10:10:39 2019 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A4594169861; Sat, 26 Oct 2019 10:10:39 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 470cDv3qClz4042; Sat, 26 Oct 2019 10:10:39 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 66A5965F1; Sat, 26 Oct 2019 10:10:39 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x9QAAdS3089379; Sat, 26 Oct 2019 10:10:39 GMT (envelope-from tcberner@FreeBSD.org) Received: (from tcberner@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x9QAAdJO089378; Sat, 26 Oct 2019 10:10:39 GMT (envelope-from tcberner@FreeBSD.org) Message-Id: <201910261010.x9QAAdJO089378@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tcberner set sender to tcberner@FreeBSD.org using -f From: "Tobias C. Berner" Date: Sat, 26 Oct 2019 10:10:39 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r515678 - head/net/kitinerary/files X-SVN-Group: ports-head X-SVN-Commit-Author: tcberner X-SVN-Commit-Paths: head/net/kitinerary/files X-SVN-Commit-Revision: 515678 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Oct 2019 10:10:39 -0000 Author: tcberner Date: Sat Oct 26 10:10:38 2019 New Revision: 515678 URL: https://svnweb.freebsd.org/changeset/ports/515678 Log: net/kitinerary: prepare for poppler 0.82.0 Added: head/net/kitinerary/files/ head/net/kitinerary/files/patch-git_bd9003c (contents, props changed) Added: head/net/kitinerary/files/patch-git_bd9003c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/kitinerary/files/patch-git_bd9003c Sat Oct 26 10:10:38 2019 (r515678) @@ -0,0 +1,124 @@ +From bd9003c67d2ac62a00918aeb22a4911b51d99a47 Mon Sep 17 00:00:00 2001 +From: Volker Krause +Date: Sun, 29 Sep 2019 12:51:57 +0200 +Subject: [PATCH] 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 489c618..a4db328 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -65,17 +65,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 +- #include +- 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 c422512..deac15f 100644 +--- src/config-kitinerary.h.cmake ++++ 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 +--- src/pdf/pdfextractoroutputdevice.cpp ++++ 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 +--- src/pdf/pdfextractoroutputdevice_p.h ++++ src/pdf/pdfextractoroutputdevice_p.h +@@ -21,6 +21,7 @@ + #include + + #include "pdfvectorpicture_p.h" ++#include "popplertypes_p.h" + + #ifdef HAVE_POPPLER + #include +@@ -43,7 +44,7 @@ class PdfExtractorOutputDevice : public TextOutputDev + 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 ++++ src/pdf/popplertypes_p.h +@@ -0,0 +1,30 @@ ++/* ++ Copyright (C) 2019 Volker Krause ++ ++ 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 . ++*/ ++ ++#ifndef KITINERARY_POPPLERTYPES_P_H ++#define KITINERARY_POPPLERTYPES_P_H ++ ++#include ++ ++#ifdef HAVE_POPPLER_0_82 ++using PopplerMaskColors = const int; ++#else ++using PopplerMaskColors = int; ++#endif ++ ++#endif // KITINERARY_POPPLERTYPES_P_H ++