diff -Nru extractpdfmark-1.1.0/debian/changelog extractpdfmark-1.1.0/debian/changelog --- extractpdfmark-1.1.0/debian/changelog 2019-08-28 21:55:09.000000000 +0000 +++ extractpdfmark-1.1.0/debian/changelog 2020-09-08 10:26:50.000000000 +0000 @@ -1,3 +1,19 @@ +extractpdfmark (1.1.0-1+rpi2) bullseye-staging; urgency=medium + + * Update getDestNameTreeDest and getDestsDest calls for poppler 20 + * Bump poppler build-dependency since changes will break build with older + poppler. + + -- Peter Michael Green Tue, 08 Sep 2020 10:26:50 +0000 + +extractpdfmark (1.1.0-1+rpi1) bullseye-staging; urgency=medium + + * Update findpage call for poppler 0.85 (Closes: 968714) + * Bump poppler build-dependency since changes will break build with older + poppler. + + -- Peter Michael Green Thu, 20 Aug 2020 13:59:55 +0000 + extractpdfmark (1.1.0-1) unstable; urgency=medium * New upstream version 1.1.0 diff -Nru extractpdfmark-1.1.0/debian/control extractpdfmark-1.1.0/debian/control --- extractpdfmark-1.1.0/debian/control 2019-08-28 21:54:37.000000000 +0000 +++ extractpdfmark-1.1.0/debian/control 2020-09-08 10:26:50.000000000 +0000 @@ -4,8 +4,8 @@ Priority: optional Build-Depends: debhelper-compat (= 12), pkg-config, - libpoppler-dev, - libpoppler-private-dev, + libpoppler-dev (>= 20), + libpoppler-private-dev (>= 20), # Needed for testing (gs and pdftex) ghostscript, texlive-base diff -Nru extractpdfmark-1.1.0/debian/patches/0003-poppler-0.85.patch extractpdfmark-1.1.0/debian/patches/0003-poppler-0.85.patch --- extractpdfmark-1.1.0/debian/patches/0003-poppler-0.85.patch 1970-01-01 00:00:00.000000000 +0000 +++ extractpdfmark-1.1.0/debian/patches/0003-poppler-0.85.patch 2020-08-20 13:59:55.000000000 +0000 @@ -0,0 +1,16 @@ +Description: Fix build with poppler 0.85 + This package fixes the build with poppler 0.85, it will break the build with + poppler 0.71. Intermediate versions of poppler have not been investigated. +Author: Peter Michael Green + +--- extractpdfmark-1.1.0.orig/src/poppler-core/destname.cc ++++ extractpdfmark-1.1.0/src/poppler-core/destname.cc +@@ -82,7 +82,7 @@ std::string poppler_core::build_destname + if (link_dest->isPageRef ()) + { + Ref page_ref = link_dest->getPageRef (); +- pagenum = doc->findPage (page_ref.num, page_ref.gen); ++ pagenum = doc->findPage (page_ref); + } + else + { diff -Nru extractpdfmark-1.1.0/debian/patches/0004-poppler-20.patch extractpdfmark-1.1.0/debian/patches/0004-poppler-20.patch --- extractpdfmark-1.1.0/debian/patches/0004-poppler-20.patch 1970-01-01 00:00:00.000000000 +0000 +++ extractpdfmark-1.1.0/debian/patches/0004-poppler-20.patch 2020-09-08 10:26:50.000000000 +0000 @@ -0,0 +1,44 @@ +Description: Update getDestNameTreeDest and getDestsDest calls for poppler 20 + Poppler changed the return type of Catalog::getDestNameTreeDest and Catalog::getDestsDest + from LinkDest * to std::unique_ptr + + If I am following the code correctly, it seems that extractpdfmark had a memory leak, + previously, getDestNameTreeDest and getDestsDest returned an owning pointer, but + add_destname does not take ownership of the pointer passed in. + + I therefore belive it is ok to just add .get() to the calls, this should fix both the + build failure and the memory leak. +Author: Peter Michael Green + +--- +The information above should follow the Patch Tagging Guidelines, please +checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here +are templates for supplementary fields that you might want to add: + +Origin: , +Bug: +Bug-Debian: https://bugs.debian.org/ +Bug-Ubuntu: https://launchpad.net/bugs/ +Forwarded: +Reviewed-By: +Last-Update: 2020-09-08 + +--- extractpdfmark-1.1.0.orig/src/poppler-core/destname.cc ++++ extractpdfmark-1.1.0/src/poppler-core/destname.cc +@@ -189,14 +189,14 @@ std::string poppler_core::destname (void + for (int i=0; igetDestNameTreeName (i), +- catalog->getDestNameTreeDest (i)); ++ catalog->getDestNameTreeDest (i).get()); + } + + len = catalog->numDests (); + for (int i=0; igetDestsName (i), +- catalog->getDestsDest (i)); ++ catalog->getDestsDest (i).get()); + } + } + else diff -Nru extractpdfmark-1.1.0/debian/patches/series extractpdfmark-1.1.0/debian/patches/series --- extractpdfmark-1.1.0/debian/patches/series 2019-08-28 21:50:53.000000000 +0000 +++ extractpdfmark-1.1.0/debian/patches/series 2020-09-08 10:26:50.000000000 +0000 @@ -1,2 +1,4 @@ 0001-Add-gettext-requirement-to-configure.ac.patch 0002-Exclude-some-docs-from-install.patch +0003-poppler-0.85.patch +0004-poppler-20.patch