blob: 7fcb2b89b3f7c4c8ccb9de62d316b221b17e2dcd (
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
|
# Maintainer: Marco Rubin <marco.rubin@protonmail.com>
pkgname=cubeb
pkgver=20230517
_commit=48689ae7a73caeb747953f9ed664dc71d2f918d8
pkgrel=1
pkgdesc="Cross platform audio library"
arch=('aarch64' 'armv7h' 'i486' 'i686' 'pentium4' 'x86_64')
url="https://github.com/mozilla/cubeb"
license=('ISC')
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-git")
source=(git+$url#commit=$_commit)
b2sums=('SKIP')
pkgver() {
cd $pkgname
git log -n1 --pretty='format:%cd' --date=format:'%Y%m%d' $_commit
}
prepare() {
cd $pkgname
# https://github.com/mozilla/cubeb/issues/736
sed -i '/cubeb_add_test(logging)/d' CMakeLists.txt
}
build() {
cd $pkgname
cmake -B build \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTS="$CHECKFUNC" \
-DBUNDLE_SPEEX=OFF \
-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() {
cd $pkgname
ctest --test-dir build -E 'audio|callback_ret|device_changed_callback|devices|duplex|latency|record|sanity|tone'
}
package() {
depends+=('libspeexdsp.so')
cd $pkgname
DESTDIR="$pkgdir" cmake --install build
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
|