summaryrefslogtreecommitdiff
path: root/audio/xmms2/Makefile
blob: f80622496caf7c9ece6429b759bdd88d749631ca (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
# New ports collection makefile for:    xmms2
# Date created:				20 May 2005
# Whom:				  	Alexander Botero-Lowry <alex@foxybanana.com>
#
# $FreeBSD$
#

PORTNAME?=	xmms2
PORTVERSION=	0.6
PORTREVISION=	1
DISTVERSIONSUFFIX=DrMattDestruction
CATEGORIES?=	audio
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTVERSION}%20DrMattDestruction

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

USE_BZIP2=	yes
USE_PYTHON_BUILD=	yes

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

USE_LDCONFIG=	yes

MAN1=		nyxmms2.1 xmms2.1 xmms2-et.1 xmms2d.1 xmms2-launcher.1
MANCOMPRESSED=	yes
PLIST_SUB+=	INCLUDEDIR="include/${PORTNAME}" LIBDIR="lib/${PORTNAME}"

OPTIONS=	AIRPLAY	"Support output via Airport Express" off \
		AO	"Support to output via libao" off \
		APE	"Support to playback Monkey's Audio files" off \
		AVCODEC	"Support to playback files with avcodec" off \
		CDDA	"Support to playback AudioCD" off \
		CURL	"Support to playback files via HTTP" on \
		FAAD	"Support to playback AAC files" on \
		FAM	"Support to update Media Library on file change" off \
		FLAC	"Support to playback FLAC files" on \
		GVFS	"Support to playback files via GVFS" off \
		ICES	"Support to playback files to an icecast server" off \
		JACK	"Support to output via the Jack output server" off \
		MAD	"Support to playback MP3 files" on \
		MDNS_APPLE "Support to announce XMMS2d via mDNS (Apple)" on \
		MDNS_AVAHI "Support to announce XMMS2d via mDNS (Avahi)" off \
		MMS	"Support to playback streams via MMS" off \
		MODPLUG	"Support to playback MOD files" off \
		MPG123	"Support to playback MP3 files" off \
		MUSEPACK "Support to playback MPC files" off \
		OFA	"Support to collect MusicDNS fingerprints" off \
		PULSE	"Support to output via the PulseAudio" off \
		SAMBA	"Support to playback files via SMB" off \
		SID	"Support to playback SID files" off \
		SPEEX	"Support to playback SPEEX files" off \
		VISUAL	"Support for visualization plugins" off \
		VOCODER	"Phase Vocoder effect plugin" off \
		VORBIS	"Support to playback OGG files" on \
		WAVPACK	"Support to playback WV files" off \
		XML	"Support for XML based playlists (XSPF, RSS)" off
.endif # !XMMS_SLAVE

.include <bsd.port.pre.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 !defined(WITHOUT_AIRPLAY)
USE_OPENSSL=	yes
PLIST_SUB+=	AIRPLAY=""
.else
EXCLUDE+=	--without-plugins="airplay"
PLIST_SUB+=	AIRPLAY="@comment "
.endif

.if !defined(WITHOUT_AO)
LIB_DEPENDS+=	ao.3:${PORTSDIR}/audio/libao
PLIST_SUB+=	AO=""
.else
EXCLUDE+=	--without-plugins="ao"
PLIST_SUB+=	AO="@comment "
.endif

.if !defined(WITHOUT_APE)
LIB_DEPENDS+=	mac.2:${PORTSDIR}/audio/mac
PLIST_SUB+=	MAC=""
.else
EXCLUDE+=	--without-plugins="mac"
PLIST_SUB+=	MAC="@comment "
.endif

.if !defined(WITHOUT_AVCODEC)
LIB_DEPENDS+=	avutil.1:${PORTSDIR}/multimedia/ffmpeg
PLIST_SUB+=	AVCODEC=""
.else
EXCLUDE+=	--without-plugins="avcodec"
PLIST_SUB+=	AVCODEC="@comment "
.endif

.if !defined(WITHOUT_CDDA)
LIB_DEPENDS+=	cdio.8:${PORTSDIR}/sysutils/libcdio \
		discid.2:${PORTSDIR}/audio/libdiscid
PLIST_SUB+=	CDDA=""
.else
EXCLUDE+=	--without-plugins="cdda"
PLIST_SUB+=	CDDA="@comment "
.endif

