diff options
author | Justin Lecher <jlec@gentoo.org> | 2015-01-06 09:57:11 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2015-01-06 09:57:11 +0000 |
commit | bb504f48bb6eb5793b0a805415e34a10e62480f0 (patch) | |
tree | 3550e3e0ab7a4bbd36fbf3a9c666a9e3fab6aa01 /media-gfx/inkscape/files | |
parent | EAPI 5 (diff) | |
download | gentoo-2-bb504f48bb6eb5793b0a805415e34a10e62480f0.tar.gz gentoo-2-bb504f48bb6eb5793b0a805415e34a10e62480f0.tar.bz2 gentoo-2-bb504f48bb6eb5793b0a805415e34a10e62480f0.zip |
media-gfx/inkscape: Backport fix for API changes in app-text/poppler-0.29.0, #534392
(Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)
Diffstat (limited to 'media-gfx/inkscape/files')
-rw-r--r-- | media-gfx/inkscape/files/inkscape-0.48.4-poppler-0.29.0.patch | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/media-gfx/inkscape/files/inkscape-0.48.4-poppler-0.29.0.patch b/media-gfx/inkscape/files/inkscape-0.48.4-poppler-0.29.0.patch new file mode 100644 index 000000000000..bcfea9b77adb --- /dev/null +++ b/media-gfx/inkscape/files/inkscape-0.48.4-poppler-0.29.0.patch @@ -0,0 +1,98 @@ + configure.ac | 5 ++++ + src/extension/internal/pdfinput/pdf-parser.cpp | 32 +++++++++++++++++++++----- + 2 files changed, 31 insertions(+), 6 deletions(-) + +diff --git a/configure.ac b/configure.ac +index c8e1ae2..d62c989 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -593,6 +593,11 @@ if test "x$popplernewercolorspaceapi" = "xyes"; then + AC_DEFINE(POPPLER_EVEN_NEWER_COLOR_SPACE_API, 1, [Use even newer color space API from Poppler >= 0.26.0]) + fi + ++PKG_CHECK_MODULES(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API, poppler >= 0.29.0, popplernewernewcolorspaceapi=yes, popplernewernewcolorspaceapi=no) ++if test "x$popplernewernewcolorspaceapi" = "xyes"; then ++ AC_DEFINE(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API, 1, [Use even newer new color space API from Poppler >= 0.29.0]) ++fi ++ + # Poppler's b604a008 commit changes this + AC_MSG_CHECKING([whether Poppler's GfxPatch no longer uses GfxColor]) + popplergfxcolor="no" +diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp +index b6edbfb..3fbf237 100644 +--- a/src/extension/internal/pdfinput/pdf-parser.cpp ++++ b/src/extension/internal/pdfinput/pdf-parser.cpp +@@ -860,7 +860,9 @@ void PdfParser::opSetExtGState(Object args[], int numArgs) { + blendingColorSpace = NULL; + isolated = knockout = gFalse; + if (!obj4.dictLookup(const_cast<char*>("CS"), &obj5)->isNull()) { +-#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) ++#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API) ++ blendingColorSpace = GfxColorSpace::parse(NULL, &obj5, NULL, NULL); ++#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) + blendingColorSpace = GfxColorSpace::parse(&obj5, NULL, NULL); + #elif defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI) + blendingColorSpace = GfxColorSpace::parse(&obj5, NULL); +@@ -1085,7 +1087,13 @@ void PdfParser::opSetFillColorSpace(Object args[], int numArgs) { + + state->setFillPattern(NULL); + res->lookupColorSpace(args[0].getName(), &obj); +-#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) ++#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API) ++ if (obj.isNull()) { ++ colorSpace = GfxColorSpace::parse(NULL, &args[0], NULL, NULL); ++ } else { ++ colorSpace = GfxColorSpace::parse(NULL, &obj, NULL, NULL); ++ } ++#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) + if (obj.isNull()) { + colorSpace = GfxColorSpace::parse(&args[0], NULL, NULL); + } else { +@@ -1126,7 +1134,13 @@ void PdfParser::opSetStrokeColorSpace(Object args[], int numArgs) { + + state->setStrokePattern(NULL); + res->lookupColorSpace(args[0].getName(), &obj); +-#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) ++#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API) ++ if (obj.isNull()) { ++ colorSpace = GfxColorSpace::parse(NULL, &args[0], NULL, NULL); ++ } else { ++ colorSpace = GfxColorSpace::parse(NULL, &obj, NULL, NULL); ++ } ++#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) + if (obj.isNull()) { + colorSpace = GfxColorSpace::parse(&args[0], NULL, NULL); + } else { +@@ -2756,7 +2770,9 @@ void PdfParser::doImage(Object *ref, Stream *str, GBool inlineImg) { + } + } + if (!obj1.isNull()) { +-#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) ++#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API) ++ colorSpace = GfxColorSpace::parse(NULL, &obj1, NULL, NULL); ++#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) + colorSpace = GfxColorSpace::parse(&obj1, NULL, NULL); + #elif defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI) + colorSpace = GfxColorSpace::parse(&obj1, NULL); +@@ -2847,7 +2863,9 @@ void PdfParser::doImage(Object *ref, Stream *str, GBool inlineImg) { + obj2.free(); + } + } +-#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) ++#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API) ++ GfxColorSpace *maskColorSpace = GfxColorSpace::parse(NULL, &obj1, NULL, NULL); ++#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) + GfxColorSpace *maskColorSpace = GfxColorSpace::parse(&obj1, NULL, NULL); + #elif defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI) + maskColorSpace = GfxColorSpace::parse(&obj1, NULL); +@@ -3040,7 +3058,9 @@ void PdfParser::doForm(Object *str) { + if (obj1.dictLookup(const_cast<char*>("S"), &obj2)->isName(const_cast<char*>("Transparency"))) { + transpGroup = gTrue; + if (!obj1.dictLookup(const_cast<char*>("CS"), &obj3)->isNull()) { +-#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) ++#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API) ++ blendingColorSpace = GfxColorSpace::parse(NULL, &obj3, NULL, NULL); ++#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) + blendingColorSpace = GfxColorSpace::parse(&obj3, NULL, NULL); + #elif defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI) + blendingColorSpace = GfxColorSpace::parse(&obj3, NULL); |