From 4b6703f4a669e188197df74b20b21ef742edd123 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 19 2015 08:48:09 +0000 Subject: import inkscape-0.48.4-15.el7 --- diff --git a/SOURCES/inkscape-0.48.4-libwpg.patch b/SOURCES/inkscape-0.48.4-libwpg.patch new file mode 100644 index 0000000..c745143 --- /dev/null +++ b/SOURCES/inkscape-0.48.4-libwpg.patch @@ -0,0 +1,112 @@ +From 127777fe3298bcdfe45d74b36f77b8238ebb6937 Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Tue, 27 May 2014 16:47:39 +0200 +Subject: [PATCH] switch to librevenge-based import libs + +--- + configure.ac | 19 ++--------------- + src/extension/internal/wpg-input.cpp | 41 ++++++++++++------------------------ + 2 files changed, 15 insertions(+), 45 deletions(-) + +diff --git a/configure.ac b/configure.ac +index fcff879..4bce58c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -676,23 +676,8 @@ dnl ****************************** + + with_libwpg=no + +-PKG_CHECK_MODULES(LIBWPG01, libwpg-0.1 libwpg-stream-0.1, with_libwpg01=yes, with_libwpg01=no) +-if test "x$with_libwpg01" = "xyes"; then +- AC_DEFINE(WITH_LIBWPG01,1,[Build in libwpg 0.1.x]) +- with_libwpg=yes +- AC_SUBST(LIBWPG_LIBS, $LIBWPG01_LIBS) +- AC_SUBST(LIBWPG_CFLAGS, $LIBWPG01_CFLAGS) +-fi +-AM_CONDITIONAL(WITH_LIBWPG01, test "x$with_libwpg01" = "xyes") +- +-PKG_CHECK_MODULES(LIBWPG02, libwpg-0.2 libwpd-0.9 libwpd-stream-0.9, with_libwpg02=yes, with_libwpg02=no) +-if test "x$with_libwpg02" = "xyes"; then +- AC_DEFINE(WITH_LIBWPG02,1,[Build in libwpg 0.2.x]) +- with_libwpg=yes +- AC_SUBST(LIBWPG_LIBS, $LIBWPG02_LIBS) +- AC_SUBST(LIBWPG_CFLAGS, $LIBWPG02_CFLAGS) +-fi +-AM_CONDITIONAL(WITH_LIBWPG02, test "x$with_libwpg02" = "xyes") ++PKG_CHECK_MODULES(LIBWPG, libwpg-0.3 librevenge-0.0 librevenge-stream-0.0, with_libwpg=yes, with_libwpg=no) ++AM_CONDITIONAL(WITH_LIBWPG01, test "x$with_libwpg" = "xyes") + + if test "x$with_libwpg" = "xyes"; then + AC_DEFINE(WITH_LIBWPG,1,[Build in libwpg]) +diff --git a/src/extension/internal/wpg-input.cpp b/src/extension/internal/wpg-input.cpp +index 5c5cb65..71c7b44 100644 +--- a/src/extension/internal/wpg-input.cpp ++++ b/src/extension/internal/wpg-input.cpp +@@ -48,17 +48,8 @@ + #include "extension/input.h" + #include "document.h" + +-// Take a guess and fallback to 0.1.x if no configure has run +-#if !defined(WITH_LIBWPG01) && !defined(WITH_LIBWPG02) +-#define WITH_LIBWPG01 1 +-#endif +- + #include "libwpg/libwpg.h" +-#if WITH_LIBWPG01 +-#include "libwpg/WPGStreamImplementation.h" +-#elif WITH_LIBWPG02 +-#include "libwpd-stream/libwpd-stream.h" +-#endif ++#include "librevenge-stream/librevenge-stream.h" + + using namespace libwpg; + +@@ -69,17 +60,9 @@ namespace Internal { + + SPDocument * + WpgInput::open(Inkscape::Extension::Input * mod, const gchar * uri) { +-#if WITH_LIBWPG01 +- WPXInputStream* input = new libwpg::WPGFileStream(uri); +-#elif WITH_LIBWPG02 +- WPXInputStream* input = new WPXFileStream(uri); +-#endif +- if (input->isOLEStream()) { +-#if WITH_LIBWPG01 +- WPXInputStream* olestream = input->getDocumentOLEStream(); +-#elif WITH_LIBWPG02 +- WPXInputStream* olestream = input->getDocumentOLEStream("PerfectOffice_MAIN"); +-#endif ++ librevenge::RVNGInputStream* input = new librevenge::RVNGFileStream(uri); ++ if (input->isStructured()) { ++ librevenge::RVNGInputStream* olestream = input->getSubStreamByName("PerfectOffice_MAIN"); + if (olestream) { + delete input; + input = olestream; +@@ -94,15 +77,17 @@ WpgInput::open(Inkscape::Extension::Input * mod, const gchar * uri) { + return NULL; + } + +-#if WITH_LIBWPG01 +- libwpg::WPGString output; +-#elif WITH_LIBWPG02 +- WPXString output; +-#endif +- if (!libwpg::WPGraphics::generateSVG(input, output)) { ++ librevenge::RVNGStringVector vec; ++ librevenge::RVNGSVGDrawingGenerator generator(vec, ""); ++ ++ if (!libwpg::WPGraphics::parse(input, &generator) || vec.empty() || vec[0].empty()) ++ { + delete input; + return NULL; +- } ++ } ++ ++ librevenge::RVNGString output("\n\n"); ++ output.append(vec[0]); + + //printf("I've got a doc: \n%s", painter.document.c_str()); + +-- +1.9.3 + diff --git a/SOURCES/poppler.patch b/SOURCES/poppler.patch new file mode 100644 index 0000000..9e37a41 --- /dev/null +++ b/SOURCES/poppler.patch @@ -0,0 +1,143 @@ +commit 6f7d0e79120a973eb4a17abbd8ac5bef6be06804 +Author: Matthias Kilian +Date: Wed Jun 4 15:01:44 2014 +0200 + + Fix build failure with poppler 0.26 (Bug #1315142) + +diff --git a/configure.ac b/configure.ac +index 712aa68..f78668d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -491,6 +491,11 @@ else + AC_MSG_RESULT(no) + fi + ++PKG_CHECK_MODULES(POPPLER_EVEN_NEWER_COLOR_SPACE_API, poppler >= 0.26.0, popplernewercolorspaceapi=yes, popplernewercolorspaceapi=no) ++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 ++ + # 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 b398486..c5f03e5 100644 +--- a/src/extension/internal/pdfinput/pdf-parser.cpp ++++ b/src/extension/internal/pdfinput/pdf-parser.cpp +@@ -866,7 +866,9 @@ void PdfParser::opSetExtGState(Object args[], int /*numArgs*/) + blendingColorSpace = NULL; + isolated = knockout = gFalse; + if (!obj4.dictLookup(const_cast("CS"), &obj5)->isNull()) { +-#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI) ++#if 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); + #else + blendingColorSpace = GfxColorSpace::parse(&obj5); +@@ -1100,7 +1102,13 @@ void PdfParser::opSetFillColorSpace(Object args[], int /*numArgs*/) + + state->setFillPattern(NULL); + res->lookupColorSpace(args[0].getName(), &obj); +-#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI) ++#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) ++ if (obj.isNull()) { ++ colorSpace = GfxColorSpace::parse(&args[0], NULL, NULL); ++ } else { ++ colorSpace = GfxColorSpace::parse(&obj, NULL, NULL); ++ } ++#elif defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI) + if (obj.isNull()) { + colorSpace = GfxColorSpace::parse(&args[0], NULL); + } else { +@@ -1137,7 +1145,13 @@ void PdfParser::opSetStrokeColorSpace(Object args[], int /*numArgs*/) + + state->setStrokePattern(NULL); + res->lookupColorSpace(args[0].getName(), &obj); +-#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI) ++#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) ++ if (obj.isNull()) { ++ colorSpace = GfxColorSpace::parse(&args[0], NULL, NULL); ++ } else { ++ colorSpace = GfxColorSpace::parse(&obj, NULL, NULL); ++ } ++#elif defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI) + if (obj.isNull()) { + colorSpace = GfxColorSpace::parse(&args[0], NULL); + } else { +@@ -1231,7 +1245,13 @@ void PdfParser::opSetFillColorN(Object args[], int numArgs) { + state->setFillColor(&color); + builder->updateStyle(state); + } +-#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI) ++#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) ++ if (args[numArgs-1].isName() && ++ (pattern = res->lookupPattern(args[numArgs-1].getName(), NULL, NULL))) { ++ state->setFillPattern(pattern); ++ builder->updateStyle(state); ++ } ++#elif defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI) + if (args[numArgs-1].isName() && + (pattern = res->lookupPattern(args[numArgs-1].getName(), NULL))) { + state->setFillPattern(pattern); +@@ -1291,7 +1311,13 @@ void PdfParser::opSetStrokeColorN(Object args[], int numArgs) { + state->setStrokeColor(&color); + builder->updateStyle(state); + } +-#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI) ++#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) ++ if (args[numArgs-1].isName() && ++ (pattern = res->lookupPattern(args[numArgs-1].getName(), NULL, NULL))) { ++ state->setStrokePattern(pattern); ++ builder->updateStyle(state); ++ } ++#elif defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI) + if (args[numArgs-1].isName() && + (pattern = res->lookupPattern(args[numArgs-1].getName(), NULL))) { + state->setStrokePattern(pattern); +@@ -1746,7 +1772,11 @@ void PdfParser::opShFill(Object args[], int /*numArgs*/) + double *matrix = NULL; + GBool savedState = gFalse; + +-#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI) ++#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) ++ if (!(shading = res->lookupShading(args[0].getName(), NULL, NULL))) { ++ return; ++ } ++#elif defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI) + if (!(shading = res->lookupShading(args[0].getName(), NULL))) { + return; + } +@@ -2817,7 +2847,9 @@ void PdfParser::doImage(Object * /*ref*/, Stream *str, GBool inlineImg) + } + } + if (!obj1.isNull()) { +-#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI) ++#if 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 + colorSpace = GfxColorSpace::parse(&obj1); +@@ -2909,7 +2941,9 @@ void PdfParser::doImage(Object * /*ref*/, Stream *str, GBool inlineImg) + obj2.free(); + } + } +-#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI) ++#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) ++ maskColorSpace = GfxColorSpace::parse(&obj1, NULL, NULL); ++#elif defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI) + maskColorSpace = GfxColorSpace::parse(&obj1, NULL); + #else + maskColorSpace = GfxColorSpace::parse(&obj1); +@@ -3099,7 +3133,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_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI) ++#if 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); + #else + blendingColorSpace = GfxColorSpace::parse(&obj3); diff --git a/SPECS/inkscape.spec b/SPECS/inkscape.spec index 93e15de..bf5b891 100644 --- a/SPECS/inkscape.spec +++ b/SPECS/inkscape.spec @@ -1,6 +1,6 @@ Name: inkscape Version: 0.48.4 -Release: 10%{?dist} +Release: 15%{?dist} Summary: Vector-based drawing program using SVG Group: Applications/Productivity @@ -8,14 +8,10 @@ License: GPLv2+ URL: http://inkscape.sourceforge.net/ Source0: http://downloads.sourceforge.net/inkscape/%{name}-%{version}.tar.bz2 Patch0: inkscape-0.48.2-types.patch -#Patch4: inkscape-0.48.2-glib.patch -#Patch5: inkscape-0.48.2-png.patch -#Patch6: inkscape-0.48.2-png-write.patch -#Patch7: inkscape-0.48.2-gcc47.patch -#Patch8: inkscape-0.48.2-poppler_020.patch -#Patch9: inkscape-0.48.3.1-hugexml.patch Patch10: inkscape-0.48.4-spuriouscomma.h Patch11: inkscape-0.48.4-spsvg-remove.path +Patch12: inkscape-0.48.4-libwpg.patch +Patch14: poppler.patch %if 0%{?fedora} && 0%{?fedora} < 18 %define desktop_vendor fedora @@ -28,7 +24,6 @@ BuildRequires: gc-devel >= 6.4 BuildRequires: gettext BuildRequires: gtkmm24-devel >= 2.8.0 BuildRequires: gtkspell-devel -BuildRequires: gnome-vfs2-devel >= 2.0 BuildRequires: libpng-devel >= 1.2 BuildRequires: libxml2-devel >= 2.6.11 BuildRequires: libxslt-devel >= 1.0.15 @@ -41,7 +36,7 @@ BuildRequires: python-devel BuildRequires: poppler-glib-devel BuildRequires: boost-devel BuildRequires: gsl-devel -BuildRequires: libwpg-devel +BuildRequires: libwpg-devel >= 0.3.0 BuildRequires: ImageMagick-c++-devel BuildRequires: perl(XML::Parser) BuildRequires: perl(ExtUtils::Embed) @@ -128,14 +123,10 @@ graphics in W3C standard Scalable Vector Graphics (SVG) file format. %prep %setup -q %patch0 -p1 -b .types -#%patch4 -p1 -b .glib -#%patch5 -p0 -b .png -#%patch6 -p0 -b .png-write -#%patch7 -p0 -b .gcc47 -#%patch8 -p1 -b .poppler_020 -#%patch9 -p0 -b .hugexml %patch10 -p0 -b .spuriouscomma %patch11 -p1 -b .spsvg +%patch12 -p1 -b .libwpg +%patch14 -p1 -b .poppler # https://bugs.launchpad.net/inkscape/+bug/314381 # A couple of files have executable bits set, @@ -157,7 +148,7 @@ export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" %configure \ --with-python \ --with-perl \ - --with-gnome-vfs \ + --without-gnome-vfs \ --with-xft \ --enable-lcms \ --enable-poppler-cairo @@ -242,6 +233,15 @@ fi %changelog +* Tue Jul 21 2015 Jan Horak - 0.48.4-15 +- Building without gnome-vfs + +* Thu May 7 2015 Jan Horak - 0.48.4-13 +- Added patch to support newer poppler + +* Thu Apr 30 2015 Jan Horak - 0.48.4-11 +- Fix for libwpg rebase + * Fri Feb 28 2014 Jan Horak - 0.48.4-10 - Get rid of SpSVG extension - rhbz#1023508