.if !defined(WITHOUT_CURL)
LIB_DEPENDS+=	curl.5:${PORTSDIR}/ftp/curl
PLIST_SUB+=	CURL=""
.else
EXCLUDE+=	--without-plugins="curl" --without-plugins="icymetaint"
PLIST_SUB+=	CURL="@comment "
.endif

.if !defined(WITHOUT_FAAD)
LIB_DEPENDS+=	faad.2:${PORTSDIR}/audio/faad
PLIST_SUB+=	FAAD=""
.else
EXCLUDE+=	--without-plugins="faad" --without-plugins="mp4"
PLIST_SUB+=	FAAD="@comment "
.endif

.if !defined(WITHOUT_FAM)
USE_FAM=	yes
WANT_FAM_SYSTEM=gamin
PLIST_SUB+=	FAM=""
.else
EXCLUDE+=	--without-optionals="medialib-updater"
PLIST_SUB+=	FAM="@comment "
.endif

.if !defined(WITHOUT_FLAC)
LIB_DEPENDS+=	FLAC.10:${PORTSDIR}/audio/flac
PLIST_SUB+=	FLAC=""
.else
EXCLUDE+=	--without-plugins="flac"
PLIST_SUB+=	FLAC="@comment "
.endif

.if !defined(WITHOUT_GVFS)
USE_GNOME+=	gvfs
PLIST_SUB+=	GVFS=""
.else
EXCLUDE+=	--without-plugins="gvfs"
PLIST_SUB+=	GVFS="@comment "
.endif

.if !defined(WITHOUT_ICES)
LIB_DEPENDS+=	shout.5:${PORTSDIR}/audio/libshout2
PLIST_SUB+=	ICES=""
.else
EXCLUDE+=	--without-plugins="ices"
PLIST_SUB+=	ICES="@comment "
.endif

.if !defined(WITHOUT_JACK)
LIB_DEPENDS+=	jack.0:${PORTSDIR}/audio/jack
PLIST_SUB+=	JACK=""
.else
EXCLUDE+=	--without-plugins="jack"
PLIST_SUB+=	JACK="@comment "
.endif

.if !defined(WITHOUT_MAD)
LIB_DEPENDS+=	mad.2:${PORTSDIR}/audio/libmad
PLIST_SUB+=	MAD=""
.else
EXCLUDE+=	--without-plugins="mad"
PLIST_SUB+=	MAD="@comment "
.endif

.if !defined(WITHOUT_MDNS_APPLE) && !defined(WITHOUT_MDNS_AVAHI)
BROKEN=		You may choose either MDNS_APPLE or MDNS_AVAHI, but not both
.endif

.if !defined(WITHOUT_MDNS_APPLE)
EXCLUDE+=	--without-optionals="avahi"
LIB_DEPENDS+=	dns_sd:${PORTSDIR}/net/mDNSResponder
PLIST_SUB+=	MDNS_APPLE=""
.else
EXCLUDE+=	--without-optionals="dns_sd"
PLIST_SUB+=	MDNS_APPLE="@comment "
.endif

.if !defined(WITHOUT_MDNS_AVAHI)
EXCLUDE+=	--without-optionals="dns_sd"
LIB_DEPENDS+=	avahi-core:${PORTSDIR}/net/avahi-app
PLIST_SUB+=	MDNS_AVAHI=""
MAN1+=		xmms2-mdns-avahi.1
.else
EXCLUDE+=	--without-optionals="avahi"
PLIST_SUB+=	MDNS_AVAHI="@comment "
.endif

.if !defined(WITHOUT_MMS)
LIB_DEPENDS+=	mms.0:${PORTSDIR}/net/libmms
PLIST_SUB+=	MMS=""
.else
EXCLUDE+=	--without-plugins="mms"
PLIST_SUB+=	MMS="@comment "
.endif

.if !defined(WITHOUT_MODPLUG)
LIB_DEPENDS+=	modplug.0:${PORTSDIR}/audio/libmodplug
PLIST_SUB+=	MODPLUG=""
.else
EXCLUDE+=	--without-plugins="modplug"
PLIST_SUB+=	MODPLUG="@comment "
.endif

.if !defined(WITHOUT_MPG123)
LIB_DEPENDS+=	mpg123.20:${PORTSDIR}/audio/mpg123
PLIST_SUB+=	MPG123=""
.else
EXCLUDE+=	--without-plugins="mpg123"
PLIST_SUB+=	MPG123="@comment "
.endif

