dia: unstable-2025-10-26 -> 0.97.2-unstable-2026-07-24, fix build (#545336)

This commit is contained in:
7c6f434c
2026-07-24 20:26:10 +00:00
committed by GitHub
2 changed files with 41 additions and 3 deletions
@@ -0,0 +1,33 @@
From 2373861a858fb6ee7d50870ae66a59f05c6cd4bd Mon Sep 17 00:00:00 2001
From: Nadzeya Hutsko <nadzeya@ubuntu.com>
Date: Wed, 22 Jul 2026 20:46:52 +0200
Subject: [PATCH] Fix build 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
---
plug-ins/pdf/pdf-import.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/plug-ins/pdf/pdf-import.cpp b/plug-ins/pdf/pdf-import.cpp
index 3af268646..35fc6d9e3 100644
--- a/plug-ins/pdf/pdf-import.cpp
+++ b/plug-ins/pdf/pdf-import.cpp
@@ -93,8 +93,13 @@ public :
(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);
--
GitLab
+8 -3
View File
@@ -50,16 +50,21 @@ let
in
stdenv.mkDerivation {
pname = "dia";
version = "unstable-2025-10-26";
version = "0.97.2-unstable-2026-07-24";
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "GNOME";
repo = "dia";
rev = "efdf829e8afdbbeb371820932769e35415ebe886";
hash = "sha256-VFFU5iJnVJdZ2tkNszZ2ooBD+GiCL6MqanzpEWIJerk=";
rev = "ad68cc378b7a187706bc2648c48b44d16fb80819";
hash = "sha256-ejjSc9GGXD5GsbeRps1T20xifJuzWA1yq/G7jk797Cw=";
};
patches = [
# https://gitlab.gnome.org/GNOME/dia/-/merge_requests/146
./fix-build-with-poppler-26-06.patch
];
postPatch = ''
# Fix build with poppler 25.10.0
substituteInPlace plug-ins/pdf/pdf-import.cpp \