pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/print/poppler pull some patches from upstream, to fix ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/6293ae41b1ad
branches: trunk
changeset: 555270:6293ae41b1ad
user: drochner <drochner%pkgsrc.org@localhost>
date: Thu Feb 26 20:23:02 2009 +0000
description:
pull some patches from upstream, to fix two crashes and an off-by-one
in color management support, bump PKGREVISION
diffstat:
print/poppler/Makefile | 4 +-
print/poppler/distinfo | 6 +-
print/poppler/patches/patch-ba | 13 ++
print/poppler/patches/patch-bb | 197 +++++++++++++++++++++++++++++++++++++++++
print/poppler/patches/patch-ca | 4 +-
5 files changed, 219 insertions(+), 5 deletions(-)
diffs (269 lines):
diff -r c2fb5263f8de -r 6293ae41b1ad print/poppler/Makefile
--- a/print/poppler/Makefile Thu Feb 26 19:49:12 2009 +0000
+++ b/print/poppler/Makefile Thu Feb 26 20:23:02 2009 +0000
@@ -1,8 +1,10 @@
-# $NetBSD: Makefile,v 1.35 2009/02/12 20:55:07 drochner Exp $
+# $NetBSD: Makefile,v 1.36 2009/02/26 20:23:02 drochner Exp $
#
.include "../../print/poppler/Makefile.common"
+PKGREVISION= 1
+
COMMENT= PDF rendering library
MAINTAINER= reed%reedmedia.net@localhost
diff -r c2fb5263f8de -r 6293ae41b1ad print/poppler/distinfo
--- a/print/poppler/distinfo Thu Feb 26 19:49:12 2009 +0000
+++ b/print/poppler/distinfo Thu Feb 26 20:23:02 2009 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.39 2009/02/12 20:55:07 drochner Exp $
+$NetBSD: distinfo,v 1.40 2009/02/26 20:23:02 drochner Exp $
SHA1 (poppler-0.10.4.tar.gz) = e8a5a1090394a2cfab3c9aa67d188f3628c60165
RMD160 (poppler-0.10.4.tar.gz) = 62815f486a4f1eaa226e84aa953134be6a209ed6
@@ -9,5 +9,7 @@
SHA1 (patch-ai) = 852332490394756c496d06eb109f3d1d637f8717
SHA1 (patch-aj) = 8bb1fe169bddb76ecc72129cc1dbd32030073dfd
SHA1 (patch-ak) = ab4d0c91a6f2806b405954f8dab6e3d61a03b054
-SHA1 (patch-ca) = ba4190663bc0c0e9a7d9477922665e0ed5d4c0e4
+SHA1 (patch-ba) = c53d76e13dc7afeb9410f4566ea917b83a76a133
+SHA1 (patch-bb) = c9fa8638988e335f9d80cda25015d9a18d78fa94
+SHA1 (patch-ca) = 5bd31c497c8cbfb6c1d6cb5b9183088113bef6e3
SHA1 (patch-cb) = e8cfb16a0641788759b13cf5fcf97d82f9485adc
diff -r c2fb5263f8de -r 6293ae41b1ad print/poppler/patches/patch-ba
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/print/poppler/patches/patch-ba Thu Feb 26 20:23:02 2009 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ba,v 1.1 2009/02/26 20:23:02 drochner Exp $
+
+--- poppler/CairoOutputDev.cc.orig 2009-02-24 15:34:03.000000000 +0100
++++ poppler/CairoOutputDev.cc
+@@ -236,7 +236,7 @@ void CairoOutputDev::setDefaultCTM(doubl
+ matrix.y0 = ctm[5];
+
+ cairo_transform (cairo, &matrix);
+- if (shape)
++ if (cairo_shape)
+ cairo_transform (cairo_shape, &matrix);
+
+ OutputDev::setDefaultCTM(ctm);
diff -r c2fb5263f8de -r 6293ae41b1ad print/poppler/patches/patch-bb
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/print/poppler/patches/patch-bb Thu Feb 26 20:23:02 2009 +0000
@@ -0,0 +1,197 @@
+$NetBSD: patch-bb,v 1.1 2009/02/26 20:23:02 drochner Exp $
+
+--- poppler/JBIG2Stream.cc.orig 2009-01-23 23:09:41.000000000 +0100
++++ poppler/JBIG2Stream.cc
+@@ -684,6 +684,7 @@ public:
+ void combine(JBIG2Bitmap *bitmap, int x, int y, Guint combOp);
+ Guchar *getDataPtr() { return data; }
+ int getDataSize() { return h * line; }
++ GBool isOk() { return data != NULL; }
+
+ private:
+
+@@ -2074,18 +2075,20 @@ void JBIG2Stream::readTextRegionSeg(Guin
+
+ gfree(syms);
+
+- // combine the region bitmap into the page bitmap
+- if (imm) {
+- if (pageH == 0xffffffff && y + h > curPageH) {
+- pageBitmap->expand(y + h, pageDefPixel);
+- }
+- pageBitmap->combine(bitmap, x, y, extCombOp);
+- delete bitmap;
++ if (bitmap) {
++ // combine the region bitmap into the page bitmap
++ if (imm) {
++ if (pageH == 0xffffffff && y + h > curPageH) {
++ pageBitmap->expand(y + h, pageDefPixel);
++ }
++ pageBitmap->combine(bitmap, x, y, extCombOp);
++ delete bitmap;
+
+- // store the region bitmap
+- } else {
+- bitmap->setSegNum(segNum);
+- segments->append(bitmap);
++ // store the region bitmap
++ } else {
++ bitmap->setSegNum(segNum);
++ segments->append(bitmap);
++ }
+ }
+
+ // clean up the Huffman decoder
+@@ -2207,73 +2210,84 @@ JBIG2Bitmap *JBIG2Stream::readTextRegion
+ ri = 0;
+ }
+ if (ri) {
++ GBool decodeSuccess;
+ if (huff) {
+- huffDecoder->decodeInt(&rdw, huffRDWTable);
+- huffDecoder->decodeInt(&rdh, huffRDHTable);
+- huffDecoder->decodeInt(&rdx, huffRDXTable);
+- huffDecoder->decodeInt(&rdy, huffRDYTable);
+- huffDecoder->decodeInt(&bmSize, huffRSizeTable);
++ decodeSuccess = huffDecoder->decodeInt(&rdw, huffRDWTable);
++ decodeSuccess = decodeSuccess && huffDecoder->decodeInt(&rdh, huffRDHTable);
++ decodeSuccess = decodeSuccess && huffDecoder->decodeInt(&rdx, huffRDXTable);
++ decodeSuccess = decodeSuccess && huffDecoder->decodeInt(&rdy, huffRDYTable);
++ decodeSuccess = decodeSuccess && huffDecoder->decodeInt(&bmSize, huffRSizeTable);
+ huffDecoder->reset();
+ arithDecoder->start();
+ } else {
+- arithDecoder->decodeInt(&rdw, iardwStats);
+- arithDecoder->decodeInt(&rdh, iardhStats);
+- arithDecoder->decodeInt(&rdx, iardxStats);
+- arithDecoder->decodeInt(&rdy, iardyStats);
+- }
+- refDX = ((rdw >= 0) ? rdw : rdw - 1) / 2 + rdx;
+- refDY = ((rdh >= 0) ? rdh : rdh - 1) / 2 + rdy;
+-
+- symbolBitmap =
+- readGenericRefinementRegion(rdw + syms[symID]->getWidth(),
+- rdh + syms[symID]->getHeight(),
+- templ, gFalse, syms[symID],
+- refDX, refDY, atx, aty);
++ decodeSuccess = arithDecoder->decodeInt(&rdw, iardwStats);
++ decodeSuccess = decodeSuccess && arithDecoder->decodeInt(&rdh, iardhStats);
++ decodeSuccess = decodeSuccess && arithDecoder->decodeInt(&rdx, iardxStats);
++ decodeSuccess = decodeSuccess && arithDecoder->decodeInt(&rdy, iardyStats);
++ }
++
++ if (decodeSuccess)
++ {
++ refDX = ((rdw >= 0) ? rdw : rdw - 1) / 2 + rdx;
++ refDY = ((rdh >= 0) ? rdh : rdh - 1) / 2 + rdy;
++
++ symbolBitmap =
++ readGenericRefinementRegion(rdw + syms[symID]->getWidth(),
++ rdh + syms[symID]->getHeight(),
++ templ, gFalse, syms[symID],
++ refDX, refDY, atx, aty);
++ }
+ //~ do we need to use the bmSize value here (in Huffman mode)?
+ } else {
+ symbolBitmap = syms[symID];
+ }
+
+- // combine the symbol bitmap into the region bitmap
+- //~ something is wrong here - refCorner shouldn't degenerate into
+- //~ two cases
+- bw = symbolBitmap->getWidth() - 1;
+- bh = symbolBitmap->getHeight() - 1;
+- if (transposed) {
+- switch (refCorner) {
+- case 0: // bottom left
+- bitmap->combine(symbolBitmap, tt, s, combOp);
+- break;
+- case 1: // top left
+- bitmap->combine(symbolBitmap, tt, s, combOp);
+- break;
+- case 2: // bottom right
+- bitmap->combine(symbolBitmap, tt - bw, s, combOp);
+- break;
+- case 3: // top right
+- bitmap->combine(symbolBitmap, tt - bw, s, combOp);
+- break;
++ if (symbolBitmap) {
++ // combine the symbol bitmap into the region bitmap
++ //~ something is wrong here - refCorner shouldn't degenerate into
++ //~ two cases
++ bw = symbolBitmap->getWidth() - 1;
++ bh = symbolBitmap->getHeight() - 1;
++ if (transposed) {
++ switch (refCorner) {
++ case 0: // bottom left
++ bitmap->combine(symbolBitmap, tt, s, combOp);
++ break;
++ case 1: // top left
++ bitmap->combine(symbolBitmap, tt, s, combOp);
++ break;
++ case 2: // bottom right
++ bitmap->combine(symbolBitmap, tt - bw, s, combOp);
++ break;
++ case 3: // top right
++ bitmap->combine(symbolBitmap, tt - bw, s, combOp);
++ break;
++ }
++ s += bh;
++ } else {
++ switch (refCorner) {
++ case 0: // bottom left
++ bitmap->combine(symbolBitmap, s, tt - bh, combOp);
++ break;
++ case 1: // top left
++ bitmap->combine(symbolBitmap, s, tt, combOp);
++ break;
++ case 2: // bottom right
++ bitmap->combine(symbolBitmap, s, tt - bh, combOp);
++ break;
++ case 3: // top right
++ bitmap->combine(symbolBitmap, s, tt, combOp);
++ break;
++ }
++ s += bw;
+ }
+- s += bh;
+- } else {
+- switch (refCorner) {
+- case 0: // bottom left
+- bitmap->combine(symbolBitmap, s, tt - bh, combOp);
+- break;
+- case 1: // top left
+- bitmap->combine(symbolBitmap, s, tt, combOp);
+- break;
+- case 2: // bottom right
+- bitmap->combine(symbolBitmap, s, tt - bh, combOp);
+- break;
+- case 3: // top right
+- bitmap->combine(symbolBitmap, s, tt, combOp);
+- break;
++ if (ri) {
++ delete symbolBitmap;
+ }
+- s += bw;
+- }
+- if (ri) {
+- delete symbolBitmap;
++ } else {
++ // NULL symbolBitmap only happens on error
++ delete bitmap;
++ return NULL;
+ }
+ }
+
+@@ -3052,6 +3066,11 @@ JBIG2Bitmap *JBIG2Stream::readGenericRef
+ int x, y, pix;
+
+ bitmap = new JBIG2Bitmap(0, w, h);
++ if (!bitmap->isOk())
++ {
++ delete bitmap;
++ return NULL;
++ }
+ bitmap->clearToZero();
+
+ // set up the typical row context
diff -r c2fb5263f8de -r 6293ae41b1ad print/poppler/patches/patch-ca
--- a/print/poppler/patches/patch-ca Thu Feb 26 19:49:12 2009 +0000
+++ b/print/poppler/patches/patch-ca Thu Feb 26 20:23:02 2009 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-ca,v 1.1 2009/02/12 20:55:07 drochner Exp $
+$NetBSD: patch-ca,v 1.2 2009/02/26 20:23:02 drochner Exp $
--- poppler/GfxState.cc.orig 2008-11-05 22:49:26.000000000 +0100
+++ poppler/GfxState.cc
@@ -912,7 +912,7 @@
+ if (cache[GFX_ICCBASED_CACHE_SIZE-1].num > 0) {
+ delete cache[GFX_ICCBASED_CACHE_SIZE-1].colorSpace;
+ }
-+ for (i = GFX_ICCBASED_CACHE_SIZE; i > 0; i--) {
++ for (i = GFX_ICCBASED_CACHE_SIZE-1; i > 0; i--) {
+ if (cache[i - 1].num > 0) cache[i] = cache[i - 1];
+ }
+ cache[0].num = numA;
Home |
Main Index |
Thread Index |
Old Index