Accepting request 242761 from GNOME:Apps
push OBS-URL: https://build.opensuse.org/request/show/242761 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/inkscape?expand=0&rev=75
This commit is contained in:
parent
1fd41138bd
commit
d638071f05
100
inkscape-0.48.5-librevenge.patch
Normal file
100
inkscape-0.48.5-librevenge.patch
Normal file
@ -0,0 +1,100 @@
|
||||
--- inkscape-0.48.5/configure.ac 2014-06-20 22:29:03.717600589 +0200
|
||||
+++ inkscape-0.48.5/configure.ac 2014-07-22 10:38:06.623930753 +0200
|
||||
@@ -659,27 +659,13 @@
|
||||
|
||||
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)
|
||||
|
||||
if test "x$with_libwpg" = "xyes"; then
|
||||
AC_DEFINE(WITH_LIBWPG,1,[Build in libwpg])
|
||||
fi
|
||||
+AC_SUBST(LIBWPG_LIBS)
|
||||
+AC_SUBST(LIBWPG_CFLAGS)
|
||||
AM_CONDITIONAL(WITH_LIBWPG, test "x$with_libwpg" = "xyes")
|
||||
|
||||
dnl ******************************
|
||||
--- inkscape-0.48.5/src/extension/internal/wpg-input.cpp 2011-07-14 23:43:01.000000000 +0200
|
||||
+++ inkscape-0.48.5/src/extension/internal/wpg-input.cpp 2014-07-22 10:38:06.623930753 +0200
|
||||
@@ -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 @@
|
||||
|
||||
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,16 +77,18 @@
|
||||
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("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n");
|
||||
+ output.append(vec[0]);
|
||||
+
|
||||
//printf("I've got a doc: \n%s", painter.document.c_str());
|
||||
|
||||
SPDocument * doc = sp_document_new_from_mem(output.cstr(), strlen(output.cstr()), TRUE);
|
@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 22 13:01:10 UTC 2014 - fstrba@suse.com
|
||||
|
||||
- Add inkscape-0.48.5-librevenge.patch:
|
||||
+ Port the WPG importer to librevenge framework based libwpg.
|
||||
- Add autoconf, automake and libtool BuildRequires and call
|
||||
libtoolize and autorecof: regenerate the build system, as above
|
||||
patch touches the build system.
|
||||
- Update BuildRequires, following the port:
|
||||
+ Remove libwpg-devel
|
||||
+ Add pkgconfig(libwpg-0.3) and pkgconfig(librevenge-0.0).
|
||||
- Run osc service localrun clean_spec_file on the package
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 22 12:04:55 UTC 2014 - fcrozat@suse.com
|
||||
|
||||
|
@ -35,6 +35,10 @@ Patch1: inkscape-packages.patch
|
||||
Patch2: inkscape-return-on-exit.patch
|
||||
# PATCH-FIX-UPSTREAM inkscape-apply-invert-transform.patch bnc#779560 lp#840625 malcolmlewis@opensuse.org -- Apply invert transform to all image tags.
|
||||
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
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: boost-devel
|
||||
BuildRequires: docbook-toys
|
||||
BuildRequires: fdupes
|
||||
@ -47,7 +51,7 @@ BuildRequires: intltool
|
||||
BuildRequires: libMagick++-devel
|
||||
BuildRequires: liblcms2-devel
|
||||
BuildRequires: libpoppler-glib-devel
|
||||
BuildRequires: libwpg-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: libxslt-devel
|
||||
BuildRequires: perl
|
||||
BuildRequires: popt-devel
|
||||
@ -55,7 +59,9 @@ BuildRequires: python-devel
|
||||
BuildRequires: python-gtk-devel
|
||||
BuildRequires: sgml-skel
|
||||
BuildRequires: update-desktop-files
|
||||
Requires: /usr/bin/gs
|
||||
BuildRequires: pkgconfig(librevenge-0.0)
|
||||
BuildRequires: pkgconfig(libwpg-0.3)
|
||||
Requires: %{_bindir}/gs
|
||||
Requires: ghostscript-fonts-std
|
||||
Requires: gzip
|
||||
Requires: pstoedit
|
||||
@ -77,11 +83,11 @@ Requires: python-lxml
|
||||
Requires: python-xml
|
||||
# for cdr and wmf modules
|
||||
Recommends: yudit
|
||||
Enhances: %{name}
|
||||
# python-xml is already likely installed, so the big dependency is python-lxml. Hence this supplements.
|
||||
Supplements: packageand(%{name}:python-lxml)
|
||||
# Package in openSUSE <= 11.0 and SLED <= 10
|
||||
Provides: %{name}:%{_datadir}/inkscape/extensions/inkex.py
|
||||
Enhances: %{name}
|
||||
|
||||
%description extensions-extra
|
||||
Extra extensions for Inkscape. Recommended for everybody who wants to
|
||||
@ -94,10 +100,10 @@ Summary: Vector Illustration Program - Dia Import Extension
|
||||
Group: Productivity/Graphics/Vector Editors
|
||||
Requires: %{name} = %{version}
|
||||
Requires: dia
|
||||
Enhances: %{name}
|
||||
Supplements: packageand(%{name}:dia)
|
||||
# Package in openSUSE <= 11.0 and SLED <= 10
|
||||
Provides: %{name}:%{_datadir}/inkscape/extensions/dia.inx
|
||||
Enhances: %{name}
|
||||
|
||||
%description extensions-dia
|
||||
Dia import extension for Inkscape.
|
||||
@ -109,10 +115,10 @@ Summary: Vector Illustration Program - Fig Import Extension
|
||||
Group: Productivity/Graphics/Vector Editors
|
||||
Requires: %{name} = %{version}
|
||||
Requires: transfig
|
||||
Enhances: %{name}
|
||||
Supplements: packageand(%{name}:transfig)
|
||||
# Package in openSUSE <= 11.0 and SLED <= 10
|
||||
Provides: %{name}:%{_datadir}/inkscape/extensions/fig_input.inx
|
||||
Enhances: %{name}
|
||||
|
||||
%description extensions-fig
|
||||
Fig family (XFig, Figurine, JFig, WinFig,...) import extension for
|
||||
@ -125,11 +131,11 @@ Summary: Vector Illustration Program - The GIMP Extensions
|
||||
Group: Productivity/Graphics/Vector Editors
|
||||
Requires: %{name} = %{version}
|
||||
Requires: gimp-2.0
|
||||
Enhances: %{name}
|
||||
Supplements: packageand(%{name}:gimp)
|
||||
Supplements: packageand(%{name}:gimp-2.0)
|
||||
# Package in openSUSE <= 11.0 and SLED <= 10
|
||||
Provides: %{name}:%{_datadir}/inkscape/extensions/gimp_xcf.inx
|
||||
Enhances: %{name}
|
||||
|
||||
%description extensions-gimp
|
||||
The GIMP import and export extensions for Inkscape.
|
||||
@ -141,10 +147,10 @@ Summary: Vector Illustration Program - Skencil Import Extension
|
||||
Group: Productivity/Graphics/Vector Editors
|
||||
Requires: %{name} = %{version}
|
||||
Requires: skencil
|
||||
Enhances: %{name}
|
||||
Supplements: packageand(%{name}:skencil)
|
||||
# Package in openSUSE <= 11.0 and SLED <= 10
|
||||
Provides: %{name}:%{_datadir}/inkscape/extensions/sk_input.inx
|
||||
Enhances: %{name}
|
||||
|
||||
%description extensions-skencil
|
||||
Skencil import extension for Inkscape.
|
||||
@ -152,20 +158,24 @@ Skencil import extension for Inkscape.
|
||||
Inkscape is a vector illustration program for the GNOME desktop.
|
||||
|
||||
%lang_package
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch4 -p1
|
||||
%patch8 -p1
|
||||
|
||||
%build
|
||||
libtoolize --force --copy --install
|
||||
autoreconf -fi
|
||||
RPM_OPT_FLAGS="%{optflags}"
|
||||
%ifarch %arm
|
||||
%ifarch %{arm}
|
||||
export LDFLAGS+="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
|
||||
%endif
|
||||
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
||||
export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
||||
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
||||
export CXXFLAGS="%{optflags} -fno-strict-aliasing"
|
||||
# We're building without perl support for now...
|
||||
%configure\
|
||||
--with-python\
|
||||
@ -173,18 +183,18 @@ export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
%makeinstall
|
||||
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
||||
rm -rf %{buildroot}%{_datadir}/locale/en_US@piglatin
|
||||
rm -rf %{buildroot}%{_datadir}/inkscape/filters/filters.svg.h
|
||||
rm -rf %{buildroot}%{_datadir}/inkscape/patterns/patterns.svg.h
|
||||
|
||||
install -D -m 0644 %{S:1} %{buildroot}%{_datadir}/inkscape/palettes
|
||||
install -D -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/inkscape/palettes
|
||||
%suse_update_desktop_file -N "Inkscape" -G "SVG Vector Illustrator" inkscape
|
||||
# te_IN should really just be te, see lp#690255
|
||||
test ! -e %{buildroot}%{_datadir}/locale/te
|
||||
mv %{buildroot}%{_datadir}/locale/te_IN %{buildroot}%{_datadir}/locale/te
|
||||
%find_lang %{name} %{?no_lang_C}
|
||||
bash %{S:2} %{buildroot}%{_datadir}/inkscape/extensions "%%{_datadir}/inkscape/extensions/"
|
||||
bash %{SOURCE2} %{buildroot}%{_datadir}/inkscape/extensions "%%{_datadir}/inkscape/extensions/"
|
||||
## fix line endings
|
||||
sed -i 's/\r$//' %{buildroot}%{_datadir}/inkscape/extensions/param_curves.py
|
||||
sed -i 's/\r$//' %{buildroot}%{_datadir}/inkscape/extensions/render_alphabetsoup.py
|
||||
@ -199,17 +209,11 @@ sort -u %{name}.man-lang.tmp > %{name}.man-lang
|
||||
rm %{name}.man-lang.tmp
|
||||
%fdupes %{buildroot}
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%if 0%{?suse_version} > 1130
|
||||
|
||||
%post
|
||||
%desktop_database_post
|
||||
%icon_theme_cache_post
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version} > 1130
|
||||
|
||||
%postun
|
||||
%desktop_database_postun
|
||||
@ -286,5 +290,6 @@ rm -rf %{buildroot}
|
||||
%{_datadir}/inkscape/extensions/sk*
|
||||
|
||||
%files lang -f %{name}.lang
|
||||
%defattr(-,root,root)
|
||||
|
||||
%changelog
|
||||
|
Loading…
x
Reference in New Issue
Block a user