- Add backported inkscape-fix-for-poppler-0.82.patch: Fix build with poppler 0.82 and newer. - Stop post(un) handling of desktop_database_post(un) and icon_theme_cache_post(un) macros, no longer needed for any supported version of openSUSE. OBS-URL: https://build.opensuse.org/request/show/744902 OBS-URL: https://build.opensuse.org/package/show/graphics/inkscape?expand=0&rev=54
69 lines
3.0 KiB
Diff
69 lines
3.0 KiB
Diff
From 324c7903d9fd62e74c042c31477299be3b980fd2 Mon Sep 17 00:00:00 2001
|
|
From: Thomas Holder <thomas@thomas-holder.de>
|
|
Date: Sat, 26 Oct 2019 14:39:31 +0200
|
|
Subject: [PATCH] fix poppler 0.82.0 build
|
|
|
|
---
|
|
src/extension/internal/pdfinput/pdf-parser.cpp | 2 +-
|
|
src/extension/internal/pdfinput/poppler-transition-api.h | 6 ++++++
|
|
src/extension/internal/pdfinput/svg-builder.cpp | 2 +-
|
|
src/extension/internal/pdfinput/svg-builder.h | 2 +-
|
|
4 files changed, 9 insertions(+), 3 deletions(-)
|
|
|
|
Index: inkscape-0.92.4/src/extension/internal/pdfinput/pdf-parser.cpp
|
|
===================================================================
|
|
--- inkscape-0.92.4.orig/src/extension/internal/pdfinput/pdf-parser.cpp
|
|
+++ inkscape-0.92.4/src/extension/internal/pdfinput/pdf-parser.cpp
|
|
@@ -2414,7 +2414,7 @@ void PdfParser::doShowText(GooString *s)
|
|
int wMode;
|
|
double riseX, riseY;
|
|
CharCode code;
|
|
- Unicode *u = NULL;
|
|
+ Unicode _POPPLER_CONST_82 *u = nullptr;
|
|
double x, y, dx, dy, tdx, tdy;
|
|
double originX, originY, tOriginX, tOriginY;
|
|
double oldCTM[6], newCTM[6];
|
|
Index: inkscape-0.92.4/src/extension/internal/pdfinput/poppler-transition-api.h
|
|
===================================================================
|
|
--- inkscape-0.92.4.orig/src/extension/internal/pdfinput/poppler-transition-api.h
|
|
+++ inkscape-0.92.4/src/extension/internal/pdfinput/poppler-transition-api.h
|
|
@@ -3,6 +3,12 @@
|
|
|
|
#include <glib/poppler-features.h>
|
|
|
|
+#if POPPLER_CHECK_VERSION(0, 82, 0)
|
|
+#define _POPPLER_CONST_82 const
|
|
+#else
|
|
+#define _POPPLER_CONST_82
|
|
+#endif
|
|
+
|
|
#if POPPLER_CHECK_VERSION(0, 76, 0)
|
|
#define _POPPLER_NEW_PARSER(xref, obj) Parser(xref, obj, gFalse)
|
|
#else
|
|
Index: inkscape-0.92.4/src/extension/internal/pdfinput/svg-builder.cpp
|
|
===================================================================
|
|
--- inkscape-0.92.4.orig/src/extension/internal/pdfinput/svg-builder.cpp
|
|
+++ inkscape-0.92.4/src/extension/internal/pdfinput/svg-builder.cpp
|
|
@@ -1379,7 +1379,7 @@ void SvgBuilder::beginString(GfxState *s
|
|
void SvgBuilder::addChar(GfxState *state, double x, double y,
|
|
double dx, double dy,
|
|
double originX, double originY,
|
|
- CharCode /*code*/, int /*nBytes*/, Unicode *u, int uLen) {
|
|
+ CharCode /*code*/, int /*nBytes*/, Unicode const *u, int uLen) {
|
|
|
|
|
|
bool is_space = ( uLen == 1 && u[0] == 32 );
|
|
Index: inkscape-0.92.4/src/extension/internal/pdfinput/svg-builder.h
|
|
===================================================================
|
|
--- inkscape-0.92.4.orig/src/extension/internal/pdfinput/svg-builder.h
|
|
+++ inkscape-0.92.4/src/extension/internal/pdfinput/svg-builder.h
|
|
@@ -141,7 +141,7 @@ public:
|
|
void addChar(GfxState *state, double x, double y,
|
|
double dx, double dy,
|
|
double originX, double originY,
|
|
- CharCode code, int nBytes, Unicode *u, int uLen);
|
|
+ CharCode code, int nBytes, Unicode const *u, int uLen);
|
|
void beginTextObject(GfxState *state);
|
|
void endTextObject(GfxState *state);
|
|
|