PKGBUILDs/extra/openal/PKGBUILD

71 lines
2.2 KiB
Bash
Raw Normal View History

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