There's some DRM code left in xpdf that prevents me from copying
text.

This kills it.  ok?

Index: Makefile
===================================================================
RCS file: /cvs/ports/textproc/xpdf/Makefile,v
retrieving revision 1.61
diff -u -p -r1.61 Makefile
--- Makefile    19 Apr 2008 07:38:24 -0000      1.61
+++ Makefile    24 Apr 2008 15:11:09 -0000
@@ -4,7 +4,7 @@ COMMENT-main=   PDF viewer for X11
 COMMENT-utils= PDF conversion tools
 
 DISTNAME=      xpdf-3.02
-PKGNAME-main=  xpdf-3.02pl2p3
+PKGNAME-main=  xpdf-3.02pl2p4
 PKGNAME-utils= xpdf-utils-3.02pl2p0
 CATEGORIES=    textproc x11
 
Index: patches/patch-xpdf_PDFCore_cc
===================================================================
RCS file: patches/patch-xpdf_PDFCore_cc
diff -N patches/patch-xpdf_PDFCore_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-xpdf_PDFCore_cc       24 Apr 2008 15:09:49 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+--- xpdf/PDFCore.cc.orig       Thu Apr 24 11:06:47 2008
++++ xpdf/PDFCore.cc    Thu Apr 24 11:08:52 2008
+@@ -1563,9 +1563,6 @@ GString *PDFCore::extractText(int pg, double xMin, dou
+   int x0, y0, x1, y1, t;
+   GString *s;
+ 
+-  if (!doc->okToCopy()) {
+-    return NULL;
+-  }
+   if ((page = findPage(pg))) {
+     cvtUserToDev(pg, xMin, yMin, &x0, &y0);
+     cvtUserToDev(pg, xMax, yMax, &x1, &y1);
Index: patches/patch-xpdf_XPDFCore_cc
===================================================================
RCS file: /cvs/ports/textproc/xpdf/patches/patch-xpdf_XPDFCore_cc,v
retrieving revision 1.4
diff -u -p -r1.4 patch-xpdf_XPDFCore_cc
--- patches/patch-xpdf_XPDFCore_cc      30 Mar 2007 04:09:42 -0000      1.4
+++ patches/patch-xpdf_XPDFCore_cc      24 Apr 2008 15:09:48 -0000
@@ -1,7 +1,22 @@
 $OpenBSD: patch-xpdf_XPDFCore_cc,v 1.4 2007/03/30 04:09:42 ckuethe Exp $
---- xpdf/XPDFCore.cc.orig      Tue Feb 27 22:05:52 2007
-+++ xpdf/XPDFCore.cc   Fri Mar 30 00:31:19 2007
-@@ -407,9 +407,6 @@ void XPDFCore::copySelection() {
+--- xpdf/XPDFCore.cc.orig      Tue Feb 27 17:05:52 2007
++++ xpdf/XPDFCore.cc   Thu Apr 24 11:07:18 2008
+@@ -383,13 +383,8 @@ void XPDFCore::endSelection(int wx, int wy) {
+       }
+ #ifndef NO_TEXT_SELECT
+       if (selectULX != selectLRX &&
+-        selectULY != selectLRY) {
+-      if (doc->okToCopy()) {
++        selectULY != selectLRY)
+         copySelection();
+-      } else {
+-        error(-1, "Copying of text from this document is not allowed.");
+-      }
+-      }
+ #endif
+     }
+   }
+@@ -407,9 +402,6 @@ void XPDFCore::copySelection() {
    int pg;
    double ulx, uly, lrx, lry;
  

Reply via email to