From 7419a7e915ec2f9fdb49afbecb9034717f1155a4 Mon Sep 17 00:00:00 2001 From: Martchus Date: Wed, 14 Sep 2022 17:06:00 +0200 Subject: [PATCH] Import cubeb-git from AUR and apply fixes mentioned in AUR comment --- cubeb/git/PKGBUILD | 59 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 cubeb/git/PKGBUILD diff --git a/cubeb/git/PKGBUILD b/cubeb/git/PKGBUILD new file mode 100644 index 00000000..9232bef5 --- /dev/null +++ b/cubeb/git/PKGBUILD @@ -0,0 +1,59 @@ +# Maintainer: Zion Nimchuk +# Contributor: Martchus + +_pkgbase='cubeb' +pkgname=$_pkgbase-git +pkgver=r1534.dc511c6 +provides=("cubeb=$pkgver" 'libcubeb.so') +conflicts=('cubeb') +pkgrel=2 +pkgdesc="A cross platform audio library" +arch=('i686' 'x86_64') +url="https://github.com/mozilla/cubeb" +license=('GPL2') +depends=('sndio' 'alsa-lib' 'speexdsp') +makedepends=('git' 'cmake' 'libpulse' 'alsa-lib' 'jack2' 'sndio') +optdepends=('libpulse: for PulseAudio support' + 'jack2: for JACK support') +source=("$_pkgbase::git+https://github.com/mozilla/cubeb" + 'git+https://github.com/arsenm/sanitizers-cmake') +md5sums=('SKIP' + 'SKIP') + +pkgver() { + cd "$srcdir/$_pkgbase" + echo "r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)" +} + +prepare() { + cd "$srcdir/$_pkgbase" + mkdir -p build + + git submodule init + git config submodule.cmake/sanitizers-cmake.url "$srcdir/sanitizers-cmake" + git submodule update +} + +build() { + cd "$srcdir/$_pkgbase/build" + cmake .. \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TESTS=False \ + -DBUILD_SHARED_LIBS=true \ + -DCMAKE_INSTALL_LIBDIR=/usr/lib \ + -DUSE_PULSE=true \ + -DUSE_ALSA=true \ + -DUSE_JACK=true \ + -DUSE_SNDIO=true \ + -DUSE_OPENSL=false \ + -DUSE_KAI=false + # What even is kai? + + make +} + +package() { + cd "$srcdir/$_pkgbase/build" + make DESTDIR="$pkgdir/" install +}