Fix_Poppler_26_01_00_compat.patch OBS-URL: https://build.opensuse.org/package/show/graphics/inkscape?expand=0&rev=158
62 lines
2.1 KiB
Diff
62 lines
2.1 KiB
Diff
From 3a528728ebe33e10bb44d152f47cfedfddbfe18a Mon Sep 17 00:00:00 2001
|
|
From: Thomas Holder <thomas@thomas-holder.de>
|
|
Date: Sat, 10 Jan 2026 23:44:10 +0100
|
|
Subject: [PATCH] Fix build with poppler 26.01.0
|
|
|
|
---
|
|
src/extension/internal/pdfinput/pdf-input.cpp | 1 +
|
|
src/extension/internal/pdfinput/svg-builder.cpp | 9 +++++++++
|
|
2 files changed, 10 insertions(+)
|
|
|
|
diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp
|
|
index 89d90ff0fe..bba8633e18 100644
|
|
--- a/src/extension/internal/pdfinput/pdf-input.cpp
|
|
+++ b/src/extension/internal/pdfinput/pdf-input.cpp
|
|
@@ -32,6 +32,7 @@
|
|
#include <poppler/glib/poppler.h>
|
|
#include <poppler/glib/poppler-document.h>
|
|
#include <poppler/glib/poppler-page.h>
|
|
+#include <poppler/goo/gmem.h>
|
|
#endif
|
|
|
|
#include <gdkmm/general.h>
|
|
diff --git a/src/extension/internal/pdfinput/svg-builder.cpp b/src/extension/internal/pdfinput/svg-builder.cpp
|
|
index 1b15b425b1..e1de266111 100644
|
|
--- a/src/extension/internal/pdfinput/svg-builder.cpp
|
|
+++ b/src/extension/internal/pdfinput/svg-builder.cpp
|
|
@@ -29,6 +29,7 @@
|
|
#include <poppler/GfxState.h>
|
|
#include <poppler/Page.h>
|
|
#include <poppler/Stream.h>
|
|
+#include <poppler/goo/gmem.h>
|
|
|
|
#include "color.h"
|
|
#include "color/cms-util.h"
|
|
@@ -2145,7 +2146,11 @@ Inkscape::XML::Node *SvgBuilder::_createImage(Stream *str, int width, int height
|
|
} else {
|
|
image_stream = new ImageStream(str, width, 1, 1);
|
|
}
|
|
+#if POPPLER_CHECK_VERSION(26, 0, 0)
|
|
+ image_stream->rewind();
|
|
+#else
|
|
image_stream->reset();
|
|
+#endif
|
|
|
|
// Convert grayscale values
|
|
unsigned char *buffer = new unsigned char[width];
|
|
@@ -2171,7 +2176,11 @@ Inkscape::XML::Node *SvgBuilder::_createImage(Stream *str, int width, int height
|
|
image_stream = new ImageStream(str, width,
|
|
color_map->getNumPixelComps(),
|
|
color_map->getBits());
|
|
+#if POPPLER_CHECK_VERSION(26, 0, 0)
|
|
+ image_stream->rewind();
|
|
+#else
|
|
image_stream->reset();
|
|
+#endif
|
|
|
|
// Convert RGB values
|
|
unsigned int *buffer = new unsigned int[width];
|
|
--
|
|
GitLab
|
|
|