package/minetest: enable sound support
authorRomain Naour <romain.naour@gmail.com>
Thu, 13 Jul 2017 12:40:47 +0000 (14:40 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 21 Oct 2017 15:19:32 +0000 (17:19 +0200)
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/minetest/Config.in
package/minetest/minetest.mk

index a76c3197cfca6e8fa6a3be1c249a2ac7527e1614..4e8b1d0eefa5c0e05cafa5894c2747f943b320f6 100644 (file)
@@ -37,6 +37,19 @@ config BR2_PACKAGE_MINETEST_SERVER
        help
          Build Minetest server.
 
+config BR2_PACKAGE_MINETEST_SOUND
+       bool "enable sound"
+       depends on BR2_PACKAGE_MINETEST_CLIENT
+       depends on BR2_PACKAGE_OPENAL_ARCH_SUPPORTS
+       depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # openal
+       select BR2_PACKAGE_LIBVORBIS
+       select BR2_PACKAGE_OPENAL
+
+comment "sound support needs a toolchain w/ threads NPTL"
+       depends on BR2_PACKAGE_MINETEST_CLIENT
+       depends on BR2_PACKAGE_OPENAL_ARCH_SUPPORTS
+       depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL
+
 endif
 
 comment "minetest needs a toolchain w/ C++, gcc >= 4.7, threads"
index 528f1400b366e4bab08cf74a52a34ffca00a6f5a..44a28ce2389ccbb9b1d70781385f12dcbda2f4f2 100644 (file)
@@ -13,7 +13,6 @@ MINETEST_DEPENDENCIES = gmp irrlicht jsoncpp luajit sqlite zlib
 
 MINETEST_CONF_OPTS = \
        -DDEFAULT_RUN_IN_PLACE=OFF \
-       -DENABLE_SOUND=OFF \
        -DENABLE_GLES=OFF \
        -DENABLE_LUAJIT=ON \
        -DENABLE_CURSES=OFF \
@@ -38,6 +37,13 @@ else
 MINETEST_CONF_OPTS += -DBUILD_SERVER=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_MINETEST_SOUND),y)
+MINETEST_DEPENDENCIES += libvorbis openal
+MINETEST_CONF_OPTS += -DENABLE_SOUND=ON
+else
+MINETEST_CONF_OPTS += -DENABLE_SOUND=OFF
+endif
+
 ifeq ($(BR2_PACKAGE_FREETYPE),y)
 MINETEST_DEPENDENCIES += freetype
 MINETEST_CONF_OPTS += -DENABLE_FREETYPE=ON