[packages/libvpx] add ppc/ppc64 targets. enable shared does not work on generic target

glen glen at pld-linux.org
Sat Aug 11 19:22:13 CEST 2012


commit e1331b3ac6f893ccb3e6e4b8ac1ec62e2a3986be
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat Aug 11 20:22:09 2012 +0300

     add ppc/ppc64 targets. enable shared does not work on generic target

 libvpx.spec | 27 ++++++++++++++++++---------
 1 file changed, 18 insertions(+), 9 deletions(-)
---
diff --git a/libvpx.spec b/libvpx.spec
index 25b2700..671a790 100644
--- a/libvpx.spec
+++ b/libvpx.spec
@@ -23,6 +23,21 @@ BuildRequires:	sed >= 4.0
 %endif
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define	generic_target	generic-gnu
+%define	vpxtarget	%{generic_target}
+%ifarch %{x8664}
+%define	vpxtarget	x86_64-linux-gcc
+%endif
+%ifarch %{ix86}
+%define	vpxtarget	x86-linux-gcc
+%endif
+%ifarch ppc
+%define	vpxtarget	ppc32-linux-gcc
+%endif
+%ifarch ppc64
+%define	vpxtarget	ppc64-linux-gcc
+%endif
+
 %description
 VP8, a high-quality video codec.
 
@@ -64,16 +79,10 @@ CFLAGS="%{rpmcflags} %{rpmcppflags}" \
 ../configure \
 %if %{with asm}
 	--as=yasm \
-%ifarch %{x8664}
-	--target=x86_64-linux-gcc \
-%endif
-%ifarch %{ix86}
-	--target=x86-linux-gcc \
-%endif
-%else
-	--target=generic-gnu \
-%endif
+	--target=%{vpxtarget} \
+%if "%{vpxtarget}" != "%{generic_target}"
 	--enable-shared \
+%endif
 	--disable-optimizations \
 	--enable-vp8 \
 	--enable-postproc \


More information about the pld-cvs-commit mailing list