aboutsummaryrefslogtreecommitdiff
path: root/multimedia/qmmp/Makefile
blob: 6348cf9569dbf72687243ed572653ba857159fe2 (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
# $FreeBSD$

PORTNAME=	qmmp
PORTVERSION=	0.10.0
CATEGORIES=	multimedia
MASTER_SITES=	http://qmmp.ylsoftware.com/files/ \
	SF/qmmp-dev/${PORTNAME}/

MAINTAINER=	liangtai.s16@gmail.com
COMMENT=	Qt4-based multimedia player

LICENSE=	GPLv2

CONFLICTS=	${PORTNAME}-qt5-1.*
PORTSCOUT=	limit:^0.*

USES=		cmake:outsource localbase pathfix pkgconfig tar:bzip2
USE_QT4=	corelib gui network xml \
		linguisttools_build moc_build qmake_build rcc_build uic_build
USE_LDCONFIG=	yes

OPTIONS_SUB=	yes
OPTIONS_GROUP=	DOCUMENTS PLUGIN_APPLICATION PLUGIN_FORMATS \
		PLUGIN_DSP_EFFECTS PLUGIN_VISUAL_EFFECTS PLUGIN_OUTPUT \
		PLUGIN_PLAYLIST PLUGIN_NETWORKING MISC

PLUGIN_APPLICATION_DESC=	Main program view
OPTIONS_GROUP_PLUGIN_APPLICATION=	GNOMEHOTKEY HOTKEY KDENOTIFY \
		NOTIFIER QMMP_DIALOG QSUI SKINNEDUI STATICON TWOPANELDIALOG

DOCUMENTS_DESC=	Documentation and API Reference
OPTIONS_GROUP_DOCUMENTS=	DOCS DOXYGEN

PLUGIN_FORMATS_DESC=	Support various media formats
OPTIONS_GROUP_PLUGIN_FORMATS=	CDDA FAAD FFMPEG FLAC GME MAD MODPLUG \
		MUSEPACK OPUS SNDFILE VORBIS WAVPACK WILDMIDI

PLUGIN_DSP_EFFECTS_DESC=	DSP effects
OPTIONS_GROUP_PLUGIN_DSP_EFFECTS=	BS2B CROSSFADE LADSPA SOXR STEREO

PLUGIN_VISUAL_EFFECTS_DESC=	Visual effects
OPTIONS_GROUP_PLUGIN_VISUAL_EFFECTS=	ANALYZER PROJECTM

PLUGIN_OUTPUT_DESC=	Output sound systems
OPTIONS_GROUP_PLUGIN_OUTPUT=	ALSA JACK NULLOUT OSS OSS4 \
		PULSEAUDIO QTMULTIMEDIA

PLUGIN_PLAYLIST_DESC=	Playlist operation
OPTIONS_GROUP_PLUGIN_PLAYLIST=	COPYPASTE DIR_ASSOC FILEOPS HAL \
		TRACKCHANGE UDISKS UDISKS2

PLUGIN_NETWORKING_DESC=	Features via the Net
OPTIONS_GROUP_PLUGIN_NETWORKING=	COVER CURL LYRICS MMS SB SCROBBLER

MISC_DESC=	Other features
OPTIONS_GROUP_MISC=	CONVERTER CUE ENCA MPLAYER1 MPLAYER2 MPRIS RGSCAN SID

OPTIONS_DEFAULT=	ALSA ANALYZER BS2B CDDA CONVERTER COPYPASTE COVER \
		CROSSFADE CUE CURL DIR_ASSOC ENCA FAAD FFMPEG FILEOPS FLAC \
		GNOMEHOTKEY GME HAL HOTKEY JACK KDENOTIFY LADSPA LYRICS MAD \
		MMS MODPLUG MPRIS MPLAYER1 MUSEPACK NOTIFIER NULLOUT \
		OPUS OSS4 PROJECTM PULSEAUDIO QMMP_DIALOG QSUI QTMULTIMEDIA \
		RGSCAN SB SCROBBLER SID SKINNEDUI SNDFILE SOXR STATICON STEREO \
		TRACKCHANGE TWOPANELDIALOG UDISKS2 VORBIS WAVPACK WILDMIDI

DOXYGEN_BUILD_DEPENDS=	doxygen:devel/doxygen

QSUI_DESC=	Simple UI based on standard widgets set
QSUI_USE=	QT4=uic_build
QSUI_CMAKE_ON=	-DUSE_QSUI:BOOL=TRUE
QSUI_CMAKE_OFF=	-DUSE_QSUI:BOOL=FALSE

SKINNEDUI_DESC=	Skinned GUI
SKINNEDUI_USE=	XORG=x11
SKINNEDUI_CMAKE_ON=	-DUSE_SKINNED:BOOL=TRUE
SKINNEDUI_CMAKE_OFF=	-DUSE_SKINNED:BOOL=FALSE

DIR_ASSOC_DESC=	inode/directory mime type association
DIR_ASSOC_CMAKE_ON=	-DUSE_DIR_ASSOC:BOOL=TRUE
DIR_ASSOC_CMAKE_OFF=	-DUSE_DIR_ASSOC:BOOL=FALSE
DIR_ASSOC_USES=	desktop-file-utils

JACK_LIB_DEPENDS=	libjack.so:audio/jack \
		libsamplerate.so:audio/libsamplerate
JACK_BUILD_DEPENDS=	jackit>=0.121.2:audio/jack
JACK_CMAKE_ON=	-DUSE_JACK:BOOL=TRUE
JACK_CMAKE_OFF=	-DUSE_JACK:BOOL=FALSE

ALSA_LIB_DEPENDS=	libasound.so:audio/alsa-lib
ALSA_CMAKE_ON=	-DUSE_ALSA:BOOL=TRUE
ALSA_CMAKE_OFF=	-DUSE_ALSA:BOOL=FALSE

BS2B_DESC=		Support the Bauer stereophonic2binaural effect
BS2B_LIB_DEPENDS=	libbs2b.so:audio/libbs2b
BS2B_CMAKE_ON=	-DUSE_BS2B:BOOL=TRUE
BS2B_CMAKE_OFF=	-DUSE_BS2B:BOOL=FALSE

PULSEAUDIO_LIB_DEPENDS=	libpulse.so:audio/pulseaudio
PULSEAUDIO_CMAKE_ON=	-DUSE_PULSE:BOOL=TRUE
PULSEAUDIO_CMAKE_OFF=	-DUSE_PULSE:BOOL=FALSE

QTMULTIMEDIA_DESC=	Support to use Qt low-level multimedia API
QTMULTIMEDIA_USE=	QT4=multimedia
QTMULTIMEDIA_CMAKE_ON=	-DUSE_QTMULTIMEDIA:BOOL=TRUE
QTMULTIMEDIA_CMAKE_OFF=	-DUSE_QTMULTIMEDIA:BOOL=FALSE

FLAC_LIB_DEPENDS=	libFLAC.so:audio/flac \
		libtag.so:audio/taglib
FLAC_CMAKE_ON=	-DUSE_FLAC:BOOL=TRUE
FLAC_CMAKE_OFF=	-DUSE_FLAC:BOOL=FALSE

MUSEPACK_LIB_DEPENDS=	libmpcdec.so:audio/musepack \
		libtag.so:audio/taglib
MUSEPACK_CMAKE_ON=	-DUSE_MPC:BOOL=TRUE
MUSEPACK_CMAKE_OFF=	-DUSE_MPC:BOOL=FALSE

GME_DESC=		Support video game music files
GME_LIB_DEPENDS=	libgme.so:audio/libgme
GME_CMAKE_ON=	-DUSE_GME:BOOL=TRUE
GME_CMAKE_OFF=	-DUSE_GME:BOOL=FALSE

FFMPEG_LIB_DEPENDS=	libavcodec.so:multimedia/ffmpeg
FFMPEG_CMAKE_ON=	-DUSE_FFMPEG:BOOL=TRUE
FFMPEG_CMAKE_OFF=	-DUSE_FFMPEG:BOOL=FALSE

MODPLUG_LIB_DEPENDS=	libmodplug.so:audio/libmodplug
MODPLUG_CMAKE_ON=	-DUSE_MODPLUG:BOOL=TRUE
MODPLUG_CMAKE_OFF=	-DUSE_MODPLUG:BOOL=FALSE

FAAD_LIB_DEPENDS=	libfaad.so:audio/faad \
		libtag.so:audio/taglib
FAAD_CMAKE_ON=	-DUSE_AAC:BOOL=TRUE
FAAD_CMAKE_OFF=	-DUSE_AAC:BOOL=FALSE

CDDA_LIB_DEPENDS=	libcdio.so:sysutils/libcdio \
		libcddb.so:audio/libcddb \
		libcdio_cdda.so:sysutils/libcdio-paranoia
CDDA_CMAKE_ON=	-DUSE_CDA:BOOL=TRUE
CDDA_CMAKE_OFF=	-DUSE_CDA:BOOL=FALSE

ENCA_DESC=		Support automatic character set detection
ENCA_LIB_DEPENDS=	libenca.so:converters/enca
ENCA_CMAKE_ON=	-DUSE_ENCA:BOOL=TRUE
ENCA_CMAKE_OFF=	-DUSE_ENCA:BOOL=FALSE

MPLAYER1_DESC=	mplayer-1.x (multimedia/mplayer)
MPLAYER2_DESC=	mplayer-2.x (multimedia/mplayer2)
MPLAYER1_RUN_DEPENDS=	mplayer:multimedia/mplayer
MPLAYER2_RUN_DEPENDS=	mplayer:multimedia/mplayer2
MPLAYER1_PREVENTS=	MPLAYER2
MPLAYER2_PREVENTS=	MPLAYER1

PROJECTM_DESC=	Support the projectM music visualiser
PROJECTM_LIB_DEPENDS=	libprojectM.so.2:graphics/libprojectm
PROJECTM_USE=	GL=gl QT4=opengl
PROJECTM_CMAKE_ON=	-DUSE_PROJECTM:BOOL=TRUE
PROJECTM_CMAKE_OFF=	-DUSE_PROJECTM:BOOL=FALSE

OSS_CMAKE_ON=	-DUSE_OSS:BOOL=TRUE
OSS_CMAKE_OFF=	-DUSE_OSS:BOOL=FALSE

OSS4_DESC=		Open Sound System (ver4) support
OSS4_BUILD_DEPENDS=	${LOCALBASE}/lib/oss/include/sys/soundcard.h:audio/oss
OSS4_CMAKE_ON=	-DUSE_OSS4:BOOL=TRUE
OSS4_CMAKE_OFF=	-DUSE_OSS4:BOOL=FALSE

LADSPA_RUN_DEPENDS=	analyseplugin:audio/ladspa
LADSPA_CMAKE_ON=	-DUSE_LADSPA:BOOL=TRUE
LADSPA_CMAKE_OFF=	-DUSE_LADSPA:BOOL=FALSE

WILDMIDI_DESC=	Support to playback MIDI files
WILDMIDI_LIB_DEPENDS=	libWildMidi.so:audio/wildmidi
WILDMIDI_CMAKE_ON=	-DUSE_MIDI:BOOL=TRUE
WILDMIDI_CMAKE_OFF=	-DUSE_MIDI:BOOL=FALSE

MAD_LIB_DEPENDS=	libmad.so:audio/libmad \
		libtag.so:audio/taglib
MAD_CMAKE_ON=	-DUSE_MAD:BOOL=TRUE
MAD_CMAKE_OFF=	-DUSE_MAD:BOOL=FALSE

OPUS_DESC=		Enable reading opusfile tags
OPUS_LIB_DEPENDS=	libopusfile.so:audio/opusfile \
		libopus.so:audio/opus \
		libtag.so:audio/taglib
OPUS_CMAKE_ON=	-DUSE_OPUS:BOOL=TRUE
OPUS_CMAKE_OFF=	-DUSE_OPUS:BOOL=FALSE

RGSCAN_DESC=	ReplayGain scanner
RGSCAN_LIB_DEPENDS=	libtag.so:audio/taglib
RGSCAN_CMAKE_ON=	-DUSE_RGSCAN:BOOL=TRUE
RGSCAN_CMAKE_OFF=	-DUSE_RGSCAN:BOOL=FALSE

SNDFILE_LIB_DEPENDS=	libsndfile.so:audio/libsndfile
SNDFILE_CMAKE_ON=	-DUSE_SNDFILE:BOOL=TRUE
SNDFILE_CMAKE_OFF=	-DUSE_SNDFILE:BOOL=FALSE

VORBIS_LIB_DEPENDS=	libvorbis.so:audio/libvorbis \
		libogg.so:audio/libogg \
		libtag.so:audio/taglib
VORBIS_CMAKE_ON=	-DUSE_VORBIS:BOOL=TRUE
VORBIS_CMAKE_OFF=	-DUSE_VORBIS:BOOL=FALSE

WAVPACK_LIB_DEPENDS=	libwavpack.so:audio/wavpack
WAVPACK_CMAKE_ON=	-DUSE_WAVPACK:BOOL=TRUE
WAVPACK_CMAKE_OFF=	-DUSE_WAVPACK:BOOL=FALSE

CURL_LIB_DEPENDS=	libcurl.so:ftp/curl
CURL_CMAKE_ON=	-DUSE_CURL:BOOL=TRUE
CURL_CMAKE_OFF=	-DUSE_CURL:BOOL=FALSE

MMS_LIB_DEPENDS=	libmms.so:net/libmms
MMS_CMAKE_ON=	-DUSE_MMS:BOOL=TRUE
MMS_CMAKE_OFF=	-DUSE_MMS:BOOL=FALSE

CUE_CMAKE_ON=	-DUSE_CUE:BOOL=TRUE
CUE_CMAKE_OFF=	-DUSE_CUE:BOOL=FALSE

NULLOUT_DESC=	Support null output
NULLOUT_CMAKE_ON=	-DUSE_NULL:BOOL=TRUE
NULLOUT_CMAKE_OFF=	-DUSE_NULL:BOOL=FALSE

SOXR_DESC=	Support SoX Resampler
SOXR_LIB_DEPENDS=	libsoxr.so:audio/soxr
SOXR_CMAKE_ON=	-DUSE_SOXR:BOOL=TRUE
SOXR_CMAKE_OFF=	-DUSE_SOXR:BOOL=FALSE

CROSSFADE_DESC=	Support cross-fade effect
CROSSFADE_CMAKE_ON=	-DUSE_CROSSFADE:BOOL=TRUE
CROSSFADE_CMAKE_OFF=	-DUSE_CROSSFADE:BOOL=FALSE

STEREO_DESC=	Support stereo effect
STEREO_CMAKE_ON=	-DUSE_STEREO:BOOL=TRUE
STEREO_CMAKE_OFF=	-DUSE_STEREO:BOOL=FALSE

ANALYZER_DESC=	Support spectrum analyzer visualization
ANALYZER_CMAKE_ON=	-DUSE_ANALYZER:BOOL=TRUE
ANALYZER_CMAKE_OFF=	-DUSE_ANALYZER:BOOL=FALSE

CONVERTER_DESC=	Support file type converter
CONVERTER_LIB_DEPENDS=	libtag.so:audio/taglib
CONVERTER_CMAKE_ON=	-DUSE_CONVERTER:BOOL=TRUE
CONVERTER_CMAKE_OFF=	-DUSE_CONVERTER:BOOL=FALSE

COPYPASTE_DESC=	Enable copy/paste track infos between playlists
COPYPASTE_CMAKE_ON=	-DUSE_COPYPASTE:BOOL=TRUE
COPYPASTE_CMAKE_OFF=	-DUSE_COPYPASTE:BOOL=FALSE

MPRIS_DESC=	Support the Media Player Remote
MPRIS_USE=	QT4=dbus
MPRIS_CMAKE_ON=	-DUSE_MPRIS:BOOL=TRUE
MPRIS_CMAKE_OFF=	-DUSE_MPRIS:BOOL=FALSE

SCROBBLER_DESC=	Support Libre.fm/Last.fm scrobbler feature
SCROBBLER_CMAKE_ON=	-DUSE_SCROBBLER:BOOL=TRUE
SCROBBLER_CMAKE_OFF=	-DUSE_SCROBBLER:BOOL=FALSE

SID_DESC=	Support sid
SID_LIB_DEPENDS=	libsidplayfp.so:audio/libsidplayfp
SID_CMAKE_ON=	-DUSE_SID:BOOL=TRUE
SID_CMAKE_OFF=	-DUSE_SID:BOOL=FALSE

STATICON_DESC=	Support to show status icon
STATICON_CMAKE_ON=	-DUSE_STATICON:BOOL=TRUE
STATICON_CMAKE_OFF=	-DUSE_STATICON:BOOL=FALSE

SB_DESC=	Browser for IceCast stream directory
SB_CMAKE_ON=	-DUSE_SB:BOOL=TRUE
SB_CMAKE_OFF=	-DUSE_SB:BOOL=FALSE

NOTIFIER_DESC=	Support to popup notifier
NOTIFIER_CMAKE_ON=	-DUSE_NOTIFIER:BOOL=TRUE
NOTIFIER_CMAKE_OFF=	-DUSE_NOTIFIER:BOOL=FALSE

LYRICS_DESC=	Support to show lyrics using lyrics.wikia.com
LYRICS_CMAKE_ON=	-DUSE_LYRICS:BOOL=TRUE
LYRICS_CMAKE_OFF=	-DUSE_LYRICS:BOOL=FALSE

HAL_USE=	QT4=dbus
HAL_CMAKE_ON=	-DUSE_HAL:BOOL=TRUE
HAL_CMAKE_OFF=	-DUSE_HAL:BOOL=FALSE

HOTKEY_DESC=	Support global shortcut keys
HOTKEY_USE=	XORG=x11
HOTKEY_CMAKE_ON=	-DUSE_HOTKEY:BOOL=TRUE
HOTKEY_CMAKE_OFF=	-DUSE_HOTKEY:BOOL=FALSE

GNOMEHOTKEY_DESC=	Support GNOME/Cinnamon shortcut keys
GNOMEHOTKEY_USE=	QT4=dbus
GNOMEHOTKEY_CMAKE_ON=	-DUSE_GNOMEHOTKEY:BOOL=TRUE
GNOMEHOTKEY_CMAKE_OFF=	-DUSE_GNOMEHOTKEY:BOOL=FALSE

FILEOPS_DESC=	Support file operation
FILEOPS_CMAKE_ON=	-DUSE_FILEOPS:BOOL=TRUE
FILEOPS_CMAKE_OFF=	-DUSE_FILEOPS:BOOL=FALSE

COVER_DESC=	Support to show cover images
COVER_CMAKE_ON=	-DUSE_COVER:BOOL=TRUE
COVER_CMAKE_OFF=	-DUSE_COVER:BOOL=FALSE

KDENOTIFY_DESC=	Support to popup notifier for KDE
KDENOTIFY_USE=	QT4=dbus
KDENOTIFY_CMAKE_ON=	-DUSE_KDENOTIFY:BOOL=TRUE
KDENOTIFY_CMAKE_OFF=	-DUSE_KDENOTIFY:BOOL=FALSE

TRACKCHANGE_DESC=	Enable to run external command each track
TRACKCHANGE_CMAKE_ON=	-DUSE_TRACKCHANGE:BOOL=TRUE
TRACKCHANGE_CMAKE_OFF=	-DUSE_TRACKCHANGE:BOOL=FALSE

UDISKS_DESC=	Support removable disc detection (obsolete)
UDISKS2_DESC=	Support removable disc detection using UDisks
UDISKS_USE=	QT4=dbus
UDISKS2_USE=	QT4=dbus
UDISKS_CMAKE_ON=	-DUSE_UDISKS:BOOL=TRUE
UDISKS_CMAKE_OFF=	-DUSE_UDISKS:BOOL=FALSE
UDISKS2_CMAKE_ON=	-DUSE_UDISKS2:BOOL=TRUE
UDISKS2_CMAKE_OFF=	-DUSE_UDISKS2:BOOL=FALSE

QMMP_DIALOG_DESC=	An original dialog
QMMP_DIALOG_CMAKE_ON=	-DUSE_QMMP_DIALOG:BOOL=TRUE
QMMP_DIALOG_CMAKE_OFF=	-DUSE_QMMP_DIALOG:BOOL=FALSE

TWOPANELDIALOG_DESC=	File dialog by two-panel selector
TWOPANELDIALOG_CMAKE_ON=	-DUSE_TWO_PANEL_DIALOG:BOOL=TRUE
TWOPANELDIALOG_CMAKE_OFF=	-DUSE_TWO_PANEL_DIALOG:BOOL=FALSE

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MMPLAYER1} || ${PORT_OPTIONS:MMPLAYER2}
CMAKE_ARGS+=	-DUSE_MPLAYER:BOOL=TRUE
PLIST_SUB+=	MPLAYER=""
.else
CMAKE_ARGS+=	-DUSE_MPLAYER:BOOL=FALSE
PLIST_SUB+=	MPLAYER="@comment "
.endif

