# Maintainer: Jan Alexander Steffens (heftig) # Contributor: Allan McRae # Contributor: Jason Chu # ALARM: Kevin Mihelich # - disable neon (-DALSOFT_CPUEXT_NEON=OFF) pkgbase=openal pkgname=(openal openal-examples) pkgver=1.20.0 pkgrel=1 pkgdesc="Cross-platform 3D audio library, software implementation" arch=(x86_64) url="https://github.com/kcat/openal-soft" license=(LGPL) depends=(gcc-libs) makedepends=(alsa-lib libpulse fluidsynth portaudio jack qt5-base sdl2 sdl_sound ffmpeg libmysofa git cmake) optdepends=('qt5-base: alsoft-config GUI Configurator' 'fluidsynth: MIDI rendering' 'libmysofa: makemhr tool') _commit=c0cf323e1d56ce605e90927324d2fdafcfbb564a # tags/openal-soft-1.20.0 source=("git+https://github.com/kcat/openal-soft#commit=$_commit" sdl_sound.diff) sha512sums=('SKIP' 'ebfdb316adbfbdfc6e6236a390dc33579e9eb06918ba110e436ffa91b4535c82ad225b1379587e1ba6b444abcc5f65d53e0360823a054f860bc57bc6f4b51334') pkgver() { cd openal-soft git describe --tags | sed 's/^openal-soft-//;s/-/+/g' } prepare() { cd openal-soft # Fix building some things with our old SDL_sound (and SDL1) git apply -3 ../sdl_sound.diff } build() { cmake -Hopenal-soft -Bbuild \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=None \ -DCMAKE_INSTALL_LIBDIR=lib \ -DALSOFT_CPUEXT_NEON=OFF cmake --build build } package_openal() { DESTDIR="$pkgdir" cmake --build build --target install install -Dt "$pkgdir/usr/share/doc/openal" -m644 openal-soft/docs/* ### Split openal-examples mkdir -p examples/usr/bin for f in \ alffplay alhrtf allatency alloopback almultireverb alplay alrecord \ alreverb alstream altonegen do mv -v "$pkgdir/usr/bin/$f" examples/usr/bin/$f done } package_openal-examples() { pkgdesc+=" (example programs)" depends=("openal=$pkgver-$pkgrel" sdl2 sdl_sound ffmpeg) optdepends=() mv examples/* "$pkgdir" }