Package: dia
Version: 0.98+git20260221-2
Severity: normal
Tags: ftbfs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Dear Maintainer,

poppler 26.06 changed the Page box accessors (getMediaBox(), getCropBox()
and friends) to return a const reference instead of a pointer, in upstream
commit d50a4510 "Some const PDFRectangle * to const PDFRectangle &"

dia's PDF import plugin still assigns the result to a pointer, so it will
FTBFS once poppler >= 26.06 reaches unstable:

```
../plug-ins/pdf/pdf-import.cpp:96:53: error: cannot convert 'const 
PDFRectangle' to 'const PDFRectangle*' in initialization
../plug-ins/pdf/pdf-import.cpp:97:52: error: cannot convert 'const 
PDFRectangle' to 'const PDFRectangle*' in initialization
```

This was found in a test rebuild against poppler 26.07.0. Unstable is still
at 26.01.0-5, so the package builds fine today

The attached patch takes the address of the returned reference, guarded by a
POPPLER_VERSION_MAJOR/MINOR check in the same style the file already uses for
poppler. It is a no-op with the current poppler in unstable, so it can be
applied now, ahead of the transition

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEuVOE/FJ0HcdfWSw//lAdKwFeZPsFAmpfq24ACgkQ/lAdKwFe
ZPuf4g//Z28+gIECUQkNMtZgoWOqju/c20phHSj1V7eNyOdHc/gsDI9jUA7xOBV+
m+ZSLGM/RJMruqgX7/6haJYxNZnutnNX4tpQzgd5II0IvcWRS3/mb51169CL4Awc
3RL10dyrAKsY9haDSOmagaAiPx2qYKu76PJGj26FXz8yF2Jls8bZl84LOA/4ilpj
duhEHRLOjiaog/KWHPGvPdDbaWQDkDtxNltPILNumMilMhOYqAMoYUzoRou8WmqK
xpS0RroUomw636XWn7NTEIdlkuz6v/lZEom84qT1Qij1USEKJbJa+UzZD2bkTRDu
/x6oBA6FELXeNKi5WbDqZOMMxZTn9LU0q1/ir7JFx1TWBjPcFoO8EASDCfEmK/+H
KWx/xF01kCodbjCFdAFudv6rLmb1BnX2Pkb7a4dMTuwKfpNpVIfdzuIUrXn3MPuD
8yfabZuJ0hSfw+F8+LoKTOiu2fuN5+9hziubVJyy1eek3ny9OwL9bxtJr4Hd219s
i7Nt4oX5pJEZA4UtB9uRO5KdQo/V0xC0MvGvVd9pDgj31WNZUgK9p63CA4zIV3oU
4TIshs92Sn7mIbDGP1uuRIpaKjbiN3f/G/Ptw2xKfKUOpD230arg881UiKgqbWe0
kwHqTBa6GaFBJpJpQ6IpQOmsbM5xvumYTM6wUuEwZvEGExoUBSE=
=tjWI
-----END PGP SIGNATURE-----
Description: Fix FTBFS with poppler >= 26.06
 poppler 26.06 changed the Page box accessors to return a const reference
 instead of a pointer. Take the address of the result, guarded by a version
 check so older poppler still builds
Author: Nadzeya Hutsko <[email protected]>
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/dia/+bug/2161428
Forwarded: no
Last-Update: 2026-07-21
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/plug-ins/pdf/pdf-import.cpp
+++ b/plug-ins/pdf/pdf-import.cpp
@@ -93,8 +93,13 @@
                       (Annot *annot, void *user_data) G_GNUC_UNUSED,
                   void   *annotDisplayDecideCbkData   G_GNUC_UNUSED)
   {
+#if POPPLER_VERSION_MAJOR > 26 || (POPPLER_VERSION_MAJOR == 26 && 
POPPLER_VERSION_MINOR >= 6)
+    const PDFRectangle *mediaBox = &page->getMediaBox();
+    const PDFRectangle *clipBox = &page->getCropBox ();
+#else
     const PDFRectangle *mediaBox = page->getMediaBox();
     const PDFRectangle *clipBox = page->getCropBox ();
+#endif
 
     if (page->isOk()) {
       real w1 = (clipBox->x2 - clipBox->x1);

Reply via email to