#
# Conditional build:
-%bcond_without altivec # without Altivec support (on ppc)
%bcond_without static_libs # don't build static libraries
%bcond_without tests # don't perform "make check"
#
Summary: Library of Optimized Inner Loops
Summary(pl.UTF-8): Biblioteka zoptymalizowanych wewnętrznych pętli
Name: liboil
-Version: 0.3.14
+Version: 0.3.17
Release: 2
Epoch: 1
License: BSD
Group: Libraries
Source0: http://liboil.freedesktop.org/download/%{name}-%{version}.tar.gz
-# Source0-md5: 7a9f719e50656b795c06c0167012a84f
+# Source0-md5: 47dc734f82faeb2964d97771cfd2e701
Patch0: %{name}-opt.patch
-Patch1: %{name}-no_altivec.patch
+Patch1: %{name}-fixes.patch
+Patch2: x32.patch
URL: http://liboil.freedesktop.org/wiki/
BuildRequires: autoconf >= 2.58
BuildRequires: automake >= 1.6
BuildRequires: glib2-devel >= 2.0
-BuildRequires: gtk-doc-automake
+BuildRequires: gtk-doc-automake >= 1.0
+BuildRequires: libltdl-devel
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: rpmbuild(macros) >= 1.98
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-# cannot remove frame pointers on ix86, SSE wrapper hack relies on
-# gcc stack frames
-#define specflags -fomit-frame-pointer
-# CFLAGS_ALTIVEC are set, but not used
+# NOTE: cannot remove frame pointers on x86, SSE wrapper hack relies on gcc stack frames
+
+# won't compile without altivec (CFLAGS_ALTIVEC are set, but not used)
%define specflags_ppc -maltivec
%description
%prep
%setup -q
%patch0 -p1
-%{!?with_altivec:%patch1 -p1}
+%patch1 -p1
+%ifarch x32
+%patch2 -p1
+%endif
+
+rm -f m4/libtool.m4 m4/lt*.m4
%build
%{__libtoolize}
--with-html-dir=%{_gtkdocdir} \
%{!?with_static_libs:--disable-static}
-%{__make} -j1
+%{__make}
%{?with_tests:%{__make} check}