.if !defined(WITHOUT_MUSEPACK)
LIB_DEPENDS+=	mpcdec.5:${PORTSDIR}/audio/libmpcdec
PLIST_SUB+=	MUSEPACK=""
.else
EXCLUDE+=	--without-plugins="musepack"
PLIST_SUB+=	MUSEPACK="@comment "
.endif

.if !defined(WITHOUT_OFA)
LIB_DEPENDS+=	ofa.0:${PORTSDIR}/audio/libofa
PLIST_SUB+=	OFA=""
.else
EXCLUDE+=	--without-plugins="ofa"
PLIST_SUB+=	OFA="@comment "
.endif

.if !defined(WITHOUT_PULSE)
LIB_DEPENDS+=	pulse.0:${PORTSDIR}/audio/pulseaudio
PLIST_SUB+=	PULSE=""
.else
EXCLUDE+=	--without-plugins="pulse"
PLIST_SUB+=	PULSE="@comment "
.endif

.if !defined(WITHOUT_SAMBA)
LIB_DEPENDS+=	smbclient.0:${PORTSDIR}/net/samba-libsmbclient
PLIST_SUB+=	SAMBA=""
.else
EXCLUDE+=	--without-plugins="samba"
PLIST_SUB+=	SAMBA="@comment "
.endif

.if !defined(WITHOUT_SID)
LIB_DEPENDS+=	sidplay2.[0-9]:${PORTSDIR}/audio/libsidplay2
PLIST_SUB+=	SID=""
.else
EXCLUDE+=	--without-plugins="sid"
PLIST_SUB+=	SID="@comment "
.endif

.if !defined(WITHOUT_SPEEX)
LIB_DEPENDS+=	speex.1:${PORTSDIR}/audio/speex
PLIST_SUB+=	SPEEX=""
.else
EXCLUDE+=	--without-plugins="speex"
PLIST_SUB+=	SPEEX="@comment "
.endif

# xmms2-ripper
.if !defined(WITHOUT_VISUAL) && !defined(WITHOUT_VORBIS)
LIB_DEPENDS+=	vorbisenc.2:${PORTSDIR}/audio/libvorbis
.else
EXTRA_PATCHES+=	${FILESDIR}/extra-patch-src-clients-vistest-wscript
.endif

# XXX: shm support requires semtimedop(2)
.if !defined(WITHOUT_VISUAL)
USE_SDL=	yes
LIB_DEPENDS+=	visual-0.4.0:${PORTSDIR}/graphics/libvisual04
PLIST_SUB+=	VISUAL=""
.else
EXCLUDE+=	--without-optionals="vistest"
PLIST_SUB+=	VISUAL="@comment "
.endif

.if !defined(WITHOUT_VOCODER)
LIB_DEPENDS+=	fftw3f.5:${PORTSDIR}/math/fftw3-float
LIB_DEPENDS+=	samplerate.1:${PORTSDIR}/audio/libsamplerate
PLIST_SUB+=	VOCODER=""
.else
EXCLUDE+=	--without-plugins="vocoder"
PLIST_SUB+=	VOCODER="@comment "
.endif

.if !defined(WITHOUT_VORBIS)
LIB_DEPENDS+=	vorbis.4:${PORTSDIR}/audio/libvorbis
PLIST_SUB+=	VORBIS=""
.else
EXCLUDE+=	--without-plugins="vorbis"
PLIST_SUB+=	VORBIS="@comment "
.endif

.if !defined(WITHOUT_WAVPACK)
LIB_DEPENDS+=	wavpack.1:${PORTSDIR}/audio/wavpack
PLIST_SUB+=	WAVPACK=""
.else
EXCLUDE+=	--without-plugins="wavpack"
PLIST_SUB+=	WAVPACK="@comment "
.endif

.if !defined(WITHOUT_XML)
USE_GNOME+=	libxml2
PLIST_SUB+=	XML=""
.else
EXCLUDE+=	--without-plugins="xml" --without-plugins="rss" \
		--without-plugins="xspf"
PLIST_SUB+=	XML="@comment "
.endif

.endif # !XMMS2_SLAVE

do-configure:
	cd ${WRKSRC} && ./waf configure --conf-prefix=${LOCALBASE} \
		--prefix=${PREFIX} --with-mandir=${PREFIX}/man ${EXCLUDE}

do-build:
	cd ${WRKSRC} && ./waf build

do-install:
	cd ${WRKSRC} && ./waf install

.include <bsd.port.post.mk>