pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/print/pdf2djvu
Module Name: pkgsrc
Committed By: joerg
Date: Fri May 22 01:15:34 UTC 2020
Modified Files:
pkgsrc/print/pdf2djvu: distinfo
Added Files:
pkgsrc/print/pdf2djvu/patches: patch-pdf-backend.cc patch-pdf-dpi.cc
patch-pdf-unicode.cc patch-pdf-unicode.hh patch-pdf2djvu.cc
Log Message:
Deal with poppler API fallout
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 pkgsrc/print/pdf2djvu/distinfo
cvs rdiff -u -r0 -r1.4 pkgsrc/print/pdf2djvu/patches/patch-pdf-backend.cc \
pkgsrc/print/pdf2djvu/patches/patch-pdf2djvu.cc
cvs rdiff -u -r0 -r1.1 pkgsrc/print/pdf2djvu/patches/patch-pdf-dpi.cc \
pkgsrc/print/pdf2djvu/patches/patch-pdf-unicode.cc \
pkgsrc/print/pdf2djvu/patches/patch-pdf-unicode.hh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/print/pdf2djvu/distinfo
diff -u pkgsrc/print/pdf2djvu/distinfo:1.15 pkgsrc/print/pdf2djvu/distinfo:1.16
--- pkgsrc/print/pdf2djvu/distinfo:1.15 Wed Aug 7 12:13:01 2019
+++ pkgsrc/print/pdf2djvu/distinfo Fri May 22 01:15:34 2020
@@ -1,6 +1,11 @@
-$NetBSD: distinfo,v 1.15 2019/08/07 12:13:01 nia Exp $
+$NetBSD: distinfo,v 1.16 2020/05/22 01:15:34 joerg Exp $
SHA1 (pdf2djvu-0.9.13.tar.xz) = 100614ae77cfc200740d62a9f0afa841f6782663
RMD160 (pdf2djvu-0.9.13.tar.xz) = 2a8b473ca93eafc3b7f35daf4824410e91af6edf
SHA512 (pdf2djvu-0.9.13.tar.xz) = 067c721d4f587fd38121ea104e1c08930df58108a2270d7142e539715c031b5bb6b302921dfd68ace09fddfb5c881f081d6a6d866f6038255e89754fc34bc006
Size (pdf2djvu-0.9.13.tar.xz) = 296420 bytes
+SHA1 (patch-pdf-backend.cc) = 0822f8920b0065ea89e8fd8db38e8e1109d93804
+SHA1 (patch-pdf-dpi.cc) = 931c94844bf8d3428004f8d4d906266be911ac4f
+SHA1 (patch-pdf-unicode.cc) = 8edc6248c891554685181e0506e13117d74b6322
+SHA1 (patch-pdf-unicode.hh) = bab72cfba2977755613abd20aedb9763ea1a81ef
+SHA1 (patch-pdf2djvu.cc) = 8251a763a350d7ffef91e0477633b6c054a95b17
Added files:
Index: pkgsrc/print/pdf2djvu/patches/patch-pdf-backend.cc
diff -u /dev/null pkgsrc/print/pdf2djvu/patches/patch-pdf-backend.cc:1.4
--- /dev/null Fri May 22 01:15:34 2020
+++ pkgsrc/print/pdf2djvu/patches/patch-pdf-backend.cc Fri May 22 01:15:34 2020
@@ -0,0 +1,35 @@
+$NetBSD: patch-pdf-backend.cc,v 1.4 2020/05/22 01:15:34 joerg Exp $
+
+--- pdf-backend.cc.orig 2020-05-16 19:37:30.700296649 +0000
++++ 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(ErrorCategory category, pdf::Offset pos, const char *message)
+ {
+ std::string format;
+ const char *category_name = _("PDF error");
+@@ -103,8 +103,8 @@ static void poppler_error_handler(void *
+
+ pdf::Environment::Environment()
+ {
+- globalParams = new GlobalParams();
+- setErrorCallback(poppler_error_handler, nullptr);
++ globalParams.reset(new GlobalParams());
++ setErrorCallback(poppler_error_handler);
+ }
+
+ void pdf::Environment::set_antialias(bool value)
+@@ -499,8 +499,8 @@ bool pdf::get_glyph(splash::Splash *spla
+ 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();
++ const pdf::gfx::Subpath *subpath;
++ const pdf::gfx::Path *path = state->getPath();
+ int n_subpaths = path->getNumSubpaths();
+ for (int i = 0; i < n_subpaths; i++)
+ {
Index: pkgsrc/print/pdf2djvu/patches/patch-pdf2djvu.cc
diff -u /dev/null pkgsrc/print/pdf2djvu/patches/patch-pdf2djvu.cc:1.4
--- /dev/null Fri May 22 01:15:34 2020
+++ pkgsrc/print/pdf2djvu/patches/patch-pdf2djvu.cc Fri May 22 01:15:34 2020
@@ -0,0 +1,55 @@
+$NetBSD: patch-pdf2djvu.cc,v 1.4 2020/05/22 01:15:34 joerg Exp $
+
+--- pdf2djvu.cc.orig 2019-06-10 17:06:44.000000000 +0000
++++ pdf2djvu.cc
+@@ -81,7 +81,7 @@ static int get_page_for_goto_link(pdf::l
+ #endif
+ pdf::link::Destination *orig_dest = goto_link->getDest();
+ if (orig_dest == nullptr)
+- dest.reset(catalog->findDest(goto_link->getNamedDest()));
++ dest = catalog->findDest(goto_link->getNamedDest());
+ else
+ dest.reset(orig_dest->copy());
+ if (dest.get() != nullptr)
+@@ -336,7 +336,7 @@ public:
+ }
+
+ 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)
+ {
+@@ -379,7 +379,7 @@ public:
+ 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;
+@@ -459,8 +459,10 @@ public:
+ switch (link_action->getKind())
+ {
+ case actionURI:
+- uri += pdf::get_c_string(dynamic_cast<pdf::link::URI*>(link_action)->getURI());
++ {
++ uri += dynamic_cast<pdf::link::URI*>(link_action)->getURI();
+ break;
++ }
+ case actionGoTo:
+ {
+ int page;
+@@ -698,9 +700,9 @@ static void pdf_outline_to_djvu_outline(
+ pdf::OwnedObject destination;
+ std::unique_ptr<pdf::link::Action> link_action;
+ if (!pdf::dict_lookup(current, "Dest", &destination)->isNull())
+- link_action.reset(pdf::link::Action::parseDest(&destination));
++ link_action = pdf::link::Action::parseDest(&destination);
+ else if (!pdf::dict_lookup(current, "A", &destination)->isNull())
+- link_action.reset(pdf::link::Action::parseAction(&destination));
++ link_action = pdf::link::Action::parseAction(&destination);
+ else
+ throw NoPageForBookmark();
+ if (link_action.get() == nullptr || link_action->getKind() != actionGoTo)
Index: pkgsrc/print/pdf2djvu/patches/patch-pdf-dpi.cc
diff -u /dev/null pkgsrc/print/pdf2djvu/patches/patch-pdf-dpi.cc:1.1
--- /dev/null Fri May 22 01:15:34 2020
+++ pkgsrc/print/pdf2djvu/patches/patch-pdf-dpi.cc Fri May 22 01:15:34 2020
@@ -0,0 +1,13 @@
+$NetBSD: patch-pdf-dpi.cc,v 1.1 2020/05/22 01:15:34 joerg Exp $
+
+--- pdf-dpi.cc.orig 2020-05-16 19:34:23.424498851 +0000
++++ pdf-dpi.cc
+@@ -34,7 +34,7 @@ protected:
+ }
+
+ 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);
+ }
Index: pkgsrc/print/pdf2djvu/patches/patch-pdf-unicode.cc
diff -u /dev/null pkgsrc/print/pdf2djvu/patches/patch-pdf-unicode.cc:1.1
--- /dev/null Fri May 22 01:15:34 2020
+++ pkgsrc/print/pdf2djvu/patches/patch-pdf-unicode.cc Fri May 22 01:15:34 2020
@@ -0,0 +1,22 @@
+$NetBSD: patch-pdf-unicode.cc,v 1.1 2020/05/22 01:15:34 joerg Exp $
+
+--- pdf-unicode.cc.orig 2020-05-16 19:53:42.159712563 +0000
++++ pdf-unicode.cc
+@@ -124,7 +124,7 @@ std::string pdf::string_as_utf8(pdf::Obj
+ * ===================
+ */
+
+-pdf::FullNFKC::FullNFKC(Unicode *unistr, int length)
++pdf::FullNFKC::FullNFKC(const Unicode *unistr, int length)
+ : data(nullptr), length_(0)
+ {
+ assert(length >= 0);
+@@ -140,7 +140,7 @@ pdf::FullNFKC::~FullNFKC()
+ * ======================
+ */
+
+-pdf::MinimalNFKC::MinimalNFKC(Unicode *unistr, int length)
++pdf::MinimalNFKC::MinimalNFKC(const Unicode *unistr, int length)
+ {
+ this->string.append(unistr, length);
+ }
Index: pkgsrc/print/pdf2djvu/patches/patch-pdf-unicode.hh
diff -u /dev/null pkgsrc/print/pdf2djvu/patches/patch-pdf-unicode.hh:1.1
--- /dev/null Fri May 22 01:15:34 2020
+++ pkgsrc/print/pdf2djvu/patches/patch-pdf-unicode.hh Fri May 22 01:15:34 2020
@@ -0,0 +1,22 @@
+$NetBSD: patch-pdf-unicode.hh,v 1.1 2020/05/22 01:15:34 joerg Exp $
+
+--- pdf-unicode.hh.orig 2020-05-16 19:53:15.675224456 +0000
++++ pdf-unicode.hh
+@@ -58,7 +58,7 @@ namespace pdf
+ Unicode* data;
+ int length_;
+ public:
+- explicit FullNFKC(Unicode *, int length);
++ explicit FullNFKC(const Unicode *, int length);
+ ~FullNFKC();
+ int length() const
+ {
+@@ -79,7 +79,7 @@ namespace pdf
+ 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;
+ };
Home |
Main Index |
Thread Index |
Old Index