diff mbox

openal: New package

Message ID 56100EB1.4010100@dawncrow.de
State Changes Requested
Headers show

Commit Message

André Zwing Oct. 3, 2015, 5:21 p.m. UTC
Signed-off-by: André Hentschel <nerv@dawncrow.de>
---
 package/Config.in          |  1 +
 package/openal/Config.in   | 16 ++++++++++++++++
 package/openal/openal.hash |  2 ++
 package/openal/openal.mk   | 26 ++++++++++++++++++++++++++
 4 files changed, 45 insertions(+)
 create mode 100644 package/openal/Config.in
 create mode 100644 package/openal/openal.hash
 create mode 100644 package/openal/openal.mk

Comments

Bernd Kuhls Oct. 4, 2015, 8:12 a.m. UTC | #1
Hi André,

several months ago I started hacking an openal package myself but
never finished it. Here I will compare my package to your version.

Am Sat, 03 Oct 2015 19:21:53 +0200 schrieb André Hentschel:

> diff --git a/package/openal/Config.in b/package/openal/Config.in
> new file mode 100644
> index 0000000..8eb177b
> --- /dev/null
> +++ b/package/openal/Config.in
> @@ -0,0 +1,16 @@
> +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.
> +
> +comment "openal needs a backend"
> +	depends on !BR2_PACKAGE_ALSA_LIB && \
> +	           !BR2_PACKAGE_PORTAUDIO && \
> +	           !BR2_PACKAGE_PULSEAUDIO

What about having a choice option defaulting to, for example, alsa?

Please add

	http://kcat.strangesoft.net/openal.html

to Config.in. Openal also needs this

	depends on BR2_TOOLCHAIN_HAS_THREADS

	comment "openal needs a toolchain w/ threads"
		depends on !BR2_TOOLCHAIN_HAS_THREADS

Did you test a static build? I have this in openal.mk:

ifeq ($(BR2_STATIC_LIBS),y)
OPENAL_CONF_OPTS += -DLIBTYPE=STATIC
endif

Regards, Bernd
André Zwing Oct. 4, 2015, 5:04 p.m. UTC | #2
Am 04.10.2015 um 10:12 schrieb Bernd Kuhls:
> Hi André,
> 
> several months ago I started hacking an openal package myself but
> never finished it. Here I will compare my package to your version.
> 
> Am Sat, 03 Oct 2015 19:21:53 +0200 schrieb André Hentschel:
> 
>> diff --git a/package/openal/Config.in b/package/openal/Config.in
>> new file mode 100644
>> index 0000000..8eb177b
>> --- /dev/null
>> +++ b/package/openal/Config.in
>> @@ -0,0 +1,16 @@
>> +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.
>> +
>> +comment "openal needs a backend"
>> +	depends on !BR2_PACKAGE_ALSA_LIB && \
>> +	           !BR2_PACKAGE_PORTAUDIO && \
>> +	           !BR2_PACKAGE_PULSEAUDIO
> 
> What about having a choice option defaulting to, for example, alsa?

I'll think about it

> Please add
> 
> 	http://kcat.strangesoft.net/openal.html

Done locally

> to Config.in. Openal also needs this
> 
> 	depends on BR2_TOOLCHAIN_HAS_THREADS
> 
> 	comment "openal needs a toolchain w/ threads"
> 		depends on !BR2_TOOLCHAIN_HAS_THREADS
> 
> Did you test a static build? I have this in openal.mk:
> 
> ifeq ($(BR2_STATIC_LIBS),y)
> OPENAL_CONF_OPTS += -DLIBTYPE=STATIC
> endif

Done that locally, thanks.
I'll reiterate in a week hopefully.
Thank you very much for the comments!
diff mbox

Patch

diff --git a/package/Config.in b/package/Config.in
index 79cbbe6..6d15dd1 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/openal/Config.in b/package/openal/Config.in
new file mode 100644
index 0000000..8eb177b
--- /dev/null
+++ b/package/openal/Config.in
@@ -0,0 +1,16 @@ 
+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.
+
+comment "openal needs a backend"
+	depends on !BR2_PACKAGE_ALSA_LIB && \
+	           !BR2_PACKAGE_PORTAUDIO && \
+	           !BR2_PACKAGE_PULSEAUDIO
diff --git a/package/openal/openal.hash b/package/openal/openal.hash
new file mode 100644
index 0000000..b28b2e2
--- /dev/null
+++ b/package/openal/openal.hash
@@ -0,0 +1,2 @@ 
+# Locally calculated
+sha256	2f3dcd313fe26391284fbf8596863723f99c65d6c6846dccb48e79cadaf40d5f  openal-soft-1.16.0.tar.bz2
diff --git a/package/openal/openal.mk b/package/openal/openal.mk
new file mode 100644
index 0000000..a67d675
--- /dev/null
+++ b/package/openal/openal.mk
@@ -0,0 +1,26 @@ 
+################################################################################
+#
+# 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
+
+$(eval $(cmake-package))