From eb94a1d8755158b8ac6fa90e8564d420851e91c4b9ba0a1537b0589ef7e67fc3 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Fri, 26 Jul 2013 07:23:22 +0000 Subject: [PATCH] Accepting request 184377 from home:fstrba - Performance regression fix * Add patch to unconditionally use WPX_SEEK_END * Depend on libwpd-devel >= 0.9.5 that has WPX_SEEK_END OBS-URL: https://build.opensuse.org/request/show/184377 OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libcdr?expand=0&rev=15 --- libcdr-0.0.14-wpx_seek_end.patch | 14 ++++++++++++++ libcdr.changes | 7 +++++++ libcdr.spec | 6 ++++-- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 libcdr-0.0.14-wpx_seek_end.patch diff --git a/libcdr-0.0.14-wpx_seek_end.patch b/libcdr-0.0.14-wpx_seek_end.patch new file mode 100644 index 0000000..9f7e3a2 --- /dev/null +++ b/libcdr-0.0.14-wpx_seek_end.patch @@ -0,0 +1,14 @@ +--- a/src/lib/CDRZipStream.cpp ++++ b/src/lib/CDRZipStream.cpp +@@ -160,11 +160,7 @@ WPXInputStream *libcdr::CDRZipStream::getDocumentOLEStream(const char *name) + + bool libcdr::CDRZipStreamImpl::findCentralDirectoryEnd() + { +-#if defined(LIBWPD_STREAM_VERSION_MAJOR) && defined(LIBWPD_STREAM_VERSION_MINOR) && defined(LIBWPD_STREAM_VERSION_REVISION) \ +- && (LIBWPD_STREAM_VERSION_MAJOR > 0 || (LIBWPD_STREAM_VERSION_MAJOR == 0 && (LIBWPD_STREAM_VERSION_MINOR > 9 \ +- || (LIBWPD_STREAM_VERSION_MINOR == 9 && LIBWPD_STREAM_VERSION_REVISION >= 5)))) + if (m_cdir_offset || m_input->seek(-1024, WPX_SEEK_END)) +-#endif + m_input->seek(m_cdir_offset, WPX_SEEK_SET); + try + { diff --git a/libcdr.changes b/libcdr.changes index 2be73a4..02da410 100644 --- a/libcdr.changes +++ b/libcdr.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Jul 26 07:06:40 UTC 2013 - fstrba@suse.com + +- Performance regression fix + * Add patch to unconditionally use WPX_SEEK_END + * Depend on libwpd-devel >= 0.9.5 that has WPX_SEEK_END + ------------------------------------------------------------------- Mon May 27 10:21:51 UTC 2013 - fridrich.strba@suse.com diff --git a/libcdr.spec b/libcdr.spec index 0f1459c..372e8ed 100644 --- a/libcdr.spec +++ b/libcdr.spec @@ -28,7 +28,7 @@ BuildRequires: doxygen BuildRequires: gcc-c++ BuildRequires: libicu-devel BuildRequires: liblcms2-devel -BuildRequires: libwpd-devel >= 0.9.0 +BuildRequires: libwpd-devel >= 0.9.5 BuildRequires: libwpg-devel >= 0.2.0 BuildRequires: pkgconfig BuildRequires: xz @@ -39,7 +39,8 @@ Group: Productivity/Publishing/Word Version: 0.0.14 Release: 0 Url: http://www.freedesktop.org/wiki/Software/libcdr -Source: http://dev-www.libreoffice.org/src/libcdr-%{version}.tar.xz +Source0: http://dev-www.libreoffice.org/src/libcdr-%{version}.tar.xz +Patch0: libcdr-0.0.14-wpx_seek_end.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -92,6 +93,7 @@ Tools to work with documents in Corel Draw file-format. %prep %setup -q +%patch0 -p1 -b .wpx_seek_end %build %configure --disable-static --docdir=%_docdir/%name