Package: pdf2djvu
Version: 0.9.18.2-1
Severity: wishlist
Tags: patch
X-Debbugs-Cc: nathan.teodo...@canonical.com

Dear Maintainer,

With Poppler 22.06, pdf2djvu no longer builds.

The attached patch is comprised of upstream changes to fix this.


-- System Information:
Debian Release: bookworm/sid
  APT prefers kinetic
  APT policy: (500, 'kinetic')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.15.0-33-generic (SMP w/8 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages pdf2djvu depends on:
ii  djvulibre-bin               3.5.28-2build2
ii  libc6                       2.35-0ubuntu3
ii  libdjvulibre21              3.5.28-2build2
ii  libexiv2-27                 0.27.5-3ubuntu1
ii  libgcc-s1                   12.1.0-2ubuntu1
ii  libgomp1                    12.1.0-2ubuntu1
ii  libgraphicsmagick++-q16-12  1.4+really1.3.38-1
ii  libgraphicsmagick-q16-3     1.4+really1.3.38-1
ii  libpoppler118               22.02.0-3
ii  libstdc++6                  12.1.0-2ubuntu1
ii  libuuid1                    2.38-4ubuntu1

pdf2djvu recommends no packages.

Versions of packages pdf2djvu suggests:
ii  poppler-data  0.4.11-1

-- no debconf information
diff -Nru pdf2djvu-0.9.18.2/debian/changelog pdf2djvu-0.9.18.2/debian/changelog
--- pdf2djvu-0.9.18.2/debian/changelog  2022-02-17 14:16:25.000000000 -0300
+++ pdf2djvu-0.9.18.2/debian/changelog  2022-06-14 09:00:10.000000000 -0300
@@ -1,3 +1,11 @@
+pdf2djvu (0.9.18.2-2) UNRELEASED; urgency=medium
+
+  * debian/patches/compat-with-poppler-22.06.patch
+    - Backport upstream changes need for compatibility with new Poppler
+    version.
+
+ -- Nathan Pratta Teodosio <nathan.teodo...@canonical.com>  Tue, 14 Jun 2022 
09:00:10 -0300
+
 pdf2djvu (0.9.18.2-1) unstable; urgency=medium
 
   * New upstream release.
diff -Nru pdf2djvu-0.9.18.2/debian/patches/compat-with-poppler-22.06.patch 
pdf2djvu-0.9.18.2/debian/patches/compat-with-poppler-22.06.patch
--- pdf2djvu-0.9.18.2/debian/patches/compat-with-poppler-22.06.patch    
1969-12-31 21:00:00.000000000 -0300
+++ pdf2djvu-0.9.18.2/debian/patches/compat-with-poppler-22.06.patch    
2022-06-14 09:00:10.000000000 -0300
@@ -0,0 +1,29 @@
+Description: Backport for Poppler 22.06 compatibility
+Author: Nathan Pratta Teodosio <nathan.teodo...@canonical.com>
+
+--- pdf2djvu-0.9.18.2.orig/pdf-backend.cc
++++ pdf2djvu-0.9.18.2/pdf-backend.cc
+@@ -130,7 +130,11 @@ void pdf::Environment::set_antialias(boo
+  */
+ 
+ pdf::Document::Document(const std::string &file_name)
+-: ::PDFDoc(new pdf::String(file_name.c_str()), nullptr, nullptr)
++#if POPPLER_VERSION >= 220300
++: ::PDFDoc(std::make_unique<pdf::String>(file_name.c_str()))
++#else
++: ::PDFDoc(new pdf::String(file_name.c_str()))
++#endif
+ {
+   if (!this->isOk())
+     throw LoadError();
+--- pdf2djvu-0.9.18.2.orig/pdf2djvu.cc
++++ pdf2djvu-0.9.18.2/pdf2djvu.cc
+@@ -89,7 +89,7 @@ static int get_page_for_goto_link(pdf::l
+ #endif
+   }
+   else
+-    dest.reset(orig_dest->copy());
++    dest.reset(new pdf::link::Destination(*orig_dest));
+   if (dest.get() != nullptr)
+   {
+     int page;
diff -Nru pdf2djvu-0.9.18.2/debian/patches/series 
pdf2djvu-0.9.18.2/debian/patches/series
--- pdf2djvu-0.9.18.2/debian/patches/series     1969-12-31 21:00:00.000000000 
-0300
+++ pdf2djvu-0.9.18.2/debian/patches/series     2022-06-14 08:59:39.000000000 
-0300
@@ -0,0 +1 @@
+compat-with-poppler-22.06.patch

Reply via email to