aboutsummaryrefslogtreecommitdiffstats
path: root/audio/xmms2/Makefile
blob: 19a21650043854f7666724783864aca6feb83ffe (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
# Created by: Alexander Botero-Lowry <alex@foxybanana.com>
# $FreeBSD$

PORTNAME?=  xmms2
PORTVERSION=    0.8
DISTVERSIONSUFFIX=  DrO_o
PORTREVISION?=  31
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)

USES+=      pkgconfig tar:bzip2 waf

CONFIGURE_ARGS+=    --conf-prefix=${LOCALBASE} \
        --mandir=${MANPREFIX}/man \
        --without-plugins="ofa"
INSTALL_TARGET= install --without-ldconfig

.if !defined(XMMS2_SLAVE)
USE_GNOME=  glib20
USES+=      readline sqlite

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 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
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
SAMBA_DESC= Playback files via SMB
SID_DESC=   Playback SID files
VISUAL_DESC=    Visualization plugins support
VOCODER_DESC=   Phase Vocoder effect plugin
XML_DESC=   Support XML based playlists (XSPF, RSS)

OPTIONS_SUB=    yes

AIRPLAY_USES=       ssl
AIRPLAY_CONFIGURE_OFF=  --without-plugins="airplay"

AO_LIB_DEPENDS=     libao.so:audio/libao
AO_CONFIGURE_OFF=   --without-plugins="ao"

APE_LIB_DEPENDS=    libmac.so:audio/mac
APE_CONFIGURE_OFF=  --without-plugins="mac"

AVCODEC_LIB_DEPENDS=    libavutil.so:multimedia/ffmpeg
AVCODEC_CONFIGURE_OFF=  --without-plugins="avcodec"

CDDA_LIB_DEPENDS=   libcdio.so:sysutils/libcdio \
            libcdio_cdda.so:sysutils/libcdio-paranoia \
            libdiscid.so:audio/libdiscid
CDDA_CONFIGURE_OFF= --without-plugins="cdda"

CURL_LIB_DEPENDS=   libcurl.so:ftp/curl
CURL_CONFIGURE_OFF= --without-plugins="curl" --without-plugins="icymetaint"

FAAD_LIB_DEPENDS=   libfaad.so:audio/faad
FAAD_CONFIGURE_OFF= --without-plugins="faad" --without-plugins="mp4"

FAM_USES=       fam:gamin
FAM_CONFIGURE_OFF=  --without-optionals="medialib-updater"

FLAC_LIB_DEPENDS=   libFLAC.so:audio/flac

GME_LIB_DEPENDS=    libgme.so:audio/libgme
GME_CONFIGURE_OFF=  --without-plugins="gme"

GVFS_USE=       GNOME=gvfs
GVFS_CONFIGURE_OFF= --without-plugins="gvfs"

ICES_LIB_DEPENDS=   libshout.so:audio/libshout
ICES_CONFIGURE_OFF= --without-plugins="ices"

JACK_LIB_DEPENDS=   libjack.so:audio/jack
JACK_CONFIGURE_OFF= --without-plugins="jack"

MAD_LIB_DEPENDS=    libmad.so:audio/libmad
MAD_CONFIGURE_OFF=  --without-plugins="mad"

MDNS_CONFIGURE_OFF= --without-optionals="mdns"

MDNS_APPLE_CONFIGURE_ON=    --with-mdns-backend="dns_sd"
MDNS_APPLE_LIB_DEPENDS=     libdns_sd.so:net/mDNSResponder

MDNS_AVAHI_CONFIGURE_ON=    --with-mdns-backend="avahi"
MDNS_AVAHI_LIB_DEPENDS=     libavahi-core.so:net/avahi-app

MMS_LIB_DEPENDS=    libmms.so:net/libmms
MMS_CONFIGURE_OFF=  --without-plugins="mms"

MODPLUG_LIB_DEPENDS=    libmodplug.so:audio/libmodplug
MODPLUG_CONFIGURE_OFF=  --without-plugins="modplug"

MPG123_LIB_DEPENDS= libmpg123.so:audio/mpg123
MPG123_CONFIGURE_OFF=   --without-plugins="mpg123"

MUSEPACK_LIB_DEPENDS=   libmpcdec.so:audio/musepack
MUSEPACK_CONFIGURE_OFF= --without-plugins="musepack"

PULSEAUDIO_LIB_DEPENDS=     libpulse.so:audio/pulseaudio
PULSEAUDIO_CONFIGURE_OFF=   --without-plugins="pulse"

SAMBA_USES= samba:lib
SAMBA_CPPFLAGS= -I${SAMBAINCLUDES}
SAMBA_LDFLAGS=  -L${SAMBALIBS}
SAMBA_CONFIGURE_OFF=    --without-plugins="samba"

SID_LIB_DEPENDS=    libsidplay2.so:audio/libsidplay2
SID_CONFIGURE_OFF=  --without-plugins="sid"

SNDFILE_LIB_DEPENDS=    libsndfile.so:audio/libsndfile
SNDFILE_CONFIGURE_OFF=  --without-plugins="sndfile"

SPEEX_LIB_DEPENDS=  libspeex.so:audio/speex
SPEEX_CONFIGURE_OFF=    --without-plugins="speex"

TREMOR_LIB_DEPENDS= libvorbisidec.so:audio/libtremor
TREMOR_CONFIGURE_OFF=   --without-plugins="tremor"

VISUAL_USE=     SDL=sdl
VISUAL_LIB_DEPENDS= libvisual-0.4.so:graphics/libvisual04
VISUAL_CONFIGURE_OFF=   --without-optionals="vistest"
VISUAL_CONFIGURE_ON=    --with-vis-reference-clients

VOCODER_LIB_DEPENDS=    libfftw3f.so:math/fftw3-float \
            libsamplerate.so:audio/libsamplerate
VOCODER_CONFIGURE_OFF=  --without-plugins="vocoder"

VORBIS_LIB_DEPENDS= libvorbis.so:audio/libvorbis
VORBIS_CONFIGURE_OFF=   --without-plugins="vorbis"

WAVPACK_LIB_DEPENDS=    libwavpack.so:audio/wavpack
WAVPACK_CONFIGURE_OFF=  --without-plugins="wavpack"

XML_USE=        GNOME=libxml2
XML_CONFIGURE_OFF=  --without-plugins="xml" --without-plugins="rss" \
            --without-plugins="xspf"

ET_CONFIGURE_OFF=   --without-optionals="et"

.endif # !XMMS2_SLAVE

.include <bsd.port.options.mk>

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

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

.else # XMMS2_SLAVE
CONFIGURE_ARGS+=    --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)

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

.endif # !XMMS2_SLAVE

.include <bsd.port.pre.mk>

.if defined(XMMS2_SLAVE) && ${XMMS2_SLAVE} == perl && ${PERL_LEVEL} >= 503100
BUILD_DEPENDS+=  p5-Pod-Parser>=0:textproc/p5-Pod-Parser
.endif

# Force to nothing to avoid bsd.openssl.mk adding definitions
# to it when AIRPLAY option is active, waf does not understand it anyway.
MAKE_ARGS=

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

post-install:
.if !defined(XMMS2_SLAVE)
    ${MKDIR} ${STAGEDIR}${DATADIR}/scripts/startup.d
    ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/*
    ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/*
    ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libxmmsclient*
.else
    ${RM} -R ${STAGEDIR}${PREFIX}/lib/xmms2
    ${FIND} ${STAGEDIR}${PREFIX}/lib -name '*.so*' | ${XARGS} ${STRIP_CMD} 
.endif

.include <bsd.port.post.mk>