commit 540f24b822fae6df844be665e5219597f8c15a7e5d013759704103bbc35e1549 Author: Adrian Schröter Date: Fri May 3 14:20:51 2024 +0200 Sync from SUSE:SLFO:Main libEMF revision 8aa95eb90521e17b31bcc5cd4ed67838 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/libEMF.changes b/libEMF.changes new file mode 100644 index 0000000..dc05079 --- /dev/null +++ b/libEMF.changes @@ -0,0 +1,118 @@ +------------------------------------------------------------------- +Sat Sep 24 08:37:06 UTC 2022 - Dirk Müller + +- add riscv64-support.patch +- enable build for riscv64 + +------------------------------------------------------------------- +Mon Aug 17 09:51:29 UTC 2020 - Dirk Mueller + +- update to 1.0.13: + * CVE-2020-13999 (bsc#1173070) + + libEMF (aka ECMA-234 Metafile Library) through 1.0.12 is vulnerable to + Integer overflow condition in libemf.cpp:ScaleviewportExtEx function + leading to Denial of Service + VulnerabilityType : Integer Overflow + +------------------------------------------------------------------- +Wed May 27 23:58:38 UTC 2020 - Jason Sikes + +- Upgrade to version 1.0.12 + * Fixes for CVE-2020-11863, CVE-2020-11864, + CVE-2020-11865, and CVE-2020-11866. + * bsc#1171496, bsc#1171497, bsc#1171498, and bsc#1171499 + * Removed obsoleted aarch64-support.patch + +------------------------------------------------------------------- +Fri Sep 4 14:24:02 UTC 2015 - mpluskal@suse.com + +- Cleanup spec file with spec-cleaner +- Enable build checks + +------------------------------------------------------------------- +Mon Dec 9 18:14:07 UTC 2013 - uweigand@de.ibm.com + +- ppc64le-support.patch: Support for powerpc64le + +------------------------------------------------------------------- +Thu Apr 11 08:20:34 UTC 2013 - mmeister@suse.com + +- Added url as source. + Please see http://en.opensuse.org/SourceUrls + +------------------------------------------------------------------- +Wed Mar 20 16:30:03 UTC 2013 - schwab@suse.de + +- aarch64-support.patch: Support for aarch64 + +------------------------------------------------------------------- +Wed Feb 27 06:20:03 UTC 2013 - coolo@suse.com + +- update license to new format + +------------------------------------------------------------------- +Wed Nov 7 16:25:41 CET 2012 - sbrabec@suse.cz + +- Upgrade to version 1.0.7: + * Fixes and additions for various non-x86 architectures. + +------------------------------------------------------------------- +Mon Aug 20 23:04:17 UTC 2012 - agraf@suse.com + +- add support for arm + +------------------------------------------------------------------- +Mon Jun 4 18:22:36 UTC 2012 - dmueller@suse.com + +- exclude from arm (does not build there) + +------------------------------------------------------------------- +Fri May 25 15:31:57 CEST 2012 - sbrabec@suse.cz + +- Upgrade to version 1.0.6: + * Added support for strokeandfillpath and setmiterlimit. + * Minor fixes. +- Build for all architectures. +- Split according to the Shared Library Packaging Policy. + +------------------------------------------------------------------- +Wed Mar 4 04:29:11 CET 2009 - crrodriguez@suse.de + +- remove static libraries and "la" files + +------------------------------------------------------------------- +Wed Aug 13 18:01:30 CEST 2008 - ro@suse.de + +- move ExclusiveArch to main package + +------------------------------------------------------------------- +Fri Feb 29 12:36:26 CET 2008 - ro@suse.de + +- fix build with current gcc + +------------------------------------------------------------------- +Wed Jan 25 21:37:21 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Thu Sep 29 03:17:34 CEST 2005 - dmueller@suse.de + + - add norootforbuild + +------------------------------------------------------------------- +Sat Aug 23 17:18:14 CEST 2003 - ro@suse.de + +- added ExclusiveArch to specfile + +------------------------------------------------------------------- +Sun Jun 15 18:43:50 CEST 2003 - coolo@suse.de + +- package %_docdir + +------------------------------------------------------------------- +Thu Nov 21 12:50:22 CET 2002 - sbrabec@suse.cz + +- New package. + diff --git a/libEMF.spec b/libEMF.spec new file mode 100644 index 0000000..690a473 --- /dev/null +++ b/libEMF.spec @@ -0,0 +1,124 @@ +# +# spec file for package libEMF +# +# 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/ +# + + +Name: libEMF +Version: 1.0.13 +Release: 0 +Summary: Library for Manipulation with Enhanced MetaFile (EMF, ECMA-234) +License: GPL-2.0-or-later AND LGPL-2.1-or-later +Group: System/Libraries +URL: https://libemf.sourceforge.net/ +Source: https://downloads.sourceforge.net/libemf/libemf-%{version}.tar.gz +Patch1: riscv64-support.patch +Patch2: ppc64le-support.patch +BuildRequires: gcc-c++ +# taken from includes/wine/winnt.h +ExclusiveArch: alpha %{arm} aarch64 %{ix86} mips ppc ppc64 ppc64le riscv64 sparc s390 s390x x86_64 + +%description +LibEMF is a C/C++ library that provides a drawing toolkit based on +ECMA-234. The general purpose of this library is to create vector +graphics files on POSIX systems that can be imported into StarOffice or +OpenOffice. The Enhanced MetaFile (EMF) is one of the two color vector +graphics format that is "vectorially" understood by SO and OO. The EMF +format also has the additional advantage that it can be "broken" into +its constituent components and edited like any other SO or OO graphics +object. + +%package -n libEMF1 +Summary: Library for manipulation with Enhanced MetaFile (EMF, ECMA-234) +License: LGPL-2.1-or-later +Group: System/Libraries + +%description -n libEMF1 +LibEMF is a C/C++ library which provides a drawing toolkit based on +ECMA-234. The general purpose of this library is to create vector +graphics files on POSIX systems which can be imported into +StarOffice/OpenOffice. The Enhanced MetaFile (EMF) is one of the two +color vector graphics format which is "vectorially" understood by +SO/OO. The EMF format also has the additional advantage that it can be +"broken" into its constituent components and edited like any other +SO/OO graphics object. + +%package utils +Summary: Library for manipulation with Enhanced MetaFile (EMF, ECMA-234) +# split-provides for upgrade from openSUSE <= 12.1 and SLE <= 11 +License: GPL-2.0-or-later +Group: Productivity/Graphics/Other +Provides: %{name}:%{_bindir}/printemf + +%description utils +LibEMF is a C/C++ library which provides a drawing toolkit based on +ECMA-234. The general purpose of this library is to create vector +graphics files on POSIX systems which can be imported into +StarOffice/OpenOffice. The Enhanced MetaFile (EMF) is one of the two +color vector graphics format which is "vectorially" understood by +SO/OO. The EMF format also has the additional advantage that it can be +"broken" into its constituent components and edited like any other +SO/OO graphics object. + +%package devel +Summary: Library for manipulation with Enhanced MetaFile (EMF, ECMA-234) +License: GPL-2.0-or-later AND LGPL-2.1-or-later +Group: Development/Libraries/C and C++ +Requires: glibc-devel +Requires: libEMF1 = %{version} + +%description devel +LibEMF is a C/C++ library which provides a drawing toolkit based on +ECMA-234. The general purpose of this library is to create vector +graphics files on POSIX systems which can be imported into +StarOffice/OpenOffice. The Enhanced MetaFile (EMF) is one of the two +color vector graphics format which is "vectorially" understood by +SO/OO. The EMF format also has the additional advantage that it can be +"broken" into its constituent components and edited like any other +SO/OO graphics object. + +%prep +%autosetup -p1 -n libemf-%{version} + +%build +%configure\ + --disable-static +%make_build + +%install +%make_install +find %{buildroot} -type f -name "*.la" -delete -print + +%check +%make_build check + +%post -n libEMF1 -p /sbin/ldconfig +%postun -n libEMF1 -p /sbin/ldconfig + +%files -n libEMF1 +%license COPYING.LIB +%{_libdir}/*.so.* + +%files utils +%license COPYING +%doc AUTHORS ChangeLog NEWS README +%{_bindir}/* + +%files devel +%doc doc/html +%{_includedir}/libEMF +%{_libdir}/*.so + +%changelog diff --git a/libemf-1.0.13.tar.gz b/libemf-1.0.13.tar.gz new file mode 100644 index 0000000..7132ad3 --- /dev/null +++ b/libemf-1.0.13.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:74d92c017e8beb41730a8be07c2c6e4ff6547660c84bf91f832d8f325dd0cf82 +size 1314905 diff --git a/ppc64le-support.patch b/ppc64le-support.patch new file mode 100644 index 0000000..8372c8b --- /dev/null +++ b/ppc64le-support.patch @@ -0,0 +1,20 @@ +Index: libEMF-1.0.7/include/libEMF/wine/winnt.h +=================================================================== +--- libEMF-1.0.7.orig/include/libEMF/wine/winnt.h ++++ libEMF-1.0.7/include/libEMF/wine/winnt.h +@@ -50,8 +50,13 @@ + # define BITFIELDS_BIGENDIAN + # undef ALLOW_UNALIGNED_ACCESS + #elif defined(__PPC__) +-# define WORDS_BIGENDIAN +-# define BITFIELDS_BIGENDIAN ++# ifdef __LITTLE_ENDIAN__ ++# undef WORDS_BIGENDIAN ++# undef BITFIELDS_BIGENDIAN ++# else ++# define WORDS_BIGENDIAN ++# define BITFIELDS_BIGENDIAN ++# endif + # undef ALLOW_UNALIGNED_ACCESS + #elif defined(__s390__) + # define WORDS_BIGENDIAN diff --git a/riscv64-support.patch b/riscv64-support.patch new file mode 100644 index 0000000..5d9bf28 --- /dev/null +++ b/riscv64-support.patch @@ -0,0 +1,104 @@ +From: Bo YU +Date: Mon, 27 Jun 2022 20:11:46 +0800 +Subject: add-support-riscv64 + +add support for riscv64 arch + +Original reference e2k code for supporting riscv64 arch +--- + include/libEMF/wine/winnt.h | 75 +++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 75 insertions(+) + +diff --git a/include/libEMF/wine/winnt.h b/include/libEMF/wine/winnt.h +index 39e2f90..1609f38 100644 +--- a/include/libEMF/wine/winnt.h ++++ b/include/libEMF/wine/winnt.h +@@ -69,6 +69,10 @@ + # define WORDS_BIGENDIAN + # define BITFIELDS_BIGENDIAN + # undef ALLOW_UNALIGNED_ACCESS ++#elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64 ++# undef WORDS_BIGENDIAN ++# undef BITFIELDS_BIGENDIAN ++# undef ALLOW_UNALIGNED_ACCESS + #elif !defined(RC_INVOKED) + # error Unknown CPU architecture! + #endif +@@ -1582,6 +1586,77 @@ typedef struct _CONTEXT { + + #endif /* __e2k__ */ + ++#ifdef __riscv && __riscv_xlen==64 ++/* ++ * FIXME: ++ * ++ * There is not yet an official CONTEXT structure defined for the ++ * riscv64 architecture (64-bit LE), so I just made one up. ++ * ++ */ ++ ++#define CONTEXT_RISCV64 0x4000000 ++#define CONTEXT_CONTROL (CONTEXT_RISCV64 | 0x00000001) ++#define CONTEXT_INTEGER (CONTEXT_RISCV64 | 0x00000002) ++#define CONTEXT_FLOATING_POINT (CONTEXT_RISCV64 | 0x00000004) ++#define CONTEXT_DEBUG_REGISTERS (CONTEXT_RISCV64 | 0x00000008) ++ ++#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER) ++ ++#define EXCEPTION_READ_FAULT 0 ++#define EXCEPTION_WRITE_FAULT 1 ++#define EXCEPTION_EXECUTE_FAULT 8 ++ ++typedef struct _CONTEXT { ++ ULONG ContextFlags; ++ ++ /* This section is specified/returned if the ContextFlags word contains ++ the flag CONTEXT_INTEGER. */ ++ ULONGLONG X0; ++ ULONGLONG X1; ++ ULONGLONG X2; ++ ULONGLONG X3; ++ ULONGLONG X4; ++ ULONGLONG X5; ++ ULONGLONG X6; ++ ULONGLONG X7; ++ ULONGLONG X8; ++ ULONGLONG X9; ++ ULONGLONG X10; ++ ULONGLONG X11; ++ ULONGLONG X12; ++ ULONGLONG X13; ++ ULONGLONG X14; ++ ULONGLONG X15; ++ ULONGLONG X16; ++ ULONGLONG X17; ++ ULONGLONG X18; ++ ULONGLONG X19; ++ ULONGLONG X20; ++ ULONGLONG X21; ++ ULONGLONG X22; ++ ULONGLONG X23; ++ ULONGLONG X24; ++ ULONGLONG X25; ++ ULONGLONG X26; ++ ULONGLONG X27; ++ ULONGLONG X28; ++ ULONGLONG X29; ++ ULONGLONG X30; ++ ULONGLONG X31; ++ ++ /* These are selected by CONTEXT_CONTROL */ ++ ULONGLONG Sp; ++ ULONGLONG Pc; ++ ULONGLONG PState; ++ ++ /* These are selected by CONTEXT_FLOATING_POINT */ ++ /* FIXME */ ++} CONTEXT; ++ ++#endif /* __riscv64__ */ ++ ++ + #if !defined(CONTEXT_FULL) && !defined(RC_INVOKED) + #error You need to define a CONTEXT for your CPU + #endif