aboutsummaryrefslogtreecommitdiff
path: root/audio/xmms2/Makefile
blob: 6d0894368c7d0d5a0b8ec9689b55d466ba061a1a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
# Created by: Alexander Botero-Lowry <alex@foxybanana.com>
# $FreeBSD$

PORTNAME?=	xmms2
PORTVERSION=	0.8
DISTVERSIONSUFFIX=DrO_o
PORTREVISION?=	5
CATEGORIES?=	audio
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTVERSION}%20${DISTVERSIONSUFFIX}

MAINTAINER?=	madpilot@FreeBSD.org
COMMENT?=	Rewrite of xmms as a client/server system (developer release)

USE_PYTHON_BUILD=	yes
USES+=		pkgconfig tar:bzip2

.if !defined(XMMS2_SLAVE)
USE_GNOME=	glib20
USE_SQLITE=	3

USE_LDCONFIG=	yes

PLIST_SUB+=	INCLUDEDIR="include/${PORTNAME}" LIBDIR="lib/${PORTNAME}"

CPPFLAGS+=	-I${LOCALBASE}/include

OPTIONS_DEFINE=	AIRPLAY AO APE AVCODEC CDDA CURL ET FAAD FAM FLAC \
		GME GVFS ICES JACK MAD MDNS MMS \
		MODPLUG MPG123 MUSEPACK OFA PULSEAUDIO SAMBA SID \
		SNDFILE SPEEX TREMOR VISUAL VOCODER VORBIS WAVPACK XML
OPTIONS_SINGLE=	MDNS
OPTIONS_SINGLE_MDNS=	MDNS_APPLE MDNS_AVAHI
OPTIONS_DEFAULT=	CURL FAAD FLAC MAD MDNS MDNS_APPLE VORBIS

AIRPLAY_DESC=	Support output via Airport Express
AVCODEC_DESC=	Avcodevc playback support
CDDA_DESC=	AudioCD support
ET_DESC=	Install usage feedback reporting client
FAM_DESC=	Support to update Media Library on file change
GME_DESC=	Video game music files support
GVFS_DESC=	Playback files via GVFS
ICES_DESC=	Playback files to an icecast server
MDNS_DESC=	Announce XMMS2d via mDNS (Choose implementation)
MDNS_APPLE_DESC=	Use Apple mDNS implementation
MDNS_AVAHI_DESC=	Use Avahi mDNS implementation
OFA_DESC=	Collect MusicDNS fingerprints
SAMBA_DESC=	Playback files via SMB
SID_DESC=	Playback SID files
VISUAL_DESC=	Visualization plugins support
VOCODER_DESC=	Phase Vocoder effect plugin
WAVPACK_DESC=	Playback WV files
XML_DESC=	Support XML based playlists (XSPF, RSS)

.endif # !XMMS_SLAVE

.include <bsd.port.options.mk>

.if defined(XMMS2_SLAVE)
EXCLUDE+=	--without-xmms2d

.if   ${XMMS2_SLAVE} == "python"
EXCLUDE+=	--with-optionals="python"
.elif ${XMMS2_SLAVE} == "ruby"
EXCLUDE+=	--with-optionals="ruby"
.elif ${XMMS2_SLAVE} == "perl"
EXCLUDE+=	--with-optionals="perl"
.elif ${XMMS2_SLAVE} == "ruby-ecore"
EXCLUDE+=	--with-optionals="ruby" --with-optionals="xmmsclient-ecore"
.elif ${XMMS2_SLAVE} == "cpp"
EXCLUDE+=	--with-optionals="xmmsclient++" \
		--with-optionals="xmmsclient++-glib"
.endif

.else # XMMS2_SLAVE
EXCLUDE+=	--without-optionals="python" \
		--without-optionals="ruby" \
		--without-optionals="xmmsclient-ecore" \
		--without-optionals="xmmsclient++" \
		--without-optionals="xmmsclient++-glib" \
		--without-optionals="perl"
.endif # XMMS2_SLAVE

.if !defined(XMMS2_SLAVE)

.if ${PORT_OPTIONS:MAIRPLAY}
USE_OPENSSL=	yes
PLIST_SUB+=	AIRPLAY=""
.else
EXCLUDE+=	--without-plugins="airplay"
PLIST_SUB+=	AIRPLAY="@comment "
.endif

