summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059>2009-09-28 17:43:46 +0800
committerkwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059>2009-09-28 17:43:46 +0800
commit7747376ec8bcb0831f8487b1f2a6933e85fe5ca1 (patch)
tree68b0c537ca30a4e41b5ad2096f729170324be1e0
parente04763834f7a4dad4a816d96b160408d17a70502 (diff)
downloadmarcuscom-ports-7747376ec8bcb0831f8487b1f2a6933e85fe5ca1.tar
marcuscom-ports-7747376ec8bcb0831f8487b1f2a6933e85fe5ca1.tar.gz
marcuscom-ports-7747376ec8bcb0831f8487b1f2a6933e85fe5ca1.tar.bz2
marcuscom-ports-7747376ec8bcb0831f8487b1f2a6933e85fe5ca1.tar.lz
marcuscom-ports-7747376ec8bcb0831f8487b1f2a6933e85fe5ca1.tar.xz
marcuscom-ports-7747376ec8bcb0831f8487b1f2a6933e85fe5ca1.tar.zst
marcuscom-ports-7747376ec8bcb0831f8487b1f2a6933e85fe5ca1.zip
Add upstream patch to fix build with new poppler.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@13060 df743ca5-7f9a-e211-a948-0013205c9059
-rw-r--r--converters/pdf2djvu/Makefile2
-rw-r--r--converters/pdf2djvu/files/patch-pdf2djvu.cc60
2 files changed, 61 insertions, 1 deletions
diff --git a/converters/pdf2djvu/Makefile b/converters/pdf2djvu/Makefile
index a8ebddb18..3a95dcf18 100644
--- a/converters/pdf2djvu/Makefile
+++ b/converters/pdf2djvu/Makefile
@@ -7,7 +7,7 @@
PORTNAME= pdf2djvu
PORTVERSION= 0.5.10
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= converters
MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE}
DISTNAME= ${PORTNAME}_${PORTVERSION}${EXTRACT_SUFFIX}
diff --git a/converters/pdf2djvu/files/patch-pdf2djvu.cc b/converters/pdf2djvu/files/patch-pdf2djvu.cc
new file mode 100644
index 000000000..19dbe5df9
--- /dev/null
+++ b/converters/pdf2djvu/files/patch-pdf2djvu.cc
@@ -0,0 +1,60 @@
+--- pdf2djvu.cc.orig 2009-09-28 11:26:02.000000000 +0200
++++ pdf2djvu.cc 2009-09-28 11:37:12.000000000 +0200
+@@ -277,6 +277,8 @@ public:
+ return !config.no_render;
+ }
+
++#if POPPLER_VERSION < 1101
++
+ void drawImageMask(pdf::gfx::State *state, pdf::Object *object, pdf::Stream *stream, int width, int height,
+ pdf::Bool invert, pdf::Bool inline_image)
+ {
+@@ -310,6 +312,48 @@ public:
+ color_map, mask_stream, mask_width, mask_height, mask_color_map);
+ }
+
++#else
++
++ void drawImageMask(pdf::gfx::State *state, pdf::Object *object, pdf::Stream *stream, int width, int height,
++ pdf::Bool invert, pdf::Bool interpolate, pdf::Bool inline_image)
++ {
++ return;
++ }
++
++ void drawImage(pdf::gfx::State *state, pdf::Object *object, pdf::Stream *stream, int width, int height,
++ pdf::gfx::ImageColorMap *color_map, pdf::Bool interpolate, int *mask_colors, pdf::Bool inline_image)
++ {
++ if (is_foreground_color_map(color_map) || config.no_render)
++ return;
++ Renderer::drawImage(state, object, stream, width, height, color_map, interpolate, mask_colors, inline_image);
++ }
++
++ void drawMaskedImage(pdf::gfx::State *state, pdf::Object *object, pdf::Stream *stream, int width, int height,
++ pdf::gfx::ImageColorMap *color_map, pdf::Bool interpolate,
++ pdf::Stream *mask_stream, int mask_width, int mask_height, pdf::Bool mask_invert, pdf::Bool mask_interpolate)
++ {
++ if (is_foreground_color_map(color_map) || config.no_render)
++ return;
++ Renderer::drawMaskedImage(state, object, stream, width, height,
++ color_map, interpolate,
++ mask_stream, mask_width, mask_height, mask_invert, mask_interpolate);
++
++ }
++
++ void drawSoftMaskedImage(pdf::gfx::State *state, pdf::Object *object, pdf::Stream *stream,
++ int width, int height, pdf::gfx::ImageColorMap *color_map, pdf::Bool interpolate,
++ pdf::Stream *mask_stream, int mask_width, int mask_height,
++ pdf::gfx::ImageColorMap *mask_color_map, pdf::Bool mask_interpolate)
++ {
++ if (is_foreground_color_map(color_map) || config.no_render)
++ return;
++ Renderer::drawSoftMaskedImage(state, object, stream, width, height,
++ color_map, interpolate,
++ mask_stream, mask_width, mask_height, mask_color_map, mask_interpolate);
++ }
++
++#endif
++
+ pdf::Bool interpretType3Chars() { return gFalse; }
+
+ void drawChar(pdf::gfx::State *state, double x, double y, double dx, double dy, double origin_x, double origin_y,