several changes to mpd Makefile
authorMirko Vogt <mirko@openwrt.org>
Tue, 20 Apr 2010 17:20:04 +0000 (17:20 +0000)
committerMirko Vogt <mirko@openwrt.org>
Tue, 20 Apr 2010 17:20:04 +0000 (17:20 +0000)
 - general cleanup, adjust dependencies -> make build more deterministic
 - enable AAC-support (link against libfaad2)
 - disable sqlite support, as this is only used for the "sticker" feature
 - make build depend on BUILD_PATENTED flag (affects aac/mp3 support)
 - provide avahi service file for mpd to have some kind of mdns support

SVN-Revision: 21054

sound/mpd/Makefile
sound/mpd/files/mpd.service [new file with mode: 0644]
sound/mpd/patches/diff.patch [new file with mode: 0644]

index a36de90f6af5f9fd6ce28bbb9f1d3688f5d30188..32307c2a777ac9755bddd213782ae2c46095da52 100644 (file)
@@ -22,8 +22,8 @@ include $(INCLUDE_DIR)/package.mk
 define Package/mpd
   SECTION:=sound
   CATEGORY:=Sound
-  DEPENDS:=+libflac +libid3tag +libmad +libvorbisidec +libpthread +glib2 \
-       +libmms +libcurl +libsqlite3 +libvorbis +libshout
+  # libvorbis and therewith libogg are needed for shout support
+  DEPENDS:=+libflac +BUILD_PATENTED:libfaad2 +BUILD_PATENTED:libmad +libvorbisidec +libpthread +glib2 +libmms +libcurl +libshout +alsa-lib +libvorbis
   TITLE:=Music Player Daemon
   URL:=http://www.musicpd.org/
 endef
@@ -38,42 +38,55 @@ define Package/mpd/conffiles
 /etc/mpd.conf
 endef
 
+TARGET_CFLAGS += \
+       -I$(STAGING_DIR)/usr/lib/libintl/include/ \
+       -I$(STAGING_DIR)/usr/lib/libiconv/include/
+
+TARGET_LDFLAGS += \
+       -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
+       -L$(STAGING_DIR)/usr/lib/libintl/lib/ \
+       -L$(STAGING_DIR)/usr/lib/libiconv/lib/
+
+# oggflac is not compatible with tremor
 CONFIGURE_ARGS+= \
-       --disable-audiofile \
+       --$(if $(CONFIG_BUILD_PATENTED),enable-mad,disable-mad) \
+       --enable-alsa \
+       --enable-audiofile \
        --disable-mpc \
-       --disable-aac \
+       --$(if $(CONFIG_BUILD_PATENTED),enable-aac,disable-aac) \
        --disable-lsr \
        --disable-ao \
        --disable-mvp \
-       --disable-lametest \
        --disable-lame-encoder \
+       --disable-ffmpeg \
        --enable-flac \
+       --enable-vorbis \
+       --disable-oggflac \
+       --disable-sqlite \
+       --enable-shout \
+       --enable-id3 \
        --enable-lastfm \
        --enable-mms \
-       --with-tremor="$(STAGING_DIR)/usr/lib" \
-
-ifeq ($(CONFIG_PACKAGE_kmod-sound-core),)
-       CONFIGURE_ARGS+= --disable-alsa
-endif
+       --enable-curl \
+       --disable-oss \
+       --enable-aac \
+       --with-zeroconf=no \
+       --disable-libOggFLACtest \
+       --disable-test \
+       --with-tremor=yes \
+       --with-faad="$(STAGING_DIR)/usr" \
 
 # use gcc instead of g++ to avoid unnecessary linking against libstdc++
 TARGET_CXX=$(TARGET_CC)
 
 TARGET_CFLAGS+=-std=gnu99
 
+
 CONFIGURE_VARS += \
-       CURL_LIBS="-L$(STAGING_DIR)/usr/lib -lssl -lcrypto -lcurl" \
-       CURL_CFLAGS="-I$(STAGING_DIR)/usr/include" \
-       ID3TAG_LIBS="$(TARGET_LDFLAGS) -lz -lid3tag" \
-       ID3TAG_CFLAGS="$(TARGET_CPPFLAGS)" \
+       FLAC_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/FLAC" \
        FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \
-       FLAC_CFLAGS="-I$(STAGING_DIR)/usr/include/FLAC" \
-       MAD_LIBS="$(TARGET_LDFLAGS) -lmad" \
-       MAD_CFLAGS="$(TARGET_CPPFLAGS)" \
-       OGGVORBIS_LIBS="$(TARGET_LDLFAGS) -lvorbisidec" \
-       OGGVORBIS_CFLAGS="$(TARGET_CPPFLAGS)" \
-       GLIB_CFLAGS="-I$(STAGING_DIR)/usr/include/glib-2.0 -I$(STAGING_DIR)/usr/lib/glib-2.0/include" \
-       GLIB_LIBS="$(TARGET_LDLFAGS) -L$(STAGING_DIR)/usr/lib/libintl/lib -lintl -L$(STAGING_DIR)/usr/lib/libiconv/lib -liconv -lglib-2.0 -lgthread-2.0 -pthread"
+       $(if $(CONFIG_BUILD_PATENTED),MAD_CFLAGS="$(TARGET_CFLAGS)") \
+       $(if $(CONFIG_BUILD_PATENTED),MAD_LIBS="$(TARGET_LDFLAGS) -lmad") \
 
 define Package/mpd/install
        $(INSTALL_DIR) $(1)/etc
diff --git a/sound/mpd/files/mpd.service b/sound/mpd/files/mpd.service
new file mode 100644 (file)
index 0000000..086a2bb
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
+<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
+<service-group>
+ <name replace-wildcards="yes">Music Player Daemon on %h</name>
+  <service>
+   <type>_mpd._tcp</type>
+   <port>6600</port>
+  </service>
+</service-group>
diff --git a/sound/mpd/patches/diff.patch b/sound/mpd/patches/diff.patch
new file mode 100644 (file)
index 0000000..7a9791f
--- /dev/null
@@ -0,0 +1,10 @@
+--- mpd-0.15.9/configure.orig  2010-04-13 22:40:51.998295776 +0200
++++ mpd-0.15.9/configure       2010-04-13 22:41:15.868300133 +0200
+@@ -9162,6 +9162,7 @@
+ # Check whether --with-faad was given.
+ if test "${with_faad+set}" = set; then :
+   withval=$with_faad;
++  faad_prefix=$with_faad;
+ else
+   faad_prefix=""
+ fi