diff --git a/extra/openal/PKGBUILD b/extra/openal/PKGBUILD index dd0e2e56d..66f5aac14 100644 --- a/extra/openal/PKGBUILD +++ b/extra/openal/PKGBUILD @@ -3,27 +3,27 @@ # Contributor: Jason Chu # ALARM: Kevin Mihelich -# - fix for unimplemented _FPU_EXTENDED -# - patch to use neon only on 32bit ARM +# - disable neon (-DALSOFT_CPUEXT_NEON=OFF) pkgbase=openal pkgname=(openal openal-examples) -pkgver=1.19.1 -pkgrel=2 +pkgver=1.20.0 +pkgrel=1 pkgdesc="Cross-platform 3D audio library, software implementation" -arch=(i686 x86_64) +arch=(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 +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 source=("git+https://github.com/kcat/openal-soft#commit=$_commit" - 'no-fpuextended.patch' - 'openal-soft-arm_neon-only-for-32bit.patch') + sdl_sound.diff) sha512sums=('SKIP' - 'e782025501a62003ee7e63dcdb50343add8b1241b2efd606cc9a7f61a01d4625c777a647d7647b0b19798f247efca213bce3b3f40e22c8903355f7058e3d2011' - 'e2bdf53d9bb154be83db134ad256333dcbb25715946e4f4098808200a3ff250d2ff492008ec64ddc2b0b67c84fca1392f568a455c819c487c7efc92793ede98a') + 'ebfdb316adbfbdfc6e6236a390dc33579e9eb06918ba110e436ffa91b4535c82ad225b1379587e1ba6b444abcc5f65d53e0360823a054f860bc57bc6f4b51334') pkgver() { cd openal-soft @@ -31,40 +31,38 @@ pkgver() { } 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 + # Fix building some things with our old SDL_sound (and SDL1) + git apply -3 ../sdl_sound.diff } build() { - cd build - cmake ../openal-soft -G Ninja \ + cmake -Hopenal-soft -Bbuild \ -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_LIBDIR=lib - ninja + -DCMAKE_BUILD_TYPE=None \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DALSOFT_CPUEXT_NEON=OFF + cmake --build build } package_openal() { - optdepends=('qt5-base: alsoft-config GUI Configurator' - 'fluidsynth: MIDI rendering') - - DESTDIR="$pkgdir" ninja -C build install + DESTDIR="$pkgdir" cmake --build build --target 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 + 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 } package_openal-examples() { pkgdesc+=" (example programs)" depends=("openal=$pkgver-$pkgrel" sdl2 sdl_sound ffmpeg) - - mkdir "$pkgdir/usr" - mv -v examples "$pkgdir/usr/bin" + optdepends=() + mv examples/* "$pkgdir" } diff --git a/extra/openal/no-fpuextended.patch b/extra/openal/no-fpuextended.patch deleted file mode 100644 index 58aae8172..000000000 --- a/extra/openal/no-fpuextended.patch +++ /dev/null @@ -1,35 +0,0 @@ -Description: Fix builds on architectures without _FPU_EXTENDED -Author: Nobuhiro Iwamatsu - ---- a/OpenAL32/Include/alu.h -+++ b/OpenAL32/Include/alu.h -@@ -224,6 +224,29 @@ - return a0*mu*mu2 + a1*mu2 + a2*mu + a3; - } - -+#if defined(_FPU_GETCW) && defined(_FPU_SETCW) -+ #ifndef _FPU_EXTENDED -+ #define _FPU_EXTENDED 0 -+ #endif -+ #ifndef _FPU_DOUBLE -+ #define _FPU_DOUBLE 0 -+ #endif -+ #ifndef _FPU_SINGLE -+ #define _FPU_SINGLE 0 -+ #endif -+ #ifndef _FPU_RC_NEAREST -+ #define _FPU_RC_NEAREST 0 -+ #endif -+ #ifndef _FPU_RC_DOWN -+ #define _FPU_RC_DOWN 0 -+ #endif -+ #ifndef _FPU_RC_UP -+ #define _FPU_RC_UP 0 -+ #endif -+ #ifndef _FPU_RC_ZERO -+ #define _FPU_RC_ZERO 0 -+ #endif -+#endif - - static __inline int SetMixerFPUMode(void) - { diff --git a/extra/openal/openal-soft-arm_neon-only-for-32bit.patch b/extra/openal/openal-soft-arm_neon-only-for-32bit.patch deleted file mode 100644 index c2ac53400..000000000 --- a/extra/openal/openal-soft-arm_neon-only-for-32bit.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- CMakeLists.txt.orig 2018-09-11 07:50:54.763206560 -0600 -+++ CMakeLists.txt 2018-09-11 07:51:56.040874745 -0600 -@@ -945,7 +945,7 @@ - # Check for ARM Neon support - OPTION(ALSOFT_REQUIRE_NEON "Require ARM Neon support" OFF) - CHECK_INCLUDE_FILE(arm_neon.h HAVE_ARM_NEON_H ${FPU_NEON_SWITCH}) --IF(HAVE_ARM_NEON_H) -+IF(HAVE_ARM_NEON_H AND CMAKE_SIZEOF_VOID_P EQUAL 4) # only 32-bit ARM - OPTION(ALSOFT_CPUEXT_NEON "Enable ARM Neon support" ON) - IF(ALSOFT_CPUEXT_NEON) - SET(HAVE_NEON 1) diff --git a/extra/openal/sdl_sound.diff b/extra/openal/sdl_sound.diff new file mode 100644 index 000000000..cd1f8d6c1 --- /dev/null +++ b/extra/openal/sdl_sound.diff @@ -0,0 +1,78 @@ +diff --git i/examples/alhrtf.c w/examples/alhrtf.c +index 2be28a91..dfa01e5c 100644 +--- i/examples/alhrtf.c ++++ w/examples/alhrtf.c +@@ -30,8 +30,6 @@ + #include + + #include "SDL_sound.h" +-#include "SDL_audio.h" +-#include "SDL_stdinc.h" + + #include "AL/al.h" + #include "AL/alc.h" +diff --git i/examples/allatency.c w/examples/allatency.c +index a61fb820..5705506a 100644 +--- i/examples/allatency.c ++++ w/examples/allatency.c +@@ -28,8 +28,6 @@ + #include + + #include "SDL_sound.h" +-#include "SDL_audio.h" +-#include "SDL_stdinc.h" + + #include "AL/al.h" + #include "AL/alext.h" +diff --git i/examples/almultireverb.c w/examples/almultireverb.c +index a90b3368..65e444f5 100644 +--- i/examples/almultireverb.c ++++ w/examples/almultireverb.c +@@ -35,8 +35,6 @@ + #include + + #include "SDL_sound.h" +-#include "SDL_audio.h" +-#include "SDL_stdinc.h" + + #include "AL/al.h" + #include "AL/alc.h" +diff --git i/examples/alplay.c w/examples/alplay.c +index 09ad96b4..01cf769d 100644 +--- i/examples/alplay.c ++++ w/examples/alplay.c +@@ -28,8 +28,6 @@ + #include + + #include "SDL_sound.h" +-#include "SDL_audio.h" +-#include "SDL_stdinc.h" + + #include "AL/al.h" + +diff --git i/examples/alreverb.c w/examples/alreverb.c +index d789dffe..a6dd141d 100644 +--- i/examples/alreverb.c ++++ w/examples/alreverb.c +@@ -28,8 +28,6 @@ + #include + + #include "SDL_sound.h" +-#include "SDL_audio.h" +-#include "SDL_stdinc.h" + + #include "AL/al.h" + #include "AL/alc.h" +diff --git i/examples/alstream.c w/examples/alstream.c +index 56505ddb..103492c7 100644 +--- i/examples/alstream.c ++++ w/examples/alstream.c +@@ -30,8 +30,6 @@ + #include + + #include "SDL_sound.h" +-#include "SDL_audio.h" +-#include "SDL_stdinc.h" + + #include "AL/al.h" +