2 # http://www.securityfocus.com/bid/18751/info
5 %bcond_without gtk # without gtk-loader package (which requires gtk+2-devel)
6 %bcond_without static_libs # don't build static version of library
8 Summary: libwmf - library to convert wmf files
9 Summary(pl.UTF-8): libwmf - biblioteka z funkcjami do konwersji plików wmf
15 Group: Applications/Text
16 Source0: http://dl.sourceforge.net/wvware/%{name}-%{version}.tar.gz
17 # Source0-md5: d1177739bf1ceb07f57421f0cee191e0
18 Patch0: %{name}-fontmap-pld.patch
19 Patch1: %{name}-includes.patch
20 Patch2: %{name}-segv.patch
21 Patch3: %{name}-png12.patch
22 URL: http://wvware.sourceforge.net/
23 BuildRequires: autoconf >= 2.59-9
24 BuildRequires: automake
25 BuildRequires: expat-devel
26 BuildRequires: freetype-devel >= 2.0
27 %{?with_gtk:BuildRequires: gtk+2-devel >= 1:2.10.0}
28 BuildRequires: libjpeg-devel
29 BuildRequires: libpng-devel >= 1.2.12
30 BuildRequires: libtool >= 1:1.4.2-9
31 BuildRequires: xorg-lib-libX11-devel
32 Requires(post): ghostscript-fonts-std
34 Requires: fonts-Type1-urw
36 Requires: %{name}-libs = %{epoch}:%{version}-%{release}
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 %define specflags_ia32 -fomit-frame-pointer
42 libwmf is a library for unix like machines that can convert wmf files
43 into other formats, currently it supports fig, eps, a gd binding to
44 convert to png, and an X one to draw direct to an X window or pixmap.
46 %description -l pl.UTF-8
47 libwmf jest biblioteką dla systemów uniksowych, która konwertuje pliki
48 wmf na inne formaty. Aktualnie obsługuje formaty fig i eps, format png
49 poprzez bibliotekę gd oraz - poprzez biblioteki X Window - rysowanie w
50 okienku oraz format xpm.
53 Summary: libwmf - libraries
54 Summary(pl.UTF-8): libwmf - biblioteki
56 Conflicts: libwmf < 2:0.2.8.4
59 This package contains libwmf libraries.
61 %description libs -l pl.UTF-8
62 Ten pakiet zawiera biblioteki libwmf.
65 Summary: libwmf - header files
66 Summary(pl.UTF-8): libwmf - pliki nagłówkowe
67 Group: Development/Libraries
68 Requires: %{name}-libs = %{epoch}:%{version}-%{release}
69 # libwmflite(.la) has no additional deps
70 # libwmf(.la) needs freetype-devel, expat-devel, libjpeg-devel, libpng-devel, xorg-lib-libX11-devel
73 This package contains libwmf header files.
75 %description devel -l pl.UTF-8
76 Pakiet zawiera pliki nagłówkowe do biblioteki libwmf.
79 Summary: libwmf - static libraries
80 Summary(pl.UTF-8): libwmf - biblioteki statyczne
81 Group: Development/Libraries
82 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
85 This package contains libwmf static libraries.
87 %description static -l pl.UTF-8
88 Pakiet zawiera statyczną wersję biblioteki libwmf.
91 Summary: WMF loader for gdk_pixbuf 2.x library
92 Summary(pl.UTF-8): Moduł wczytujący WMF dla biblioteki gdk_pixbuf 2.x
94 Requires: %{name} = %{epoch}:%{version}-%{release}
96 %description gtk-loader
97 WMF loader for gdk_pixbuf 2.x library.
99 %description gtk-loader -l pl.UTF-8
100 Moduł wczytujący WMF dla biblioteki gdk_pixbuf 2.x
116 LDFLAGS="%{rpmldflags} -Wl,--as-needed"
118 %{!?with_static_libs:--disable-static} \
119 --with-sysfontmap=%{_fontsdir}/ghostscript-fonts-std.font \
120 --with-gsfontmap=%{_fontsdir}/Type1/Fontmap \
121 --with-gsfontdir=%{_fontsdir}/Type1
126 rm -rf $RPM_BUILD_ROOT
129 DESTDIR=$RPM_BUILD_ROOT
132 mv -f $RPM_BUILD_ROOT%{_datadir}/doc ./html-doc
134 # no static modules and *.la for GTK+ loaders - shut up check-files
135 rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-2*/*/loaders/*.{a,la}
138 rm -rf $RPM_BUILD_ROOT
141 %{_bindir}/libwmf-fontmap > /dev/null
143 %post libs -p /sbin/ldconfig
144 %postun libs -p /sbin/ldconfig
147 %defattr(644,root,root,755)
148 %doc CREDITS ChangeLog README TODO
149 %attr(755,root,root) %{_bindir}/libwmf-fontmap
150 %attr(755,root,root) %{_bindir}/wmf2eps
151 %attr(755,root,root) %{_bindir}/wmf2fig
152 %attr(755,root,root) %{_bindir}/wmf2gd
153 %attr(755,root,root) %{_bindir}/wmf2svg
154 %attr(755,root,root) %{_bindir}/wmf2x
155 %dir %{_datadir}/libwmf
156 %dir %{_datadir}/libwmf/fonts
157 %ghost %{_datadir}/libwmf/fonts/fontmap
160 %defattr(644,root,root,755)
161 %attr(755,root,root) %{_libdir}/*.so.*.*
164 %defattr(644,root,root,755)
165 %doc html-doc examples
166 %attr(755,root,root) %{_bindir}/libwmf-config
167 %attr(755,root,root) %{_libdir}/*.so
171 %if %{with static_libs}
173 %defattr(644,root,root,755)
179 %defattr(644,root,root,755)
180 %attr(755,root,root) %{_libdir}/gtk-2*/*/loaders/*.so