aboutsummaryrefslogtreecommitdiffstats
path: root/community/faudio/APKBUILD
blob: 1715ca7acff5db2eef098c5f667332c8a22036f0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=faudio
pkgver=21.06
pkgrel=0
pkgdesc="Accuracy-focused XAudio reimplementation for open platforms"
url="https://fna-xna.github.io/"
arch="all !mips !mips64"
license="Zlib"
makedepends="cmake sdl2-dev"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/FNA-XNA/FAudio/archive/$pkgver.tar.gz"
builddir="$srcdir/FAudio-$pkgver"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=1 \
		-DBUILD_TESTS=1
	make -C build
}

check() {
	cd build
	./faudio_tests
}

package() {
	make -C build DESTDIR="$pkgdir" install
}

sha512sums="
107eae5174e9485129be50b46d2349cf54420b10e12c89cc3e241b8a2f0fdf7cfb7981f88edd9ccd2f40e2f6afc95ef18c29b71873b61ed4b1645df67d6f842c  faudio-21.06.tar.gz
"