From a6c4d6f476215fd280b0b149ba427ad3e80fe47a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Thu, 28 Jun 2018 21:05:56 +0200 Subject: [PATCH] libreoffice: fix build with poppler 0.64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes commit 99310e2a62c4cbf9f827c41b343cbb2629806911 Author: Andreas Müller Date: Fri Jun 8 23:45:08 2018 +0200 libreoffice: Fix build with recent icu/gcc for all versions of poppler and the error was not caused by gcc. Signed-off-by: Andreas Müller --- .../0007-FIx-build-with-recent-gcc.patch | 53 -------------- .../0007-fix-build-with-poppler-0.64.patch | 70 +++++++++++++++++++ .../libreoffice/libreoffice.inc | 2 +- 3 files changed, 71 insertions(+), 54 deletions(-) delete mode 100644 recipes-libreoffice/libreoffice/files/0007-FIx-build-with-recent-gcc.patch create mode 100644 recipes-libreoffice/libreoffice/files/0007-fix-build-with-poppler-0.64.patch diff --git a/recipes-libreoffice/libreoffice/files/0007-FIx-build-with-recent-gcc.patch b/recipes-libreoffice/libreoffice/files/0007-FIx-build-with-recent-gcc.patch deleted file mode 100644 index b0cd62e..0000000 --- a/recipes-libreoffice/libreoffice/files/0007-FIx-build-with-recent-gcc.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 575a48e4a1683b30a8171225b7484a8c7ab6f94b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= -Date: Fri, 8 Jun 2018 19:47:11 +0200 -Subject: [PATCH 2/3] FIx build with recent gcc -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Change-Id: Ic7f8aa08c8268ecc51abb7710e4a91b9ed892ee7 -Signed-off-by: Andreas Müller ---- - sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 4 ++-- - sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx -index e505a43..db5f361 100644 ---- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx -+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx -@@ -456,7 +456,7 @@ int PDFOutDev::parseFont( long long nNewId, GfxFont* gfxFont, GfxState* state ) - FontAttributes aNewFont; - int nSize = 0; - -- GooString* pFamily = gfxFont->getName(); -+ const GooString* pFamily = gfxFont->getName(); - if( pFamily ) - { - aNewFont.familyName.clear(); -@@ -753,7 +753,7 @@ void PDFOutDev::updateFont(GfxState *state) - FontAttributes aFont; - int nEmbedSize=0; - -- Ref* pID = gfxFont->getID(); -+ const Ref* pID = gfxFont->getID(); - // TODO(Q3): Portability problem - long long fontID = (long long)pID->gen << 32 | (long long)pID->num; - std::unordered_map< long long, FontAttributes >::const_iterator it = -diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx -index b5dd4e4..f6cefda 100644 ---- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx -+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx -@@ -237,7 +237,7 @@ namespace pdfi - double dx, double dy, - double originX, double originY, - CharCode code, int nBytes, Unicode *u, int uLen) SAL_OVERRIDE; -- virtual void drawString(GfxState *state, GooString *s) SAL_OVERRIDE; -+ virtual void drawString(GfxState *state, GooString *s); - virtual void endTextObject(GfxState *state) SAL_OVERRIDE; - - //----- image drawing --- -2.14.3 - diff --git a/recipes-libreoffice/libreoffice/files/0007-fix-build-with-poppler-0.64.patch b/recipes-libreoffice/libreoffice/files/0007-fix-build-with-poppler-0.64.patch new file mode 100644 index 0000000..7fd20e2 --- /dev/null +++ b/recipes-libreoffice/libreoffice/files/0007-fix-build-with-poppler-0.64.patch @@ -0,0 +1,70 @@ +From 42cebff14f7d486c20f04863681cc5ef4602f4eb Mon Sep 17 00:00:00 2001 +From: Rene Engelhard +Date: Tue, 24 Apr 2018 15:56:23 +0200 +Subject: [PATCH] fix build with poppler 0.64 + +GooString became const... + +Upstream-Status: Backport + +Change-Id: Icc95be2e8603a4e22c6a9ac2008986bacd0bfba5 +--- + sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 10 ++++++++++ + sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 4 ++++ + 2 files changed, 14 insertions(+) + +diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +index b7c47d8..6a40bcc 100644 +--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx ++++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +@@ -453,6 +453,9 @@ int PDFOutDev::parseFont( long long nNewId, GfxFont* gfxFont, GfxState* state ) + FontAttributes aNewFont; + int nSize = 0; + ++#if POPPLER_CHECK_VERSION(0, 64, 0) ++ const ++#endif + GooString* pFamily = gfxFont->getName(); + if( pFamily ) + { +@@ -750,6 +753,9 @@ void PDFOutDev::updateFont(GfxState *state) + FontAttributes aFont; + int nEmbedSize=0; + ++#if POPPLER_CHECK_VERSION(0, 64, 0) ++ const ++#endif + Ref* pID = gfxFont->getID(); + // TODO(Q3): Portability problem + long long fontID = (long long)pID->gen << 32 | (long long)pID->num; +@@ -929,7 +935,11 @@ void PDFOutDev::drawChar(GfxState *state, double x, double y, + printf( "\n" ); + } + ++#if POPPLER_CHECK_VERSION(0, 64, 0) ++void PDFOutDev::drawString(GfxState*, const GooString* /*s*/) ++#else + void PDFOutDev::drawString(GfxState*, GooString* /*s*/) ++#endif + { + // TODO(F3): NYI + } +diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx +index b5dd4e4..2f59bf2 100644 +--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx ++++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx +@@ -237,7 +237,11 @@ namespace pdfi + double dx, double dy, + double originX, double originY, + CharCode code, int nBytes, Unicode *u, int uLen) SAL_OVERRIDE; ++#if POPPLER_CHECK_VERSION(0, 64, 0) ++ virtual void drawString(GfxState *state, const GooString *s) SAL_OVERRIDE; ++#else + virtual void drawString(GfxState *state, GooString *s) SAL_OVERRIDE; ++#endif + virtual void endTextObject(GfxState *state) SAL_OVERRIDE; + + //----- image drawing +-- +2.14.3 + diff --git a/recipes-libreoffice/libreoffice/libreoffice.inc b/recipes-libreoffice/libreoffice/libreoffice.inc index 166c688..43bd492 100644 --- a/recipes-libreoffice/libreoffice/libreoffice.inc +++ b/recipes-libreoffice/libreoffice/libreoffice.inc @@ -16,7 +16,7 @@ SRC_URI += " \ file://0004-remove-dictmgr.hxx-to-be-compatible-with-later-hunsp.patch \ file://0005-packedpixeliterator.hxx-fix-typo-detected-by-gcc7.patch \ file://0006-Fix-build-with-recent-icu.patch \ - file://0007-FIx-build-with-recent-gcc.patch \ + file://0007-fix-build-with-poppler-0.64.patch \ " SRCREV_unoconv = "260b815bf2c57118df439f381974f3f0987222a1"