void-packages/srcpkgs/libvpx/template
2017-01-20 15:07:09 +01:00

61 lines
1.4 KiB
Bash

# Template file for 'libvpx'
pkgname=libvpx
version=1.6.1
revision=1
hostmakedepends="perl yasm"
short_desc="The VP8/VP9 Codecs"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
homepage="http://www.webmproject.org"
license="BSD"
distfiles="http://downloads.webmproject.org/releases/webm/libvpx-${version}.tar.bz2"
checksum=1c2c0c2a97fba9474943be34ee39337dee756780fc12870ba1dc68372586a819
# https://github.com/webmproject/libvpx/commit/d55724fae9cb27e070add7952394fc0427ef2061
case "$XBPS_TARGET_MACHINE" in
armv6*) broken="armv6hf not supported";;
esac
do_configure() {
export LD="$CC"
if [ "$CROSS_BUILD" ]; then
case "$XBPS_TARGET_MACHINE" in
aarch64*) _cross="--target=arm64-linux-gcc";;
armv7*) _cross="--target=armv7-linux-gcc";;
*) _cross="--target=generic-gnu";;
esac
fi
CFLAGS+=" -fPIC"
./configure --enable-vp8 --enable-vp9 \
--enable-runtime-cpu-detect --enable-shared \
--enable-postproc --enable-pic --disable-install-docs \
--disable-install-srcs --as=yasm ${_cross}
}
do_build() {
make ${makejobs}
}
do_install() {
make DIST_DIR=${DESTDIR}/usr install
vlicense LICENSE
}
libvpx-tools_package() {
short_desc+=" - tools"
pkg_install() {
vmove usr/bin
}
}
libvpx-devel_package() {
depends="libvpx>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
}
}