pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/print/poppler pull a patch from upstream which fixes g...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c6bc07ccba5d
branches:  trunk
changeset: 396606:c6bc07ccba5d
user:      drochner <drochner%pkgsrc.org@localhost>
date:      Tue Jul 28 18:22:49 2009 +0000

description:
pull a patch from upstream which fixes generation of invalid postscript
files in some cases, bump PKGREVISION

diffstat:

 print/poppler/Makefile         |    4 +-
 print/poppler/distinfo         |    3 +-
 print/poppler/patches/patch-an |  107 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 112 insertions(+), 2 deletions(-)

diffs (142 lines):

diff -r de8ea9b6f8be -r c6bc07ccba5d print/poppler/Makefile
--- a/print/poppler/Makefile    Tue Jul 28 16:27:53 2009 +0000
+++ b/print/poppler/Makefile    Tue Jul 28 18:22:49 2009 +0000
@@ -1,8 +1,10 @@
-# $NetBSD: Makefile,v 1.40 2009/06/14 21:16:22 joerg Exp $
+# $NetBSD: Makefile,v 1.41 2009/07/28 18:22:49 drochner Exp $
 #
 
 .include "../../print/poppler/Makefile.common"
 
+PKGREVISION=   1
+
 COMMENT=               PDF rendering library
 MAINTAINER=            reed%reedmedia.net@localhost
 
diff -r de8ea9b6f8be -r c6bc07ccba5d print/poppler/distinfo
--- a/print/poppler/distinfo    Tue Jul 28 16:27:53 2009 +0000
+++ b/print/poppler/distinfo    Tue Jul 28 18:22:49 2009 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.44 2009/05/25 21:05:23 drochner Exp $
+$NetBSD: distinfo,v 1.45 2009/07/28 18:22:49 drochner Exp $
 
 SHA1 (poppler-0.10.7.tar.gz) = 891284d3fcac9bb250218e3439e596778c7f5edb
 RMD160 (poppler-0.10.7.tar.gz) = a275742a11df1965e4b7d06115f071f67d781d8f
@@ -11,5 +11,6 @@
 SHA1 (patch-ak) = ab4d0c91a6f2806b405954f8dab6e3d61a03b054
 SHA1 (patch-al) = b1d76a92a5ffad01543f0072a1a00e74e751a56f
 SHA1 (patch-am) = 2ee61c446ea85acde8c1ee798a0201901e565d55
+SHA1 (patch-an) = 357b88ed15a4d355b1532e0d95cc511b137b4c44
 SHA1 (patch-ca) = 5bd31c497c8cbfb6c1d6cb5b9183088113bef6e3
 SHA1 (patch-cb) = e8cfb16a0641788759b13cf5fcf97d82f9485adc
