/[gentoo-x86]/media-sound/xmms2/xmms2-0.8-r1.ebuild
Gentoo

Contents of /media-sound/xmms2/xmms2-0.8-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Sun Jul 1 17:25:26 2012 UTC (11 months, 2 weeks ago) by slyfox
Branch: MAIN
Changes since 1.6: +9 -3 lines
Workaround build failure when test failure occurs. Rerun tests in src_test(). It moves valgrind misconfiguration error to src_test() phase (bug #424377 by Diego Elio Pettenò).

(Portage version: 2.2.0_alpha110_p5/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/xmms2/xmms2-0.8-r1.ebuild,v 1.6 2012/05/05 08:56:07 mgorny Exp $
4
5 EAPI=3
6
7 inherit eutils python toolchain-funcs
8
9 MY_P="${P}DrO_o"
10
11 DESCRIPTION="X(cross)platform Music Multiplexing System. The new generation of the XMMS player."
12 HOMEPAGE="http://xmms2.org/wiki/Main_Page"
13 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2"
14 LICENSE="GPL-2 LGPL-2.1"
15
16 SLOT="0"
17 KEYWORDS="~alpha amd64 ppc x86"
18
19 IUSE="aac airplay +alsa ao asf avahi cdda curl cxx ffmpeg flac gvfs ices
20 jack mac mlib-update mms +mad modplug mp3 mp4 musepack ofa oss
21 perl phonehome pulseaudio python ruby
22 samba +server sid sndfile speex test +vorbis vocoder wavpack xml"
23
24 RDEPEND="server? (
25 >=dev-db/sqlite-3.3.4
26
27 aac? ( >=media-libs/faad2-2.0 )
28 airplay? ( dev-libs/openssl )
29 alsa? ( media-libs/alsa-lib )
30 ao? ( media-libs/libao )
31 avahi? ( net-dns/avahi[mdnsresponder-compat] )
32 cdda? ( dev-libs/libcdio
33 >=media-libs/libdiscid-0.1.1
34 >=media-sound/cdparanoia-3.9.8 )
35 curl? ( >=net-misc/curl-7.15.1 )
36 ffmpeg? ( virtual/ffmpeg )
37 flac? ( media-libs/flac )
38 gvfs? ( gnome-base/gnome-vfs )
39 ices? ( media-libs/libogg
40 media-libs/libshout
41 media-libs/libvorbis )
42 jack? ( >=media-sound/jack-audio-connection-kit-0.101.1 )
43 mac? ( media-sound/mac )
44 mms? ( virtual/ffmpeg
45 >=media-libs/libmms-0.3 )
46 modplug? ( media-libs/libmodplug )
47 mad? ( media-libs/libmad )
48 mp3? ( >=media-sound/mpg123-1.5.1 )
49 musepack? ( media-sound/musepack-tools )
50 ofa? ( media-libs/libofa )
51 pulseaudio? ( media-sound/pulseaudio )
52 samba? ( net-fs/samba[smbclient] )
53 sid? ( media-sound/sidplay
54 media-libs/resid )
55 sndfile? ( media-libs/libsndfile )
56 speex? ( media-libs/speex
57 media-libs/libogg )
58 vorbis? ( media-libs/libvorbis )
59 vocoder? ( sci-libs/fftw media-libs/libsamplerate )
60 wavpack? ( media-sound/wavpack )
61 xml? ( dev-libs/libxml2 )
62 )
63
64 >=dev-libs/glib-2.12.9
65 cxx? ( >=dev-libs/boost-1.32 )
66 perl? ( >=dev-lang/perl-5.8.8 )
67 python? ( dev-lang/python )
68 ruby? ( >=dev-lang/ruby-1.8.5 ) "
69
70 DEPEND="${RDEPEND}
71 dev-lang/python
72 python? ( dev-python/pyrex )
73 perl? ( virtual/perl-Module-Build )
74 virtual/pkgconfig
75 test? ( dev-util/cunit )
76 "
77
78 S="${WORKDIR}/${MY_P}"
79
80 # use_enable() is taken as proto
81 # $1 - useflag
82 # $2 - xmms2 option/plugin name (equals to $1 if not set)
83
84 xmms2_flag() {
85 [[ -z $1 ]] && eerror "!!! empty arg. usage: xmms2_flag <USEFLAG> [<xmms2_flagname>]."
86
87 local UWORD=${2:-$1}
88
89 case $1 in
90 ENABLED)
91 echo ",${UWORD}"
92 ;;
93 DISABLED)
94 ;;
95 *)
96 use $1 && echo ",${UWORD}"
97 ;;
98 esac
99 }
100
101 pkg_setup() {
102 python_pkg_setup
103 }
104
105 src_prepare() {
106 ./waf # inflate waf
107 cd .waf* || die
108 epatch "${FILESDIR}/${PN}"-0.8DrO_o-waflib-fix-perl.patch
109 cd "${S}"
110 }
111
112 src_configure() {
113 # ./configure alike options.
114 local waf_params="--prefix=/usr \
115 --libdir=/usr/$(get_libdir) \
116 --with-target-platform=${CHOST} \
117 --mandir=/usr/share/man \
118 --infodir=/usr/share/info \
119 --datadir=/usr/share \
120 --sysconfdir=/etc \
121 --localstatedir=/var/lib"
122
123 local optionals=""
124 local plugins=""
125 if ! use server ; then
126 waf_params+=" --without-xmms2d"
127 else
128 # some fun static mappings:
129 local option_map=( # USE # sorted xmms2 option flag (same, as USE if empty)
130 "phonehome et"
131 "ENABLED launcher"
132 "mlib-update medialib-updater"
133 "ENABLED nycli"
134 " perl"
135 "ENABLED pixmaps"
136 " python"
137 " ruby"
138 "DISABLED tests"
139 "DISABLED vistest"
140 "cxx xmmsclient++"
141 "cxx xmmsclient++-glib"
142 "DISABLED xmmsclient-cf"
143 "DISABLED xmmsclient-ecore" # not in tree
144
145 "test tests"
146 )
147
148 local plugin_map=( # USE # sorted xmms2 plugin flag (same, as USE if empty)
149 " alsa"
150 " airplay"
151 " ao"
152 "ffmpeg apefile"
153 "ffmpeg avcodec"
154 " asf"
155 "ENABLED asx"
156 " cdda"
157 "DISABLED coreaudio" # MacOS only?
158 " curl"
159 "ENABLED cue"
160 "avahi daap"
161 "ENABLED diskwrite"
162 "ENABLED equalizer"
163 "aac faad"
164 "ENABLED file"
165 " flac"
166 "ffmpeg flv"
167 "ffmpeg tta"
168 "DISABLED gme" # not in tree
169 " gvfs"
170 "ENABLED html"
171 " ices"
172 "ENABLED icymetaint"
173 "ENABLED id3v2"
174 " jack"
175 "ENABLED karaoke"
176 "ENABLED m3u"
177 " mac"
178 " mms"
179 " mad"
180 " mp4" # bug #387961 (aac, mp3, ape can sit there)
181 "mp3 mpg123"
182 " modplug"
183 " musepack"
184 "DISABLED nms" # not in tree
185 "ENABLED normalize"
186 "ENABLED null"
187 "ENABLED nulstripper"
188 " ofa"
189 " oss"
190 "ENABLED pls"
191 "pulseaudio pulse"
192 "ENABLED replaygain"
193 "xml rss"
194 " samba"
195 "DISABLED sc68" #not in tree
196 " sid"
197 " sndfile"
198 " speex"
199 "DISABLED sun" # {Open,Net}BSD only
200 "DISABLED tremor" # not in tree
201 " vorbis"
202 " vocoder"
203 "ffmpeg tta"
204 "ENABLED wave"
205 "DISABLED waveout" # windows only
206 " wavpack"
207 "xml xspf"
208 "ENABLED xml"
209 )
210
211 local option
212 for option in "${option_map[@]}"; do
213 optionals+=$(xmms2_flag $option)
214 done
215
216 local plugin
217 for plugin in "${plugin_map[@]}"; do
218 plugins+=$(xmms2_flag $plugin)
219 done
220 fi # ! server
221
222 # pass them explicitely even if empty as we try to avoid magic deps
223 waf_params+=" --with-optionals=${optionals:1}" # skip first ',' if yet
224 waf_params+=" --with-plugins=${plugins:1}"
225
226 CC="$(tc-getCC)" \
227 CPP="$(tc-getCPP)" \
228 AR="$(tc-getAR)" \
229 RANLIB="$(tc-getRANLIB)" \
230 CXX="$(tc-getCXX)" \
231 ./waf configure ${waf_params} || die "'waf configure' failed"
232 }
233
234 src_compile() {
235 # waf is very keen to run tests in build phase (bug #424377) but
236 # it does not bother running tests twice, so the hack below works:
237 ./waf build || ./waf build || die "waf build failed"
238 }
239
240 src_test() {
241 # rerun tests
242 ./waf --alltests || die "waf --alltests failed"
243 }
244
245 src_install() {
246 ./waf --without-ldconfig --destdir="${D}" install || die "'waf install' failed"
247 dodoc AUTHORS TODO README
248
249 use python && python_need_rebuild
250 }
251
252 pkg_postinst() {
253 elog "This version is built on experimental development code"
254 elog "If you encounter any errors report them at http://bugs.xmms2.xmms.se"
255 elog "and visit #xmms2 at irc://irc.freenode.net"
256 if use phonehome ; then
257 einfo ""
258 einfo "The phone-home client xmms2-et was activated"
259 einfo "This client sends anonymous usage-statistics to the xmms2"
260 einfo "developers which may help finding bugs"
261 einfo "Disable the phonehome useflag if you don't like that"
262 fi
263
264 use python && python_mod_optimize xmmsclient
265 }
266
267 pkg_postrm() {
268 use python && python_mod_cleanup xmmsclient
269 }

  ViewVC Help
Powered by ViewVC 1.1.20