#
# Conditional build:
-%bcond_with bootstrap
-#
-%define snap 20111212
+%bcond_with bootstrap # no ffmpeg/gpac support in x264 utility
+%bcond_without asm # disable asm
+
+%ifnarch %{ix86} %{x8664}
+%undefine with_asm
+%endif
+
+%define rel 7
+%define snap 20140824
%define snaph 2245
-%define rel 1
Summary: H264 encoder library
Summary(pl.UTF-8): Biblioteka kodująca H264
Name: libx264
Group: Libraries
# still no releases, use snapshots
Source0: ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-%{snap}-%{snaph}.tar.bz2
-# Source0-md5: 586e5a6e49bef5b026702c327b1edda2
+# Source0-md5: d2a779a864254ca426dfb1f3115987a0
Patch0: %{name}-alpha.patch
Patch1: altivec-no-vand.patch
Patch2: %{name}-gpac.patch
+Patch3: x32.patch
+Patch4: ffmpeg3.patch
URL: http://www.videolan.org/developers/x264.html
BuildRequires: pkgconfig
-%ifarch %{ix86} %{x8664}
-BuildRequires: yasm >= 0.6.0
-%endif
+%{?with_asm:BuildRequires: yasm >= 1.2.0}
%if %{without bootstrap}
# which version exactly???
# for full x264 CLI utility functionality it wants:
BuildRequires: ffmpeg-devel >= 0.7.1
BuildRequires: ffmpegsource-devel >= 2.16
# gpac >= 2007-06-21
-BuildRequires: gpac-devel >= 0.4.5-2
-Requires: gpac >= 0.4.5-2
+BuildRequires: gpac-devel >= 0.5.0-3
%endif
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Summary(pl.UTF-8): Dekoder x264 działający z linii poleceń
Group: Applications/Multimedia
Requires: %{name} = %{version}-%{release}
+%if %{without bootstrap}
+Requires: gpac >= 0.5.0-3
+%endif
%description -n x264
x264 CLI decoder.
%patch1 -p1
%endif
%patch2 -p1
+%patch3 -p1
+%patch4 -p1
%build
CC="%{__cc}" \
./configure \
+ --host=%{_target_platform} \
--prefix=%{_prefix} \
--exec-prefix=%{_prefix} \
--bindir=%{_bindir} \
--includedir=%{_includedir} \
--libdir=%{_libdir} \
--extra-cflags="%{rpmcflags}" \
+ %{!?with_asm:--disable-asm} \
--enable-pic \
--enable-shared \
--enable-static
%files
%defattr(644,root,root,755)
%doc AUTHORS
-%attr(755,root,root) %{_libdir}/libx264.so.120
+%attr(755,root,root) %{_libdir}/libx264.so.142
%files devel
%defattr(644,root,root,755)