PKGBUILDs/extra/openal/PKGBUILD
2019-02-18 15:12:06 +00:00

70 lines
2.2 KiB
Bash

# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Jason Chu <jchu@xentac.net>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - fix for unimplemented _FPU_EXTENDED
# - patch to use neon only on 32bit ARM
pkgbase=openal
pkgname=(openal openal-examples)
pkgver=1.19.1
pkgrel=2
pkgdesc="Cross-platform 3D audio library, software implementation"
arch=(i686 x86_64)
url="https://github.com/kcat/openal-soft"
license=(LGPL)
depends=(glibc)
makedepends=(alsa-lib libpulse fluidsynth portaudio jack qt5-base sdl2 sdl_sound ffmpeg
git cmake ninja)
_commit=6761218e51699f46bf25c377e65b3e9ea5e434b9 # tags/openal-soft-1.19.1
source=("git+https://github.com/kcat/openal-soft#commit=$_commit"
'no-fpuextended.patch'
'openal-soft-arm_neon-only-for-32bit.patch')
sha512sums=('SKIP'
'e782025501a62003ee7e63dcdb50343add8b1241b2efd606cc9a7f61a01d4625c777a647d7647b0b19798f247efca213bce3b3f40e22c8903355f7058e3d2011'
'e2bdf53d9bb154be83db134ad256333dcbb25715946e4f4098808200a3ff250d2ff492008ec64ddc2b0b67c84fca1392f568a455c819c487c7efc92793ede98a')
pkgver() {
cd openal-soft
git describe --tags | sed 's/^openal-soft-//;s/-/+/g'
}
prepare() {
mkdir build examples
cd openal-soft
git cherry-pick -n 8bacb5dfb8ef910586fcf5b5cd89526ec81061e8
patch -p1 -i "${srcdir}"/no-fpuextended.patch
patch -p0 -i "${srcdir}"/openal-soft-arm_neon-only-for-32bit.patch
}
build() {
cd build
cmake ../openal-soft -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_LIBDIR=lib
ninja
}
package_openal() {
optdepends=('qt5-base: alsoft-config GUI Configurator'
'fluidsynth: MIDI rendering')
DESTDIR="$pkgdir" ninja -C build install
install -Dt "$pkgdir/usr/share/doc/openal" -m644 openal-soft/docs/*
### Split openal-examples
cd "$pkgdir/usr/bin"
mv -vt "$srcdir/examples" alffplay alhrtf allatency alloopback almultireverb \
alplay alrecord alreverb alstream altonegen
}
package_openal-examples() {
pkgdesc+=" (example programs)"
depends=("openal=$pkgver-$pkgrel" sdl2 sdl_sound ffmpeg)
mkdir "$pkgdir/usr"
mv -v examples "$pkgdir/usr/bin"
}