remove upstreamed patches
This commit is contained in:
parent
03f15bf1e9
commit
a42986a80c
@ -5,7 +5,6 @@ Summary: PDF to DjVu converter
|
|||||||
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
|
||||||
#Patch0: poppler-splash.patch
|
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: djvulibre-devel djvulibre
|
BuildRequires: djvulibre-devel djvulibre
|
||||||
|
@ -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,
|
|
@ -1,80 +0,0 @@
|
|||||||
--- pdf2djvu-0.9.17.1/configure.ac
|
|
||||||
+++ pdf2djvu-0.9.17.1/configure.ac
|
|
||||||
@@ -73,8 +73,8 @@ do
|
|
||||||
done
|
|
||||||
AC_MSG_RESULT([ok])
|
|
||||||
|
|
||||||
-PKG_CHECK_MODULES([POPPLER], [poppler-splash >= 0.35.0])
|
|
||||||
-poppler_version=$($PKG_CONFIG --modversion poppler-splash)
|
|
||||||
+PKG_CHECK_MODULES([POPPLER], [poppler >= 0.35.0])
|
|
||||||
+poppler_version=$($PKG_CONFIG --modversion poppler)
|
|
||||||
AC_DEFINE_UNQUOTED([POPPLER_VERSION_STRING], ["$poppler_version"], [Define to the version of Poppler])
|
|
||||||
parse_poppler_version()
|
|
||||||
{
|
|
||||||
--- pdf2djvu-0.9.17.1/configure
|
|
||||||
+++ pdf2djvu-0.9.17.1/configure
|
|
||||||
@@ -4006,19 +4006,19 @@ $as_echo "ok" >&6; }
|
|
||||||
|
|
||||||
|
|
||||||
pkg_failed=no
|
|
||||||
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for poppler-splash >= 0.35.0" >&5
|
|
||||||
-$as_echo_n "checking for poppler-splash >= 0.35.0... " >&6; }
|
|
||||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for poppler >= 0.35.0" >&5
|
|
||||||
+$as_echo_n "checking for poppler >= 0.35.0... " >&6; }
|
|
||||||
|
|
||||||
if test -n "$POPPLER_CFLAGS"; then
|
|
||||||
pkg_cv_POPPLER_CFLAGS="$POPPLER_CFLAGS"
|
|
||||||
elif test -n "$PKG_CONFIG"; then
|
|
||||||
if test -n "$PKG_CONFIG" && \
|
|
||||||
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"poppler-splash >= 0.35.0\""; } >&5
|
|
||||||
- ($PKG_CONFIG --exists --print-errors "poppler-splash >= 0.35.0") 2>&5
|
|
||||||
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"poppler >= 0.35.0\""; } >&5
|
|
||||||
+ ($PKG_CONFIG --exists --print-errors "poppler >= 0.35.0") 2>&5
|
|
||||||
ac_status=$?
|
|
||||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
|
||||||
test $ac_status = 0; }; then
|
|
||||||
- pkg_cv_POPPLER_CFLAGS=`$PKG_CONFIG --cflags "poppler-splash >= 0.35.0" 2>/dev/null`
|
|
||||||
+ pkg_cv_POPPLER_CFLAGS=`$PKG_CONFIG --cflags "poppler >= 0.35.0" 2>/dev/null`
|
|
||||||
test "x$?" != "x0" && pkg_failed=yes
|
|
||||||
else
|
|
||||||
pkg_failed=yes
|
|
||||||
@@ -4030,12 +4030,12 @@ if test -n "$POPPLER_LIBS"; then
|
|
||||||
pkg_cv_POPPLER_LIBS="$POPPLER_LIBS"
|
|
||||||
elif test -n "$PKG_CONFIG"; then
|
|
||||||
if test -n "$PKG_CONFIG" && \
|
|
||||||
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"poppler-splash >= 0.35.0\""; } >&5
|
|
||||||
- ($PKG_CONFIG --exists --print-errors "poppler-splash >= 0.35.0") 2>&5
|
|
||||||
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"poppler >= 0.35.0\""; } >&5
|
|
||||||
+ ($PKG_CONFIG --exists --print-errors "poppler >= 0.35.0") 2>&5
|
|
||||||
ac_status=$?
|
|
||||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
|
||||||
test $ac_status = 0; }; then
|
|
||||||
- pkg_cv_POPPLER_LIBS=`$PKG_CONFIG --libs "poppler-splash >= 0.35.0" 2>/dev/null`
|
|
||||||
+ pkg_cv_POPPLER_LIBS=`$PKG_CONFIG --libs "poppler >= 0.35.0" 2>/dev/null`
|
|
||||||
test "x$?" != "x0" && pkg_failed=yes
|
|
||||||
else
|
|
||||||
pkg_failed=yes
|
|
||||||
@@ -4058,12 +4058,12 @@ fi
|
|
||||||
if test $_pkg_short_errors_supported = yes; then
|
|
||||||
POPPLER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "poppler-splash >= 0.35.0" 2>&1`
|
|
||||||
else
|
|
||||||
- POPPLER_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "poppler-splash >= 0.35.0" 2>&1`
|
|
||||||
+ POPPLER_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "poppler >= 0.35.0" 2>&1`
|
|
||||||
fi
|
|
||||||
# Put the nasty error message in config.log where it belongs
|
|
||||||
echo "$POPPLER_PKG_ERRORS" >&5
|
|
||||||
|
|
||||||
- as_fn_error $? "Package requirements (poppler-splash >= 0.35.0) were not met:
|
|
||||||
+ as_fn_error $? "Package requirements (poppler >= 0.35.0) were not met:
|
|
||||||
|
|
||||||
$POPPLER_PKG_ERRORS
|
|
||||||
|
|
||||||
@@ -4095,7 +4095,7 @@ else
|
|
||||||
$as_echo "yes" >&6; }
|
|
||||||
|
|
||||||
fi
|
|
||||||
-poppler_version=$($PKG_CONFIG --modversion poppler-splash)
|
|
||||||
+poppler_version=$($PKG_CONFIG --modversion poppler)
|
|
||||||
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
|
||||||
#define POPPLER_VERSION_STRING "$poppler_version"
|
|
Loading…
Reference in New Issue
Block a user