diff -r de8ea9b6f8be -r c6bc07ccba5d print/poppler/patches/patch-an
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/poppler/patches/patch-an    Tue Jul 28 18:22:49 2009 +0000
@@ -0,0 +1,107 @@
+$NetBSD: patch-an,v 1.1 2009/07/28 18:22:49 drochner Exp $
+
+--- poppler/PSOutputDev.cc.orig        2009-05-02 14:14:57.000000000 +0200
++++ poppler/PSOutputDev.cc
+@@ -4565,6 +4565,8 @@ void PSOutputDev::doImageL2(Object *ref,
+   GfxCMYK cmyk;
+   int c;
+   int col, i, j, x0, x1, y, maskXor;
++  
++  rectsOutLen = 0;
+ 
+   // color key masking
+   if (maskColors && colorMap && !inlineImg) {
+@@ -4573,7 +4575,7 @@ void PSOutputDev::doImageL2(Object *ref,
+     numComps = colorMap->getNumPixelComps();
+     imgStr = new ImageStream(str, width, numComps, colorMap->getBits());
+     imgStr->reset();
+-    rects0Len = rects1Len = rectsOutLen = 0;
++    rects0Len = rects1Len = 0;
+     rectsSize = rectsOutSize = 64;
+     rects0 = (PSOutImgClipRect *)gmallocn(rectsSize, sizeof(PSOutImgClipRect));
+     rects1 = (PSOutImgClipRect *)gmallocn(rectsSize, sizeof(PSOutImgClipRect));
+@@ -4696,14 +4698,28 @@ void PSOutputDev::doImageL2(Object *ref,
+       rectsOut[rectsOutLen].y1 = height - rects0[i].y0 - 1;
+       ++rectsOutLen;
+     }
+-    writePSFmt("{0:d} array 0\n", rectsOutLen * 4);
+-    for (i = 0; i < rectsOutLen; ++i) {
+-      writePSFmt("[{0:d} {1:d} {2:d} {3:d}] pr\n",
+-               rectsOut[i].x0, rectsOut[i].y0,
+-               rectsOut[i].x1 - rectsOut[i].x0,
+-               rectsOut[i].y1 - rectsOut[i].y0);
++    if (rectsOutLen < 65536/4) {
++      writePSFmt("{0:d} array 0\n", rectsOutLen * 4);
++      for (i = 0; i < rectsOutLen; ++i) {
++      writePSFmt("[{0:d} {1:d} {2:d} {3:d}] pr\n",
++                 rectsOut[i].x0, rectsOut[i].y0,
++                 rectsOut[i].x1 - rectsOut[i].x0,
++                 rectsOut[i].y1 - rectsOut[i].y0);
++      }
++      writePSFmt("pop {0:d} {1:d} pdfImClip\n", width, height);
++    } else {
++      //  would be over the limit of array size.
++      //  make each rectangle path and clip.
++      writePS("gsave newpath\n");
++      for (i = 0; i < rectsOutLen; ++i) {
++      writePSFmt("{0:.4g} {1:.4g} {2:.4g} {3:.4g} re\n",
++                 ((double)rectsOut[i].x0)/width,
++                 ((double)rectsOut[i].y0)/height,
++                 ((double)(rectsOut[i].x1 - rectsOut[i].x0))/width,
++                 ((double)(rectsOut[i].y1 - rectsOut[i].y0))/height);
++      }
++      writePS("clip\n");
+     }
+-    writePSFmt("pop {0:d} {1:d} pdfImClip\n", width, height);
+     gfree(rectsOut);
+     gfree(rects0);
+     gfree(rects1);
+@@ -4798,14 +4814,28 @@ void PSOutputDev::doImageL2(Object *ref,
+       rectsOut[rectsOutLen].y1 = maskHeight - rects0[i].y0 - 1;
+       ++rectsOutLen;
+     }
+-    writePSFmt("{0:d} array 0\n", rectsOutLen * 4);
+-    for (i = 0; i < rectsOutLen; ++i) {
+-      writePSFmt("[{0:d} {1:d} {2:d} {3:d}] pr\n",
+-               rectsOut[i].x0, rectsOut[i].y0,
+-               rectsOut[i].x1 - rectsOut[i].x0,
+-               rectsOut[i].y1 - rectsOut[i].y0);
++    if (rectsOutLen < 65536/4) {
++      writePSFmt("{0:d} array 0\n", rectsOutLen * 4);
++      for (i = 0; i < rectsOutLen; ++i) {
++        writePSFmt("[{0:d} {1:d} {2:d} {3:d}] pr\n",
++                  rectsOut[i].x0, rectsOut[i].y0,
++                  rectsOut[i].x1 - rectsOut[i].x0,
++                  rectsOut[i].y1 - rectsOut[i].y0);
++      }
++      writePSFmt("pop {0:d} {1:d} pdfImClip\n", maskWidth, maskHeight);
++    } else {
++      //  would be over the limit of array size.
++      //  make each rectangle path and clip.
++      writePS("gsave newpath\n");
++      for (i = 0; i < rectsOutLen; ++i) {
++        writePSFmt("{0:.4g} {1:.4g} {2:.4g} {3:.4g} re\n",
++                  ((double)rectsOut[i].x0)/maskWidth,
++                  ((double)rectsOut[i].y0)/maskHeight,
++                  ((double)(rectsOut[i].x1 - rectsOut[i].x0))/maskWidth,
++                  ((double)(rectsOut[i].y1 - rectsOut[i].y0))/maskHeight);
++      }
++      writePS("clip\n");
+     }
+-    writePSFmt("pop {0:d} {1:d} pdfImClip\n", maskWidth, maskHeight);
+     gfree(rectsOut);
+     gfree(rects0);
+     gfree(rects1);
+@@ -5066,7 +5096,11 @@ void PSOutputDev::doImageL2(Object *ref,
+   }
+ 
+   if ((maskColors && colorMap && !inlineImg) || maskStr) {
+-    writePS("pdfImClipEnd\n");
++    if (rectsOutLen < 65536/4) {
++      writePS("pdfImClipEnd\n");
++    } else {
++      writePS("grestore\n");
++    }
+   }
+ }
+ 



Home | Main Index | Thread Index | Old Index