PKGBUILDs/extra/openal/PKGBUILD

65 lines
1.7 KiB
Bash
Raw Normal View History

2020-11-05 00:49:19 +00:00
# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2012-05-13 23:42:50 +00:00
# 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>
2019-12-07 00:22:23 +00:00
# - disable neon (-DALSOFT_CPUEXT_NEON=OFF)
2012-05-13 23:42:50 +00:00
2015-11-19 00:49:29 +00:00
pkgbase=openal
pkgname=(openal openal-examples)
2020-11-05 00:49:19 +00:00
pkgver=1.21.0
pkgrel=1
2016-02-27 16:02:12 +00:00
pkgdesc="Cross-platform 3D audio library, software implementation"
2019-12-07 00:22:23 +00:00
arch=(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)
2019-12-07 00:22:23 +00:00
depends=(gcc-libs)
2020-11-05 00:49:19 +00:00
makedepends=(alsa-lib libpulse fluidsynth portaudio jack qt5-base sdl2
libsndfile ffmpeg libmysofa git cmake)
2019-12-07 00:22:23 +00:00
optdepends=('qt5-base: alsoft-config GUI Configurator'
'fluidsynth: MIDI rendering'
'libmysofa: makemhr tool')
2020-11-05 00:49:19 +00:00
_commit=c0cbe602ce66481a822ba16856052a47154f5cc5 # tags/openal-soft-1.21.0
source=("git+https://github.com/kcat/openal-soft#commit=$_commit")
sha512sums=('SKIP')
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() {
2017-06-09 00:12:09 +00:00
cd openal-soft
2015-07-15 13:16:29 +00:00
}
build() {
2020-11-05 00:49:19 +00:00
cmake -S openal-soft -B build \
2017-08-02 00:00:29 +00:00
-DCMAKE_INSTALL_PREFIX=/usr \
2019-12-07 00:22:23 +00:00
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_LIBDIR=lib \
-DALSOFT_CPUEXT_NEON=OFF
cmake --build build
2012-05-13 23:42:50 +00:00
}
2015-11-19 00:49:29 +00:00
package_openal() {
2020-11-05 00:49:19 +00:00
DESTDIR="$pkgdir" cmake --install build
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
2019-12-07 00:22:23 +00:00
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
2015-11-19 00:49:29 +00:00
}
package_openal-examples() {
pkgdesc+=" (example programs)"
2020-11-05 00:49:19 +00:00
depends=("openal=$pkgver-$pkgrel" sdl2 libsndfile ffmpeg)
2019-12-07 00:22:23 +00:00
optdepends=()
2020-11-05 00:49:19 +00:00
2019-12-07 00:22:23 +00:00
mv examples/* "$pkgdir"
2012-05-13 23:42:50 +00:00
}