Compare commits
27 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
25ba5f0734 | ||
|
9e1d1f6cff | ||
|
88bc857b92 | ||
|
de4fabea83 | ||
|
c822bef086 | ||
|
43b47146f8 | ||
|
eecd708f9c | ||
|
a42986a80c | ||
|
03f15bf1e9 | ||
|
85356f167a | ||
|
a14b357148 | ||
|
379597b56c | ||
|
e30de2fbea | ||
|
cfb1013e04 | ||
|
ef6d84f8f4 | ||
|
240ee33795 | ||
|
4b86a862ba | ||
|
5888cedab9 | ||
|
394a18ce7e | ||
|
e2c5eaf138 | ||
|
43d43ded6d | ||
|
aa38a06aea | ||
|
371b11fd44 | ||
|
c905d793e3 | ||
|
7dfcbb73ea | ||
|
cd10708a04 | ||
|
f7e941062e |
8
.gitignore
vendored
8
.gitignore
vendored
@ -9,3 +9,11 @@ pdf2djvu_0.7.3.tar.gz
|
|||||||
/pdf2djvu-0.9.9.tar.xz
|
/pdf2djvu-0.9.9.tar.xz
|
||||||
/pdf2djvu-0.9.10.tar.xz
|
/pdf2djvu-0.9.10.tar.xz
|
||||||
/pdf2djvu-0.9.11.tar.xz
|
/pdf2djvu-0.9.11.tar.xz
|
||||||
|
/pdf2djvu-0.9.13.tar.xz
|
||||||
|
/pdf2djvu-0.9.15.tar.xz
|
||||||
|
/pdf2djvu-0.9.17.tar.xz
|
||||||
|
/pdf2djvu-0.9.17.1.tar.xz
|
||||||
|
/pdf2djvu-0.9.18.tar.xz
|
||||||
|
/pdf2djvu-0.9.18.1.tar.xz
|
||||||
|
/pdf2djvu-0.9.18.2.tar.xz
|
||||||
|
/pdf2djvu-0.9.19.tar.xz
|
||||||
|
File diff suppressed because it is too large
Load Diff
28
pdf2djvu-Destination-copy-constructor.patch
Normal file
28
pdf2djvu-Destination-copy-constructor.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
From 81b635e014ebd0240a8719cc39b6a1b759cc6a98 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jakub Wilk <jwilk@jwilk.net>
|
||||||
|
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;
|
23
pdf2djvu-PDFDoc-constructor.patch
Normal file
23
pdf2djvu-PDFDoc-constructor.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
From dca43e8182174bc04e107eaefcafcfdfdf9bcd61 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jakub Wilk <jwilk@jwilk.net>
|
||||||
|
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<pdf::String>(file_name.c_str()))
|
||||||
|
+#else
|
||||||
|
+: ::PDFDoc(new pdf::String(file_name.c_str()))
|
||||||
|
+#endif
|
||||||
|
{
|
||||||
|
if (!this->isOk())
|
||||||
|
throw LoadError();
|
@ -1,19 +1,19 @@
|
|||||||
%global _hardened_build 1
|
|
||||||
|
|
||||||
Name: pdf2djvu
|
Name: pdf2djvu
|
||||||
Version: 0.9.11
|
Version: 0.9.19
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: PDF to DjVu converter
|
Summary: PDF to DjVu converter
|
||||||
Group: Applications/Publishing
|
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: http://jwilk.net/software/pdf2djvu
|
URL: http://jwilk.net/software/pdf2djvu
|
||||||
Source0: https://github.com/jwilk/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz
|
Source0: https://github.com/jwilk/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz
|
||||||
|
# both patches are included in 0.9.19 release, remove these lines next commit
|
||||||
|
# Patch0: pdf2djvu-PDFDoc-constructor.patch
|
||||||
|
# Patch1: pdf2djvu-Destination-copy-constructor.patch
|
||||||
|
BuildRequires: make
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: djvulibre-devel djvulibre
|
BuildRequires: djvulibre-devel djvulibre
|
||||||
BuildRequires: libjpeg-devel
|
BuildRequires: libjpeg-devel
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: poppler-devel
|
BuildRequires: poppler-devel
|
||||||
BuildRequires: pstreams-devel
|
|
||||||
BuildRequires: fontconfig-devel
|
BuildRequires: fontconfig-devel
|
||||||
BuildRequires: GraphicsMagick-c++-devel
|
BuildRequires: GraphicsMagick-c++-devel
|
||||||
BuildRequires: exiv2-devel libuuid-devel
|
BuildRequires: exiv2-devel libuuid-devel
|
||||||
@ -28,6 +28,7 @@ metadata.
|
|||||||
%autosetup
|
%autosetup
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
export CXXFLAGS="-std=c++17 $RPM_OPT_FLAGS"
|
||||||
%configure
|
%configure
|
||||||
%make_build
|
%make_build
|
||||||
|
|
||||||
@ -49,6 +50,83 @@ install -p -m 644 -D {doc,%{buildroot}%{_mandir}/man1}/%{name}.1
|
|||||||
%{_mandir}/ru/man1/%{name}.1*
|
%{_mandir}/ru/man1/%{name}.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Aug 25 2022 Filipe Rosset <rosset.filipe@gmail.com> - 0.9.19-1
|
||||||
|
- Updated to 0.9.19 fixes rhbz#2113575 and rhbz#2117084
|
||||||
|
|
||||||
|
* Mon Aug 08 2022 Marek Kasik <mkasik@redhat.com> - 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 <releng@fedoraproject.org> - 0.9.18.2-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.18.2-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jan 18 2022 Marek Kasik <mkasik@redhat.com> - 0.9.18.2-2
|
||||||
|
- Rebuild for poppler-22.01.0
|
||||||
|
- Switch to C++17 because it is needed by poppler now
|
||||||
|
|
||||||
|
* Mon Nov 22 2021 Filipe Rosset <rosset.filipe@gmail.com> - 0.9.18.2-1
|
||||||
|
- Update to 0.9.18.2 fixes rhbz#2025677
|
||||||
|
|
||||||
|
* Mon Oct 18 2021 Filipe Rosset <rosset.filipe@gmail.com> - 0.9.18.1-1
|
||||||
|
- Update to 0.9.18.1 fixes rhbz#2013685
|
||||||
|
|
||||||
|
* Thu Oct 07 2021 Filipe Rosset <rosset.filipe@gmail.com> - 0.9.18-1
|
||||||
|
- Update to 0.9.18 fixes rhbz#1969290
|
||||||
|
|
||||||
|
* Thu Aug 05 2021 Marek Kasik <mkasik@redhat.com> - 0.9.17.1-5
|
||||||
|
- Rebuild for poppler-21.08.0
|
||||||
|
|
||||||
|
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.17.1-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.17.1-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jan 19 2021 Marek Kasik <mkasik@redhat.com> - 0.9.17.1-2
|
||||||
|
- Rebuild for poppler-21.01.0
|
||||||
|
|
||||||
|
* Fri Jan 1 2021 Filipe Rosset <rosset.filipe@gmail.com> - 0.9.17.1-1
|
||||||
|
- Update to 0.9.17.1 fixes rhbz#1805167
|
||||||
|
|
||||||
|
* Wed Aug 19 2020 Jeff Law <law@redhat.com> - 0.9.17-4
|
||||||
|
- Force C++14 as this code is not C++17 ready
|
||||||
|
|
||||||
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.17-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jul 20 2020 Marek Kasik <mkasik@redhat.com> - 0.9.17-2
|
||||||
|
- Rebuild for poppler-0.90.0
|
||||||
|
|
||||||
|
* Sun Mar 15 2020 Filipe Rosset <rosset.filipe@gmail.com> - 0.9.17-1
|
||||||
|
- Update to 0.9.17 fixes rhbz#1805167
|
||||||
|
|
||||||
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.15-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jan 20 2020 Filipe Rosset <rosset.filipe@gmail.com> - 0.9.15-1
|
||||||
|
- Update to 0.9.15 fixes rhbz#1766275
|
||||||
|
|
||||||
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.13-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jun 11 2019 Filipe Rosset <rosset.filipe@gmail.com> - 0.9.13-1
|
||||||
|
- update to new 0.9.13 upstream release, fixes rhbz #1719015
|
||||||
|
- removed upstreamed patch
|
||||||
|
|
||||||
|
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.11-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jan 30 2019 Rex Dieter <rdieter@fedoraproject.org> - 0.9.11-3
|
||||||
|
- rebuild (exiv2)
|
||||||
|
|
||||||
|
* Fri Jan 25 2019 Marek Kasik <mkasik@redhat.com> - 0.9.11-2
|
||||||
|
- Rebuild for poppler-0.73.0
|
||||||
|
|
||||||
* Sat Oct 27 2018 Filipe Rosset <rosset.filipe@gmail.com> - 0.9.11-1
|
* Sat Oct 27 2018 Filipe Rosset <rosset.filipe@gmail.com> - 0.9.11-1
|
||||||
- Rebuilt for new upstream release 0.9.11
|
- Rebuilt for new upstream release 0.9.11
|
||||||
- Upstream changelog https://github.com/jwilk/pdf2djvu/blob/master/doc/changelog
|
- Upstream changelog https://github.com/jwilk/pdf2djvu/blob/master/doc/changelog
|
||||||
|
@ -1,111 +0,0 @@
|
|||||||
From 435cd4bddd69f742467114cc0f9331e48f30cabc Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jakub Wilk <jwilk@jwilk.net>
|
|
||||||
Date: Sat, 2 Sep 2017 15:58:25 +0200
|
|
||||||
Subject: [PATCH] Fix compatibility with Poppler 0.58.
|
|
||||||
|
|
||||||
http://cgit.freedesktop.org/poppler/poppler/commit/?id=3c29ded4bee5eadb829ed46af2ec92be57b0077b
|
|
||||||
http://cgit.freedesktop.org/poppler/poppler/commit/?id=9773c1534668d84b8267c3e5c9d612076fa231a5
|
|
||||||
---
|
|
||||||
pdf-backend.cc | 14 ++++++++++++--
|
|
||||||
pdf-backend.hh | 12 ++++++++++++
|
|
||||||
pdf2djvu.cc | 5 ++++-
|
|
||||||
3 files changed, 28 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pdf-backend.cc b/pdf-backend.cc
|
|
||||||
index 2499402..554c5c0 100644
|
|
||||||
--- a/pdf-backend.cc
|
|
||||||
+++ b/pdf-backend.cc
|
|
||||||
@@ -402,7 +402,7 @@ pdf::Metadata::Metadata(pdf::Document &document)
|
|
||||||
date_fields.push_back(std::make_pair("ModDate", &this->mod_date));
|
|
||||||
|
|
||||||
pdf::OwnedObject info;
|
|
||||||
- document.getDocInfo(&info);
|
|
||||||
+ document.get_doc_info(info);
|
|
||||||
if (!info.isDict())
|
|
||||||
return;
|
|
||||||
pdf::Dict *info_dict = info.getDict();
|
|
||||||
@@ -591,17 +591,27 @@ double pdf::get_path_area(splash::Path &path)
|
|
||||||
|
|
||||||
pdf::Object *pdf::dict_lookup(pdf::Object &dict, const char *key, pdf::Object *object)
|
|
||||||
{
|
|
||||||
+#if POPPLER_VERSION < 5800
|
|
||||||
return dict.dictLookup(const_cast<char*>(key), object);
|
|
||||||
+#else
|
|
||||||
+ *object = dict.dictLookup(const_cast<char*>(key));
|
|
||||||
+ return object;
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
pdf::Object *pdf::dict_lookup(pdf::Object *dict, const char *key, pdf::Object *object)
|
|
||||||
{
|
|
||||||
- return dict->dictLookup(const_cast<char*>(key), object);
|
|
||||||
+ return pdf::dict_lookup(*dict, key, object);
|
|
||||||
}
|
|
||||||
|
|
||||||
pdf::Object *pdf::dict_lookup(pdf::Dict *dict, const char *key, pdf::Object *object)
|
|
||||||
{
|
|
||||||
+#if POPPLER_VERSION < 5800
|
|
||||||
return dict->lookup(const_cast<char*>(key), object);
|
|
||||||
+#else
|
|
||||||
+ *object = dict->lookup(const_cast<char*>(key));
|
|
||||||
+ return object;
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/pdf-backend.hh b/pdf-backend.hh
|
|
||||||
index 6a430c7..f50269e 100644
|
|
||||||
--- a/pdf-backend.hh
|
|
||||||
+++ b/pdf-backend.hh
|
|
||||||
@@ -274,6 +274,7 @@ namespace pdf
|
|
||||||
* ====================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
+#if POPPLER_VERSION < 5800
|
|
||||||
class OwnedObject : public Object
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
@@ -282,6 +283,9 @@ namespace pdf
|
|
||||||
this->free();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
+#else
|
|
||||||
+ typedef ::Object OwnedObject;
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* class pdf::Environment
|
|
||||||
@@ -315,6 +319,14 @@ namespace pdf
|
|
||||||
void display_page(Renderer *renderer, int npage, double hdpi, double vdpi, bool crop, bool do_links);
|
|
||||||
void get_page_size(int n, bool crop, double &width, double &height);
|
|
||||||
const std::string get_xmp();
|
|
||||||
+ void get_doc_info(pdf::OwnedObject &info)
|
|
||||||
+ {
|
|
||||||
+#if POPPLER_VERSION < 5800
|
|
||||||
+ this->getDocInfo(&info);
|
|
||||||
+#else
|
|
||||||
+ info = this->getDocInfo();
|
|
||||||
+#endif
|
|
||||||
+ }
|
|
||||||
class LoadError : public std::runtime_error
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
diff --git a/pdf2djvu.cc b/pdf2djvu.cc
|
|
||||||
index ea3f7b0..9c16be7 100644
|
|
||||||
--- a/pdf2djvu.cc
|
|
||||||
+++ b/pdf2djvu.cc
|
|
||||||
@@ -716,10 +716,13 @@ void pdf_outline_to_djvu_outline(pdf::Object *node, pdf::Catalog *catalog,
|
|
||||||
}
|
|
||||||
|
|
||||||
pdf::dict_lookup(current, "Next", &next);
|
|
||||||
+#if POPPLER_VERSION < 5800
|
|
||||||
current.free();
|
|
||||||
current = next;
|
|
||||||
+#else
|
|
||||||
+ current = std::move(next);
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
- current.free();
|
|
||||||
}
|
|
||||||
|
|
||||||
static void pdf_outline_to_djvu_outline(pdf::Document &doc, djvu::Outline &djvu_outline,
|
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (pdf2djvu-0.9.11.tar.xz) = 7b47ff4cd3a49f3fa1fec08490a192725899307d9c2a75a65a21d36abcece2f308e56161ec4c4f77f32fbdedcc167520657cad2b06cf178335f7e2169b7ada82
|
SHA512 (pdf2djvu-0.9.19.tar.xz) = 14d6b217345da6ae8fb9f0fccfb79b86f4448d30d1de1bd2eb537c4eb129f0bdac64ed58c59119f31a837df143490be77050a4b92362a548e08bf8991a03ec41
|
||||||
|
Loading…
Reference in New Issue
Block a user