.if ${PORT_OPTIONS:MAO}
LIB_DEPENDS+=	libao.so:${PORTSDIR}/audio/libao
PLIST_SUB+=	AO=""
.else
EXCLUDE+=	--without-plugins="ao"
PLIST_SUB+=	AO="@comment "
.endif

.if ${PORT_OPTIONS:MAPE}
LIB_DEPENDS+=	libmac.so:${PORTSDIR}/audio/mac
PLIST_SUB+=	MAC=""
.else
EXCLUDE+=	--without-plugins="mac"
PLIST_SUB+=	MAC="@comment "
.endif

.if ${PORT_OPTIONS:MAVCODEC}
LIB_DEPENDS+=	libavutil.so:${PORTSDIR}/multimedia/ffmpeg
PLIST_SUB+=	AVCODEC=""
.else
EXCLUDE+=	--without-plugins="avcodec"
PLIST_SUB+=	AVCODEC="@comment "
.endif

.if ${PORT_OPTIONS:MCDDA}
LIB_DEPENDS+=	libcdio.so:${PORTSDIR}/sysutils/libcdio \
		libdiscid.so:${PORTSDIR}/audio/libdiscid
PLIST_SUB+=	CDDA=""
.else
EXCLUDE+=	--without-plugins="cdda"
PLIST_SUB+=	CDDA="@comment "
.endif

.if ${PORT_OPTIONS:MCURL}
LIB_DEPENDS+=	libcurl.so:${PORTSDIR}/ftp/curl
PLIST_SUB+=	CURL=""
.else
EXCLUDE+=	--without-plugins="curl" --without-plugins="icymetaint"
PLIST_SUB+=	CURL="@comment "
.endif

.if ${PORT_OPTIONS:MFAAD}
LIB_DEPENDS+=	libfaad.so:${PORTSDIR}/audio/faad
PLIST_SUB+=	FAAD=""
.else
EXCLUDE+=	--without-plugins="faad" --without-plugins="mp4"
PLIST_SUB+=	FAAD="@comment "
.endif

.if ${PORT_OPTIONS:MFAM}
USES+=		fam:gamin
PLIST_SUB+=	FAM=""
.else
EXCLUDE+=	--without-optionals="medialib-updater"
PLIST_SUB+=	FAM="@comment "
.endif

.if ${PORT_OPTIONS:MFLAC}
LIB_DEPENDS+=	libFLAC.so:${PORTSDIR}/audio/flac
PLIST_SUB+=	FLAC=""
.else
EXCLUDE+=	--without-plugins="flac"
PLIST_SUB+=	FLAC="@comment "
.endif

.if ${PORT_OPTIONS:MGME}
LIB_DEPENDS+=	libgme.so:${PORTSDIR}/audio/libgme
PLIST_SUB+=	GME=""
.else
EXCLUDE+=	--without-plugins="gme"
PLIST_SUB+=	GME="@comment "
.endif

.if ${PORT_OPTIONS:MGVFS}
USE_GNOME+=	gvfs
PLIST_SUB+=	GVFS=""
.else
EXCLUDE+=	--without-plugins="gvfs"
PLIST_SUB+=	GVFS="@comment "
.endif

.if ${PORT_OPTIONS:MICES}
LIB_DEPENDS+=	libshout.so:${PORTSDIR}/audio/libshout2
PLIST_SUB+=	ICES=""
.else
EXCLUDE+=	--without-plugins="ices"
PLIST_SUB+=	ICES="@comment "
.endif

.if ${PORT_OPTIONS:MJACK}
LIB_DEPENDS+=	libjack.so:${PORTSDIR}/audio/jack
PLIST_SUB+=	JACK=""
.else
EXCLUDE+=	--without-plugins="jack"
PLIST_SUB+=	JACK="@comment "
.endif

.if ${PORT_OPTIONS:MMAD}
LIB_DEPENDS+=	libmad.so:${PORTSDIR}/audio/libmad
PLIST_SUB+=	MAD=""
.else
EXCLUDE+=	--without-plugins="mad"
PLIST_SUB+=	MAD="@comment "
.endif

