diff options
author | drochner <drochner@pkgsrc.org> | 2009-07-28 18:22:49 +0000 |
---|---|---|
committer | drochner <drochner@pkgsrc.org> | 2009-07-28 18:22:49 +0000 |
commit | bc5e78c9821e4db51d684ea3163d8d4985fc828d (patch) | |
tree | f5e9130c1aecd43d8f55014d895661252f8cd1e2 /print | |
parent | 0c6c3f7e95835a9d7e51ee0405432d2cd6bebfaf (diff) | |
download | pkgsrc-bc5e78c9821e4db51d684ea3163d8d4985fc828d.tar.gz |
pull a patch from upstream which fixes generation of invalid postscript
files in some cases, bump PKGREVISION
Diffstat (limited to 'print')
-rw-r--r-- | print/poppler/Makefile | 4 | ||||
-rw-r--r-- | print/poppler/distinfo | 3 | ||||
-rw-r--r-- | print/poppler/patches/patch-an | 107 |
3 files changed, 112 insertions, 2 deletions
diff --git a/print/poppler/Makefile b/print/poppler/Makefile index ca8ded391c8..dae7011e20a 100644 --- a/print/poppler/Makefile +++ b/print/poppler/Makefile @@ -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 diff --git a/print/poppler/distinfo b/print/poppler/distinfo index e9bf5c33e2c..1c9e86db664 100644 --- a/print/poppler/distinfo +++ b/print/poppler/distinfo @@ -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-aj) = 8bb1fe169bddb76ecc72129cc1dbd32030073dfd 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 --git a/print/poppler/patches/patch-an b/print/poppler/patches/patch-an new file mode 100644 index 00000000000..0131678cb9e --- /dev/null +++ b/print/poppler/patches/patch-an @@ -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"); ++ } + } + } + |