PKGBUILDs/extra/openal/PKGBUILD

69 lines
1.8 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)
2021-02-24 12:59:58 +00:00
pkgver=1.21.1
2020-11-05 00:49:19 +00:00
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')
2021-02-24 12:59:58 +00:00
_commit=ae4eacf147e2c2340cc4e02a790df04c793ed0a9 # tags/1.21.1
2020-11-05 00:49:19 +00:00
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
}
2021-02-24 12:59:58 +00:00
_pick() {
local p="$1" f d; shift
for f; do
d="$srcdir/$p/${f#$pkgdir/}"
mkdir -p "$(dirname "$d")"
mv "$f" "$d"
rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
done
}
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
2021-02-24 12:59:58 +00:00
cd "$pkgdir"
_pick examples usr/bin/al{ffplay,hrtf,latency,loopback,multireverb}
_pick examples usr/bin/al{play,record,reverb,stream,tonegen}
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=()
mv examples/* "$pkgdir"
2012-05-13 23:42:50 +00:00
}