Fix build with poppler-0.20. No idea wether it still works (and I don't care much).
Index: patches/patch-setup_build_environment_py =================================================================== RCS file: /cvs/ports/textproc/calibre/patches/patch-setup_build_environment_py,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 patch-setup_build_environment_py --- patches/patch-setup_build_environment_py 17 Apr 2011 18:39:21 -0000 1.1.1.1 +++ patches/patch-setup_build_environment_py 13 Jul 2012 11:51:23 -0000 @@ -1,6 +1,12 @@ $OpenBSD: patch-setup_build_environment_py,v 1.1.1.1 2011/04/17 18:39:21 phessler Exp $ ---- setup/build_environment.py.orig Fri Jan 21 23:22:10 2011 -+++ setup/build_environment.py Thu Jan 27 09:46:09 2011 +--- setup/build_environment.py.orig Fri Sep 23 19:14:20 2011 ++++ setup/build_environment.py Fri Jul 13 13:21:25 2012 +@@ -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: fc_inc = os.environ.get('FC_INC_DIR', fc_inc) Index: patches/patch-setup_extensions_py =================================================================== RCS file: /cvs/ports/textproc/calibre/patches/patch-setup_extensions_py,v retrieving revision 1.2 diff -u -p -r1.2 patch-setup_extensions_py --- patches/patch-setup_extensions_py 5 Sep 2011 12:38:36 -0000 1.2 +++ patches/patch-setup_extensions_py 13 Jul 2012 11:51:23 -0000 @@ -1,6 +1,12 @@ $OpenBSD: patch-setup_extensions_py,v 1.2 2011/09/05 12:38:36 jasper Exp $ ---- setup/extensions.py.orig Fri Jun 24 20:01:27 2011 -+++ setup/extensions.py Tue Jun 28 23:45:46 2011 +--- setup/extensions.py.orig Fri Sep 23 19:14:20 2011 ++++ setup/extensions.py Fri Jul 13 13:21:25 2012 +@@ -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 + @@ -111,8 +111,8 @@ extensions = [ reflow_sources, headers=reflow_headers, Index: patches/patch-setup_install_py =================================================================== RCS file: /cvs/ports/textproc/calibre/patches/patch-setup_install_py,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 patch-setup_install_py --- patches/patch-setup_install_py 17 Apr 2011 18:39:21 -0000 1.1.1.1 +++ patches/patch-setup_install_py 13 Jul 2012 11:51:23 -0000 @@ -1,6 +1,21 @@ $OpenBSD: patch-setup_install_py,v 1.1.1.1 2011/04/17 18:39:21 phessler Exp $ ---- setup/install.py.orig Thu Jan 27 09:50:17 2011 -+++ setup/install.py Thu Jan 27 09:50:20 2011 +--- setup/install.py.orig Fri Sep 23 19:14:20 2011 ++++ setup/install.py Fri Jul 13 13:21:25 2012 +@@ -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 + +@@ -12,7 +12,7 @@ from setup import (Command, islinux, isbsd, basenames, + __appname__, __version__) + + HEADER = '''\ +-#!/usr/bin/env python2 ++#!/usr/local/bin/python2.7 + + """ + This is the standard runscript for all of calibre's tools. @@ -269,7 +269,7 @@ class Install(Develop): reldir = os.path.relpath(x[0], self.SRC) destdir = os.path.join(dest, reldir) 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 11:51:23 -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;