72 lines
1.7 KiB
Bash
72 lines
1.7 KiB
Bash
# Template file for 'libaom'
|
|
pkgname=libaom
|
|
version=3.7.1
|
|
revision=1
|
|
create_wrksrc=yes
|
|
build_style=cmake
|
|
configure_args="-DENABLE_DOCS=OFF -DBUILD_SHARED_LIBS=ON"
|
|
hostmakedepends="perl"
|
|
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"
|
|
# unstable checksum use content hash
|
|
checksum=@0d7a8c9863f705816fb3ecebbefe9976c6c20b7872b98a67d038cd1c4e56da9d
|
|
make_check=extended # takes a lot of time
|
|
|
|
# aom segfaults with default musl stack size
|
|
LDFLAGS="-Wl,-z,stack-size=2097152"
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
x86_64* | i686*) hostmakedepends+=" yasm" ;;
|
|
# no runtime detection
|
|
arm*) configure_args+=" -DENABLE_NEON=0" ;;
|
|
ppc64le*) ;;
|
|
ppc*) configure_args+=" -DENABLE_VSX=0" ;;
|
|
esac
|
|
|
|
if [ "$XBPS_CHECK_PKGS" = full ]; then
|
|
configure_args+=" -DENABLE_TESTS=ON"
|
|
else
|
|
configure_args+=" -DENABLE_TESTS=OFF"
|
|
fi
|
|
|
|
pre_check() {
|
|
export LIBAOM_TEST_DATA_PATH=/host/libaom-test-data
|
|
mkdir -p $LIBAOM_TEST_DATA_PATH
|
|
}
|
|
|
|
do_check() {
|
|
cd build
|
|
ninja ${makejobs} testdata
|
|
../test/examples.sh --bin-path "$PWD"
|
|
if [ "$XBPS_CHECK_PKGS" = full ]; then
|
|
ninja ${makejobs} runtests
|
|
fi
|
|
}
|
|
|
|
post_install() {
|
|
vlicense LICENSE
|
|
}
|
|
|
|
libaom-devel_package() {
|
|
depends="${sourcepkg}-${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
|
|
}
|
|
}
|