PKGBUILDs/extra/openal/PKGBUILD

69 lines
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>
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)
2019-12-07 00:22:23 +00:00
pkgver=1.20.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)
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
2017-06-09 00:12:09 +00:00
source=("git+https://github.com/kcat/openal-soft#commit=$_commit"
2019-12-07 00:22:23 +00:00
sdl_sound.diff)
2018-05-12 16:40:41 +00:00
sha512sums=('SKIP'
2019-12-07 00:22:23 +00:00
'ebfdb316adbfbdfc6e6236a390dc33579e9eb06918ba110e436ffa91b4535c82ad225b1379587e1ba6b444abcc5f65d53e0360823a054f860bc57bc6f4b51334')
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-11-19 00:49:29 +00:00
2019-12-07 00:22:23 +00:00
# Fix building some things with our old SDL_sound (and SDL1)
git apply -3 ../sdl_sound.diff
2015-07-15 13:16:29 +00:00
}
build() {
2019-12-07 00:22:23 +00:00
cmake -Hopenal-soft -Bbuild \
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() {
2019-12-07 00:22:23 +00:00
DESTDIR="$pkgdir" cmake --build build --target 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
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)"
depends=("openal=$pkgver-$pkgrel" sdl2 sdl_sound ffmpeg)
2019-12-07 00:22:23 +00:00
optdepends=()
mv examples/* "$pkgdir"
2012-05-13 23:42:50 +00:00
}