From 987abb09765b4a6f53acb6aa9e3a83cb77ed21a8 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Mon, 24 Apr 2023 23:48:49 +0000 Subject: [PATCH] added extra/opus --- extra/opus/PKGBUILD | 77 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 extra/opus/PKGBUILD diff --git a/extra/opus/PKGBUILD b/extra/opus/PKGBUILD new file mode 100644 index 000000000..23a48820c --- /dev/null +++ b/extra/opus/PKGBUILD @@ -0,0 +1,77 @@ +# Maintainer: Jan Alexander Steffens (heftig) +# Contributor: Jan de Groot +# Contributor: DrZaius +# Contributor: pumbur + +# ALARM: Kevin Mihelich +# - upstream PR to fix ARM FTBFS + +pkgbase=opus +pkgname=( + opus + opus-docs +) +pkgver=1.4 +pkgrel=1 +pkgdesc="Totally open, royalty-free, highly versatile audio codec" +url="https://www.opus-codec.org/" +arch=(x86_64) +license=(BSD) +depends=( + glibc +) +makedepends=( + doxygen + git + meson +) +_commit=82ac57d9f1aaf575800cf17373348e45b7ce6c0d # tags/v1.4^0 +source=("git+https://github.com/xiph/opus#commit=$_commit" + "https://patch-diff.githubusercontent.com/raw/xiph/opus/pull/267.patch") +b2sums=('SKIP' + 'df0731c18eaebc87743a585c47add278f52f01a9f692f304f305cc8b9d3644f9d05c1d71e5fe51f9d9590b5b883a25338f341edb697a0a3a9fa4234014af1032') + +pkgver() { + cd opus + git describe --tags | sed 's/^v//;s/[^-]*-g/r&/;s/-/+/g' +} + +prepare() { + cd opus + patch -p1 -i ../267.patch +} + +build() { + local meson_options=( + -D asm=disabled + -D custom-modes=true + ) + + arch-meson opus build "${meson_options[@]}" + meson compile -C build +} + +check() { + meson test -C build --print-errorlogs +} + +package_opus() { + provides=(libopus.so) + + meson install -C build --destdir "$pkgdir" + install -Dt "$pkgdir/usr/share/aclocal" -m644 opus/opus.m4 + + install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 opus/COPYING + + mkdir -p doc/usr/share + mv {"$pkgdir",doc}/usr/share/doc +} + +package_opus-docs() { + pkgdesc+=" (documentation)" + depends=() + + mv doc/* "$pkgdir" +} + +# vim:set sw=2 sts=-1 et: