3 %bcond_without gtk # without gtk-loader package (which requires gtk+2-devel)
4 %bcond_without static_libs # don't build static version of library
6 Summary: libwmf - library to convert WMF files
7 Summary(pl.UTF-8): libwmf - biblioteka z funkcjami do konwersji plików WMF
13 Group: Applications/Text
14 Source0: http://downloads.sourceforge.net/wvware/%{name}-%{version}.tar.gz
15 # Source0-md5: d1177739bf1ceb07f57421f0cee191e0
16 Patch0: %{name}-fontmap-pld.patch
17 Patch1: %{name}-includes.patch
18 Patch2: %{name}-segv.patch
19 Patch3: %{name}-png12.patch
20 Patch4: %{name}-0.2.8.4-useafterfree.patch
21 Patch5: %{name}-0.2.8.4-CVE-2007-0455.patch
22 Patch6: %{name}-0.2.8.4-CVE-2007-3472.patch
23 Patch7: %{name}-0.2.8.4-CVE-2007-3473.patch
24 Patch8: %{name}-0.2.8.4-CVE-2007-3477.patch
25 Patch9: %{name}-0.2.8.4-CVE-2007-2756.patch
26 Patch10: %{name}-0.2.8.4-CAN-2004-0941.patch
27 Patch11: %{name}-0.2.8.4-CVE-2009-3546.patch
28 URL: http://wvware.sourceforge.net/
29 BuildRequires: autoconf >= 2.59-9
30 BuildRequires: automake
31 BuildRequires: expat-devel
32 BuildRequires: freetype-devel >= 2.0
33 %{?with_gtk:BuildRequires: gtk+2-devel >= 1:2.10.0}
34 BuildRequires: libjpeg-devel
35 BuildRequires: libpng-devel >= 2:1.4.0
36 BuildRequires: libtool >= 1:1.4.2-9
37 BuildRequires: pkgconfig
38 BuildRequires: xorg-lib-libX11-devel
39 Requires(post): ghostscript-fonts-std
41 Requires: %{name}-libs = %{epoch}:%{version}-%{release}
42 Requires: fonts-Type1-urw
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 %define specflags_ia32 -fomit-frame-pointer
49 libwmf is a library for Unix like machines that can convert WMF files
50 into other formats, currently it supports fig, eps, a gd binding to
51 convert to png, and an X one to draw direct to an X Window or pixmap.
53 %description -l pl.UTF-8
54 libwmf jest biblioteką dla systemów uniksowych, która konwertuje pliki
55 WMF na inne formaty. Aktualnie obsługuje formaty fig i eps, format png
56 poprzez bibliotekę gd oraz - poprzez biblioteki X Window - rysowanie w
57 okienku oraz format xpm.
60 Summary: libwmf - libraries
61 Summary(pl.UTF-8): libwmf - biblioteki
63 Conflicts: libwmf < 2:0.2.8.4
66 This package contains libwmf libraries.
68 %description libs -l pl.UTF-8
69 Ten pakiet zawiera biblioteki libwmf.
72 Summary: libwmf - header files
73 Summary(pl.UTF-8): libwmf - pliki nagłówkowe
74 Group: Development/Libraries
75 Requires: %{name}-libs = %{epoch}:%{version}-%{release}
76 # libwmflite(.la) has no additional deps
77 # libwmf(.la) needs freetype-devel, expat-devel, libjpeg-devel, libpng-devel, xorg-lib-libX11-devel
80 This package contains libwmf header files.
82 %description devel -l pl.UTF-8
83 Pakiet zawiera pliki nagłówkowe do biblioteki libwmf.
86 Summary: libwmf - static libraries
87 Summary(pl.UTF-8): libwmf - biblioteki statyczne
88 Group: Development/Libraries
89 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
92 This package contains libwmf static libraries.
94 %description static -l pl.UTF-8
95 Pakiet zawiera statyczną wersję biblioteki libwmf.
98 Summary: WMF loader for gdk_pixbuf 2.x library
99 Summary(pl.UTF-8): Moduł wczytujący WMF dla biblioteki gdk_pixbuf 2.x
101 Requires: %{name} = %{epoch}:%{version}-%{release}
103 %description gtk-loader
104 WMF loader for gdk_pixbuf 2.x library.
106 %description gtk-loader -l pl.UTF-8
107 Moduł wczytujący WMF dla biblioteki gdk_pixbuf 2.x
131 LDFLAGS="%{rpmldflags} -Wl,--as-needed"
133 %{!?with_static_libs:--disable-static} \
134 --with-sysfontmap=%{_fontsdir}/ghostscript-fonts-std.font \
135 --with-gsfontmap=%{_fontsdir}/Type1/Fontmap \
136 --with-gsfontdir=%{_fontsdir}/Type1
141 rm -rf $RPM_BUILD_ROOT
143 %{__make} -j1 install \
144 DESTDIR=$RPM_BUILD_ROOT
147 mv -f $RPM_BUILD_ROOT%{_datadir}/doc ./html-doc
149 # no static modules and *.la for GTK+ loaders - shut up check-files
150 rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-2*/*/loaders/*.{a,la}
153 rm -rf $RPM_BUILD_ROOT
156 %{_bindir}/libwmf-fontmap > /dev/null
158 %post libs -p /sbin/ldconfig
159 %postun libs -p /sbin/ldconfig
162 %defattr(644,root,root,755)
163 %doc CREDITS ChangeLog README TODO
164 %attr(755,root,root) %{_bindir}/libwmf-fontmap
165 %attr(755,root,root) %{_bindir}/wmf2eps
166 %attr(755,root,root) %{_bindir}/wmf2fig
167 %attr(755,root,root) %{_bindir}/wmf2gd
168 %attr(755,root,root) %{_bindir}/wmf2svg
169 %attr(755,root,root) %{_bindir}/wmf2x
170 %dir %{_datadir}/libwmf
171 %dir %{_datadir}/libwmf/fonts
172 %ghost %{_datadir}/libwmf/fonts/fontmap
175 %defattr(644,root,root,755)
176 %attr(755,root,root) %{_libdir}/libwmf-0.2.so.*.*.*
177 %attr(755,root,root) %ghost %{_libdir}/libwmf-0.2.so.7
178 %attr(755,root,root) %{_libdir}/libwmflite-0.2.so.*.*.*
179 %attr(755,root,root) %ghost %{_libdir}/libwmflite-0.2.so.7
182 %defattr(644,root,root,755)
183 %doc html-doc examples
184 %attr(755,root,root) %{_bindir}/libwmf-config
185 %attr(755,root,root) %{_libdir}/libwmf.so
186 %attr(755,root,root) %{_libdir}/libwmflite.so
188 %{_libdir}/libwmflite.la
189 %{_includedir}/libwmf
191 %if %{with static_libs}
193 %defattr(644,root,root,755)
195 %{_libdir}/libwmflite.a
200 %defattr(644,root,root,755)
201 %attr(755,root,root) %{_libdir}/gtk-2.0/*/loaders/io-wmf.so