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 Patch12: %{name}-pixbufloaderdir.patch
29 URL: http://wvware.sourceforge.net/
30 BuildRequires: autoconf >= 2.59-9
31 BuildRequires: automake
32 BuildRequires: expat-devel
33 BuildRequires: freetype-devel >= 2.0
34 %{?with_gtk:BuildRequires: gtk+2-devel >= 1:2.10.0}
35 BuildRequires: libjpeg-devel
36 BuildRequires: libpng-devel >= 2:1.4.0
37 BuildRequires: libtool >= 1:1.4.2-9
38 BuildRequires: pkgconfig
39 BuildRequires: xorg-lib-libX11-devel
40 Requires(post): ghostscript-fonts-std
42 Requires: %{name}-libs = %{epoch}:%{version}-%{release}
43 Requires: fonts-Type1-urw
45 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 %define specflags_ia32 -fomit-frame-pointer
50 libwmf is a library for Unix like machines that can convert WMF files
51 into other formats, currently it supports fig, eps, a gd binding to
52 convert to png, and an X one to draw direct to an X Window or pixmap.
54 %description -l pl.UTF-8
55 libwmf jest biblioteką dla systemów uniksowych, która konwertuje pliki
56 WMF na inne formaty. Aktualnie obsługuje formaty fig i eps, format png
57 poprzez bibliotekę gd oraz - poprzez biblioteki X Window - rysowanie w
58 okienku oraz format xpm.
61 Summary: libwmf - libraries
62 Summary(pl.UTF-8): libwmf - biblioteki
64 Conflicts: libwmf < 2:0.2.8.4
67 This package contains libwmf libraries.
69 %description libs -l pl.UTF-8
70 Ten pakiet zawiera biblioteki libwmf.
73 Summary: libwmf - header files
74 Summary(pl.UTF-8): libwmf - pliki nagłówkowe
75 Group: Development/Libraries
76 Requires: %{name}-libs = %{epoch}:%{version}-%{release}
77 # libwmflite(.la) has no additional deps
78 # libwmf(.la) needs freetype-devel, expat-devel, libjpeg-devel, libpng-devel, xorg-lib-libX11-devel
81 This package contains libwmf header files.
83 %description devel -l pl.UTF-8
84 Pakiet zawiera pliki nagłówkowe do biblioteki libwmf.
87 Summary: libwmf - static libraries
88 Summary(pl.UTF-8): libwmf - biblioteki statyczne
89 Group: Development/Libraries
90 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
93 This package contains libwmf static libraries.
95 %description static -l pl.UTF-8
96 Pakiet zawiera statyczną wersję biblioteki libwmf.
99 Summary: WMF loader for gdk_pixbuf 2.x library
100 Summary(pl.UTF-8): Moduł wczytujący WMF dla biblioteki gdk_pixbuf 2.x
102 Requires: %{name} = %{epoch}:%{version}-%{release}
104 %description gtk-loader
105 WMF loader for gdk_pixbuf 2.x library.
107 %description gtk-loader -l pl.UTF-8
108 Moduł wczytujący WMF dla biblioteki gdk_pixbuf 2.x
134 %{!?with_static_libs:--disable-static} \
135 --with-sysfontmap=%{_fontsdir}/ghostscript-fonts-std.font \
136 --with-gsfontmap=%{_fontsdir}/Type1/Fontmap \
137 --with-gsfontdir=%{_fontsdir}/Type1
142 rm -rf $RPM_BUILD_ROOT
144 %{__make} -j1 install \
145 DESTDIR=$RPM_BUILD_ROOT
148 mv -f $RPM_BUILD_ROOT%{_datadir}/doc ./html-doc
150 # no static modules and *.la for GTK+ loaders - shut up check-files
151 %{__rm} $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/*/loaders/*.{a,la}
154 rm -rf $RPM_BUILD_ROOT
157 %{_bindir}/libwmf-fontmap > /dev/null
159 %post libs -p /sbin/ldconfig
160 %postun libs -p /sbin/ldconfig
163 %defattr(644,root,root,755)
164 %doc CREDITS ChangeLog README TODO
165 %attr(755,root,root) %{_bindir}/libwmf-fontmap
166 %attr(755,root,root) %{_bindir}/wmf2eps
167 %attr(755,root,root) %{_bindir}/wmf2fig
168 %attr(755,root,root) %{_bindir}/wmf2gd
169 %attr(755,root,root) %{_bindir}/wmf2svg
170 %attr(755,root,root) %{_bindir}/wmf2x
171 %dir %{_datadir}/libwmf
172 %dir %{_datadir}/libwmf/fonts
173 %ghost %{_datadir}/libwmf/fonts/fontmap
176 %defattr(644,root,root,755)
177 %attr(755,root,root) %{_libdir}/libwmf-0.2.so.*.*.*
178 %attr(755,root,root) %ghost %{_libdir}/libwmf-0.2.so.7
179 %attr(755,root,root) %{_libdir}/libwmflite-0.2.so.*.*.*
180 %attr(755,root,root) %ghost %{_libdir}/libwmflite-0.2.so.7
183 %defattr(644,root,root,755)
184 %doc html-doc examples
185 %attr(755,root,root) %{_bindir}/libwmf-config
186 %attr(755,root,root) %{_libdir}/libwmf.so
187 %attr(755,root,root) %{_libdir}/libwmflite.so
189 %{_libdir}/libwmflite.la
190 %{_includedir}/libwmf
192 %if %{with static_libs}
194 %defattr(644,root,root,755)
196 %{_libdir}/libwmflite.a
201 %defattr(644,root,root,755)
202 %{_libdir}/gdk-pixbuf-2.0/*/loaders/io-wmf.so