rpms/libvpx/F-12 libvpx.spec,1.4,1.5
Tom Callaway
spot at fedoraproject.org
Thu Jun 24 19:04:54 UTC 2010
Author: spot
Update of /cvs/pkgs/rpms/libvpx/F-12
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv5341/F-12
Modified Files:
libvpx.spec
Log Message:
fix build for generic arch targets
Index: libvpx.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libvpx/F-12/libvpx.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- libvpx.spec 24 Jun 2010 14:04:46 -0000 1.4
+++ libvpx.spec 24 Jun 2010 19:04:54 -0000 1.5
@@ -1,11 +1,13 @@
Name: libvpx
Summary: VP8 Video Codec SDK
Version: 0.9.1
-Release: 1%{?dist}
+Release: 2%{?dist}
License: BSD
Group: System Environment/Libraries
Source0: http://webm.googlecode.com/files/%{name}-%{version}.tar.bz2
Source1: libvpx.pc
+# Thanks to debian.
+Source2: libvpx.ver
Patch0: libvpx-0.9.0-no-explicit-dep-on-static-lib.patch
URL: http://www.webmproject.org/tools/vp8-sdk/
%ifarch %{ix86} x86_64
@@ -51,7 +53,19 @@ and decoder.
%endif
%endif
-./configure --target=%{vpxtarget} --enable-pic --disable-install-srcs --enable-shared --prefix=%{_prefix} --libdir=%{_libdir}
+# The configure script will reject the shared flag on the generic target
+# This means we need to fall back to the manual creation we did before. :P
+%if "%{vpxtarget}" == "generic-gnu"
+%global generic_target 1
+%else
+%global generic_target 0
+%endif
+
+./configure --target=%{vpxtarget} --enable-pic --disable-install-srcs \
+%if ! %{generic_target}
+--enable-shared \
+%endif
+--prefix=%{_prefix} --libdir=%{_libdir}
# Hack our optflags in.
sed -i "s|-O3|%{optflags}|g" libs-%{vpxtarget}.mk
@@ -60,6 +74,16 @@ sed -i "s|-O3|%{optflags}|g" docs-%{vpxt
make %{?_smp_mflags} verbose=true target=libs
+%if %{generic_target}
+# Manual shared library creation
+mkdir tmp
+cd tmp
+ar x ../libvpx_g.a
+cd ..
+gcc -fPIC -shared -pthread -lm -Wl,--no-undefined -Wl,-soname,libvpx.so.0 -Wl,--version-script,%{SOURCE2} -Wl,-z,noexecstack -o libvpx.so.%{version} tmp/*.o
+rm -rf tmp
+%endif
+
# Temporarily dance the static libs out of the way
mv libvpx.a libNOTvpx.a
mv libvpx_g.a libNOTvpx_g.a
@@ -88,6 +112,15 @@ sed -i "s|@INCLUDEDIR@|%{_includedir}|g"
# Simpler to label the dir as %doc.
mv %{buildroot}/usr/docs doc/
+%if %{generic_target}
+install -p libvpx.so.%{version} %{buildroot}%{_libdir}
+pushd %{buildroot}%{_libdir}
+ln -sf libvpx.so.%{version} libvpx.so
+ln -sf libvpx.so.%{version} libvpx.so.0
+ln -sf libvpx.so.%{version} libvpx.so.0.9
+popd
+%endif
+
pushd %{buildroot}
# Stuff we don't need.
rm -rf usr/build/ usr/md5sums.txt usr/lib*/*.a usr/CHANGELOG usr/README
@@ -124,6 +157,9 @@ rm -rf %{buildroot}
%{_bindir}/*
%changelog
+* Thu Jun 24 2010 Tom "spot" Callaway <tcallawa at redhat.com> 0.9.1-2
+- build shared library the old way for generic arches
+
* Thu Jun 24 2010 Tom "spot" Callaway <tcallawa at redhat.com> 0.9.1-1
- update to 0.9.1
More information about the scm-commits
mailing list