ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/mports/trunk/audio/musicpd/Makefile
Revision: 21837
Committed: Mon Aug 22 22:29:29 2016 UTC (7 years, 8 months ago) by laffer1
Content type: text/plain
File size: 7742 byte(s)
Log Message:
remove bad patch

File Contents

# Content
1 # $MidnightBSD$
2
3 PORTNAME= musicpd
4 PORTVERSION= 0.18.11
5 CATEGORIES= audio ipv6
6 MASTER_SITES= http://www.musicpd.org/download/mpd/${PORTVERSION:R}/
7 DISTNAME= mpd-${PORTVERSION}
8
9 MAINTAINER= ports@MidnightBSD.org
10 COMMENT= Remote-controllable music daemon
11
12 LICENSE= gpl2
13
14 USES= gmake pkgconfig compiler:c++11-lib tar:xz
15 GNU_CONFIGURE= yes
16 USE_GNOME= glib20
17
18 USE_RC_SUBR= ${PORTNAME}
19 CONFIGURE_ARGS+=--disable-alsa --disable-systemd-daemon --disable-roar
20 CFLAGS+= -I${PREFIX}/include
21 CPPFLAGS+= -I${LOCALBASE}/include
22 LDFLAGS+= -L${LOCALBASE}/lib -L${LOCALBASE}/lib/sidplay/builders
23
24 PORTDOCS= AUTHORS README COPYING NEWS UPGRADING
25
26 SUB_FILES= pkg-message
27
28 OPTIONS_DEFINE= ID3TAG IPV6 ARCHIVE SAMPLERATE SQLITE3 \
29 CDPARANOIA LAME MMS VORBISENC DOCS
30
31 OPTIONS_RADIO= ZEROCONF
32 OPTIONS_RADIO_ZEROCONF= AVAHI MDNSRESPONDER
33
34 OPTIONS_MULTI= FILE_FORMAT
35 OPTIONS_MULTI_FILE_FORMAT= AAC ADPLUG FFMPEG FLAC FLUIDSYNTH \
36 GME MAD MIKMOD MODPLUG MPG123 MUSEPACK \
37 OPUS SIDPLAY2 SNDFILE TREMOR TWOLAME \
38 VORBIS WAV WAVPACK WILDMIDI
39
40 OPTIONS_GROUP= PLAYBACK
41 OPTIONS_GROUP_PLAYBACK= AO CURL HTTPD JACK OPENAL OSS PULSEAUDIO SHOUTCAST
42
43 ADPLUG_DESC= AdPlug support
44 FLUIDSYNTH_DESC=FludSynth support (MIDI files)
45 GME_DESC= GME support (video game music files)
46 LAME_DESC= Support for MP3 Icecast Streams
47 SIDPLAY2_DESC= Sidplay support (C64 mono and stereo files)
48 TREMOR_DESC= Tremor decoder (not with SHOUTCAST; use VORBIS)
49 TWOLAME_DESC= TwoLAME support (mp2)
50 VORBISENC_DESC= Ogg Vorbis encoder
51 WAVPACK_DESC= WavPack support
52 WILDMIDI_DESC= WildMIDI support (MIDI files)
53
54 OPTIONS_DEFAULT=ID3TAG IPV6 MAD OSS FLAC VORBIS WAV FFMPEG SNDFILE CURL
55
56 AAC_CONFIGURE_ENABLE=aac
57 AAC_LIB_DEPENDS=libfaad.so:${PORTSDIR}/audio/faad
58 ADPLUG_CONFIGURE_ENABLE=adplug
59 ADPLUG_LIB_DEPENDS=libadplug.so:${PORTSDIR}/audio/libadplug
60 AO_CONFIGURE_ENABLE=ao
61 AO_LIB_DEPENDS=libao.so:${PORTSDIR}/audio/libao
62 CDPARANOIA_CONFIGURE_ENABLE=cdio-paranoia
63 CDPARANOIA_LIB_DEPENDS=libcdda_paranoia.so:${PORTSDIR}/audio/cdparanoia
64 CURL_CONFIGURE_ENABLE=curl
65 CURL_LIB_DEPENDS=libcurl.so:${PORTSDIR}/ftp/curl
66 FFMPEG_CONFIGURE_ENABLE=ffmpeg
67 FFMPEG_LIB_DEPENDS= libavcodec.so:${PORTSDIR}/multimedia/ffmpeg \
68 libavformat.so:${PORTSDIR}/multimedia/ffmpeg \
69 libavutil.so:${PORTSDIR}/multimedia/ffmpeg
70 FLAC_CONFIGURE_ENABLE=flac
71 FLAC_LIB_DEPENDS=libFLAC.so:${PORTSDIR}/audio/flac
72 FLUIDSYNTH_CONFIGURE_ENABLE=fluidsynth
73 FLUIDSYNTH_LIB_DEPENDS=libfluidsynth.so:${PORTSDIR}/audio/fluidsynth
74 GME_CONFIGURE_ENABLE=gme
75 GME_LIB_DEPENDS=libgme.so:${PORTSDIR}/audio/libgme
76 HTTPD_CONFIGURE_ENABLE=httpd-output
77 ID3TAG_CONFIGURE_ENABLE=id3
78 ID3TAG_LIB_DEPENDS=libid3tag.so:${PORTSDIR}/audio/libid3tag
79 IPV6_CONFIGURE_ENABLE=ipv6
80 JACK_CONFIGURE_ENABLE=jack
81 JACK_LIB_DEPENDS=libjack.so:${PORTSDIR}/audio/jack
82 LAME_CONFIGURE_ENABLE=lame-encoder
83 LAME_LIB_DEPENDS=libmp3lame.so:${PORTSDIR}/audio/lame
84 MAD_CONFIGURE_ENABLE=mad
85 MAD_LIB_DEPENDS=libmad.so:${PORTSDIR}/audio/libmad
86 MIKMOD_CONFIGURE_ENABLE=mikmod
87 MIKMOD_LIB_DEPENDS=libmikmod.so:${PORTSDIR}/audio/libmikmod
88 MMS_CONFIGURE_ENABLE=mms
89 MMS_LIB_DEPENDS=libmms.so:${PORTSDIR}/net/libmms
90 MODPLUG_CONFIGURE_ENABLE=modplug
91 MODPLUG_LIB_DEPENDS=libmodplug.so:${PORTSDIR}/audio/libmodplug
92 MPG123_CONFIGURE_ENABLE=mpg123
93 MPG123_LIB_DEPENDS=libmpg123.so:${PORTSDIR}/audio/mpg123
94 MUSEPACK_CONFIGURE_ENABLE=mpc
95 MUSEPACK_LIB_DEPENDS=libmpcdec.so:${PORTSDIR}/audio/musepack
96 OPENAL_CONFIGURE_ENABLE=openal
97 OPENAL_LIB_DEPENDS=libopenal.so:${PORTSDIR}/audio/openal
98 OPUS_CONFIGURE_ENABLE=opus
99 OPUS_LIB_DEPENDS=libopus.so:${PORTSDIR}/audio/opus
100 OSS_CONFIGURE_ENABLE=oss
101 PULSEAUDIO_CONFIGURE_ENABLE=pulse
102 PULSEAUDIO_LIB_DEPENDS=libpulse.so:${PORTSDIR}/audio/pulseaudio
103 SAMPLERATE_CONFIGURE_ENABLE=lsr
104 SAMPLERATE_LIB_DEPENDS=libsamplerate.so:${PORTSDIR}/audio/libsamplerate
105 SIDPLAY2_CONFIGURE_ENABLE=sidplay
106 SIDPLAY2_LIB_DEPENDS=libsidplay2.so:${PORTSDIR}/audio/libsidplay2
107 SNDFILE_CONFIGURE_ENABLE=sndfile
108 SNDFILE_LIB_DEPENDS=libsndfile.so:${PORTSDIR}/audio/libsndfile
109 SQLITE3_CONFIGURE_ENABLE=sqlite
110 SQLITE3_LIB_DEPENDS=libsqlite3.so:${PORTSDIR}/databases/sqlite3
111 TREMOR_CONFIGURE_WITH=tremor
112 TREMOR_LIB_DEPENDS=libvorbisidec.so:${PORTSDIR}/audio/libtremor
113 TWOLAME_CONFIGURE_ENABLE=twolame-encoder
114 TWOLAME_LIB_DEPENDS=libtwolame.so:${PORTSDIR}/audio/twolame
115 VORBISENC_CONFIGURE_ENABLE=vorbis-encoder
116 VORBISENC_LIB_DEPENDS=libvorbisenc.so:${PORTSDIR}/audio/libvorbis
117 VORBIS_CONFIGURE_ENABLE=vorbis
118 VORBIS_LIB_DEPENDS=libvorbis.so:${PORTSDIR}/audio/libvorbis
119 WAV_CONFIGURE_ENABLE=audiofile
120 WAV_LIB_DEPENDS=libaudiofile.so:${PORTSDIR}/audio/libaudiofile
121 WAVPACK_CONFIGURE_ENABLE=wavpack
122 WAVPACK_LIB_DEPENDS=libwavpack.so:${PORTSDIR}/audio/wavpack
123 WILDMIDI_CONFIGURE_ENABLE=wildmidi
124 WILDMIDI_LIB_DEPENDS=libWildMidi.so:${PORTSDIR}/audio/wildmidi
125
126 MPDUSER?= mpd
127 MPDGROUP?= mpd
128
129 USERS= ${MPDUSER}
130 GROUPS= ${MPDGROUP}
131
132 .include <bsd.mport.options.mk>
133
134 .ifdef MPDCONF
135 IGNORE=Please remove the MPDCONF line from make.conf, then rename ${PREFIX}/etc/${MPDCONF} to musicpd.conf, if it exists
136 .endif
137
138 .if exists(${PREFIX}/etc/mpd.conf)
139 MSG=does not expect ${PREFIX}/etc/mpd.conf to exist.
140 .if !exists(${PREFIX}/etc/musicpd.conf)
141 IGNORE=${MSG} Move it to ${PREFIX}/etc/musicpd.conf.
142 .else
143 IGNORE=${MSG} You also have musicpd.conf-- check carefully to see which one you want, and remove mpd.conf.
144 .endif
145 .endif
146
147 .if ${PORT_OPTIONS:MARCHIVE}
148 CONFIGURE_ARGS+=--enable-bzip2 \
149 --enable-zzip \
150 --enable-iso9660
151 LIB_DEPENDS+= libzzip.so:${PORTSDIR}/devel/zziplib \
152 libcdio_paranoia.so:${PORTSDIR}/sysutils/libcdio-paranoia
153 .else
154 CONFIGURE_ARGS+=--disable-bzip2 \
155 --disable-zzip \
156 --disable-iso9660
157 .endif
158
159 .if ${PORT_OPTIONS:MAVAHI}
160 CONFIGURE_ARGS+=--with-zeroconf=avahi
161 LIB_DEPENDS+= libavahi-client.so:${PORTSDIR}/net/avahi-app
162 .else
163 CONFIGURE_ARGS+=--with-zeroconf=no
164 .endif
165
166 .if ${PORT_OPTIONS:MMDNSRESPONDER}
167 CONFIGURE_ARGS+=--with-zeroconf=bonjour
168 LIB_DEPENDS+= libdns_sd.so:${PORTSDIR}/net/mDNSResponder
169 .else
170 CONFIGURE_ARGS+=--with-zeroconf=no
171 .endif
172
173 # libshout streaming support will be disabled by configure script when built
174 # also with tremor since the latter does not support vorbis encoding
175 .if ${PORT_OPTIONS:MSHOUTCAST}
176 . if ${PORT_OPTIONS:MTREMOR}
177 IGNORE= shoutcast and tremor do not coexist; use vorbis instead
178 . endif
179 LIB_DEPENDS+= libshout.so:${PORTSDIR}/audio/libshout
180 CONFIGURE_ARGS+=--enable-vorbis-encoder \
181 --enable-shout
182 .else
183 CONFIGURE_ARGS+=--disable-shout
184 .endif
185
186 post-patch:
187 # Replace ~/ with /var/mpd and make musicpd run as mpd by default
188 @${REINPLACE_CMD} -e 's,^#\([^"]*"\)~/,\1/var/mpd,g' \
189 -e 's,^#\(user[^"]*"\)nobody,\1${MPDUSER},g' \
190 ${WRKSRC}/doc/mpdconf.example
191 # Uncomment OSS audio output part from MPDCONF; dragons!
192 start=$$(expr $$(${SED} -n '/^# type *"oss"/=' \
193 ${WRKSRC}/doc/mpdconf.example) - 1); \
194 finish=$$(for n in $$(${JOT} 10 $$start); do \
195 [ "$$(${SED} -n $${n}p ${WRKSRC}/doc/mpdconf.example)" = \
196 "#}" ] && echo $$n || true; done); \
197 ${REINPLACE_CMD} -e "$${start},$${finish}s,^#,," \
198 ${WRKSRC}/doc/mpdconf.example
199 # Fix man pages for executable names
200 @${REINPLACE_CMD} -e 's/^\(\.B m\)pd/\1usicpd/' \
201 -e 's#^\(\.BI \)/etc/mpd.conf#\1${PREFIX}/etc/${PORTNAME}.conf#' \
202 -e 's#^mpd.conf#${PORTNAME}.conf#' \
203 -e 's#^mpd(1)#musicpd(1)#' \
204 ${WRKSRC}/doc/mpd.1 ${WRKSRC}/doc/mpd.conf.5
205
206 do-install:
207 ${INSTALL_PROGRAM} ${WRKSRC}/src/mpd \
208 ${STAGEDIR}/${PREFIX}/bin/${PORTNAME}
209 ${INSTALL_MAN} ${WRKSRC}/doc/mpd.1 \
210 ${STAGEDIR}/${PREFIX}/man/man1/${PORTNAME}.1
211 ${INSTALL_MAN} ${WRKSRC}/doc/mpd.conf.5 \
212 ${STAGEDIR}/${PREFIX}/man/man5/${PORTNAME}.conf.5
213 ${MKDIR} ${STAGEDIR}/${DOCSDIR}
214 ${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}/${DOCSDIR}/
215 ${INSTALL_DATA} ${WRKSRC}/doc/mpdconf.example \
216 ${STAGEDIR}/${PREFIX}/etc/${PORTNAME}.conf.sample
217
218 .include <bsd.port.mk>

Properties

Name Value
svn:eol-style native
svn:keywords MidnightBSD=%H
svn:mime-type text/plain