83bc7c
Summary: Windows MetaFile Library
83bc7c
Name: libwmf
83bc7c
Version: 0.2.8.4
d98598
Release: 43%{?dist}
83bc7c
Group: System Environment/Libraries
83bc7c
#libwmf is under the LGPLv2+, however...
83bc7c
#1. The tarball contains an old version of the urw-fonts under GPL+.
83bc7c
#   Those fonts are not installed
83bc7c
#2. The header of the command-line wmf2plot utility places it under the GPLv2+.
83bc7c
#   wmf2plot is neither built or install
83bc7c
License: LGPLv2+ and GPLv2+ and GPL+
83bc7c
Source: http://downloads.sourceforge.net/wvware/%{name}-%{version}.tar.gz
83bc7c
URL: http://wvware.sourceforge.net/libwmf.html
83bc7c
#Upstream is uncontactable for some time now, which is a real pity esp.
83bc7c
#wrt CVE-2006-3376/CVE-2009-1364
83bc7c
#Don't install out of date documentation
83bc7c
Patch0:  libwmf-0.2.8.3-nodocs.patch
83bc7c
#Allow use of system install fonts intead of libwmf bundled ones
83bc7c
Patch1:  libwmf-0.2.8.3-relocatablefonts.patch
83bc7c
#Set a fallback font of Times for text if a .wmf file don't set any
83bc7c
Patch2:  libwmf-0.2.8.4-fallbackfont.patch
83bc7c
#Strip unnecessary extra library dependencies
83bc7c
Patch3:  libwmf-0.2.8.4-deps.patch
83bc7c
#convert libwmf-config to a pkg-config to avoid multilib conflicts
83bc7c
Patch4:  libwmf-0.2.8.4-multiarchdevel.patch
83bc7c
#CVE-2006-3376 Integer overflow in player.c
83bc7c
Patch5:  libwmf-0.2.8.4-intoverflow.patch
83bc7c
#Don't export the modified embedded GD library symbols, to avoid conflicts with
83bc7c
#the external one
83bc7c
Patch6:  libwmf-0.2.8.4-reducesymbols.patch
83bc7c
#CVE-2009-1364, Use-after-free vulnerability in the modified embedded GD
83bc7c
#library
83bc7c
Patch7:  libwmf-0.2.8.4-useafterfree.patch
83bc7c
# adapt to standalone gdk-pixbuf
83bc7c
Patch8:  libwmf-0.2.8.4-pixbufloaderdir.patch
83bc7c
# CVE-2007-0455
83bc7c
Patch9:  libwmf-0.2.8.4-CVE-2007-0455.patch
83bc7c
# CVE-2007-3472
83bc7c
Patch10: libwmf-0.2.8.4-CVE-2007-3472.patch
83bc7c
# CVE-2007-3473
83bc7c
Patch11: libwmf-0.2.8.4-CVE-2007-3473.patch
83bc7c
# CVE-2006-2906 affects GIFs, which is not implemented here
83bc7c
# CVE-2006-4484 affects GIFs, which is not implemented here
83bc7c
# CVE-2007-3474 affects GIFs, which is not implemented here
83bc7c
# CVE-2007-3475 affects GIFs, which is not implemented here
83bc7c
# CVE-2007-3476 affects GIFs, which is not implemented here
83bc7c
# CVE-2007-3477
83bc7c
Patch12: libwmf-0.2.8.4-CVE-2007-3477.patch
83bc7c
# CVE-2007-3478 affects shared ttf files across threads, which is not implemented here
83bc7c
# CVE-2007-2756
83bc7c
Patch13: libwmf-0.2.8.4-CVE-2007-2756.patch
83bc7c
# CAN-2004-0941
83bc7c
Patch14: libwmf-0.2.8.4-CAN-2004-0941.patch
83bc7c
# CVE-2009-3546
83bc7c
Patch15: libwmf-0.2.8.4-CVE-2009-3546.patch
83bc7c
# https://bugzilla.redhat.com/show_bug.cgi?id=925929
83bc7c
Patch16: libwmf-aarch64.patch
83bc7c
# CVE-2015-0848+CVE-2015-4588
83bc7c
Patch17: libwmf-0.2.8.4-CVE-2015-0848+CVE-2015-4588.patch
83bc7c
# CVE-2015-4695
83bc7c
Patch18: libwmf-0.2.8.4-CVE-2015-4695.patch
83bc7c
# CVE-2015-4696
83bc7c
Patch19: libwmf-0.2.8.4-CVE-2015-4696.patch
d98598
# CVE-2019-6978
d98598
Patch20: 0001-merge-in-fixes-for-libgd-CVE-2019-6978.patch
83bc7c
83bc7c
Requires: urw-fonts
83bc7c
Requires: %{name}-lite = %{version}-%{release}
83bc7c
Requires(post): gdk-pixbuf2
83bc7c
Requires(postun): gdk-pixbuf2
83bc7c
BuildRequires: gtk2-devel, libtool, libxml2-devel, libpng-devel
83bc7c
BuildRequires: libjpeg-devel, libXt-devel, libX11-devel, dos2unix, libtool
83bc7c
83bc7c
%description
83bc7c
A library for reading and converting Windows MetaFile vector graphics (WMF).
83bc7c
83bc7c
%package lite
83bc7c
Summary: Windows Metafile parser library
83bc7c
Group: System Environment/Libraries
83bc7c
83bc7c
%description lite
83bc7c
A library for parsing Windows MetaFile vector graphics (WMF).
83bc7c
83bc7c
%package devel
83bc7c
Summary: Support files necessary to compile applications with libwmf
83bc7c
Group: Development/Libraries
83bc7c
Requires: libwmf = %{version}-%{release}
83bc7c
Requires: gtk2-devel, libxml2-devel, libjpeg-devel
83bc7c
83bc7c
%description devel
83bc7c
Libraries, headers, and support files necessary to compile applications 
83bc7c
using libwmf.
83bc7c
83bc7c
%prep
83bc7c
%setup -q
83bc7c
%patch0  -p1 -b .nodocs
83bc7c
%patch1  -p1 -b .relocatablefonts
83bc7c
%patch2  -p1 -b .fallbackfont
83bc7c
%patch3  -p1 -b .deps
83bc7c
%patch4  -p1 -b .multiarchdevel
83bc7c
%patch5  -p1 -b .intoverflow
83bc7c
%patch6  -p1 -b .reducesymbols.patch
83bc7c
%patch7  -p1 -b .useafterfree.patch
83bc7c
%patch8  -p1 -b .pixbufloaderdir
83bc7c
%patch9  -p1 -b .CVE-2007-0455
83bc7c
%patch10 -p1 -b .CVE-2007-3472
83bc7c
%patch11 -p1 -b .CVE-2007-3473
83bc7c
%patch12 -p1 -b .CVE-2007-3477
83bc7c
%patch13 -p1 -b .CVE-2007-2756
83bc7c
%patch14 -p1 -b .CAN-2004-0941
83bc7c
%patch15 -p1 -b .CVE-2009-3546
83bc7c
%patch16 -p1 -b .aarch64
83bc7c
%patch17 -p1 -b .CVE-2015-0848+CVE-2015-4588
83bc7c
%patch18 -p1 -b .CVE-2015-4695
83bc7c
%patch19 -p1 -b .CVE-2015-4696
d98598
%patch20 -p1 -b .CVE-2019-6978
83bc7c
f=README ; iconv -f iso-8859-2 -t utf-8 $f > $f.utf8 ; mv $f.utf8 $f
83bc7c
83bc7c
%build
83bc7c
rm configure.ac
83bc7c
ln -s patches/acconfig.h acconfig.h
83bc7c
autoreconf -i -f
83bc7c
%configure --with-libxml2 --disable-static --disable-dependency-tracking
83bc7c
make %{?_smp_mflags}
83bc7c
dos2unix doc/caolan/*.html
83bc7c
83bc7c
%install
83bc7c
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
83bc7c
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
83bc7c
83bc7c
rm -rf $RPM_BUILD_ROOT%{_includedir}/libwmf/gd
83bc7c
find doc -name "Makefile*" -exec rm {} \;
83bc7c
83bc7c
#we're carrying around duplicate fonts
83bc7c
rm -rf $RPM_BUILD_ROOT%{_datadir}/libwmf/fonts/*afm
83bc7c
rm -rf $RPM_BUILD_ROOT%{_datadir}/libwmf/fonts/*pfb
83bc7c
sed -i $RPM_BUILD_ROOT%{_datadir}/libwmf/fonts/fontmap -e 's#libwmf/fonts#fonts/default/Type1#g'
83bc7c
83bc7c
%post
83bc7c
/sbin/ldconfig
83bc7c
gdk-pixbuf-query-loaders-%{__isa_bits} --update-cache || :
83bc7c
83bc7c
%post lite -p /sbin/ldconfig
83bc7c
83bc7c
%postun 
83bc7c
/sbin/ldconfig
83bc7c
gdk-pixbuf-query-loaders-%{__isa_bits} --update-cache || :
83bc7c
83bc7c
%postun lite -p /sbin/ldconfig
83bc7c
83bc7c
%files
83bc7c
%defattr(-,root,root,-)
83bc7c
%{_libdir}/libwmf-*.so.*
83bc7c
%{_libdir}/gdk-pixbuf-2.0/*/loaders/*.so
83bc7c
%{_bindir}/wmf2svg
83bc7c
%{_bindir}/wmf2gd
83bc7c
%{_bindir}/wmf2eps
83bc7c
%{_bindir}/wmf2fig
83bc7c
%{_bindir}/wmf2x
83bc7c
%{_bindir}/libwmf-fontmap
83bc7c
%{_datadir}/libwmf/
83bc7c
83bc7c
%files lite
83bc7c
%defattr(-,root,root,-)
83bc7c
%doc AUTHORS COPYING README
83bc7c
%{_libdir}/libwmflite-*.so.*
83bc7c
83bc7c
%files devel
83bc7c
%defattr(-,root,root,-)
83bc7c
%doc doc/*.html
83bc7c
%doc doc/*.png
83bc7c
%doc doc/*.gif
83bc7c
%doc doc/html
83bc7c
%doc doc/caolan
83bc7c
%{_libdir}/*.so
83bc7c
%{_libdir}/pkgconfig/libwmf.pc
83bc7c
%{_includedir}/libwmf
83bc7c
%{_bindir}/libwmf-config
83bc7c
83bc7c
83bc7c
%changelog
d98598
* Mon Mar 30 2020 Caolán McNamara <caolanm@redhat.com> - 0.2.8.4-43
d98598
- Resolves: rhbz#1679005 CVE-2019-6978
83bc7c
d98598
* Wed Sep 02 2015 Caolán McNamara <caolanm@redhat.com> - 0.2.8.4-42
d98598
- Related: rhbz#1239162 fix patch context
83bc7c
d98598
* Tue Jul 07 2015 Caolán McNamara <caolanm@redhat.com> - 0.2.8.4-41
d98598
- Resolves: rhbz#1239162 CVE-2015-0848 CVE-2015-4588 CVE-2015-4695 CVE-2015-4696
d98598
d98598
* Mon May 08 2015 Caolán McNamara <caolanm@redhat.com> - 0.2.8.4-40
d98598
- Resolves: rhbz#1227431 CVE-2015-0848 libwmf: heap overflow when decoding BMP images
83bc7c
83bc7c
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 0.2.8.4-39
83bc7c
- Mass rebuild 2014-01-24
83bc7c
83bc7c
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.2.8.4-38
83bc7c
- Mass rebuild 2013-12-27
83bc7c
83bc7c
* Thu Apr 04 2013 Caolán McNamara <caolanm@redhat.com> - 0.2.8.4-37
83bc7c
- Resolves: rhbz#925929 support aarch64
83bc7c
83bc7c
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.8.4-36
83bc7c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
83bc7c
83bc7c
* Fri Jan 18 2013 Adam Tkac <atkac redhat com> - 0.2.8.4-35
83bc7c
- rebuild due to "jpeg8-ABI" feature drop
83bc7c
83bc7c
* Fri Dec 21 2012 Adam Tkac <atkac redhat com> - 0.2.8.4-34
83bc7c
- rebuild against new libjpeg
83bc7c
83bc7c
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.8.4-33
83bc7c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
83bc7c
83bc7c
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.8.4-32
83bc7c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
83bc7c
83bc7c
* Mon Dec 05 2011 Adam Jackson <ajax@redhat.com> 0.2.8.4-31
83bc7c
- Rebuild for new libpng
83bc7c
83bc7c
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.8.4-30
83bc7c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
83bc7c
83bc7c
* Tue Dec 07 2010 Caolán McNamara <caolanm@redhat.com> - 0.2.8.4-29
83bc7c
- drop bogus buildrequires
83bc7c
83bc7c
* Mon Dec 06 2010 Caolán McNamara <caolanm@redhat.com> - 0.2.8.4-28
83bc7c
- Resolves: rhbz#660161 security issues
83bc7c
83bc7c
* Mon Oct 18 2010 Parag Nemade <paragn AT fedoraproject.org> - 0.2.8.4-27
83bc7c
- Merge-review cleanup (#226058)
83bc7c
83bc7c
* Thu Jul 08 2010 Caolán McNamara <caolanm@redhat.com> - 0.2.8.4-26
83bc7c
- Move docs into -lite subpackage that all the rest require to
83bc7c
  fulfil subpackage licencing rules
83bc7c
83bc7c
* Tue Jun 29 2010 Matthias Clasen <mclasen@redhat.com> - 0.2.8.4-25
83bc7c
- Remove explicit file deps
83bc7c
83bc7c
* Mon Jun 28 2010 Matthias Clasen <mclasen@redhat.com> - 0.2.8.4-23
83bc7c
- Adapt to standalone gdk-pixbuf
83bc7c
83bc7c
* Fri Apr 16 2010 Caolán McNamara <caolanm@redhat.com> - 0.2.8.4-22
83bc7c
- Clarify licences
83bc7c
83bc7c
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.8.4-21
83bc7c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
83bc7c
83bc7c
* Tue May 26 2009 Caolán McNamara <caolanm@redhat.com> - 0.2.8.4-20
83bc7c
- Resolves: CVE-2009-1364
83bc7c
83bc7c
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.8.4-19
83bc7c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
83bc7c
83bc7c
* Wed Feb 13 2008 Ville Skyttä <ville.skytta at iki.fi> - 0.2.8.4-18
83bc7c
- Split libwmflite (WMF parser) into -lite subpackage (#432651).
83bc7c
- Build with dependency tracking disabled.
83bc7c
- Convert docs to UTF-8.
83bc7c
83bc7c
* Wed Aug 29 2007 Caolan McNamara <caolanm@redhat.com> 0.2.8.4-17
83bc7c
- rebuild
83bc7c
83bc7c
* Thu Aug 02 2007 Caolan McNamara <caolanm@redhat.com> 0.2.8.4-16
83bc7c
- I wrote it and still had to check the headers to see if I had
83bc7c
  cut and pasted "and later" into then
83bc7c
83bc7c
* Thu May 24 2007 Caolan McNamara <caolanm@redhat.com> 0.2.8.4-15
83bc7c
- drop duplicate font metrics
83bc7c
83bc7c
* Thu Feb 15 2007 Caolan McNamara <caolanm@redhat.com> 0.2.8.4-14
83bc7c
- remove use of archaic autotools
83bc7c
83bc7c
* Fri Feb 09 2007 Caolan McNamara <caolanm@redhat.com> 0.2.8.4-13
83bc7c
- Resolves: rhbz#222734 no need for Makefiles in doc dirs
83bc7c
83bc7c
* Tue Jan 16 2007 Caolan McNamara <caolanm@redhat.com> 0.2.8.4-12
83bc7c
- Resolves: rhbz#222734 no need for Makefiles in doc dirs
83bc7c
83bc7c
* Thu Nov 16 2006 Caolan McNamara <caolanm@redhat.com> 0.2.8.4-11
83bc7c
- Resolves: rhbz#215925 reduce exported symbols
83bc7c
83bc7c
* Fri Jul 14 2006 Caolan McNamara <caolanm@redhat.com> 0.2.8.4-10
83bc7c
- retweak for 64bit
83bc7c
83bc7c
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 0.2.8.4-9.1
83bc7c
- rebuild
83bc7c
83bc7c
* Wed Jul 12 2006 Caolan McNamara <caolanm@redhat.com> 0.2.8.4-9
83bc7c
- CVE-2006-3376 libwmf integer overflow
83bc7c
83bc7c
* Tue May 16 2006 Caolan McNamara <caolanm@redhat.com> 0.2.8.4-8
83bc7c
- rh#191971# BuildRequires
83bc7c
83bc7c
* Fri May  5 2006 Matthias Clasen <mclasen@redhat.com> 0.2.8.4-7
83bc7c
- Rebuild against the new GTK+
83bc7c
- Require GTK+ 2.9.0
83bc7c
83bc7c
* Tue May 02 2006 Caolan McNamara <caolanm@redhat.com> 0.2.8.4-6
83bc7c
- add a .pc and base libwmf-devel on pkg-config output
83bc7c
83bc7c
* Tue Feb 28 2006 Caolan McNamara <caolanm@redhat.com> 0.2.8.4-5
83bc7c
- rh#143096# extra deps according to libwmf-config
83bc7c
83bc7c
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 0.2.8.4-4.2
83bc7c
- bump again for double-long bug on ppc(64)
83bc7c
83bc7c
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 0.2.8.4-4.1
83bc7c
- rebuilt for new gcc4.1 snapshot and glibc changes
83bc7c
83bc7c
* Tue Jan 19 2006 Caolan McNamara <caolanm@redhat.com> 0.2.8.4-4
83bc7c
- rh#178275# match srvg gtk2 _host usage for pixbuf loaders
83bc7c
83bc7c
* Tue Jan 03 2006 Caolan McNamara <caolanm@redhat.com> 0.2.8.4-3
83bc7c
- add libwmf-0.2.8.4-fallbackfont.patch for rh#176620#
83bc7c
83bc7c
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com> 0.2.8.4-2.1
83bc7c
- rebuilt
83bc7c
83bc7c
* Wed Nov 23 2005 Caolan McNamara <caolanm@redhat.com> 0.2.8.4-2
83bc7c
- rh#173299# modify pre/post requires
83bc7c
83bc7c
* Thu Jul 28 2005 Caolan McNamara <caolanm@redhat.com> 0.2.8.4-1
83bc7c
- get patches merged upstream
83bc7c
- drop integrated libwmf-0.2.8.3-warnings.patch
83bc7c
- drop integrated libwmf-0.2.8.3-noextras.patch
83bc7c
- drop integrated libwmf-0.2.8.3-rh154813.patch
83bc7c
83bc7c
* Tue Jul 26 2005 Caolan McNamara <caolanm@redhat.com> 0.2.8.3-9
83bc7c
- rh#154813# wmf upsidedown, spec (what of is there is) says that
83bc7c
  this shouldn't happen, but...
83bc7c
83bc7c
* Wed Mar  2 2005 Caolan McNamara <caolanm@redhat.com> 0.2.8.3-8
83bc7c
- rebuild with gcc4
83bc7c
83bc7c
* Thu Dec 16 2004 Caolan McNamara <caolanm@redhat.com> 0.2.8.3-7
83bc7c
- RH#143096# No need for extra X libs to be linked against
83bc7c
83bc7c
* Tue Nov  2 2004 Caolan McNamara <caolanm@redhat.com> 0.2.8.3-6
83bc7c
- #rh137878# Extra BuildRequires
83bc7c
83bc7c
* Thu Oct  7 2004 Caolan McNamara <caolanm@redhat.com> 0.2.8.3-5
83bc7c
- #rh134945# Extra BuildRequires
83bc7c
83bc7c
* Wed Sep  1 2004 Caolan McNamara <caolanm@redhat.com> 0.2.8.3-4
83bc7c
- #131373# cleanup compiletime warnings
83bc7c
83bc7c
* Thu Jul  8 2004 Matthias Clasen <mclasen@redhat.com> - 0.2.8.3-3
83bc7c
- Update to use the new update-gdk-pixbuf-loaders script in gtk2-2.4.1-2
83bc7c
83bc7c
* Thu May 20 2004 Caolan McNamara <caolanm@redhat.com>
83bc7c
- Initial version