.if empty(PORT_OPTIONS:MMDNS)
EXCLUDE+=	--without-optionals="mdns"
.endif

.if ${PORT_OPTIONS:MMDNS_APPLE}
EXCLUDE+=	--with-mdns-backend="dns_sd"
LIB_DEPENDS+=	libdns_sd.so:${PORTSDIR}/net/mDNSResponder
PLIST_SUB+=	MDNS_APPLE=""
.else
PLIST_SUB+=	MDNS_APPLE="@comment "
.endif

.if ${PORT_OPTIONS:MMDNS_AVAHI}
EXCLUDE+=	--with-mdns-backend="avahi"
LIB_DEPENDS+=	libavahi-core.so:${PORTSDIR}/net/avahi-app
PLIST_SUB+=	MDNS_AVAHI=""
MAN1+=		xmms2-mdns-avahi.1
.else
PLIST_SUB+=	MDNS_AVAHI="@comment "
.endif

.if ${PORT_OPTIONS:MMMS}
LIB_DEPENDS+=	libmms.so:${PORTSDIR}/net/libmms
PLIST_SUB+=	MMS=""
.else
EXCLUDE+=	--without-plugins="mms"
PLIST_SUB+=	MMS="@comment "
.endif

.if ${PORT_OPTIONS:MMODPLUG}
LIB_DEPENDS+=	libmodplug.so:${PORTSDIR}/audio/libmodplug
PLIST_SUB+=	MODPLUG=""
.else
EXCLUDE+=	--without-plugins="modplug"
PLIST_SUB+=	MODPLUG="@comment "
.endif

.if ${PORT_OPTIONS:MMPG123}
LIB_DEPENDS+=	libmpg123.so:${PORTSDIR}/audio/mpg123
PLIST_SUB+=	MPG123=""
.else
EXCLUDE+=	--without-plugins="mpg123"
PLIST_SUB+=	MPG123="@comment "
.endif

.if ${PORT_OPTIONS:MMUSEPACK}
LIB_DEPENDS+=	libmpcdec.so:${PORTSDIR}/audio/musepack
PLIST_SUB+=	MUSEPACK=""
.else
EXCLUDE+=	--without-plugins="musepack"
PLIST_SUB+=	MUSEPACK="@comment "
.endif

.if ${PORT_OPTIONS:MOFA}
LIB_DEPENDS+=	libofa.so:${PORTSDIR}/audio/libofa
PLIST_SUB+=	OFA=""
.else
EXCLUDE+=	--without-plugins="ofa"
PLIST_SUB+=	OFA="@comment "
.endif

.if ${PORT_OPTIONS:MPULSEAUDIO}
LIB_DEPENDS+=	libpulse.so:${PORTSDIR}/audio/pulseaudio
PLIST_SUB+=	PULSE=""
.else
EXCLUDE+=	--without-plugins="pulse"
PLIST_SUB+=	PULSE="@comment "
.endif

.if ${PORT_OPTIONS:MSAMBA}
LIB_DEPENDS+=	libsmbclient.so:${PORTSDIR}/net/samba-libsmbclient
PLIST_SUB+=	SAMBA=""
.else
EXCLUDE+=	--without-plugins="samba"
PLIST_SUB+=	SAMBA="@comment "
.endif

.if ${PORT_OPTIONS:MSID}
LIB_DEPENDS+=	libsidplay2.so:${PORTSDIR}/audio/libsidplay2
PLIST_SUB+=	SID=""
.else
EXCLUDE+=	--without-plugins="sid"
PLIST_SUB+=	SID="@comment "
.endif

.if ${PORT_OPTIONS:MSNDFILE}
LIB_DEPENDS+=	libsndfile.so:${PORTSDIR}/audio/libsndfile
PLIST_SUB+=	SNDFILE=""
.else
EXCLUDE+=	--without-plugins="sndfile"
PLIST_SUB+=	SNDFILE="@comment "
.endif

.if ${PORT_OPTIONS:MSPEEX}
LIB_DEPENDS+=	libspeex.so:${PORTSDIR}/audio/speex
PLIST_SUB+=	SPEEX=""
.else
EXCLUDE+=	--without-plugins="speex"
PLIST_SUB+=	SPEEX="@comment "
.endif

