void-packages/srcpkgs/libaom/template
2020-07-24 20:53:15 +02:00

63 lines
1.5 KiB
Bash

# Template file for 'libaom'
pkgname=libaom
version=2.0.0
revision=1
create_wrksrc=yes
build_style=cmake
configure_args="-DENABLE_DOCS=OFF -DBUILD_SHARED_LIBS=ON"
hostmakedepends="yasm doxygen perl python"
short_desc="AV1 Codec library implementation"
maintainer="Orphaned <orphan@voidlinux.org>"
license="BSD-2-Clause"
homepage="https://aomedia.org/"
changelog="https://aomedia.googlesource.com/aom/+/master/CHANGELOG"
distfiles="https://aomedia.googlesource.com/aom/+archive/v${version}.tar.gz"
checksum=@4e8a74ed7e05d5534ab0b72735fa670ce1a1e757bc4a777f07fdabf8629fced1
# aom segfaults with default musl stack size
LDFLAGS="-Wl,-z,stack-size=2097152"
case "$XBPS_TARGET_MACHINE" in
# no runtime detection
arm*) configure_args+=" -DENABLE_NEON=0" ;;
ppc64le*) ;;
ppc*) configure_args+=" -DENABLE_VSX=0" ;;
esac
if [ -z "$XBPS_CHECK_PKGS" ]; then
configure_args+=" -DENABLE_TESTS=OFF"
fi
pre_check() {
mkdir -p /host/libaom-test-data
export LIBAOM_TEST_DATA_PATH=/host/libaom-test-data
}
do_check() {
cd build
make runtests ${makejobs}
../test/examples.sh --bin-path examples
}
post_install() {
vlicense LICENSE
}
libaom-devel_package() {
depends="libaom-${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
vmove "usr/lib/*.a"
}
}
libaom-tools_package() {
short_desc+=" - utilities for enconding and decoding AV1"
pkg_install() {
vmove usr/bin/aomdec
vmove usr/bin/aomenc
}
}