aboutsummaryrefslogtreecommitdiff
path: root/converters
diff options
context:
space:
mode:
Diffstat (limited to 'converters')
-rw-r--r--converters/pdf2djvu/Makefile3
-rw-r--r--converters/pdf2djvu/distinfo6
-rw-r--r--converters/pdf2djvu/files/patch-gentoo_pdf2djvu-0.9.12-poppler-0.82-4.patch26
-rw-r--r--converters/pdf2djvu/files/patch-pdf-backend.cc66
-rw-r--r--converters/pdf2djvu/files/patch-pdf-dpi.cc11
-rw-r--r--converters/pdf2djvu/files/patch-pdf-unicode.cc25
-rw-r--r--converters/pdf2djvu/files/patch-pdf-unicode.hh20
7 files changed, 4 insertions, 153 deletions
diff --git a/converters/pdf2djvu/Makefile b/converters/pdf2djvu/Makefile
index 94af2e1773ac..54800fa3d308 100644
--- a/converters/pdf2djvu/Makefile
+++ b/converters/pdf2djvu/Makefile
@@ -1,8 +1,7 @@
# $FreeBSD$
PORTNAME= pdf2djvu
-PORTVERSION= 0.9.13
-PORTREVISION= 4
+DISTVERSION= 0.9.17
CATEGORIES= converters
MASTER_SITES= https://github.com/jwilk/${PORTNAME}/releases/download/${PORTVERSION}/
diff --git a/converters/pdf2djvu/distinfo b/converters/pdf2djvu/distinfo
index d9b42f98aa08..df91ddb5bf4a 100644
--- a/converters/pdf2djvu/distinfo
+++ b/converters/pdf2djvu/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1571734947
-SHA256 (pdf2djvu-0.9.13.tar.xz) = e0ab16d83129625c86df7c121eddf286458f63cb81ae791e5a76df10a3ab4c63
-SIZE (pdf2djvu-0.9.13.tar.xz) = 296420
+TIMESTAMP = 1584261683
+SHA256 (pdf2djvu-0.9.17.tar.xz) = 2976a15344e569d7ba6a694f002e9970d0859edc2ad1b2726692e6c46969cfc4
+SIZE (pdf2djvu-0.9.17.tar.xz) = 295280
diff --git a/converters/pdf2djvu/files/patch-gentoo_pdf2djvu-0.9.12-poppler-0.82-4.patch b/converters/pdf2djvu/files/patch-gentoo_pdf2djvu-0.9.12-poppler-0.82-4.patch
deleted file mode 100644
index c3b4c4781b08..000000000000
--- a/converters/pdf2djvu/files/patch-gentoo_pdf2djvu-0.9.12-poppler-0.82-4.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-This patch doesn't come from Gentoo, but because there are already
-three unrelated patches that touch the same file, I'm following the
-naming convention so that it gets applied in the right order.
-
-Chase constness changes in the poppler API.
-
---- pdf2djvu.cc.orig 2019-10-27 19:16:30.654895000 +0000
-+++ pdf2djvu.cc 2019-10-27 19:16:47.450786000 +0000
-@@ -333,7 +333,7 @@
- }
-
- void drawImage(pdf::gfx::State *state, pdf::Object *object, pdf::Stream *stream, int width, int height,
-- pdf::gfx::ImageColorMap *color_map, bool interpolate, int *mask_colors, bool inline_image)
-+ pdf::gfx::ImageColorMap *color_map, bool interpolate, const int *mask_colors, bool inline_image)
- {
- if (is_foreground_color_map(color_map) || config.no_render)
- {
-@@ -376,7 +376,7 @@
- bool interpretType3Chars() { return false; }
-
- void drawChar(pdf::gfx::State *state, double x, double y, double dx, double dy, double origin_x, double origin_y,
-- CharCode code, int n_bytes, Unicode *unistr, int length)
-+ CharCode code, int n_bytes, const Unicode *unistr, int length)
- {
- double pox, poy, pdx, pdy, px, py, pw, ph;
- x -= origin_x; y -= origin_y;
diff --git a/converters/pdf2djvu/files/patch-pdf-backend.cc b/converters/pdf2djvu/files/patch-pdf-backend.cc
deleted file mode 100644
index f6dd392316b2..000000000000
--- a/converters/pdf2djvu/files/patch-pdf-backend.cc
+++ /dev/null
@@ -1,66 +0,0 @@
---- pdf-backend.cc.orig 2019-06-10 17:06:44 UTC
-+++ pdf-backend.cc
-@@ -48,7 +48,7 @@
- * ======================
- */
-
--static void poppler_error_handler(void *data, ErrorCategory category, pdf::Offset pos, const char *message)
-+static void poppler_error_handler_new(ErrorCategory category, pdf::Offset pos, const char *message)
- {
- std::string format;
- const char *category_name = _("PDF error");
-@@ -94,6 +94,11 @@ static void poppler_error_handler(void *data, ErrorCat
- error_log << std::endl;
- }
-
-+static void poppler_error_handler(void *data, ErrorCategory category, pdf::Offset pos, const char *message)
-+{
-+ poppler_error_handler_new(category, pos, message);
-+}
-+
- #if POPPLER_VERSION < 7000
- static void poppler_error_handler(void *data, ErrorCategory category, pdf::Offset pos, char *message)
- {
-@@ -101,10 +106,26 @@ static void poppler_error_handler(void *data, ErrorCat
- }
- #endif
-
-+// for POPPLER_VERSION >= 8500:
-+template <typename T1, typename T2> static auto set_error_callback(T1 callback1, T2 callback2) -> decltype(setErrorCallback(callback2))
-+{
-+ setErrorCallback(callback2);
-+}
-+
-+// for POPPLER_VERSION < 8500:
-+template <typename T1, typename T2> static auto set_error_callback(T1 callback1, T2 callback2) -> decltype(setErrorCallback(callback1, nullptr))
-+{
-+ setErrorCallback(callback1, nullptr);
-+}
-+
- pdf::Environment::Environment()
- {
-- globalParams = new GlobalParams();
-+ globalParams = std::unique_ptr<GlobalParams>(new GlobalParams);
-+#if POPPLER_VERSION >= 7000
-+ set_error_callback(poppler_error_handler, poppler_error_handler_new);
-+#else
- setErrorCallback(poppler_error_handler, nullptr);
-+#endif
- }
-
- void pdf::Environment::set_antialias(bool value)
-@@ -499,12 +520,11 @@ bool pdf::get_glyph(splash::Splash *splash, splash::Fo
- void pdf::Renderer::convert_path(pdf::gfx::State *state, splash::Path &splash_path)
- {
- /* Source was copied from <poppler/SplashOutputDev.c>. */
-- pdf::gfx::Subpath *subpath;
-- pdf::gfx::Path *path = state->getPath();
-+ auto path = state->getPath();
- int n_subpaths = path->getNumSubpaths();
- for (int i = 0; i < n_subpaths; i++)
- {
-- subpath = path->getSubpath(i);
-+ auto subpath = path->getSubpath(i);
- if (subpath->getNumPoints() > 0)
- {
- double x1, y1, x2, y2, x3, y3;
diff --git a/converters/pdf2djvu/files/patch-pdf-dpi.cc b/converters/pdf2djvu/files/patch-pdf-dpi.cc
deleted file mode 100644
index e1be2fa9e1c0..000000000000
--- a/converters/pdf2djvu/files/patch-pdf-dpi.cc
+++ /dev/null
@@ -1,11 +0,0 @@
---- pdf-dpi.cc.orig 2019-10-27 19:10:07 UTC
-+++ pdf-dpi.cc
-@@ -34,7 +34,7 @@ class DpiGuessDevice : public pdf::OutputDevice (prote
- }
-
- virtual void drawImage(pdf::gfx::State *state, pdf::Object *object, pdf::Stream *stream, int width, int height,
-- pdf::gfx::ImageColorMap *color_map, bool interpolate, int *mask_colors, bool inline_image)
-+ pdf::gfx::ImageColorMap *color_map, bool interpolate, const int *mask_colors, bool inline_image)
- {
- this->process_image(state, width, height);
- }
diff --git a/converters/pdf2djvu/files/patch-pdf-unicode.cc b/converters/pdf2djvu/files/patch-pdf-unicode.cc
deleted file mode 100644
index f02c7ada514f..000000000000
--- a/converters/pdf2djvu/files/patch-pdf-unicode.cc
+++ /dev/null
@@ -1,25 +0,0 @@
---- pdf-unicode.cc.orig 2019-10-27 19:19:18.837645000 +0000
-+++ pdf-unicode.cc 2019-10-27 19:20:31.405700000 +0000
-@@ -125,11 +125,11 @@
- * ===================
- */
-
--pdf::FullNFKC::FullNFKC(Unicode *unistr, int length)
-+pdf::FullNFKC::FullNFKC(const Unicode *unistr, int length)
- : data(nullptr), length_(0)
- {
- assert(length >= 0);
-- this->data = unicodeNormalizeNFKC(unistr, length, &this->length_, nullptr);
-+ this->data = unicodeNormalizeNFKC(const_cast<Unicode*>(unistr), length, &this->length_, nullptr);
- }
-
- pdf::FullNFKC::~FullNFKC()
-@@ -141,7 +141,7 @@
- * ======================
- */
-
--pdf::MinimalNFKC::MinimalNFKC(Unicode *unistr, int length)
-+pdf::MinimalNFKC::MinimalNFKC(const Unicode *unistr, int length)
- {
- this->string.append(unistr, length);
- }
diff --git a/converters/pdf2djvu/files/patch-pdf-unicode.hh b/converters/pdf2djvu/files/patch-pdf-unicode.hh
deleted file mode 100644
index 7e3f74493925..000000000000
--- a/converters/pdf2djvu/files/patch-pdf-unicode.hh
+++ /dev/null
@@ -1,20 +0,0 @@
---- pdf-unicode.hh.orig 2019-10-27 19:18:36.768779000 +0000
-+++ pdf-unicode.hh 2019-10-27 19:19:00.052652000 +0000
-@@ -58,7 +58,7 @@
- Unicode* data;
- int length_;
- public:
-- explicit FullNFKC(Unicode *, int length);
-+ explicit FullNFKC(const Unicode *, int length);
- ~FullNFKC();
- int length() const
- {
-@@ -79,7 +79,7 @@
- protected:
- std::basic_string<Unicode> string;
- public:
-- explicit MinimalNFKC(Unicode *, int length);
-+ explicit MinimalNFKC(const Unicode *, int length);
- int length() const;
- operator const Unicode*() const;
- };