libsdl-mixer 1.2.11: wrap the mp3 dependency in enterprise and bump PR
authorDenis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Sun, 5 Dec 2010 18:26:56 +0000 (19:26 +0100)
committerDenis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Sun, 5 Dec 2010 19:35:33 +0000 (20:35 +0100)
Distributing an MP3 encoder/decoder can be problematic
  in the countries where software patents are legal and enforceable.
So people not wanting to distribute or use mp3 can set ENTERPRISE_DISTRO
  in their local.conf to avoid the dependency.
As adding ENTERPRISE_DISTRO mask some dependencies, this patch should
  permit to build libsdl-mixer with enterprise set.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
recipes/libsdl/libsdl-mixer_1.2.11.bb

index 8c032ce..498f359 100644 (file)
@@ -1,10 +1,10 @@
 DESCRIPTION = "Simple DirectMedia Layer mixer library."
 SECTION = "libs"
 PRIORITY = "optional"
-DEPENDS = "virtual/libsdl flac libmikmod libvorbis libmad"
+DEPENDS = "virtual/libsdl flac libmikmod libvorbis  ${@base_conditional('ENTERPRISE_DISTRO', '1', '', 'libmad', d)}"
 LICENSE = "LGPL"
 
-PR = "r4"
+PR = "r5"
 
 SRC_URI = "http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-${PV}.tar.gz \
            file://fix-flac-madness.diff"
@@ -20,7 +20,7 @@ inherit autotools
 # Add support for runtime linking with libmad so we can use that for fixed point MP3 decoding.
 # Add support for runtime linking with libtremor so we can use that for fixed point OGG Vorbis decoding.
 
-EXTRA_OECONF = "--disable-music-mp3 --enable-music-ogg --enable-music-ogg-tremor --enable-music-mp3-mad-gpl LIBS=-L${STAGING_LIBDIR}"
+EXTRA_OECONF = "--disable-music-mp3 --enable-music-ogg --enable-music-ogg-tremor ${@base_conditional('ENTERPRISE_DISTRO', '1', '', '--enable-music-mp3-mad-gpl', d)} LIBS=-L${STAGING_LIBDIR}"
 
 do_compile() {
        # Override SDL_LIBS to include a linker rpath so the linker