summaryrefslogtreecommitdiff
path: root/misc/calibre/patches
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2011-04-12 21:48:01 +0000
committerwiz <wiz@pkgsrc.org>2011-04-12 21:48:01 +0000
commit6436cb245c0b27051b97ccbd7e2156d5d7a869ba (patch)
treedd95573c50105f027e443d1603b4247ebdbe6e04 /misc/calibre/patches
parente59b43467822cd974869eff61436e3cc1c46bdc4 (diff)
downloadpkgsrc-6436cb245c0b27051b97ccbd7e2156d5d7a869ba.tar.gz
Fix build with png-1.5.
Diffstat (limited to 'misc/calibre/patches')
-rw-r--r--misc/calibre/patches/patch-src_calibre_ebooks_pdf_images.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/misc/calibre/patches/patch-src_calibre_ebooks_pdf_images.cpp b/misc/calibre/patches/patch-src_calibre_ebooks_pdf_images.cpp
new file mode 100644
index 00000000000..f079da4f136
--- /dev/null
+++ b/misc/calibre/patches/patch-src_calibre_ebooks_pdf_images.cpp
@@ -0,0 +1,23 @@
+$NetBSD: patch-src_calibre_ebooks_pdf_images.cpp,v 1.1 2011/04/12 21:48:01 wiz Exp $
+
+Fix build with png-1.5.
+
+--- src/calibre/ebooks/pdf/images.cpp.orig 2009-11-16 19:41:31.000000000 +0000
++++ src/calibre/ebooks/pdf/images.cpp
+@@ -6,6 +6,7 @@
+ #include <math.h>
+ #include <iostream>
+ #include <wand/MagickWand.h>
++#include <zlib.h>
+
+ #include "images.h"
+ #include "utils.h"
+@@ -294,7 +295,7 @@ void PNGWriter::write_splash_bitmap(Spla
+
+ void calibre_png_mem_write(png_structp png_ptr, png_bytep data, png_size_t length) {
+ if (!png_ptr || length < 1) return;
+- vector<char> *buf = static_cast< vector<char>* >(png_ptr->io_ptr);
++ vector<char> *buf = static_cast< vector<char>* >(png_get_io_ptr(png_ptr));
+ buf->reserve(buf->capacity() + length);
+ do {
+ buf->push_back(static_cast<char>(*data));