openal: New package
PATCH 1/1 openal: New package
---
Tested on various archs and toolchains (uclibc, glibc, musl, extern, intern)
package/Config.in | 1 + package/openal/Config.in | 18 ++++++++++++++++++ package/openal/openal.hash | 2 ++ package/openal/openal.mk | 30 ++++++++++++++++++++++++++++++ 4 files changed, 51 insertions(+) create mode 100644 package/openal/Config.in create mode 100644 package/openal/openal.hash create mode 100644 package/openal/openal.mk
package/Config.in +1 -0
@@ -722,6 +722,7 @@ menu "Audio/Sound" source "package/opencore-amr/Config.in" source "package/opus/Config.in" source "package/opusfile/Config.in" + source "package/openal/Config.in" source "package/portaudio/Config.in" source "package/speex/Config.in" source "package/taglib/Config.in"
package/openal/Config.in new file +18 -0
@@ -0,0 +1,18 @@ +config BR2_PACKAGE_OPENAL + bool "openal" + # OpenAL needs a backend + depends on BR2_PACKAGE_ALSA_LIB || \ + BR2_PACKAGE_PORTAUDIO || \ + BR2_PACKAGE_PULSEAUDIO + help + OpenAL provides capabilities for playing audio in a virtual + 3D environment. Distance attenuation, doppler shift, and + directional sound emitters are among the features handled by + the API. + + http://kcat.strangesoft.net/openal.html + +comment "openal needs a backend" + depends on !BR2_PACKAGE_ALSA_LIB && \ + !BR2_PACKAGE_PORTAUDIO && \ + !BR2_PACKAGE_PULSEAUDIO
package/openal/openal.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally calculated +sha256 2f3dcd313fe26391284fbf8596863723f99c65d6c6846dccb48e79cadaf40d5f openal-soft-1.16.0.tar.bz2
package/openal/openal.mk new file +30 -0
@@ -0,0 +1,30 @@ +################################################################################ +# +# openal +# +################################################################################ + +OPENAL_VERSION = 1.16.0 +OPENAL_SOURCE = openal-soft-$(OPENAL_VERSION).tar.bz2 +OPENAL_SITE = http://kcat.strangesoft.net/openal-releases +OPENAL_LICENSE = LGPL +OPENAL_LICENSE_FILES = COPYING +OPENAL_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_ALSA_LIB),y) +OPENAL_DEPENDENCIES += alsa-lib +endif + +ifeq ($(BR2_PACKAGE_PORTAUDIO),y) +OPENAL_DEPENDENCIES += portaudio +endif + +ifeq ($(BR2_PACKAGE_PULSEAUDIO),y) +OPENAL_DEPENDENCIES += pulseaudio +endif + +ifeq ($(BR2_STATIC_LIBS),y) +OPENAL_CONF_OPTS += -DLIBTYPE=STATIC +endif + +$(eval $(cmake-package))
Signature · 1 line
1.9.1
PATCH 1/1 openal: New package
Dear Andr? Hentschel,
Thanks for this patch! It looks pretty good, but I have some comments (see below).
Quoted 1 line · Andr? Hentschel
Signed-off-by Andr?? Hentschel <[email protected]>
It seems like you have an UTF-8 configuration issue somewhere, since this ? got messed up into ??.
package/openal/Config.in line 6
Quoted 12 lines
package/openal/Config.in new file +6
-0@@ -0,0 +1,18 @@ +config BR2_PACKAGE_OPENAL + bool "openal" + # OpenAL needs a backend + depends on BR2_PACKAGE_ALSA_LIB || \ + BR2_PACKAGE_PORTAUDIO || \ + BR2_PACKAGE_PULSEAUDIO
I think in this case, we like when at least one backend is automatically selected. alsa-lib seems to be the simplest one, so:
select BR2_PACKAGE_ALSA_LIB if !BR2_PACKAGE_PORTAUDIO && !BR2_PACKAGE_PULSEAUDIO depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib
package/openal/Config.in line 18
Quoted 12 lines
package/openal/Config.in new file +12
-0+ help + OpenAL provides capabilities for playing audio in a virtual + 3D environment. Distance attenuation, doppler shift, and + directional sound emitters are among the features handled by + the API. + + http://kcat.strangesoft.net/openal.html + +comment "openal needs a backend" + depends on !BR2_PACKAGE_ALSA_LIB && \ + !BR2_PACKAGE_PORTAUDIO && \ + !BR2_PACKAGE_PULSEAUDIO
Replace this with:
comment "openal needs a toolchain w/ threads"
depends on !BR2_TOOLCHAIN_HAS_THREADS
Quoted 14 lines
package/openal/openal.hash new file +2
-0@@ -0,0 +1,2 @@ +# Locally calculated +sha256 2f3dcd313fe26391284fbf8596863723f99c65d6c6846dccb48e79cadaf40d5f openal-soft-1.16.0.tar.bz2package/openal/openal.mk new file +0
-0
package/openal/openal.mk line 10
Quoted 10 lines
package/openal/openal.mk new file +10
-0@@ -0,0 +1,30 @@ +################################################################################ +# +# openal +# +################################################################################ + +OPENAL_VERSION = 1.16.0 +OPENAL_SOURCE = openal-soft-$(OPENAL_VERSION).tar.bz2 +OPENAL_SITE = http://kcat.strangesoft.net/openal-releases +OPENAL_LICENSE = LGPL
This should be LGPLv2+.
package/openal/openal.mk line 15
Quoted 5 lines
package/openal/openal.mk new file +5
-0+OPENAL_LICENSE_FILES = COPYING +OPENAL_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_ALSA_LIB),y) +OPENAL_DEPENDENCIES += alsa-lib
Maybe:
OPENAL_CONF_OPTS += -DALSOFT_REQUIRE_ALSA=ON
elseOPENAL_CONF_OPTS += -DALSOFT_REQUIRE_ALSA=OFF
package/openal/openal.mk line 19
Quoted 4 lines
package/openal/openal.mk new file +4
-0+endif + +ifeq ($(BR2_PACKAGE_PORTAUDIO),y) +OPENAL_DEPENDENCIES += portaudio
ditto.
package/openal/openal.mk line 23
Quoted 4 lines
package/openal/openal.mk new file +4
-0+endif + +ifeq ($(BR2_PACKAGE_PULSEAUDIO),y) +OPENAL_DEPENDENCIES += pulseaudio
ditto.
This way, if it can't find Alsa even if we enabled it, we'll get an error.
Could you fix those minor issues and send an updated version of your patch?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 openal: New package
In reply to André HentschelDear Andr? Hentschel,
thanks for your contribution. Your patch has one more issue apart from the ones highlighted by Thomas. Please keep reading.
On 10/12/2015 08:32 PM, Andr? Hentschel wrote:
[snip]
package/Config.in menu "Audio/Sound" · line 725
Quoted 9 lines
package/Config.in +1
-0@@ -722,6 +722,7 @@ menu "Audio/Sound" source "package/opencore-amr/Config.in" source "package/opus/Config.in" source "package/opusfile/Config.in" + source "package/openal/Config.in"
This list of packages is alphabetically ordered, therefore openal should be higher. Please include that fix as well in the next version of your patch.
Also remember to add the version number to the subject-prefix of your patch, and provide a changelog between versions. This is explained here:
http://buildroot.org/downloads/manual/manual.html#submitting-patches
"21.5.2. Patch revision changelog"
Regards,
Vincent.
Quoted 3 lines
package/Config.in +0
-0source "package/portaudio/Config.in" source "package/speex/Config.in" source "package/taglib/Config.in"
[snip]