From f275b602cd3fa5002af94ea6ffc5091176135091 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 24 Mar 2013 16:41:58 +0100 Subject: [PATCH] libvpx: cross build and dbg support. --- srcpkgs/libvpx/libvpx-devel.template | 3 --- srcpkgs/libvpx/template | 30 +++++++++++++++++++++------- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/srcpkgs/libvpx/libvpx-devel.template b/srcpkgs/libvpx/libvpx-devel.template index 7787efc8e9e..cbee97a4db7 100644 --- a/srcpkgs/libvpx/libvpx-devel.template +++ b/srcpkgs/libvpx/libvpx-devel.template @@ -2,9 +2,6 @@ # depends="libvpx>=$version" short_desc="${short_desc} - development files" -long_desc="${long_desc} - - This package contains files for development, headers, static libs, etc." do_install() { vmove usr/include usr diff --git a/srcpkgs/libvpx/template b/srcpkgs/libvpx/template index 543dc5ea4b4..4d10218f442 100644 --- a/srcpkgs/libvpx/template +++ b/srcpkgs/libvpx/template @@ -1,15 +1,11 @@ # Template file for 'libvpx' pkgname=libvpx version=1.1.0 +revision=2 wrksrc="libvpx-v${version}" distfiles="http://webm.googlecode.com/files/${pkgname}-v${version}.tar.bz2" subpackages="$pkgname-devel" -build_style=configure -configure_args="--enable-vp8 --enable-runtime-cpu-detect --enable-shared ---enable-postproc --enable-pic --disable-install-docs --disable-install-srcs" -make_install_target="DIST_DIR=${XBPS_DESTDIR}/${pkgname}-${version}/usr install" -makedepends="which perl>=0 yasm" -revision=1 +hostmakedepends="which perl yasm" short_desc="The VP8 Codec SDK" maintainer="Juan RP " homepage="http://www.webmproject.org" @@ -23,6 +19,26 @@ long_desc=" streams compressed with the Vorbis audio codec. The WebM file structure is based on the Matroska container." -post_install() { +disable_as_needed=yes + +do_configure() { + export LD="$CC" + if [ "$XBPS_CROSS_BUILD" ]; then + sed -e "s,generic-gnu,$XBPS_CROSS_TRIPLET," -i configure + _cross="--target=$XBPS_CROSS_TRIPLET" + fi + + ./configure --enable-vp8 --enable-runtime-cpu-detect --enable-shared \ + --enable-postproc --enable-pic --disable-install-docs \ + --disable-install-srcs ${_cross} +} + +do_build() { + make ${makejobs} +} + +do_install() { + make DIST_DIR=${DESTDIR}/usr install + vinstall LICENSE 644 usr/share/licenses/${pkgname} }