Skip to contentSkip to conversation

package/sdl_sound: add optional support for libmodplug

PATCH New Bernd Kuhls 2 participants 5 messages Feb 21, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/4 package/sdl_sound: add optional support for libmodplug

When libmodplug was compiled before, sdl_sound will use it as optional dependency:

$ output/host/usr/bin/x86_64-linux-readelf -a output/target/usr/lib/libSDL_sound-1.0.so.1.0.2 | grep NEEDED | sort
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libdl.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libmodplug.so.1]
[...]

---
v2: add --enable/disable-modplug (Thomas)

 package/sdl_sound/sdl_sound.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/sdl_sound/sdl_sound.mk +7 -0
index 416f381..faf88ae 100644
@@ -21,6 +21,13 @@ ifeq ($(BR2_PACKAGE_FLAC),y)
 SDL_SOUND_DEPENDENCIES += flac # is only used if ogg is also enabled
 endif
 
+ifeq ($(BR2_PACKAGE_LIBMODPLUG),y)
+SDL_SOUND_CONF_OPTS += --enable-modplug
+SDL_SOUND_DEPENDENCIES += libmodplug
+else
+SDL_SOUND_CONF_OPTS += --disable-modplug
+endif
+
 ifeq ($(BR2_PACKAGE_LIBVORBIS),y)
 SDL_SOUND_DEPENDENCIES += libvorbis
 endif
Signature · 1 line
2.7.0
#1 lore raw

PATCH v2 2/4 package/sdl_sound: FLAC support depends on libogg

For the flac package itself libogg is an optional dependency, but for flac support in sdl_sound libogg is mandatory:
http://hg.icculus.org/icculus/SDL_sound/file/394e3ec86164/configure.in#l263

To avoid compiling flac when libogg is disabled change the if-clause in this package to reflect the real dependency:

$ output/host/usr/bin/x86_64-linux-readelf -a output/target/usr/lib/libSDL_sound-1.0.so.1.0.2 | grep NEEDED | sort
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libdl.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libFLAC.so.8]
 0x0000000000000001 (NEEDED)             Shared library: [libmodplug.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libogg.so.0]
[...]

---
v2: add --enable/disable-flac (Thomas)

 package/sdl_sound/sdl_sound.mk | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
package/sdl_sound/sdl_sound.mk +5 -2
index faf88ae..6201967 100644
@@ -17,8 +17,11 @@ SDL_SOUND_DEPENDENCIES += libiconv
 endif
 
 # optional dependencies
-ifeq ($(BR2_PACKAGE_FLAC),y)
-SDL_SOUND_DEPENDENCIES += flac # is only used if ogg is also enabled
+ifeq ($(BR2_PACKAGE_FLAC)$(BR2_PACKAGE_LIBOGG),yy)
+SDL_SOUND_CONF_OPTS += --enable-flac
+SDL_SOUND_DEPENDENCIES += flac libogg
+else
+SDL_SOUND_CONF_OPTS += --disable-flac
 endif
 
 ifeq ($(BR2_PACKAGE_LIBMODPLUG),y)
Signature · 1 line
2.7.0
#2 lore raw

PATCH v2 3/4 package/sdl_sound: add --enable/disable-ogg

In reply to Bernd Kuhls

---
v2: first revision

 package/sdl_sound/sdl_sound.mk | 3 +++
 1 file changed, 3 insertions(+)
package/sdl_sound/sdl_sound.mk +3 -0
index 6201967..861c932 100644
@@ -32,7 +32,10 @@ SDL_SOUND_CONF_OPTS += --disable-modplug
 endif
 
 ifeq ($(BR2_PACKAGE_LIBVORBIS),y)
+SDL_SOUND_CONF_OPTS += --enable-ogg
 SDL_SOUND_DEPENDENCIES += libvorbis
+else
+SDL_SOUND_CONF_OPTS += --disable-ogg
 endif
 
 ifeq ($(BR2_PACKAGE_SPEEX),y)
Signature · 1 line
2.7.0
#3 lore raw

PATCH v2 4/4 package/sdl_sound: add --enable/disable-speex

In reply to Bernd Kuhls

---
v2: first revision

 package/sdl_sound/sdl_sound.mk | 3 +++
 1 file changed, 3 insertions(+)
package/sdl_sound/sdl_sound.mk +3 -0
index 861c932..4fa7d9b 100644
@@ -39,7 +39,10 @@ SDL_SOUND_CONF_OPTS += --disable-ogg
 endif
 
 ifeq ($(BR2_PACKAGE_SPEEX),y)
+SDL_SOUND_CONF_OPTS += --enable-speex
 SDL_SOUND_DEPENDENCIES += speex
+else
+SDL_SOUND_CONF_OPTS += --disable-speex
 endif
 
 SDL_SOUND_CONF_OPTS = \
Signature · 1 line
2.7.0
#4 lore raw

PATCH v2 1/4 package/sdl_sound: add optional support for libmodplug

In reply to Bernd Kuhls

Dear Bernd Kuhls,

Quoted 9 lines · Bernd Kuhls

When libmodplug was compiled before, sdl_sound will use it as optional dependency:

$ output/host/usr/bin/x86_64-linux-readelf -a output/target/usr/lib/libSDL_sound-1.0.so.1.0.2 | grep NEEDED | sort
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libdl.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libmodplug.so.1]
[...]
Quoted 3 lines

---
v2: add --enable/disable-modplug (Thomas)

All four patches applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com