commit 670f8af0b01481b3dbceee846dce1b1aa21b92471242e3fcd7ca2ba846f13016 Author: Fridrich Strba Date: Mon May 5 04:49:16 2025 +0000 add libmspub-0.1.4-gcc15.patch to fix gcc15 compile time error OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libmspub?expand=0&rev=35 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/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/fix-missing-include.patch b/fix-missing-include.patch new file mode 100644 index 0000000..6bc4a6c --- /dev/null +++ b/fix-missing-include.patch @@ -0,0 +1,28 @@ +From 698bed839c9129fa7a90ca1b5a33bf777bc028d1 Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann +Date: Tue, 11 Jun 2019 12:15:28 +0200 +Subject: [PATCH] missing include + +Change-Id: I3c5c085f55223688cdc7b972f7c7981411881263 +Reviewed-on: https://gerrit.libreoffice.org/73814 +Reviewed-by: Michael Stahl +Tested-by: Michael Stahl +--- + src/lib/MSPUBMetaData.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/lib/MSPUBMetaData.h b/src/lib/MSPUBMetaData.h +index 9167f4f..27bdd4f 100644 +--- a/src/lib/MSPUBMetaData.h ++++ b/src/lib/MSPUBMetaData.h +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + #include + +-- +2.24.0 + diff --git a/libmspub-0.1.4-gcc15.patch b/libmspub-0.1.4-gcc15.patch new file mode 100644 index 0000000..37bfd7b --- /dev/null +++ b/libmspub-0.1.4-gcc15.patch @@ -0,0 +1,42 @@ +From 06cd691e6d9664847d0fb5f096e296be85bedc59 Mon Sep 17 00:00:00 2001 +From: Eli Schwartz +Date: Thu, 15 Aug 2024 20:55:25 -0400 +Subject: [PATCH] fix missing include + +int64_t comes from stdint.h, but it was never included. This is +transitively provided by some headers, on some versions of GCC, but in +GCC 15 a bit of routine cleanup means this header is no longer silently +exposed to arbitrary codebases without asking. + +As such, it fails to build. + +In upstream libmspub commit 28c545e7d04d58af998bcf4af5d1bb326d29836c, +the boost cstdint header was added as part of other work. I am not sure +why -- maybe to fix this missing header? :D But using all of boost for +this is a bit odd and unnecessary, especially when not backporting an +entire commit. + +Add in the correct stdlib header as a local backport while distros wait +for libmspub to release a new version. + +Signed-off-by: Eli Schwartz +--- + src/lib/Coordinate.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/lib/Coordinate.h b/src/lib/Coordinate.h +index bec3fe2..b87608d 100644 +--- a/src/lib/Coordinate.h ++++ b/src/lib/Coordinate.h +@@ -10,6 +10,8 @@ + #ifndef INCLUDED_COORDINATE_H + #define INCLUDED_COORDINATE_H + ++#include ++ + #include "MSPUBConstants.h" + + namespace libmspub +-- +2.44.2 + diff --git a/libmspub-0.1.4.tar.xz b/libmspub-0.1.4.tar.xz new file mode 100644 index 0000000..85c7753 --- /dev/null +++ b/libmspub-0.1.4.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba +size 377472 diff --git a/libmspub.changes b/libmspub.changes new file mode 100644 index 0000000..48ed5c4 --- /dev/null +++ b/libmspub.changes @@ -0,0 +1,150 @@ +------------------------------------------------------------------- +Tue Apr 8 12:43:33 UTC 2025 - Friedrich Haubensak + +- add libmspub-0.1.4-gcc15.patch (from gentoo) to fix gcc15 + compile time error + +------------------------------------------------------------------- +Thu Feb 29 17:57:43 UTC 2024 - pgajdos@suse.com + +- Use %autosetup macro. Allows to eliminate the usage of deprecated + %patchN + +------------------------------------------------------------------- +Tue Dec 3 17:12:43 UTC 2019 - Martin Liška + +- Add fix-missing-include.patch in order + to fix boo#1158322. + +------------------------------------------------------------------- +Wed Mar 7 12:47:35 UTC 2018 - tchvatal@suse.com + +- Version update to 0.1.4: + * Fix several problems found by oss-fuzz + * Fix regression in closing shape groups that caused missing shapes + on second and subsequent pages. (tdf#116018) + +------------------------------------------------------------------- +Mon Jan 1 12:40:28 UTC 2018 - tchvatal@suse.com + +- Version update to 0.1.3: + * Workaround a build error on some 32-bit systems. + * Parse table row and column sizes. (tdf#89061) + * Fix various problems when parsing broken files, found with the help of + american-fuzzy-lop and oss-fuzz. + * Make the output of pub2foo --help more compatible with help2man. + * Extract more metadata from documents. + * Require C++11 for build. + * Drop outdated MSVC project files. + * Handle table cells containing multiple paragraphs correctly. (tdf#89393) + * Parse more text formatting attributes: all underline types, small + caps, all caps, outline, emboss, engrave, shadow. + * Parse text language. + * Various minor changes and improvements. + +------------------------------------------------------------------- +Wed Feb 1 13:04:37 UTC 2017 - adam.majer@suse.de + +- use individual libboost-*-devel packages instead of boost-devel + +------------------------------------------------------------------- +Mon Aug 1 08:53:49 UTC 2016 - tchvatal@suse.com + +- Disable sle11 support code + +------------------------------------------------------------------- +Tue Dec 30 18:46:49 UTC 2014 - tchvatal@suse.com + +- Version bump to 0.1.2: + - Check arguments of public functions. Passing NULL no longer causes + a crash. + - Use symbol visibility on Linux. The library only exports the two public + functions now. + - Fix several crashes and hangs when reading broken files, found with the help + of american-fuzzy-lop. + - Add support for embedded fonts. + - Add initial support for tables. + - Parse document metadata. +- Remove libmspub-0.1.1-pkgconfig.patch + +------------------------------------------------------------------- +Fri Jul 25 07:21:27 UTC 2014 - fstrba@suse.com + +- Added patch: libmspub-0.1.1-pkgconfig.patch + * Remove the Requires.private which breaks SLE11 builds + +------------------------------------------------------------------- +Tue Jul 8 13:20:23 UTC 2014 - tchvatal@suse.com + +- Version bump to 0.1.1: + * Various small bugfixes + +------------------------------------------------------------------- +Mon May 26 09:40:54 UTC 2014 - fstrba@suse.com + +- Upgrade to upstream version 0.1.0 + * ABI changes + * Remove dependency on libwpd-devel and libwpg-devel + * Add dependency on librevenge-devel +- License change + * Released under MPL-2.0 + +------------------------------------------------------------------- +Sat Jan 25 21:06:46 UTC 2014 - tchvatal@suse.com + +- Cleanup with spec-cleaner and noarch documenation. + +------------------------------------------------------------------- +Sat Jan 18 13:57:20 UTC 2014 - crrodriguez@opensuse.org + +- build with -fvisibility-inlines-hidden + +------------------------------------------------------------------- +Fri Nov 1 09:11:06 UTC 2013 - tchvatal@suse.com + +- Drop conditional for doc and use verbose build. + +------------------------------------------------------------------- +Mon May 27 11:40:52 UTC 2013 - tchvatal@suse.com + +- Version bump to 0.0.6: + - various coverity and style fixes + - deduplication using wpd code + - few crash fixes + +------------------------------------------------------------------- +Thu Feb 21 09:17:36 UTC 2013 - tchvatal@suse.com + +- Version bump to 0.0.5 - bugfix release. + +------------------------------------------------------------------- +Tue Feb 5 14:11:09 UTC 2013 - tchvatal@suse.com + +- Update to 0.0.4 + * now uses icu + +------------------------------------------------------------------- +Thu Nov 29 20:38:55 UTC 2012 - tchvatal@suse.com + +- Update the whitespacing and order + +------------------------------------------------------------------- +Thu Nov 29 11:05:06 UTC 2012 - tchvatal@suse.com + +- Version bump to 0.0.3 + * cleanup the license string + * disable werror explicitely + * fdupe duped images + +------------------------------------------------------------------- +Mon Aug 6 11:26:50 CEST 2012 - fridrich.strba@suse.com + +- Upgrade to upstream version 0.0.2 + * support of MS Publisher versions 98 to 2002 + * extended coverage of autoshapes for version 2003 + +------------------------------------------------------------------- +Mon Jun 4 14:52:32 CEST 2012 - fridrich.strba@suse.com + +- Initial package of libmspub + diff --git a/libmspub.spec b/libmspub.spec new file mode 100644 index 0000000..ea9cc51 --- /dev/null +++ b/libmspub.spec @@ -0,0 +1,120 @@ +# +# spec file for package libmspub +# +# Copyright (c) 2019 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 libmspub-0_1-1 +Name: libmspub +Version: 0.1.4 +Release: 0 +Summary: Microsoft Publisher file format parser library +License: MPL-2.0 +Group: Productivity/Publishing/Word +URL: https://wiki.documentfoundation.org/DLP/Libraries/libmspub +Source: http://dev-www.libreoffice.org/src/libmspub/libmspub-%{version}.tar.xz +Patch0: fix-missing-include.patch +Patch1: libmspub-0.1.4-gcc15.patch +BuildRequires: doxygen +BuildRequires: fdupes +BuildRequires: gcc-c++ +BuildRequires: pkgconfig +BuildRequires: xz +BuildRequires: pkgconfig(icu-i18n) +BuildRequires: pkgconfig(librevenge-0.0) +BuildRequires: pkgconfig(librevenge-generators-0.0) +BuildRequires: pkgconfig(librevenge-stream-0.0) +BuildRequires: pkgconfig(zlib) +%if 0%{?suse_version} > 1325 +BuildRequires: libboost_headers-devel +%else +BuildRequires: boost-devel +%endif + +%description +libmspub is a library for parsing the Microsoft Publisher file format structure. + +%package -n %{libname} +Summary: Microsoft Publisher file format parser library +Group: System/Libraries + +%description -n %{libname} +libmspub is a library for parsing the Corel Draw file format structure. It is +cross-platform, at the moment it can be build on Microsoft Windows and Linux. + +%package devel +Summary: Files for Developing with libmspub +Group: Development/Libraries/C and C++ +Requires: %{libname} = %{version} + +%description devel +libmspub is a library for parsing the Microsoft Publisher file format structure. + +This package contains the libmspub development files. + +%package devel-doc +Summary: Documentation for the libmspub API +Group: Documentation/HTML +BuildArch: noarch + +%description devel-doc +This package contains documentation for the libmspub API. + +%package tools +Summary: Tools to work with publications in Microsoft Publisher file-format +Group: Productivity/Publishing/Word + +%description tools +Command line tools to work with publications in Microsoft Publisher file-format. + +%prep +%autosetup -p1 + +%build +export CXXFLAGS="%{optflags} -fvisibility-inlines-hidden" +%configure \ + --disable-silent-rules \ + --disable-werror \ + --disable-static \ + --docdir=%{_docdir}/%{name} +make %{?_smp_mflags} + +%install +%make_install +find %{buildroot} -type f -name "*.la" -delete -print +# docs have duped pictures +%fdupes %{buildroot} + +%post -n %{libname} -p /sbin/ldconfig +%postun -n %{libname} -p /sbin/ldconfig + +%files -n %{libname} +%doc AUTHORS +%license COPYING.* +%{_libdir}/*.so.* + +%files devel +%{_libdir}/*.so +%{_libdir}/pkgconfig/libmspub*.pc +%{_includedir}/libmspub-* + +%files devel-doc +%dir %{_docdir}/%{name} +%doc %{_docdir}/%{name}/html + +%files tools +%{_bindir}/* + +%changelog