# Template file for 'libaom' pkgname=libaom version=3.8.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 " 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=@13b60e1dc7adacc9f62acf584de37b9c1774bff89b34bccd1a4a87f957a6e170 make_check=no # downloads stuff # 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 } }