mpd: enable libmad globally
authorRosen Penev <rosenp@gmail.com>
Wed, 19 Aug 2020 04:02:27 +0000 (21:02 -0700)
committerRosen Penev <rosenp@gmail.com>
Wed, 19 Aug 2020 04:22:55 +0000 (21:22 -0700)
Since making ffmpeg dependent on BUILD_PATENTED, the full variant
becomes unable to play mp3s. Change that.

libmad is superior to mpg123 because of its faster decoding speed on
soft float systems and because in MPD, it supports streams (HTTP for
example).

ffmpeg supports streams as well. Avoid libmad in that case.

Minor Makefile cleanups.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
sound/mpd/Makefile

index 6c5cea9c50047a30fdab747b8a900c4da41356f7..b9d1e520d6e5c63cf877fd6fc3ee4a4f760d3c1d 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mpd
 PKG_VERSION:=0.21.25
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://www.musicpd.org/download/mpd/0.21/
@@ -34,7 +34,7 @@ define Package/mpd/Default
   TITLE:=Music Player Daemon
   URL:=https://www.musicpd.org/
   DEPENDS:= +zlib +libcurl +libpthread +libmpdclient +boost $(ICONV_DEPENDS) \
-           +AUDIO_SUPPORT:alsa-lib +libexpat +libflac +libid3tag +libfaad2 +libopus
+            +AUDIO_SUPPORT:alsa-lib +libexpat +libflac +libid3tag +libfaad2 +libopus
 endef
 
 define Package/mpd/Default/description
@@ -47,7 +47,8 @@ endef
 define Package/mpd-full
 $(call Package/mpd/Default)
   TITLE+= (full)
-  DEPENDS+= +BUILD_PATENTED:libffmpeg +libvorbis +libmms +libupnp +libshout +AUDIO_SUPPORT:pulseaudio-daemon +yajl
+  DEPENDS+= +AUDIO_SUPPORT:pulseaudio-daemon +libvorbis +libmms +libupnp +libshout +yajl \
+            +BUILD_PATENTED:libffmpeg +!BUILD_PATENTED:libmad
   PROVIDES:=mpd
   VARIANT:=full
 endef
@@ -98,10 +99,6 @@ define Package/mpd-avahi-service/conffiles
 /etc/avahi/services/mpd.service
 endef
 
-ifeq ($(CONFIG_AUDIO_SUPPORT),y)
-       TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib/pulseaudio
-endif
-
 MESON_ARGS += \
        -Ddocumentation=false \
        -Dtest=false \
@@ -110,7 +107,7 @@ MESON_ARGS += \
        -Ddaemon=false \
        -Dsystemd=disabled \
        -Dtcp=true \
-       -Dipv6=$(if $(CONFIG_IPV6),enabled,disabled) \
+       -Dipv6=$(if $(CONFIG_IPV6),en,dis)abled \
        -Dlocal_socket=true \
        -Ddsd=false \
        -Ddatabase=true \
@@ -169,7 +166,6 @@ MESON_ARGS += \
        -Dzlib=enabled \
        -Dzeroconf=disabled
 
-
 ifeq ($(BUILD_VARIANT),full)
 
   MESON_ARGS += \
@@ -177,7 +173,7 @@ ifeq ($(BUILD_VARIANT),full)
        -Dmms=enabled \
        -Dsoundcloud=enabled \
        -Dffmpeg=$(if $(CONFIG_BUILD_PATENTED),en,dis)abled \
-       -Dmad=disabled \
+       -Dmad=$(if $(CONFIG_BUILD_PATENTED),dis,en)abled \
        -Dtremor=disabled \
        -Dvorbis=enabled \
        -Dfifo=true \
@@ -186,6 +182,10 @@ ifeq ($(BUILD_VARIANT),full)
        -Drecorder=true \
        -Dshout=enabled \
        -Dyajl=enabled
+
+ifeq ($(CONFIG_AUDIO_SUPPORT),y)
+       TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib/pulseaudio
+endif
 endif
 
 ifeq ($(BUILD_VARIANT),mini)