.if ${PORT_OPTIONS:MTREMOR}
LIB_DEPENDS+=	libvorbisidec.so:${PORTSDIR}/audio/libtremor
PLIST_SUB+=	TREMOR=""
.else
EXCLUDE+=	--without-plugins="tremor"
PLIST_SUB+=	TREMOR="@comment "
.endif

# xmms2-ripper
.if ${PORT_OPTIONS:MVISUAL} && ${PORT_OPTIONS:MVORBIS}
LIB_DEPENDS+=	libvorbisenc.so:${PORTSDIR}/audio/libvorbis
.else
EXTRA_PATCHES+=	${FILESDIR}/extra-patch-src-clients-vistest-wscript
.endif

# XXX: shm support requires semtimedop(2)
.if ${PORT_OPTIONS:MVISUAL}
USE_SDL=	yes
LIB_DEPENDS+=	libvisual-0.4.so:${PORTSDIR}/graphics/libvisual04
.else
EXCLUDE+=	--without-optionals="vistest"
.endif

.if ${PORT_OPTIONS:MVISUAL} && ${EXCLUDE:M--with-vis-reference-clients}
PLIST_SUB+=	VISUAL=""
.else
PLIST_SUB+=	VISUAL="@comment "
.endif

.if ${PORT_OPTIONS:MVOCODER}
LIB_DEPENDS+=	libfftw3f.so:${PORTSDIR}/math/fftw3-float \
		libsamplerate.so:${PORTSDIR}/audio/libsamplerate
PLIST_SUB+=	VOCODER=""
.else
EXCLUDE+=	--without-plugins="vocoder"
PLIST_SUB+=	VOCODER="@comment "
.endif

.if ${PORT_OPTIONS:MVORBIS}
LIB_DEPENDS+=	libvorbis.so:${PORTSDIR}/audio/libvorbis
PLIST_SUB+=	VORBIS=""
.else
EXCLUDE+=	--without-plugins="vorbis"
PLIST_SUB+=	VORBIS="@comment "
.endif

.if ${PORT_OPTIONS:MWAVPACK}
LIB_DEPENDS+=	libwavpack.so:${PORTSDIR}/audio/wavpack
PLIST_SUB+=	WAVPACK=""
.else
EXCLUDE+=	--without-plugins="wavpack"
PLIST_SUB+=	WAVPACK="@comment "
.endif

.if ${PORT_OPTIONS:MXML}
USE_GNOME+=	libxml2
PLIST_SUB+=	XML=""
.else
EXCLUDE+=	--without-plugins="xml" --without-plugins="rss" \
		--without-plugins="xspf"
PLIST_SUB+=	XML="@comment "
.endif

.if ${PORT_OPTIONS:MET}
PLIST_SUB+=	ET=""
MAN1+=		xmms2-et.1
.else
EXCLUDE+=	--without-optionals="et"
PLIST_SUB+=	ET="@comment "
.endif

.endif # !XMMS2_SLAVE

post-patch:
	@${REINPLACE_CMD} -e "s|%%WRKSRC%%|${WRKSRC}|" ${WRKSRC}/wscript
.if ${PORT_OPTIONS:MVISUAL} && ${PORT_OPTIONS:MVORBIS}
	@${REINPLACE_CMD} -e "s|'vorbisenc',|'vorbisenc vorbis ogg',|" \
		${WRKSRC}/src/clients/vistest/wscript
.endif

do-configure:
	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} waf ${_MAKE_JOBS} configure \
		--conf-prefix=${LOCALBASE} --prefix=${PREFIX} \
		--mandir=${PREFIX}/man ${EXCLUDE}

do-build:
	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} waf ${_MAKE_JOBS} build

do-install:
	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} waf install --destdir=${STAGEDIR} --without-ldconfig
.if !defined(XMMS2_SLAVE)
	if [ ! -d ${STAGEDIR}${DATADIR}/scripts/startup.d ]; then \
		${MKDIR} ${STAGEDIR}${DATADIR}/scripts/startup.d; \
	fi
.endif

.include <bsd.port.mk>