# Maintainer: Jan Alexander Steffens (heftig) # Contributor: Chocobo1 # ALARM: Kevin Mihelich # - cmake with -DAOM_TARGET_CPU=generic for !AArch64 pkgbase=aom pkgname=(aom aom-docs) pkgver=3.6.0 pkgrel=1 pkgdesc="Alliance for Open Media video codec" url="https://aomedia.org/" arch=(x86_64) license=(BSD custom:PATENTS) depends=(gcc-libs) makedepends=(cmake ninja doxygen yasm) source=(https://storage.googleapis.com/aom-releases/libaom-$pkgver.tar.gz{,.asc}) b2sums=('bf97c74f3e59e3cc2431e7b7e3494beffde1b659d1a8f8775b4b47da0c7314b8bf5b9bdf14a9d1d47a8378271f49c9e26676e73509f9e910f1d5a01e79b575bc' 'SKIP') validpgpkeys=(B002F08B74A148DAA01F7123A48E86DB0B830498) # AOMedia release signing key prepare() { cd libaom-$pkgver } build() { # Upstream would like -O3 CFLAGS="${CFLAGS/-O2/-O3}" CXXFLAGS="${CXXFLAGS/-O2/-O3}" [[ $CARCH != "aarch64" ]] && CONFIG="-DAOM_TARGET_CPU=generic" cmake -S libaom-$pkgver -B build -G Ninja \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=None \ -DBUILD_SHARED_LIBS=1 \ -DENABLE_TESTS=0 $CONFIG cmake --build build } package_aom() { provides=(libaom.so) DESTDIR="$pkgdir" cmake --install build install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 libaom-$pkgver/{LICENSE,PATENTS} } package_aom-docs() { pkgdesc+=" (documentation)" depends=() mkdir -p "$pkgdir/usr/share/doc" cp -r build/docs/html "$pkgdir/usr/share/doc/$pkgbase" install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 libaom-$pkgver/{LICENSE,PATENTS} } # vim:set sw=2 sts=-1 et: