Gentoo Archives: gentoo-commits

From: "Hanno Boeck (hanno)" <hanno@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-gfx/inkscape/files: inkscape-0.48.0-poppler-0.16.patch
Date: Tue, 28 Dec 2010 10:48:43
Message-Id: 20101228104833.3678320057@flycatcher.gentoo.org
1 hanno 10/12/28 10:48:33
2
3 Added: inkscape-0.48.0-poppler-0.16.patch
4 Log:
5 inkscape poppler 0.16 fix
6
7 (Portage version: 2.1.9.26/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 media-gfx/inkscape/files/inkscape-0.48.0-poppler-0.16.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/inkscape/files/inkscape-0.48.0-poppler-0.16.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/inkscape/files/inkscape-0.48.0-poppler-0.16.patch?rev=1.1&content-type=text/plain
14
15 Index: inkscape-0.48.0-poppler-0.16.patch
16 ===================================================================
17 === modified file 'configure.ac'
18 --- configure.ac 2010-11-15 01:32:59 +0000
19 +++ configure.ac 2010-11-21 12:38:01 +0000
20 @@ -611,11 +611,12 @@
21 AC_DEFINE(POPPLER_NEW_GFXFONT, 1, [Use GfxFont from Poppler >= 0.8.3])
22 fi
23
24 -AC_MSG_CHECKING(for new color space API in Poppler)
25 ink_svd_CPPFLAGS=$CPPFLAGS
26 ink_svd_LIBS=$LIBS
27 CPPFLAGS="$CPPFLAGS $POPPLER_CFLAGS"
28 LIBS="$LIBS $POPPLER_LIBS"
29 +
30 +AC_MSG_CHECKING(for new color space API in Poppler)
31 popplercolor="no"
32 AC_COMPILE_IFELSE([
33 #include <GfxState.h>
34 @@ -627,16 +628,36 @@
35 return 0;
36 }
37 ], [popplercolor=yes])
38 +if test "x$popplercolor" = "xyes"; then
39 + AC_DEFINE(POPPLER_NEW_COLOR_SPACE_API, 1, [Use color space API from Poppler >= 0.12.2])
40 + AC_MSG_RESULT(yes)
41 +else
42 + AC_MSG_RESULT(no)
43 +fi
44 +
45 +# Poppler's b604a008 commit changes this
46 +AC_MSG_CHECKING([whether Poppler's GfxPatch no longer uses GfxColor])
47 +popplergfxcolor="no"
48 +AC_COMPILE_IFELSE([
49 +#include <GfxState.h>
50 +
51 +int main() {
52 + GfxPatch::ColorValue color = {c: {0}};
53 + GfxPatch patch;
54 + patch.color[[0]][[0]] = color;
55 + return 0;
56 +}
57 +], [popplergfxcolor=yes])
58 +if test "x$popplergfxcolor" = "xyes"; then
59 + AC_DEFINE(POPPLER_NEW_GFXPATCH, 1, [GfxPatch no longer uses GfxColor in >= 0.15.1])
60 + AC_MSG_RESULT(yes)
61 +else
62 + AC_MSG_RESULT(no)
63 +fi
64 +
65 CPPFLAGS=$ink_svd_CPPFLAGS
66 LIBS=$ink_svd_LIBS
67
68 -if test "x$popplercolor" = "xyes"; then
69 - AC_DEFINE(POPPLER_NEW_COLOR_SPACE_API, 1, [Use color space API from Poppler >= 0.12.2])
70 - AC_MSG_RESULT(yes)
71 -else
72 - AC_MSG_RESULT(no)
73 -fi
74 -
75 dnl ******************************
76 dnl Inkboard dependency checking
77 dnl ******************************
78
79 === modified file 'src/extension/internal/pdfinput/pdf-parser.cpp'
80 --- src/extension/internal/pdfinput/pdf-parser.cpp 2010-03-21 01:53:59 +0000
81 +++ src/extension/internal/pdfinput/pdf-parser.cpp 2010-11-21 12:38:01 +0000
82 @@ -1874,6 +1874,9 @@
83
84 void PdfParser::fillPatch(GfxPatch *patch, int nComps, int depth) {
85 GfxPatch patch00, patch01, patch10, patch11;
86 +#ifdef POPPLER_NEW_GFXPATCH
87 + GfxColor color;
88 +#endif
89 double xx[4][8], yy[4][8];
90 double xxm, yym;
91 double patchColorDelta = colorDeltas[pdfPatchMeshShading-1];
92 @@ -1890,9 +1893,16 @@
93 > patchColorDelta) {
94 break;
95 }
96 +#ifdef POPPLER_NEW_GFXPATCH
97 + color.c[i] = GfxColorComp(patch->color[0][0].c[i]);
98 +#endif
99 }
100 if (i == nComps || depth == maxDepths[pdfPatchMeshShading-1]) {
101 +#ifdef POPPLER_NEW_GFXPATCH
102 + state->setFillColor(&color);
103 +#else
104 state->setFillColor(&patch->color[0][0]);
105 +#endif
106 state->moveTo(patch->x[0][0], patch->y[0][0]);
107 state->curveTo(patch->x[0][1], patch->y[0][1],
108 patch->x[0][2], patch->y[0][2],