On Fri, Jul 13, 2012 at 05:53:01AM -0600, Matthias Kilian wrote:
> Fix build with poppler-0.20. No idea wether it still works (and I
> don't care much).
[...]
> +@@ -1,4 +1,4 @@
> +-#!/usr/bin/env python
> ++#!/usr/local/bin/python2.7
> + # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
> + from __future__ import with_statement
> +
> @@ -170,7 +170,7 @@ else:
[...]
Oops! Better one, as noticed by antoine@ and Mikolaj Kurcharski:
Index: patches/patch-src_calibre_ebooks_pdf_reflow_cpp
===================================================================
RCS file:
/cvs/ports/textproc/calibre/patches/patch-src_calibre_ebooks_pdf_reflow_cpp,v
retrieving revision 1.1
diff -u -p -r1.1 patch-src_calibre_ebooks_pdf_reflow_cpp
--- patches/patch-src_calibre_ebooks_pdf_reflow_cpp 26 Nov 2011 19:50:08
-0000 1.1
+++ patches/patch-src_calibre_ebooks_pdf_reflow_cpp 13 Jul 2012 13:19:59
-0000
@@ -1,11 +1,6 @@
$OpenBSD: patch-src_calibre_ebooks_pdf_reflow_cpp,v 1.1 2011/11/26 19:50:08
kili Exp $
-
-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
++++ src/calibre/ebooks/pdf/reflow.cpp Fri Jul 13 13:39:19 2012
@@ -625,7 +625,7 @@ static string get_link_dest(LinkAction *link, PDFDoc *
return oss.str();
}
@@ -15,3 +10,21 @@ the former.
double _x1, _y1, _x2, _y2;
int x1, y1, x2, y2;
+@@ -646,7 +646,7 @@ void XMLOutputDev::process_link(Link* link){
+
+
+ void XMLOutputDev::endPage() {
+- Links *slinks =
catalog->getPage(current_page->number())->getLinks(catalog);
++ Links *slinks = catalog->getPage(current_page->number())->getLinks();
+ for (int i = 0; i < slinks->getNumLinks(); i++)
+ {
+ this->process_link(slinks->getLink(i));
+@@ -877,7 +877,7 @@ vector<char>* Reflow::render_first_page(bool use_crop_
+ throw ReflowException("Failed to allocate SplashOutputDev");
+ }
+ try {
+- out->startDoc(doc->getXRef());
++ out->startDoc(doc);
+ out->startPage(1, NULL);
+
+ double pg_w, pg_h;