several changes to mpd Makefile

- 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

git-svn-id: svn://svn.openwrt.org/openwrt/packages@21054 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
mirko 2010-04-20 17:20:04 +00:00
parent ee1807de2b
commit 83831badfe
3 changed files with 53 additions and 21 deletions

View 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

View File

@ -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>

View File

@ -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