Author: arekm Date: Thu May 20 14:06:03 2010 GMT Module: packages Tag: HEAD ---- Log message: - build on x86
---- Files affected: packages/libvpx: libvpx.spec (1.2 -> 1.3) , libvpx-0.9.0-no-explicit-dep-on-static-lib.patch (NONE -> 1.1) (NEW) ---- Diffs: ================================================================ Index: packages/libvpx/libvpx.spec diff -u packages/libvpx/libvpx.spec:1.2 packages/libvpx/libvpx.spec:1.3 --- packages/libvpx/libvpx.spec:1.2 Wed May 19 23:55:47 2010 +++ packages/libvpx/libvpx.spec Thu May 20 16:05:54 2010 @@ -7,12 +7,11 @@ Group: Libraries Source0: http://webm.googlecode.com/files/%{name}-%{version}.tar.bz2 # Source0-md5: 9eb8e818d2f3263623c258fe66924082 +Patch0: %{name}-0.9.0-no-explicit-dep-on-static-lib.patch URL: http://www.webmproject.org/ BuildRequires: autoconf BuildRequires: automake BuildRequires: doxygen -BuildRequires: php-pcre -BuildRequires: php-program BuildRequires: yasm BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -37,6 +36,7 @@ %prep %setup -q +%patch0 -p1 %build install -d build @@ -49,16 +49,61 @@ %ifarch %{ix86} --target=x86-linux-gcc \ %endif - --enable-install-docs \ + --enable-pic \ + --disable-optimizations \ --enable-vp8 \ --enable-postproc \ --enable-runtime-cpu-detect -%{__make} + +# Hack our optflags in. +sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{rpmcflags} %{rpmcppflags} -fPIC|g" libs-*.mk +sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{rpmcflags} %{rpmcppflags} -fPIC|g" examples-*.mk +sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{rpmcflags} %{rpmcppflags} -fPIC|g" docs-*.mk + +%{__make} verbose=true target=libs \ + CC="%{__cc}" + +%{__cc} %{rpmldflags} -fPIC -o libvpx.so.0.0.0 -shared -Wl,-soname,libvpx.so.0 vpx_codec/src/*.o vpx_mem/*.o \ + vpx_scale/generic/*.o vp8/common/*.o vp8/common/generic/*.o vp8/*.o vp8/encoder/*.o \ + vp8/encoder/generic/*.o vp8/decoder/*.o vp8/decoder/generic/*.o vpx_config.c.o \ + vp8/common/x*/*.o vp8/encoder/x*/*.o vp8/decoder/x*/*.o vpx_ports/*.o -lm -lpthread + +# Temporarily dance the static libs out of the way +mv libvpx.a libNOTvpx.a +mv libvpx_g.a libNOTvpx_g.a + +# We need to do this so the examples can link against it. +ln -sf libvpx.so.0.0.0 libvpx.so + +%{__make} verbose=true target=examples \ + CC="%{__cc}" +%{__make} verbose=true target=docs + +# Put them back so the install doesn't fail +mv libNOTvpx.a libvpx.a +mv libNOTvpx_g.a libvpx_g.a %install rm -rf $RPM_BUILD_ROOT -%{__make} -C build install +install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir},%{_libdir}} + +install -d outdir +%{__make} -C build install \ + DIST_DIR=$(pwd)/outdir + +mv outdir/bin/{simple_decoder,vp8_simple_decoder} +mv outdir/bin/{twopass_encoder,vp8_twopass_encoder} +install -m755 outdir/bin/* $RPM_BUILD_ROOT%{_bindir} + +ln -s libvpx.so.0.0.0 build/libvpx.so.0.0 +ln -s libvpx.so.0.0.0 build/libvpx.so.0 +install -m755 -p build/libvpx.so* $RPM_BUILD_ROOT%{_libdir} +ldconfig -X -n $RPM_BUILD_ROOT%{_libdir} + +install outdir/include/*.h $RPM_BUILD_ROOT%{_includedir} + +install outdir/lib/*.a $RPM_BUILD_ROOT%{_libdir} %clean rm -rf $RPM_BUILD_ROOT @@ -68,23 +113,18 @@ %files %defattr(644,root,root,755) -%attr(755,root,root) %{_bindir}/vainfo -%attr(755,root,root) %{_libdir}/libvpx*.so.*.* -%attr(755,root,root) %ghost %{_libdir}/libvpx*.so.1 -%dir %{_libdir}/%{name} -%dir %{_libdir}/%{name}/dri -%attr(755,root,root) %{_libdir}/%{name}/dri/*.so +%attr(755,root,root) %{_bindir}/* +%attr(755,root,root) %{_libdir}/libvpx.so.*.* +%attr(755,root,root) %ghost %{_libdir}/libvpx.so.0 %files devel %defattr(644,root,root,755) %attr(755,root,root) %{_libdir}/libvpx*.so -%{_includedir}/va -%{_libdir}/libvpx*.la -%{_pkgconfigdir}/*.pc +%{_includedir}/*.h %files static %defattr(644,root,root,755) -%{_libdir}/libvpx*.a +%{_libdir}/libvpx.a %define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`) %changelog @@ -92,8 +132,8 @@ All persons listed below can be reached at <cvs_login>@pld-linux.org $Log$ -Revision 1.2 2010/05/19 21:55:47 sparky -- BR: doxygen, php-pcre, php-program (for doc generator), yasm +Revision 1.3 2010/05/20 14:05:54 arekm +- build on x86 Revision 1.1 2010/05/19 18:47:07 arekm - initial ================================================================ Index: packages/libvpx/libvpx-0.9.0-no-explicit-dep-on-static-lib.patch diff -u /dev/null packages/libvpx/libvpx-0.9.0-no-explicit-dep-on-static-lib.patch:1.1 --- /dev/null Thu May 20 16:06:03 2010 +++ packages/libvpx/libvpx-0.9.0-no-explicit-dep-on-static-lib.patch Thu May 20 16:05:54 2010 @@ -0,0 +1,11 @@ +diff -up libvpx-0.9.0/examples.mk.BAD libvpx-0.9.0/examples.mk +--- libvpx-0.9.0/examples.mk.BAD 2010-05-19 17:58:42.611058552 -0400 ++++ libvpx-0.9.0/examples.mk 2010-05-19 17:59:11.934181029 -0400 +@@ -129,7 +129,6 @@ BINS-$(NOT_MSVS) += $(addprefi + # Instantiate linker template for all examples. + CODEC_LIB=$(if $(CONFIG_DEBUG_LIBS),vpx_g,vpx) + $(foreach bin,$(BINS-yes),\ +- $(if $(BUILD_OBJS),$(eval $(bin): $(LIB_PATH)/lib$(CODEC_LIB).a))\ + $(if $(BUILD_OBJS),$(eval $(call linker_template,$(bin),\ + $(call objs,$($(notdir $(bin)).SRCS)) \ + -l$(CODEC_LIB) $(addprefix -l,$(CODEC_EXTRA_LIBS))\ ================================================================ ---- CVS-web: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/libvpx/libvpx.spec?r1=1.2&r2=1.3&f=u _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
