diff --git a/pdf2djvu-Destination-copy-constructor.patch b/pdf2djvu-Destination-copy-constructor.patch new file mode 100644 index 0000000..fcbd6de --- /dev/null +++ b/pdf2djvu-Destination-copy-constructor.patch @@ -0,0 +1,28 @@ +From 81b635e014ebd0240a8719cc39b6a1b759cc6a98 Mon Sep 17 00:00:00 2001 +From: Jakub Wilk +Date: Wed, 16 Feb 2022 09:10:28 +0000 +Subject: main: use pdf::link::Destination copy constructor. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes: + + main.cc: In function ‘int get_page_for_goto_link(pdf::link::GoTo*, pdf::Catalog*)’: + main.cc:92:27: error: ‘const Destination’ {aka ‘const class LinkDest’} has no member named ‘copy’ + +https://cgit.freedesktop.org/poppler/poppler/commit/?id=7a429c3cf9fba67e + +diff --git a/main.cc b/main.cc +index 2b42d16..bb5fd57 100644 +--- a/pdf2djvu.cc ++++ b/pdf2djvu.cc +@@ -89,7 +89,7 @@ static int get_page_for_goto_link(pdf::link::GoTo *goto_link, pdf::Catalog *cata + #endif + } + else +- dest.reset(orig_dest->copy()); ++ dest.reset(new pdf::link::Destination(*orig_dest)); + if (dest.get() != nullptr) + { + int page; diff --git a/pdf2djvu-PDFDoc-constructor.patch b/pdf2djvu-PDFDoc-constructor.patch new file mode 100644 index 0000000..31b64e5 --- /dev/null +++ b/pdf2djvu-PDFDoc-constructor.patch @@ -0,0 +1,23 @@ +From dca43e8182174bc04e107eaefcafcfdfdf9bcd61 Mon Sep 17 00:00:00 2001 +From: Jakub Wilk +Date: Wed, 2 Mar 2022 10:40:37 +0000 +Subject: pdf-backend: simplify Poppler 22.03 compat code. + + +diff --git a/pdf-backend.cc b/pdf-backend.cc +index ba85da2..8fab764 100644 +--- a/pdf-backend.cc ++++ b/pdf-backend.cc +@@ -129,7 +129,11 @@ void pdf::Environment::set_antialias(bool value) + */ + + 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(file_name.c_str())) ++#else ++: ::PDFDoc(new pdf::String(file_name.c_str())) ++#endif + { + if (!this->isOk()) + throw LoadError(); diff --git a/pdf2djvu.spec b/pdf2djvu.spec index c4a439d..f4aaaa6 100644 --- a/pdf2djvu.spec +++ b/pdf2djvu.spec @@ -1,17 +1,18 @@ Name: pdf2djvu Version: 0.9.18.2 -Release: 4%{?dist} +Release: 5%{?dist} Summary: PDF to DjVu converter License: GPLv2+ URL: http://jwilk.net/software/pdf2djvu Source0: https://github.com/jwilk/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz +Patch0: pdf2djvu-PDFDoc-constructor.patch +Patch1: pdf2djvu-Destination-copy-constructor.patch BuildRequires: make BuildRequires: gcc-c++ BuildRequires: djvulibre-devel djvulibre BuildRequires: libjpeg-devel BuildRequires: pkgconfig BuildRequires: poppler-devel -BuildRequires: pstreams-devel BuildRequires: fontconfig-devel BuildRequires: GraphicsMagick-c++-devel BuildRequires: exiv2-devel libuuid-devel @@ -48,6 +49,12 @@ install -p -m 644 -D {doc,%{buildroot}%{_mandir}/man1}/%{name}.1 %{_mandir}/ru/man1/%{name}.1* %changelog +* Mon Aug 08 2022 Marek Kasik - 0.9.18.2-5 +- Rebuild for poppler-22.08.0 +- Remove requirement of pstrams-devel as they are not supported +- and has been removed from Fedora +- Backport 2 commits from upstream to build with current poppler + * Fri Jul 22 2022 Fedora Release Engineering - 0.9.18.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild