#
# Conditional build:
# _without_qt - disables QT support
-# _with_divx4 - disables divx4linux support
+# _with_divx4 - enables divx4linux support (proprietary, binary-only lib)
#
%define _snapver 20020913
%define _snap %{_snapver}
Summary(pt_BR): Biblioteca para reproduzir formatos de áudio e vídeo usando binários win32
Name: avifile
Version: 0.7.16
-Release: 0.%{_snap}.1
+Release: 0.%{_snap}.3%{?_with_divx4:+divx4}
Epoch: 3
License: GPL
Group: X11/Libraries
Source1: %{name}.desktop
Patch0: %{name}-shareware.patch
Patch1: %{name}-no_libnsl.patch
+Patch2: %{name}-vidix.patch
+Patch3: %{name}-configure.patch
+Patch4: %{name}-compilation.patch
URL: http://avifile.sourceforge.net/
BuildRequires: SDL-devel >= 1.2.0
BuildRequires: XFree86-devel
BuildRequires: nas-devel
%{?!_without_qt:BuildRequires: qt-devel >= 3.0.5}
BuildRequires: unzip
-%ifarch %{ix86} ppc sparc sparc64 sparcv9
+%ifarch %{ix86} ppc
BuildRequires: xvid-devel
%endif
BuildConflicts: wine-devel
%setup -q -n avifile0.7-%{version}
%patch0 -p1
%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p0
%build
rm -f missing aclocal.m4
%{__libtoolize}
%{__aclocal}
-autoheader
+%{__autoheader}
%{__autoconf}
%{__automake}
cd ..
# This is The WRONG Way (tm)
+%if %{!?_without_qt:1}%{?_without_qt:0}
GEN_MOC="`grep -Rl '^ *Q_OBJECT$' *`"
for f in $GEN_MOC; do moc -o "${f%.[!.]*}.moc" "$f"; done
+%endif
%configure \
CPPFLAGS="-I/usr/include/divx" AS="%{__cc}" \
--enable-release \
--enable-ffmpeg \
--enable-ffmpeg-a52 \
- %{?_without_divx4:--disable-divx4} \
-%ifarch i586 i686 athlon
- --enable-x86opt \
-%endif
- %{?_without_qt:--without-qt}
+ %{?_with_divx4:--enable-divx4} \
+ --disable-x86opt \
+ %{?_without_qt:--without-qt} \
+ %{?_without_qt:--disable-samples}
touch lib/dummy.cpp
%{__make}
%files aviplay
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/aviplay
+%{_mandir}/man1/aviplay.1*
%{_datadir}/%{name}*
%{_applnkdir}/Multimedia/*
%{_pixmapsdir}/*
%attr(755,root,root) %{_libdir}/avifile*/ffmpeg.so*
%attr(755,root,root) %{_libdir}/avifile*/ffmpeg.la
-%if %{?_without_divx4:0}%{!?_without_divx4:1}
+%if %{?_with_divx4:1}%{!?_with_divx4:0}
%files divx
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/avifile*/divx*.so*
%attr(755,root,root) %{_libdir}/avifile*/mp3lamebin_audioenc.so*
%attr(755,root,root) %{_libdir}/avifile*/mp3lamebin_audioenc.la
-%ifarch %{ix86} ppc sparc sparc64 sparcv9
+%ifarch %{ix86} ppc
%files xvid
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/avifile*/xvid.so*