diff --git a/.cvsignore b/.cvsignore index e69de29..5e50791 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +libwmf-0.2.8.3.tar.gz diff --git a/libwmf-0.2.8.3-nodocs.patch b/libwmf-0.2.8.3-nodocs.patch new file mode 100644 index 0000000..2e88ac4 --- /dev/null +++ b/libwmf-0.2.8.3-nodocs.patch @@ -0,0 +1,32 @@ +diff -ru libwmf-0.2.8.3.orig/Makefile.am libwmf-0.2.8.3/Makefile.am +--- libwmf-0.2.8.3.orig/Makefile.am 2002-12-05 17:09:53.000000000 +0000 ++++ libwmf-0.2.8.3/Makefile.am 2004-06-11 13:28:56.149819830 +0100 +@@ -1,10 +1,10 @@ + if LIBWMF_BUILD_ALL +-DIRHEAVY = . src include fonts doc ++DIRHEAVY = . src include fonts + else + DIRHEAVY = . src include + endif + +-DIST_SUBDIRS = . src include fonts doc ++DIST_SUBDIRS = . src include fonts + + SUBDIRS = $(DIRHEAVY) + +diff -ru libwmf-0.2.8.3.orig/Makefile.in libwmf-0.2.8.3/Makefile.in +--- libwmf-0.2.8.3.orig/Makefile.in 2004-02-10 12:58:18.000000000 +0000 ++++ libwmf-0.2.8.3/Makefile.in 2004-06-11 13:29:01.996713643 +0100 +@@ -125,10 +125,10 @@ + am__include = @am__include@ + am__quote = @am__quote@ + install_sh = @install_sh@ +-@LIBWMF_BUILD_ALL_TRUE@DIRHEAVY = . src include fonts doc ++@LIBWMF_BUILD_ALL_TRUE@DIRHEAVY = . src include fonts + @LIBWMF_BUILD_ALL_FALSE@DIRHEAVY = . src include + +-DIST_SUBDIRS = . src include fonts doc ++DIST_SUBDIRS = . src include fonts + + SUBDIRS = $(DIRHEAVY) + diff --git a/libwmf-0.2.8.3-relocatablefonts.patch b/libwmf-0.2.8.3-relocatablefonts.patch new file mode 100644 index 0000000..a5708b1 --- /dev/null +++ b/libwmf-0.2.8.3-relocatablefonts.patch @@ -0,0 +1,36 @@ +diff -r -u libwmf-0.2.8.3.old/configure.in libwmf-0.2.8.3/configure.in +--- libwmf-0.2.8.3.old/configure.in 2004-02-10 12:47:44.000000000 +0000 ++++ libwmf-0.2.8.3/configure.in 2004-05-20 14:16:15.804198513 +0100 +@@ -764,14 +764,15 @@ + fi + ]) + +-AC_ARG_WITH(fontdir,[ --with-fontdir=DIR install Type1 fonts in DIR],[ +- WMF_FONTDIR=$withval +-],[ if test "x$prefix" = "xNONE"; then +- WMF_FONTDIR=$ac_default_prefix/share/$PACKAGE/fonts +- else +- WMF_FONTDIR=$prefix/share/$PACKAGE/fonts +- fi +-]) ++#AC_ARG_WITH(fontdir,[ --with-fontdir=DIR install Type1 fonts in DIR],[ ++# WMF_FONTDIR=$withval ++#],[ if test "x$prefix" = "xNONE"; then ++# WMF_FONTDIR=$ac_default_prefix/share/$PACKAGE/fonts ++# else ++# WMF_FONTDIR=$prefix/share/$PACKAGE/fonts ++# fi ++#]) ++WMF_FONTDIR=$datadir/$PACKAGE/fonts + + AC_ARG_WITH(sysfontmap,[ --with-sysfontmap=FILE [default is /usr/share/fonts/fontmap]],[ + WMF_SYS_FONTMAP=$withval +diff -r -u libwmf-0.2.8.3.old/fonts/Makefile.am libwmf-0.2.8.3/fonts/Makefile.am +--- libwmf-0.2.8.3.old/fonts/Makefile.am 2001-08-11 15:49:27.000000000 +0100 ++++ libwmf-0.2.8.3/fonts/Makefile.am 2004-05-20 14:17:22.970701362 +0100 +@@ -1,4 +1,4 @@ +-fontdir = @WMF_FONTDIR@ ++fontdir = $(datadir)/libwmf/fonts/ + + bin_SCRIPTS = libwmf-fontmap + diff --git a/libwmf.spec b/libwmf.spec new file mode 100644 index 0000000..9e6a75b --- /dev/null +++ b/libwmf.spec @@ -0,0 +1,94 @@ +Summary: Windows Metafile Library +Name: libwmf +Version: 0.2.8.3 +Release: 1 +Group: System Environment/Libraries +License: LGPL +Source: http://prdownloads.sourceforge.net/wvware/%{name}-%{version}.tar.gz +Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root +Patch0: libwmf-0.2.8.3-nodocs.patch +Patch1: libwmf-0.2.8.3-relocatablefonts.patch +Requires: gtk2 >= 2.4.0 +Requires: libxml2 >= 2.6.8 +Requires: gd >= 2.0.21 +BuildRequires: gtk2-devel +BuildRequires: libtool +BuildRequires: libxml2-devel +BuildRequires: gd-devel + +%description +A library for reading and converting Windows MetaFile vector graphics (WMF) + +%package devel +Summary: Support files necessary to compile applications with libwmf +Group: Development/Libraries +Requires: libwmf = %{version}-%{release} +Requires: gtk2-devel +Requires: libxml2-devel +Requires: gd-devel + +%description devel +Libraries, headers, and support files necessary to compile applications using libwmf. + +%prep +%setup -q +%patch0 -p1 -b .nodocs +%patch1 -p1 -b .relocatablefonts + +%build +rm configure.ac +libtoolize --force --copy +aclocal-1.4 +autoconf +automake-1.4 +%configure --with-libxml2 +export tagname=CC +make LIBTOOL=/usr/bin/libtool %{?_smp_mflags} + +%install +rm -rf $RPM_BUILD_ROOT +export tagname=CC +%makeinstall LIBTOOL=/usr/bin/libtool +rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la +rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/*/loaders/*.a +rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/*/loaders/*.la + +%post +/sbin/ldconfig +gdk-pixbuf-query-loaders > %{_sysconfdir}/gtk-2.0/gdk-pixbuf.loaders + +%postun +/sbin/ldconfig +gdk-pixbuf-query-loaders > %{_sysconfdir}/gtk-2.0/gdk-pixbuf.loaders + +%files +%defattr(-,root,root) +%doc AUTHORS COPYING README +%{_libdir}/lib*.so.* +%{_libdir}/gtk-2.0/*/loaders/*.so +%{_bindir}/wmf2svg +%{_bindir}/wmf2gd +%{_bindir}/wmf2eps +%{_bindir}/wmf2fig +%{_bindir}/wmf2x +%{_bindir}/libwmf-fontmap +%{_datadir}/libwmf + +%files devel +%defattr(-,root,root) +%doc doc/*.html +%doc doc/*.png +%doc doc/*.gif +%doc doc/html +%doc doc/caolan +%{_libdir}/*.a +%{_libdir}/*.so +%{_includedir}/libwmf +%{_bindir}/libwmf-config + +%clean +rm -r $RPM_BUILD_ROOT + +%changelog +* Thu May 20 2004 Caolan McNamara +- Initial version diff --git a/sources b/sources index e69de29..91179c9 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +3b058327bb14d2373260a74beb7f3e2f libwmf-0.2.8.3.tar.gz