/[gentoo-x86]/media-sound/mpd/mpd-0.16.6.ebuild
Gentoo

Contents of /media-sound/mpd/mpd-0.16.6.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Jan 20 12:27:58 2012 UTC (2 years, 6 months ago) by ago
Branch: MAIN
Changes since 1.1: +3 -3 lines
force libmikmod to slot 0, as ssuominen suggested

(Portage version: 2.1.10.41/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-sound/mpd/mpd-0.16.6.ebuild,v 1.1 2011/12/04 13:01:02 hwoarang Exp $
4
5 EAPI=4
6 inherit eutils flag-o-matic linux-info multilib
7
8 DESCRIPTION="The Music Player Daemon (mpd)"
9 HOMEPAGE="http://www.musicpd.org"
10 SRC_URI="mirror://sourceforge/musicpd/${P}.tar.bz2"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
15 IUSE="aac +alsa ao audiofile bzip2 cdio cue +curl debug +fifo +ffmpeg flac
16 fluidsynth profile +id3tag inotify ipv6 jack lame lastfmradio mms libsamplerate
17 +mad mikmod modplug mpg123 musepack +network ogg openal oss pipe pulseaudio sid
18 sndfile sqlite tcpd twolame unicode vorbis wavpack wildmidi zeroconf zip"
19
20 REQUIRED_USE="|| ( alsa ao fifo jack network openal oss pipe pulseaudio )
21 || ( aac audiofile ffmpeg flac fluidsynth mad mikmod modplug mpg123 musepack
22 ogg flac sid vorbis wavpack wildmidi )
23 network? ( || ( audiofile flac lame twolame vorbis ) )
24 lastfmradio? ( curl )"
25
26 RDEPEND="!<sys-cluster/mpich2-1.4_rc2
27 dev-libs/glib:2
28 aac? ( media-libs/faad2 )
29 alsa? ( media-sound/alsa-utils )
30 ao? ( media-libs/libao[alsa?,pulseaudio?] )
31 audiofile? ( media-libs/audiofile )
32 bzip2? ( app-arch/bzip2 )
33 cdio? ( dev-libs/libcdio )
34 cue? ( media-libs/libcue )
35 curl? ( net-misc/curl )
36 ffmpeg? ( virtual/ffmpeg )
37 flac? ( media-libs/flac[ogg?] )
38 fluidsynth? ( media-sound/fluidsynth )
39 network? ( >=media-libs/libshout-2
40 !lame? ( !vorbis? ( media-libs/libvorbis ) ) )
41 id3tag? ( media-libs/libid3tag )
42 jack? ( media-sound/jack-audio-connection-kit )
43 lame? ( network? ( media-sound/lame ) )
44 mms? ( media-libs/libmms )
45 libsamplerate? ( media-libs/libsamplerate )
46 mad? ( media-libs/libmad )
47 mikmod? ( media-libs/libmikmod:0 )
48 modplug? ( media-libs/libmodplug )
49 mpg123? ( >=media-sound/mpg123-1.12.2 )
50 musepack? ( media-sound/musepack-tools )
51 ogg? ( media-libs/libogg )
52 openal? ( media-libs/openal )
53 pulseaudio? ( media-sound/pulseaudio )
54 sid? ( media-libs/libsidplay:2 )
55 sndfile? ( media-libs/libsndfile )
56 sqlite? ( dev-db/sqlite:3 )
57 tcpd? ( sys-apps/tcp-wrappers )
58 twolame? ( media-sound/twolame )
59 vorbis? ( media-libs/libvorbis )
60 wavpack? ( media-sound/wavpack )
61 wildmidi? ( media-sound/wildmidi )
62 zeroconf? ( net-dns/avahi[dbus] )
63 zip? ( dev-libs/zziplib )"
64 DEPEND="${RDEPEND}
65 dev-util/pkgconfig"
66
67 pkg_setup() {
68 use network || ewarn "Icecast and Shoutcast streaming needs networking."
69 use fluidsynth && ewarn "Using fluidsynth is discouraged by upstream."
70
71 enewuser mpd "" "" "/var/lib/mpd" audio
72
73 if use inotify; then
74 CONFIG_CHECK="~INOTIFY_USER"
75 ERROR_INOTIFY_USER="${P} requires inotify in-kernel support."
76 linux-info_pkg_setup
77 fi
78 }
79
80 src_prepare() {
81 cp -f doc/mpdconf.example doc/mpdconf.dist || die "cp failed"
82 epatch "${FILESDIR}"/${PN}-0.16.conf.patch
83 }
84
85 src_configure() {
86 local mpdconf="--enable-tcp --enable-un --disable-documentation
87 --disable-ffado --disable-gme --enable-largefile
88 --disable-mvp --docdir=${EPREFIX}/usr/share/doc/${PF}"
89
90 if use network; then
91 mpdconf+=" --enable-shout $(use_enable vorbis vorbis-encoder)
92 --enable-httpd-output $(use_enable lame lame-encoder)
93 $(use_enable twolame twolame-encoder)
94 $(use_enable audiofile wave-encoder)"
95 else
96 mpdconf+=" --disable-shout --disable-vorbis-encoder
97 --disable-httpd-output --disable-lame-encoder
98 --disable-twolame-encoder --disable-wave-encoder"
99 fi
100
101 if use flac && use ogg; then
102 mpdconf+=" --enable-oggflac"
103 else
104 mpdconf+=" --disable-oggflac"
105 fi
106
107 append-lfs-flags
108 append-ldflags "-L/usr/$(get_libdir)/sidplay/builders"
109
110 econf \
111 $(use_enable aac) \
112 $(use_enable alsa) \
113 $(use_enable ao) \
114 $(use_enable audiofile) \
115 $(use_enable bzip2) \
116 $(use_enable cdio iso9660) \
117 $(use_enable cue) \
118 $(use_enable curl) \
119 $(use_enable debug) \
120 $(use_enable ffmpeg) \
121 $(use_enable fifo) \
122 $(use_enable flac) \
123 $(use_enable fluidsynth) \
124 $(use_enable id3tag id3) \
125 $(use_enable inotify) \
126 $(use_enable ipv6) \
127 $(use_enable jack) \
128 $(use_enable lastfmradio lastfm) \
129 $(use_enable mms) \
130 $(use_enable libsamplerate lsr) \
131 $(use_enable mad) \
132 $(use_enable mikmod) \
133 $(use_enable modplug) \
134 $(use_enable mpg123) \
135 $(use_enable musepack mpc) \
136 $(use_enable openal) \
137 $(use_enable oss) \
138 $(use_enable pipe pipe-output) \
139 $(use_enable profile gprof) \
140 $(use_enable pulseaudio pulse) \
141 $(use_enable sid sidplay) \
142 $(use_enable sndfile sndfile) \
143 $(use_enable sqlite) \
144 $(use_enable tcpd libwrap) \
145 $(use_enable vorbis) \
146 $(use_enable wavpack) \
147 $(use_enable wildmidi) \
148 $(use_enable zip zzip) \
149 $(use_with zeroconf zeroconf avahi) \
150 ${mpdconf}
151 }
152
153 src_install() {
154 emake DESTDIR="${D}" install
155
156 insinto /etc
157 newins doc/mpdconf.dist mpd.conf
158
159 newinitd "${FILESDIR}"/mpd.init mpd
160
161 if use unicode; then
162 sed -i -e 's:^#filesystem_charset.*$:filesystem_charset "UTF-8":' \
163 "${D}"/etc/mpd.conf || die "sed failed"
164 fi
165
166 diropts -m0755 -o mpd -g audio
167 dodir /var/lib/mpd
168 keepdir /var/lib/mpd
169 dodir /var/lib/mpd/music
170 keepdir /var/lib/mpd/music
171 dodir /var/lib/mpd/playlists
172 keepdir /var/lib/mpd/playlists
173 }
174
175 pkg_postinst() {
176 elog "If you will be starting mpd via /etc/init.d/mpd, please make"
177 elog "sure that MPD's pid_file is unset."
178
179 # also change the homedir if the user has existed before
180 usermod -d "/var/lib/mpd" mpd
181 }

  ViewVC Help
Powered by ViewVC 1.1.20