From 6568850bf6e2f6cea9d8f93e8a812f954c944746d94fa2caa2ba32f27bbd9d45 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Mon, 29 Dec 2014 23:49:27 +0000 Subject: [PATCH] Accepting request 266626 from GNOME:Apps - Add inkscape-fix-build-with-poppler-0.29.patch: Fix build with poppler 0.29. Patch has been backported from https://bugs.launchpad.net/inkscape/+bug/1399811. OBS-URL: https://build.opensuse.org/request/show/266626 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/inkscape?expand=0&rev=78 --- inkscape-fix-build-with-poppler-0.29.patch | 94 ++++++++++++++++++++++ inkscape.changes | 7 ++ inkscape.spec | 3 + 3 files changed, 104 insertions(+) create mode 100644 inkscape-fix-build-with-poppler-0.29.patch diff --git a/inkscape-fix-build-with-poppler-0.29.patch b/inkscape-fix-build-with-poppler-0.29.patch new file mode 100644 index 0000000..4fa189f --- /dev/null +++ b/inkscape-fix-build-with-poppler-0.29.patch @@ -0,0 +1,94 @@ +--- inkscape-0.48.5.orig/configure.ac ++++ inkscape-0.48.5/configure.ac +@@ -593,6 +593,11 @@ if test "x$popplernewercolorspaceapi" = + 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" +--- inkscape-0.48.5.orig/src/extension/internal/pdfinput/pdf-parser.cpp ++++ inkscape-0.48.5/src/extension/internal/pdfinput/pdf-parser.cpp +@@ -860,7 +860,9 @@ void PdfParser::opSetExtGState(Object ar + blendingColorSpace = NULL; + isolated = knockout = gFalse; + if (!obj4.dictLookup(const_cast("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(Obje + + 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(Ob + + 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,8 +2770,10 @@ void PdfParser::doImage(Object *ref, Str + } + } + if (!obj1.isNull()) { +-#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) +- colorSpace = GfxColorSpace::parse(&obj1, NULL, NULL); ++#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); + #else +@@ -2847,8 +2863,10 @@ void PdfParser::doImage(Object *ref, Str + obj2.free(); + } + } +-#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) +- GfxColorSpace *maskColorSpace = GfxColorSpace::parse(&obj1, NULL, NULL); ++#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); + #else +@@ -3040,7 +3058,9 @@ void PdfParser::doForm(Object *str) { + if (obj1.dictLookup(const_cast("S"), &obj2)->isName(const_cast("Transparency"))) { + transpGroup = gTrue; + if (!obj1.dictLookup(const_cast("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); diff --git a/inkscape.changes b/inkscape.changes index bd2eb28..b7f0bc6 100644 --- a/inkscape.changes +++ b/inkscape.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Dec 29 08:31:27 UTC 2014 - mlin@suse.com + +- Add inkscape-fix-build-with-poppler-0.29.patch: Fix build with + poppler 0.29. Patch has been backported from + https://bugs.launchpad.net/inkscape/+bug/1399811. + ------------------------------------------------------------------- Sat Nov 22 19:53:52 UTC 2014 - stefan.bruens@rwth-aachen.de diff --git a/inkscape.spec b/inkscape.spec index 729c948..4ee6bad 100644 --- a/inkscape.spec +++ b/inkscape.spec @@ -37,6 +37,8 @@ Patch2: inkscape-return-on-exit.patch Patch4: inkscape-apply-invert-transform.patch # PATCH-FIX-UPSTREAM inkscape-0.48.5-librevenge.patch lp#1323592 fstrba@suse.com -- port to librevenge based libwpg (backported to inkscape 0.48.5) Patch8: inkscape-0.48.5-librevenge.patch +# PATCH-FIX-UPSTREAM inkscape-fix-build-with-poppler-0.29.patch lp#1399811 mlin@suse.com -- fix build with poppler 0.29 (backported to inkscape 0.48.5) +Patch9: inkscape-fix-build-with-poppler-0.29.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: boost-devel @@ -166,6 +168,7 @@ Inkscape is a vector illustration program for the GNOME desktop. %patch2 -p1 %patch4 -p1 %patch8 -p1 +%patch9 -p1 %build libtoolize --force --copy --install