blob: 0629f80919477040a901aabc8fc21f5ddc7b1b2f (
plain)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# Maintainer: Alexandre Bouvier <contact@amb.tf>
# Contributor: Zion Nimchuk <zionnimchuk@gmail.com>
_pkgname=cubeb
pkgname=$_pkgname-git
pkgver=0.2.r1506.gdd8a91f
pkgrel=1
pkgdesc="Cross platform audio library"
arch=('aarch64' 'armv7h' 'i486' 'i686' 'pentium4' 'x86_64')
url="https://github.com/mozilla/cubeb"
license=('ISC')
depends=('gcc-libs' 'glibc')
makedepends=(
'alsa-lib'
'cmake'
'doxygen'
'git'
'jack'
'libpulse'
'sndio'
'speexdsp'
)
checkdepends=('gtest')
optdepends=(
'alsa-lib: for ALSA backend'
'jack: for JACK backend'
'libpulse: for PulseAudio backend'
'sndio: for sndio backend'
)
provides=("$_pkgname=$pkgver" 'libcubeb.so')
conflicts=("$_pkgname")
source=("$_pkgname::git+$url.git")
b2sums=('SKIP')
pkgver() {
cd $_pkgname
git describe --long --tags | sed 's/^cubeb-//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
# https://github.com/mozilla/cubeb/issues/736
sed -i '/cubeb_add_test(logging)/d' $_pkgname/CMakeLists.txt
}
build() {
cmake -S $_pkgname -B build \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTS="$CHECKFUNC" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \
-DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DUSE_SANITIZERS=OFF \
-Wno-dev
cmake --build build
}
check() {
ctest --test-dir build -E 'audio|callback_ret|devices|latency|sanity|tone'
}
package() {
depends+=('libspeexdsp.so')
# shellcheck disable=SC2154
DESTDIR="$pkgdir" cmake --install build
install -Dm644 -t "$pkgdir"/usr/share/licenses/$pkgname $_pkgname/LICENSE
}
|