aports/main/opus/APKBUILD
2023-04-20 19:58:55 +02:00

52 lines
1.4 KiB
Plaintext

# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=opus
pkgver=1.4
pkgrel=0
pkgdesc="Codec designed for interactive speech and audio transmission over the Internet"
url="https://www.opus-codec.org/"
arch="all"
license="BSD-3-Clause"
makedepends="meson"
subpackages="$pkgname-dev $pkgname-doc"
source="https://github.com/xiph/opus/releases/download/v$pkgver/opus-$pkgver.tar.gz
arm32.patch
"
case "$CARCH" in
arm*)
# the tests pass, but with contention armhf is really slow, and they can take
# over 20 minutes on one test
options="$options !check"
;;
esac
# secfixes:
# 0:
# - CVE-2022-25345
build() {
CFLAGS="${CFLAGS/-Os/-O2}" \
CPPFLAGS="${CPPFLAGS/-Os/-O2}" \
abuild-meson \
-Db_lto=true \
-Dcustom-modes=true \
-Dtests="$(want_check && echo enabled || echo disabled)" \
. output
meson compile -C output
}
check() {
meson test -t10 --no-rebuild --print-errorlogs -C output
}
package() {
DESTDIR="$pkgdir" meson install --no-rebuild -C output
install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
sha512sums="
1ecd39e0add24de12823bf7c936bb67441228721e2cdae0edbfcf3cee0894bcc6edf2a1d0ca5cdfdad1565803bf39cc4c985ad32710c2a9582f850adeb5ca631 opus-1.4.tar.gz
4218a3bc31efb91aa6b9cb2ac5928e63c34fd3b5aac61c68fa13b5a5fee00f902a1a03c61735d0610b0ded8f5b5e789494ea24165383bd4501d6a16e422e8eb6 arm32.patch
"