PLIST_SUB+=	SHLIB_VER=${PORTVERSION:C/-.*//}

PATHFIX_CMAKELISTSTXT=	\\"CMakeLists.txt -exec grep -l /pkgconfig {} +\\"
PORTDOCS=	README README.RUS AUTHORS
INSTALLS_ICONS=	yes

CMAKE_ARGS+=	-DUSE_FFMPEG_LEGACY:BOOL=FALSE

post-patch:
	@${GREP} -L '${LOCALBASE}/lib/oss' \
		${WRKSRC}/src/plugins/Output/oss4/CMakeLists.txt | ${XARGS} \
		${REINPLACE_CMD} -e 's|/usr/local/|${LOCALBASE}/|'

pre-configure:
	@${RM} -f ${BUILD_WRKSRC}/CMakeCache.txt

post-build-DOXYGEN-on:
	cd ${WRKSRC}/doc && doxygen Doxyfile

post-install-DOCS-on:
	@${MKDIR} ${STAGEDIR}${DOCSDIR}; \
		cd ${WRKSRC} && ${INSTALL_MAN} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}

post-install-DOXYGEN-on:
	@${MKDIR} ${STAGEDIR}${DOCSDIR}/html/search ; \
	cd ${WRKSRC}/doc/html && \
		${INSTALL_MAN} *.html *.png *.css ${STAGEDIR}${DOCSDIR}/html ; \
	cd ${WRKSRC}/doc/html/search && \
		${INSTALL_MAN} *.html *.png *.css *.js ${STAGEDIR}${DOCSDIR}/html/search ; \
	${RM} -f ${WRKDIR}/PLIST.doc ; \
	${FIND} ${STAGEDIR}${DOCSDIR}/html -type f | \
		${SED} 's|${STAGEDIR}${PREFIX}/||' \
		>> ${WRKDIR}/PLIST.doc ; \
	cd ${WRKDIR} ; ${SED} -i -e '/PLIST.doc/ r PLIST.doc' ${TMPPLIST}

.include <bsd.port.mk>