This unbreaks the build of calibre after the update to poppler-0.18.

Please test.


Index: patches/patch-src_calibre_ebooks_pdf_images_cpp
===================================================================
RCS file: patches/patch-src_calibre_ebooks_pdf_images_cpp
diff -N patches/patch-src_calibre_ebooks_pdf_images_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_calibre_ebooks_pdf_images_cpp     17 Nov 2011 15:44:12 
-0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+OCTStream::getRawStream deleted in poppler-0.18; Stream::getNextStream()
+does the same according to the poppler documentation.
+
+--- src/calibre/ebooks/pdf/images.cpp.orig     Fri Sep 23 19:14:20 2011
++++ src/calibre/ebooks/pdf/images.cpp  Thu Nov 17 16:12:13 2011
+@@ -126,7 +126,7 @@ void XMLImages::add(GfxState *state, Object *ref, Stre
+ 
+     if (img->type == jpeg) {
+         int c;
+-        str = ((DCTStream *)str)->getRawStream();
++        str = str->getNextStream();
+         str->reset();
+ 
+         // copy the stream
Index: patches/patch-src_calibre_ebooks_pdf_reflow_cpp
===================================================================
RCS file: patches/patch-src_calibre_ebooks_pdf_reflow_cpp
diff -N patches/patch-src_calibre_ebooks_pdf_reflow_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_calibre_ebooks_pdf_reflow_cpp     17 Nov 2011 15:44:12 
-0000
@@ -0,0 +1,17 @@
+$OpenBSD$
+
+With poppler-0.18, the classes Link and AnnotLink had been merged
+into AnnotLink. The latter should now contain all functionality of
+the former.
+
+--- src/calibre/ebooks/pdf/reflow.cpp.orig     Fri Sep 23 19:14:20 2011
++++ src/calibre/ebooks/pdf/reflow.cpp  Thu Nov 17 16:35:55 2011
+@@ -625,7 +625,7 @@ static string get_link_dest(LinkAction *link, PDFDoc *
+   return oss.str();
+ }
+ 
+-void XMLOutputDev::process_link(Link* link){
++void XMLOutputDev::process_link(AnnotLink* link){
+   double _x1, _y1, _x2, _y2;
+   int x1, y1, x2, y2;
+   
Index: patches/patch-src_calibre_ebooks_pdf_reflow_h
===================================================================
RCS file: patches/patch-src_calibre_ebooks_pdf_reflow_h
diff -N patches/patch-src_calibre_ebooks_pdf_reflow_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_calibre_ebooks_pdf_reflow_h       17 Nov 2011 15:44:12 
-0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+With poppler-0.18, the classes Link and AnnotLink had been merged
+into AnnotLink. The latter should now contain all functionality of
+the former.
+
+--- src/calibre/ebooks/pdf/reflow.h.orig       Fri Sep 23 19:14:20 2011
++++ src/calibre/ebooks/pdf/reflow.h    Thu Nov 17 16:33:49 2011
+@@ -244,6 +244,6 @@ class XMLOutputDev : public OutputDev {
+     XMLImages *images;
+     PDFDoc *doc;
+ 
+-    void process_link(Link* link);
++    void process_link(AnnotLink* link);
+ };
+ }

Reply via email to