summaryrefslogtreecommitdiff
path: root/print/poppler/patches
diff options
context:
space:
mode:
authordrochner <drochner@pkgsrc.org>2009-03-19 12:12:24 +0000
committerdrochner <drochner@pkgsrc.org>2009-03-19 12:12:24 +0000
commit64afbd82a7aa26dcfc2fadb08f507ef41608963c (patch)
treed79bdec368df461c9373847d692b0790c6dd14e5 /print/poppler/patches
parentce7de537f18bee2a790c4cb1235b86080fbf463f (diff)
downloadpkgsrc-64afbd82a7aa26dcfc2fadb08f507ef41608963c.tar.gz
update to 0.10.5
Changes since 0.10.4: core: * Read the UF entry if present and prefer it over F in Filespec dictionary * Fix typo that was making CairoOutputDev crash on some files. Bug #17337 * Make JBIG2Stream more robust to corrupt input data * Do not blindly follow loops parsing OutlineItem. Bug #18364 * Set up the error manager before calling jpeg_create_decompress. Bug #20484 * Check there is an optional content config before using it. Bug #20587 * Fix rendering of some PDF with OpenType fonts. Bug #20605 build system: * Yet more support for build on windows * Use AC_CHECK_HEADER to find headers. Bug #20538 * Check for pkgconfig before using it * General autotools improvements
Diffstat (limited to 'print/poppler/patches')
-rw-r--r--print/poppler/patches/patch-ai62
-rw-r--r--print/poppler/patches/patch-ba13
-rw-r--r--print/poppler/patches/patch-bb197
-rw-r--r--print/poppler/patches/patch-bc90
4 files changed, 130 insertions, 232 deletions
diff --git a/print/poppler/patches/patch-ai b/print/poppler/patches/patch-ai
index c52cdd8aac1..011a5a5bb1f 100644
--- a/print/poppler/patches/patch-ai
+++ b/print/poppler/patches/patch-ai
@@ -1,8 +1,8 @@
-$NetBSD: patch-ai,v 1.6 2009/02/12 20:55:07 drochner Exp $
+$NetBSD: patch-ai,v 1.7 2009/03/19 12:12:24 drochner Exp $
---- configure.orig 2009-02-10 20:06:59.000000000 +0100
+--- configure.orig 2009-03-12 00:15:52.000000000 +0100
+++ configure
-@@ -945,6 +945,8 @@ BUILD_ABIWORD_OUTPUT_TRUE
+@@ -948,6 +948,8 @@ BUILD_ABIWORD_OUTPUT_TRUE
BUILD_ABIWORD_OUTPUT_FALSE
BUILD_UTILS_TRUE
BUILD_UTILS_FALSE
@@ -11,7 +11,7 @@ $NetBSD: patch-ai,v 1.6 2009/02/12 20:55:07 drochner Exp $
PC_REQUIRES
PC_REQUIRES_PRIVATE
LIBOBJS
-@@ -1594,6 +1596,7 @@ Optional Features:
+@@ -1597,6 +1599,7 @@ Optional Features:
--enable-compile-warnings=[no/yes/kde]
Turn on compiler warnings.
@@ -19,7 +19,7 @@ $NetBSD: patch-ai,v 1.6 2009/02/12 20:55:07 drochner Exp $
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
-@@ -19915,13 +19918,11 @@ _ACEOF
+@@ -20355,13 +20358,11 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
@@ -35,7 +35,7 @@ $NetBSD: patch-ai,v 1.6 2009/02/12 20:55:07 drochner Exp $
;
return 0;
}
-@@ -19961,13 +19962,11 @@ cat confdefs.h >>conftest.$ac_ext
+@@ -20401,13 +20402,11 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#define _LARGEFILE_SOURCE 1
@@ -51,16 +51,7 @@ $NetBSD: patch-ai,v 1.6 2009/02/12 20:55:07 drochner Exp $
;
return 0;
}
-@@ -21325,7 +21324,7 @@ for i in $jpeg_incdirs;
- do
- for j in jpeglib.h;
- do
-- echo "configure: 21328: $i/$j" >&5
-+ echo "configure: 21327: $i/$j" >&5
- if test -r "$i/$j"; then
- echo "taking that" >&5
- jpeg_incdir=$i
-@@ -23687,7 +23686,7 @@ fi
+@@ -24123,7 +24122,7 @@ fi
if test x$enable_poppler_qt4 = xyes; then
{ echo "$as_me:$LINENO: checking for Qt4 moc" >&5
echo $ECHO_N "checking for Qt4 moc... $ECHO_C" >&6; }
@@ -69,7 +60,7 @@ $NetBSD: patch-ai,v 1.6 2009/02/12 20:55:07 drochner Exp $
mocversion=`$MOCQT4 -v 2>&1`
mocversiongrep=`echo $mocversion | grep "Qt 4"`
if test x"$mocversiongrep" != x"$mocversion"; then
-@@ -24142,6 +24141,249 @@ else
+@@ -24578,6 +24577,249 @@ else
fi
@@ -319,7 +310,7 @@ $NetBSD: patch-ai,v 1.6 2009/02/12 20:55:07 drochner Exp $
if test "x$GCC" != xyes; then
enable_compile_warnings=no
fi
-@@ -24413,6 +24655,13 @@ echo "$as_me: error: conditional \"BUILD
+@@ -24849,6 +25091,13 @@ echo "$as_me: error: conditional \"BUILD
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -333,7 +324,7 @@ $NetBSD: patch-ai,v 1.6 2009/02/12 20:55:07 drochner Exp $
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
-@@ -25542,13 +25791,15 @@ BUILD_ABIWORD_OUTPUT_TRUE!$BUILD_ABIWORD
+@@ -25984,13 +26233,15 @@ BUILD_ABIWORD_OUTPUT_TRUE!$BUILD_ABIWORD
BUILD_ABIWORD_OUTPUT_FALSE!$BUILD_ABIWORD_OUTPUT_FALSE$ac_delim
BUILD_UTILS_TRUE!$BUILD_UTILS_TRUE$ac_delim
BUILD_UTILS_FALSE!$BUILD_UTILS_FALSE$ac_delim
@@ -345,12 +336,39 @@ $NetBSD: patch-ai,v 1.6 2009/02/12 20:55:07 drochner Exp $
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
-- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 91; then
-+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 93; then
+- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 94; then
++ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 96; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-@@ -26961,6 +27212,7 @@ echo " use gtk-doc: $enable_gtk_
+@@ -26009,7 +26260,7 @@ fi
+
+ cat >>$CONFIG_STATUS <<_ACEOF
+ cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
+-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
++/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+ _ACEOF
+ sed '
+ s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+@@ -26022,8 +26273,6 @@ N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!
+ ' >>$CONFIG_STATUS <conf$$subs.sed
+ rm -f conf$$subs.sed
+ cat >>$CONFIG_STATUS <<_ACEOF
+-:end
+-s/|#_!!_#|//g
+ CEOF$ac_eof
+ _ACEOF
+
+@@ -26277,7 +26526,7 @@ s&@abs_top_builddir@&$ac_abs_top_builddi
+ s&@INSTALL@&$ac_INSTALL&;t t
+ s&@MKDIR_P@&$ac_MKDIR_P&;t t
+ $ac_datarootdir_hack
+-" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
++" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed 's/|#_!!_#|//g' >$tmp/out
+
+ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+@@ -27412,6 +27661,7 @@ echo " use gtk-doc: $enable_gtk_
echo " use libjpeg: $enable_libjpeg"
echo " use zlib: $enable_zlib"
echo " use libopenjpeg: $enable_libopenjpeg"
diff --git a/print/poppler/patches/patch-ba b/print/poppler/patches/patch-ba
deleted file mode 100644
index 587619b2cec..00000000000
--- a/print/poppler/patches/patch-ba
+++ /dev/null
@@ -1,13 +0,0 @@
-$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 --git a/print/poppler/patches/patch-bb b/print/poppler/patches/patch-bb
deleted file mode 100644
index 17494409b35..00000000000
--- a/print/poppler/patches/patch-bb
+++ /dev/null
@@ -1,197 +0,0 @@
-$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 --git a/print/poppler/patches/patch-bc b/print/poppler/patches/patch-bc
new file mode 100644
index 00000000000..d3eec7b10cd
--- /dev/null
+++ b/print/poppler/patches/patch-bc
@@ -0,0 +1,90 @@
+$NetBSD: patch-bc,v 1.1 2009/03/19 12:12:24 drochner Exp $
+
+--- poppler/Annot.cc.orig 2009-02-09 00:28:40.000000000 +0100
++++ poppler/Annot.cc
+@@ -456,49 +456,67 @@ AnnotBorderArray::AnnotBorderArray(Array
+ Object obj1;
+ int arrayLength = array->getLength();
+
+- if (arrayLength >= 3) {
++ GBool correct = gTrue;
++ if (arrayLength == 3 || arrayLength == 4) {
+ // implementation note 81 in Appendix H.
+
+ if (array->get(0, &obj1)->isNum())
+ horizontalCorner = obj1.getNum();
++ else
++ correct = gFalse;
+ obj1.free();
+
+ if (array->get(1, &obj1)->isNum())
+ verticalCorner = obj1.getNum();
++ else
++ correct = gFalse;
+ obj1.free();
+
+ if (array->get(2, &obj1)->isNum())
+ width = obj1.getNum();
++ else
++ correct = gFalse;
+ obj1.free();
+
+ // TODO: check not all zero ? (Line Dash Pattern Page 217 PDF 8.1)
+- if (arrayLength > 3) {
+- GBool correct = gTrue;
+- int tempLength = array->getLength() - 3;
+- double *tempDash = (double *) gmallocn (tempLength, sizeof (double));
++ if (arrayLength == 4) {
++ if (array->get(3, &obj1)->isArray()) {
++ Array *dashPattern = obj1.getArray();
++ int tempLength = dashPattern->getLength();
++ double *tempDash = (double *) gmallocn (tempLength, sizeof (double));
++
++ for(int i = 0; i < tempLength && i < DASH_LIMIT && correct; i++) {
+
+- for(int i = 0; i < tempLength && i < DASH_LIMIT && correct; i++) {
++ if (dashPattern->get(i, &obj1)->isNum()) {
++ tempDash[i] = obj1.getNum();
+
+- if (array->get((i + 3), &obj1)->isNum()) {
+- tempDash[i] = obj1.getNum();
++ if (tempDash[i] < 0)
++ correct = gFalse;
+
+- if (tempDash[i] < 0)
++ } else {
+ correct = gFalse;
++ }
++ obj1.free();
++ }
+
++ if (correct) {
++ dashLength = tempLength;
++ dash = tempDash;
++ style = borderDashed;
+ } else {
+- correct = gFalse;
++ gfree (tempDash);
+ }
+- obj1.free();
+- }
+-
+- if (correct) {
+- dashLength = tempLength;
+- dash = tempDash;
+- style = borderDashed;
+ } else {
+- gfree (tempDash);
++ correct = gFalse;
+ }
++ obj1.free();
+ }
++ } else {
++ correct = gFalse;
++ }
++
++ if (!correct) {
++ width = 0;
+ }
+ }
+