commit 56379f15d16628e551cfcad69d706f3dab397bbec1eceaeee0f6264024a65eb6 Author: Adrian Schröter Date: Fri May 3 16:07:48 2024 +0200 Sync from SUSE:SLFO:Main libwpd revision 8768768504c9a70fe9bb8ca78f6738db diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/0001-Fix-build-with-GCC11.patch b/0001-Fix-build-with-GCC11.patch new file mode 100644 index 0000000..702346e --- /dev/null +++ b/0001-Fix-build-with-GCC11.patch @@ -0,0 +1,37 @@ +From c5f3105230b383ebf31237b11d28b67c7498e900 Mon Sep 17 00:00:00 2001 +From: Christophe Giboudeaux +Date: Wed, 10 Mar 2021 23:37:49 +0100 +Subject: [PATCH] Fix build with GCC11 + +--- + src/lib/WPXContentListener.h | 1 + + src/lib/WPXTable.h | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/src/lib/WPXContentListener.h b/src/lib/WPXContentListener.h +index cf7a93e..376a98c 100644 +--- a/src/lib/WPXContentListener.h ++++ b/src/lib/WPXContentListener.h +@@ -32,6 +32,7 @@ + #include "WPXSubDocument.h" + #include "WPXPageSpan.h" + #include "WPXListener.h" ++#include + #include + #include + #include +diff --git a/src/lib/WPXTable.h b/src/lib/WPXTable.h +index bdbaf79..b2975c4 100644 +--- a/src/lib/WPXTable.h ++++ b/src/lib/WPXTable.h +@@ -36,6 +36,7 @@ + #ifndef _WPXTABLE_H + #define _WPXTABLE_H + ++#include + #include + + struct WPXTableCell +-- +2.30.1 + diff --git a/libwpd-0.10.3.tar.xz b/libwpd-0.10.3.tar.xz new file mode 100644 index 0000000..3a3b26e --- /dev/null +++ b/libwpd-0.10.3.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2465b0b662fdc5d4e3bebcdc9a79027713fb629ca2bff04a3c9251fdec42dd09 +size 534712 diff --git a/libwpd.changes b/libwpd.changes new file mode 100644 index 0000000..5c71a81 --- /dev/null +++ b/libwpd.changes @@ -0,0 +1,388 @@ +------------------------------------------------------------------- +Thu Jan 27 13:47:06 UTC 2022 - Fridrich Strba + +- Fix license header to correspond to SPDX abbreviation + +------------------------------------------------------------------- +Wed Mar 10 22:38:24 UTC 2021 - Christophe Giboudeaux + +- Add patch to fix build with GCC11 (boo#1181873) + * 0001-Fix-build-with-GCC11.patch + +------------------------------------------------------------------- +Sat Aug 15 22:00:33 UTC 2020 - Dirk Mueller + +- update to 0.10.3: + - Drop outdated MSVC project files. + - Fix a couple of issues found by oss-fuzz. + - Fix some potential memory leaks. + - Use a bit less memory when parsing WP5/WP6 documents with images. + - Switch from --enable-werror to --disable-werror as configure default. + - Fix a potential out-of-bounds data access. (rhbz#1643752) +- remove 0001-Resolves-rhbz-1643752-bounds-check-m_currentTable-ac.patch (upstream) + +------------------------------------------------------------------- +Tue Nov 13 09:40:49 UTC 2018 - Jan Engelhardt + +- Drop tm markers, these are undesired by legal. + +------------------------------------------------------------------- +Tue Nov 13 09:07:55 UTC 2018 - Tomáš Chvátal + +- Add patch to fix rh#1643752 bsc#1115713 CVE-2018-19208: + * 0001-Resolves-rhbz-1643752-bounds-check-m_currentTable-ac.patch + +------------------------------------------------------------------- +Wed Sep 13 10:49:05 UTC 2017 - tchvatal@suse.com + +- Upgrade to 0.10.2 bsc#1058025 CVE-2017-14226: + * Require C++11 for build. + * Fix various crashes, leaks and hangs when reading damaged files found + by oss-fuzz. + +------------------------------------------------------------------- +Thu Feb 11 20:04:39 UTC 2016 - tchvatal@suse.com + +- Disable silent rules + +------------------------------------------------------------------- +Wed Dec 30 16:08:52 UTC 2015 - fstrba@suse.com + +- Upgrade to version 0.10.1 + * Fix crash when NULL is passed as input stream. + * Use symbol visibility on Linux. The library only exports public + functions now. + * Avoid infinite loop. (libwpd#3) + * Remove bashism. (libwpd#5) + * Fix various crashes and hangs when reading broken files found + with the help of american-fuzzy-lop. + * Make --help output of all command line tools more + help2man-friendly. + * Miscellaneous fixes and cleanups. +- Generate manpages for the libwpd-tools + +------------------------------------------------------------------- +Mon May 26 09:16:13 UTC 2014 - fstrba@suse.com + +- Upgrade to version 0.10.0 + * ABI change + * Depend on librevenge-devel + +------------------------------------------------------------------- +Sat Jan 25 20:53:25 UTC 2014 - tchvatal@suse.com + +- Cleanup with spec-cleaner and noarch the documentation. + +------------------------------------------------------------------- +Mon Aug 19 14:49:39 UTC 2013 - fstrba@suse.com + +- upgrade to version 0.9.8 + - implement WPX_SEEK_END for WPXMemoryStream: fixes an infinite + loop in libmwaw when using WPXBinaryData over its stream + interface. + +------------------------------------------------------------------- +Wed May 15 06:51:02 UTC 2013 - fridrich.strba@suse.com + +- upgrade to version 0.9.8 + - Fix buffer allocation in WPXString::sprintf that can lead + to crash + - Fix crash reading invalid OLE stream + - Change source code layout so that public headers be in inc/ + and its subdirectories + - libwpd.h and libwpd-stream.h are not generated headers anymore + - Change the way we get version from libwpd build +- Fix some rpmlint warnings + +------------------------------------------------------------------- +Sat Apr 20 12:04:38 UTC 2013 - tchvatal@suse.com + +- Add URL download path. + +------------------------------------------------------------------- +Fri Apr 19 08:57:55 CEST 2013 - fridrich.strba@suse.com + +- upgrade to version 0.9.7: + - Added MPL 2.0+ as license + - Improvement of OLE stream classes +- remove integrated patch + +------------------------------------------------------------------- +Thu Sep 27 21:42:58 CEST 2012 - fridrich.strba@suse.com + +- upgrade to version 0.9.6: + - Experimental support of Zip storage along with Ole. + - Add WPX_SEEK_END enum member in order to speed up the Zip + operations. + - Numerous fixes of coverity and cppcheck warnings and errors. +- upstream patch to really enable Zip stream. +- package build depends on zlib-devel. + +------------------------------------------------------------------- +Tue Jan 24 09:40:19 UTC 2012 - jengelh@medozas.de + +- Use SPDX-style license field + +------------------------------------------------------------------- +Mon Jan 23 18:13:12 UTC 2012 - crrodriguez@opensuse.org + +- Build with fvisibility-inlines-hidden, saves around + 600 entries in the exported symbol table. + +------------------------------------------------------------------- +Tue Nov 29 15:10:34 UTC 2011 - jengelh@medozas.de + +- Remove redundant/unwanted tags/section (cf. specfile guidelines) +- Use %_smp_mflags for parallel building +- Set proper group on subpackages + +------------------------------------------------------------------ +Tue Nov 29 12:03:55 CET 2011 - fridrich.strba@suse.com + +- upgrade to version 0.9.4: + - Remove autopackage packaging that nobody uses (Fridrich) + - Don't output points as integer. This solves some rounding + issues along with the possibility of writing 10.5 point + font size (Fridrich) + - General improvement of code quality by buiding + with -Weffc++ option (Fridrich) + - Improvement of textbox code (Laurent Alonso) + - Fixes of autotools Windows build (Fridrich) +- remove obsolete unnecessary patch + +------------------------------------------------------------------ +Thu Sep 1 11:43:40 CEST 2011 - fridrich.strba@suse.com + +- upgrade to version 0.9.3: +- Improvement of arabic charset mapping (Smokey Ardisson) +- Build system rewrite and improvement (Tomas Chvatal) +- Cleanup of return values (Thomas Klausner) +- Fix crashes with WP 2.1 for Mac documents (Fridrich) +- Fix bug in WPXPropertyList::operator= (Fridrich) +- Fix memory issues in some WPXProperty's derived classes (Fridrich) +- Conversion of extended characters in WP 42 parser (Fridrich) +- Various fixes for building inside LibreOffice (Tor Lillqvist, Jan Holesovky) + +------------------------------------------------------------------- +Mon May 23 17:07:53 UTC 2011 - crrodriguez@opensuse.org + +- Do not include build dates in docs, messes up build-compare + +------------------------------------------------------------------- +Wed May 4 11:26:00 CEST 2011 - fstrba@novell.com + +- upgrade to version 0.9.2: + - Fix build with gcc 4.6.x (Caolan McNamara) + - Handle graciously corrupted WP6 prefix data (Fridrich) + - Initial conversion of Mac double byte script characters (Fridrich) + - Internally use UCS4 instead of UCS2 (Fridrich) + - Add Arabic character conversion for WP5 parser (Fridrich) + - Allow conversion of one WP character to a sequence of unicode + characters (Fridrich) + - Miscellaneous conversion fixes (Edward Mendelson, Fridrich) + - Parse correctly WP 2 for Mac documents without resource fork (Fridrich) + - Improvements in parsing of pictures in WP1 parser (Fridrich) + - Fix wrong sizes of some functions in WP1 and WP42 parsers (Fridrich) + - Fix handling of character attributes (Fridrich) + +------------------------------------------------------------------- +Wed Mar 16 09:32:59 UTC 2011 - ismail@namtrac.org + +- Add missing includes to fix compilation with gcc 4.6 + +------------------------------------------------------------------- +Tue Dec 7 14:39:57 CET 2010 - fstrba@novell.com + +- upgrade to version 0.9.0: + - Conversion of page-numbering (William) + - Conversion of embedded images and text boxes in WP1, WP3, WP5 and WP6 + documents (Fridrich) + - Conversion of password protected WP1, WP3, WP42 and WP5 documents + (Fridrich) + - Conversion of annotations/comments in WP6 parser (Fridrich) + - Fix some Greek characters so that Text written in WP5.1 with Printer + Polyglott convert correct. + - Fix Unicode mappings of some older Symbol and Dingbats fonts (Fridrich) + - Drop the libgsf dependency in favour of pure C++ implementation of the + WPXInputStream interface (Fridrich, Ariya) + - Fix the footnote/endnote/comment/annotation/textbox writing in wpd2html + converter + - Improve metadata parsing (David Hislop) + +------------------------------------------------------------------- +Wed Oct 22 16:17:30 CEST 2008 - mrueckert@suse.de + +- fix debug_packages_requires define + +------------------------------------------------------------------- +Fri Aug 1 17:32:33 CEST 2008 - ro@suse.de + +- fix requires for debuginfo package + +------------------------------------------------------------------- +Fri Apr 4 09:41:27 CEST 2008 - mmarek@suse.cz + +- rename the library package to libwpd-0_8-8, as required by the + library policy (libwpd-0.8.so.8 -> libwpd-0_8-8) +- don't version the devel package after discussion with pmladek + we'll do it only if the need arises + +------------------------------------------------------------------- +Wed Apr 2 15:33:44 CEST 2008 - mmarek@suse.cz + +- update to version 0.8.14: + - Fix some warnings due to unused variables + - Fix a warning due to a name hiding. + - Fix two loops with corrupted documents (Thank you, sum1!) + - Implement readahead in the WPXStreamImplementation class (Jan + Holesovsky, Fridrich) + - Fix some memory issues properly (each class deletes what it + allocated) (Fridrich) + - Work around an issue with relative seeks backward and certain + versions of libstdc++ in the buffered stream implementation + (Fridrich, sum1) + - Fix a problem of conversion of some page breaks due to an + unreachable block in the code (Fridrich) + - Fix a crasher in a rare case of a footnote/endnote being + defined in a table and the footnote/endnote having itself a + table (Fridrich). + - Fix some null pointer crashes with corrupted documents in table + code and in cases where there is no prefix ID present (sum1, + Fridrich). + - Fix a out of bounds array in parsing WP5 extended characters + with broken documents (sum1). + - Remove some abuse of pointers (Fridrich). + - In "wpd2raw --callback", return "-1" if no one callback was + called (Fridrich). + - Fix some issues with incorrect indents in some rear cases + (Fridrich). + - Fix some signedness problems (Fridrich). +- don't install static libraries and libtool archives +- renamed library and devel package to libwpd-0_8 and + libwpd-0_8-devel respectively, to allow parallel installation +- split off libwpd-devel-doc subpackage +- cleaned up spec a bit + +------------------------------------------------------------------- +Mon Nov 26 10:57:45 CET 2007 - pmladek@suse.cz + +- update to version 0.8.12: + - Convert Tab Set function for WP5 parser + - Basic conversion of tabulators and indents in WP3 parser + - Basic conversion of tabulators and indents in WP5 parser + - Convert the most usual Macintosh fonts from fontId to font name in + WP1 parser + - Fix compilation with the upcoming gcc 4.3 + +------------------------------------------------------------------- +Mon Oct 1 09:47:55 CEST 2007 - stbinner@suse.de + +- update to version 0.8.11: + - Fix incorrect conversion of tables with cells spanning more + then 127 rows due to incorrect information in the file-format + - Fix incorrect reading of font name information in prefix packets + +------------------------------------------------------------------- +Sun Jun 17 11:42:56 CEST 2007 - stbinner@suse.de + +- update to version 0.8.10: + * Fix a locale dependency in our float to string conversion + * Enhance our reading of document meta data for WP6 + * Fix some sillies and be gracious with documents with corrupted + prefix packets (Fridrich) + * Prevent the heuristic typedetection from throwing + * Add a new stream implementation based on C++ streams, rendering + libgsf dependency very optional; deprecate GSFInputStream + +------------------------------------------------------------------- +Fri Mar 16 13:12:07 CET 2007 - stbinner@suse.de + +- update to version 0.8.9: + * Fix a bug in WP1 document type detection where we could try to + seek to a negative place in document (Fridrich) + * Fix a regression wrt. 0.8.7 preventing the conversion of tab table + in WP1 and WP3 file-format (Fridrich) + * Fixed several overflow bugs reported by iDefense. An attacker + could create a carefully crafted Word Perfect file that could + cause an application linked with libwpd, such as OpenOffice, to + crash or possibly execute arbitrary code if the file was opened + by a victim. (CVE-2007-0002) (iDefense's Sean Larsson, Fridrich) + +------------------------------------------------------------------- +Sun Jan 14 17:11:40 CET 2007 - dmueller@suse.de + +- update to version 0.8.8: + * Add unit tests for the stream class + * Ignore foot/endnotes that are referenced inside other foot/endnotes + fixes http://www.openoffice.org/issues/show_bug.cgi?id=71487 + * Handle graciously unsupported password-protected documents; + fixes http://www.openoffice.org/issues/show_bug.cgi?id=72307 + * Remove some potential memory leaks in the WPXPropertyList class and optimize + the WPXPropertyList subscription operator + +------------------------------------------------------------------- +Mon Dec 18 15:36:46 CET 2006 - sbrabec@suse.cz + +- Spec file cleanup. + +------------------------------------------------------------------- +Tue Nov 7 01:12:59 CET 2006 - ro@suse.de + +- fix docu permissions + +------------------------------------------------------------------- +Mon Oct 9 10:40:31 CEST 2006 - stbinner@suse.de + +- update to version 0.8.7: + * Revert the alignment fix, in order to mimick the way WP for + Mac renders the documents + * Support for WP Mac 1.x documents + * Fix memory leak in standalone converters + * Miscellaneous code cleanups + +------------------------------------------------------------------- +Mon Jul 17 08:31:08 CEST 2006 - stbinner@suse.de + +- update to version 0.8.6: + * Initial support of WP Mac 2.x documents + * Initial conversion of headers/footers in WP42 parser + * General improvement of libwpd's conversion-success-rate and + extensive QA with more than 46'000 real life documents + +------------------------------------------------------------------- +Thu Jun 1 13:30:49 CEST 2006 - stbinner@suse.de + +- update to version 0.8.5 + * adds header and footer conversion in WP5.x and WP3.x for + Macintosh file formats. + * adds support for footnotes and endnotes in WP5.x file format + * improves the conversion of page margins and corrects issues + with conversion of the position of tables and tabstops in + multicolumn sections + +------------------------------------------------------------------- +Wed Jan 25 21:37:48 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Thu Dec 8 12:21:09 CET 2005 - stbinner@suse.de + +- update to version 0.8.4 + +------------------------------------------------------------------- +Wed Oct 19 18:33:43 CEST 2005 - sbrabec@suse.cz + +- Package documentation. +- Split to subpackages. + +------------------------------------------------------------------- +Sat Oct 8 10:02:49 CEST 2005 - coolo@suse.de + +- make it build with gcc 4.1 (sent upstream) + +------------------------------------------------------------------- +Tue Oct 4 13:52:01 CEST 2005 - stbinner@suse.de + +- initial package of version 0.8.3 + diff --git a/libwpd.spec b/libwpd.spec new file mode 100644 index 0000000..63947cf --- /dev/null +++ b/libwpd.spec @@ -0,0 +1,132 @@ +# +# spec file for package libwpd +# +# Copyright (c) 2022 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define libname libwpd-0_10-10 +Name: libwpd +Version: 0.10.3 +Release: 0 +Summary: Library for importing WordPerfect documents +License: LGPL-2.1-or-later AND MPL-2.0 +Group: Productivity/Publishing/Word +URL: http://libwpd.sourceforge.net +Source: http://downloads.sourceforge.net/project/%{name}/%{name}/%{name}-%{version}/%{name}-%{version}.tar.xz +# PATCH-FIX-UPSTREAM +Patch0: 0001-Fix-build-with-GCC11.patch +BuildRequires: doxygen +BuildRequires: fdupes +BuildRequires: gcc-c++ +BuildRequires: help2man +BuildRequires: pkgconfig +BuildRequires: xz +BuildRequires: pkgconfig(librevenge-0.0) +BuildRequires: pkgconfig(librevenge-stream-0.0) +%if 0%{?suse_version} >= 1330 +BuildRequires: libboost_headers-devel +%else +BuildRequires: boost-devel +%endif + +%description +libwpd is a general purpose library for reading or interpreting data +from WordPerfect files. The library is not a stand-alone utility: it is +designed to be used by another program (for example, a word processor) +as an in-process component. + +%package -n %{libname} +Summary: Library for importing WordPerfect Documents +Group: System/Libraries + +%description -n %{libname} +libwpd is a general purpose library for reading or interpreting data +from WordPerfect files. The library is not a stand-alone utility: it is +designed to be used by another program (for example, a word processor) +as an in-process component. + +%package devel +Summary: Development files for libwpd, a library for importing WordPerfect documents +Group: Development/Libraries/C and C++ +Requires: %{libname} = %{version} +Requires: libstdc++-devel + +%description devel +libwpd is a general purpose library for reading (or, interpreting data +from) WordPerfect files. The library is not a stand-alone utility: it +is designed to be used by another program (e.g.: a word processor) as +an in-process component. + +%package devel-doc +Summary: Documentation for the libwpd API +Group: Documentation/Other +BuildArch: noarch + +%description devel-doc +This package contains documentation for the libwpd API. + +%package tools +Summary: Tool from libwpd, a library for importing WordPerfect documents +Group: Productivity/Publishing/Word + +%description tools +Tools to transform WordPerfect Documents into other formats. Currently +supported: html, raw, text + +%prep +%autosetup -p1 + +%build +export CXXFLAGS="%{optflags} -fvisibility-inlines-hidden" +%configure \ + --disable-static \ + --docdir=%{_docdir}/%{name} \ + --disable-silent-rules +make %{?_smp_mflags} + +%install +%make_install +find %{buildroot} -type f -name "*.la" -delete -print +mkdir -p %{buildroot}%{_mandir}/man1 +for i in %{buildroot}%{_bindir}/*; do + LD_LIBRARY_PATH=%{buildroot}%{_libdir} \ + help2man -N -o %{buildroot}%{_mandir}/man1/$(basename $i).1 $i +done +%fdupes -s %{buildroot}%{_docdir}/%{name}/html + +%post -n %{libname} -p /sbin/ldconfig +%postun -n %{libname} -p /sbin/ldconfig + +%files -n %{libname} +%license COPYING.LGPL +%license COPYING.MPL +%{_libdir}/*.so.* + +%files devel +%{_libdir}/*.so +%{_libdir}/pkgconfig/libwpd*.pc +%{_includedir}/libwpd-* + +%files devel-doc +%doc %dir %{_docdir}/%{name} +%doc %{_docdir}/%{name}/html +%doc %{_docdir}/%{name}/libwpd.* + +%files tools +%{_bindir}/* +%{_mandir}/man1/*.1%{?ext_man} +%doc ChangeLog CREDITS NEWS + +%changelog