Bug#1026040: pdftoipe: Fix build with Poppler >= 22.09

Nathan Pratta Teodosio nathan.teodosio at canonical.com
Tue Dec 13 16:58:49 GMT 2022


Package: pdftoipe
Severity: wishlist
Tags: patch
X-Debbugs-Cc: nathan.teodosio at canonical.com

Hi, ipe-tools fails to build with Poppler 22.09.

The attached patch fixes the build (log available at [1]).

[1]: https://launchpad.net/~nteodosio/+archive/ubuntu/poppler/+build/24935610
-------------- next part --------------
diff -Nru ipe-tools-7.2.24.1/debian/changelog ipe-tools-7.2.24.1/debian/changelog
--- ipe-tools-7.2.24.1/debian/changelog	2022-10-16 21:05:46.000000000 -0300
+++ ipe-tools-7.2.24.1/debian/changelog	2022-12-13 13:45:51.000000000 -0300
@@ -1,3 +1,9 @@
+ipe-tools (1:7.2.24.1-3) unstable; urgency=medium
+
+  * Add patch to fix build with poppler 22.09.
+
+ -- Nathan Pratta Teodosio <nathan.teodosio at canonical.com>  Tue, 13 Dec 2022 13:45:51 -0300
+
 ipe-tools (1:7.2.24.1-2) unstable; urgency=medium
 
   [ Sam Q ]
diff -Nru ipe-tools-7.2.24.1/debian/patches/build-with-poppler-22.09.patch ipe-tools-7.2.24.1/debian/patches/build-with-poppler-22.09.patch
--- ipe-tools-7.2.24.1/debian/patches/build-with-poppler-22.09.patch	1969-12-31 21:00:00.000000000 -0300
+++ ipe-tools-7.2.24.1/debian/patches/build-with-poppler-22.09.patch	2022-12-13 13:42:16.000000000 -0300
@@ -0,0 +1,33 @@
+From: Jonathan Chang <me at jonathanchang.org>
+Date: Wed, 23 Nov 2022 16:22:50 -0800
+Subject: [PATCH] pdftoipe: fix for poppler >= 2.09
+Origin: https://github.com/otfried/ipe-tools/pull/55.patch
+
+---
+ pdftoipe/xmloutputdev.cpp | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/pdftoipe/xmloutputdev.cpp b/pdftoipe/xmloutputdev.cpp
+index 291eb5f..17bac2a 100644
+--- a/pdftoipe/xmloutputdev.cpp
++++ b/pdftoipe/xmloutputdev.cpp
+@@ -149,15 +149,15 @@ void XmlOutputDev::stroke(GfxState *state)
+   writeColor("<path stroke=", rgb, 0);
+   writePSFmt(" pen=\"%g\"", state->getTransformedLineWidth());
+ 
+-  double *dash;
+   double start;
+-  int length, i;
++  std::vector<double> dash = state->getLineDash(&start);
++  int length = dash.size();
++  int i;
+ 
+-  state->getLineDash(&dash, &length, &start);
+   if (length) {
+     writePS(" dash=\"[");
+     for (i = 0; i < length; ++i)
+-      writePSFmt("%g%s", state->transformWidth(dash[i]), 
++      writePSFmt("%g%s", state->transformWidth(dash.at(i)),
+ 		 (i == length-1) ? "" : " ");
+     writePSFmt("] %g\"", state->transformWidth(start));
+   }
diff -Nru ipe-tools-7.2.24.1/debian/patches/series ipe-tools-7.2.24.1/debian/patches/series
--- ipe-tools-7.2.24.1/debian/patches/series	2022-10-16 21:05:46.000000000 -0300
+++ ipe-tools-7.2.24.1/debian/patches/series	2022-12-13 13:45:51.000000000 -0300
@@ -1,2 +1,3 @@
 build-with-poppler-22.03.patch
+build-with-poppler-22.09.patch
 cross.patch


More information about the debian-science-maintainers mailing list