mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-29 05:38:00 +00:00
6fbc265a6d
- Introduce non-default OPTIONs for JACK and SAMPLERATE PR: 197917 Submitted by: h.skuhra@gmail.com (maintainer)
214 lines
5.0 KiB
Makefile
214 lines
5.0 KiB
Makefile
# Created by: Adam Weinberger
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= cmus
|
|
PORTVERSION= 2.6.0
|
|
CATEGORIES= audio
|
|
|
|
MAINTAINER= h.skuhra@gmail.com
|
|
COMMENT= Console-based music player with really cool features
|
|
|
|
LICENSE= GPLv2
|
|
|
|
USE_GITHUB= yes
|
|
GH_ACCOUNT= ${PORTNAME}
|
|
GH_TAGNAME= v${PORTVERSION}
|
|
GH_COMMIT= 76421f1
|
|
|
|
USES= gmake pkgconfig iconv ncurses
|
|
HAS_CONFIGURE= yes
|
|
CONFIGURE_ENV+= HOSTCC=${CC}
|
|
CONFIGURE_ARGS+=prefix=${PREFIX} mandir=${MANPREFIX}/man \
|
|
exampledir=${EXAMPLESDIR} \
|
|
CONFIG_ALSA=n CONFIG_ARTS=n CONFIG_ROAR=n
|
|
|
|
OPTIONS_DEFINE= AAC AO CDDB CDIO CUE DISCID FFMPEG FLAC JACK MAD MIKMOD \
|
|
MODPLUG MP4 MUSEPACK OPUS PULSEAUDIO SAMPLERATE TREMOR \
|
|
VORBIS WAVPACK
|
|
OPTIONS_DEFAULT=FLAC MAD VORBIS
|
|
DISCID_DESC= DISCID support
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
.if ${PORT_OPTIONS:MFLAC}
|
|
LIB_DEPENDS+= libFLAC.so:${PORTSDIR}/audio/flac
|
|
CONFIGURE_ARGS+=CONFIG_FLAC=y
|
|
PLIST_SUB+= FLAC=""
|
|
.else
|
|
CONFIGURE_ARGS+=CONFIG_FLAC=n
|
|
PLIST_SUB+= FLAC="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MMAD}
|
|
LIB_DEPENDS+= libmad.so:${PORTSDIR}/audio/libmad
|
|
CONFIGURE_ARGS+=CONFIG_MAD=y
|
|
PLIST_SUB+= MAD=""
|
|
.else
|
|
CONFIGURE_ARGS+=CONFIG_MAD=n
|
|
PLIST_SUB+= MAD="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MMODPLUG}
|
|
LIB_DEPENDS+= libmodplug.so:${PORTSDIR}/audio/libmodplug
|
|
CONFIGURE_ARGS+=CONFIG_MODPLUG=y
|
|
PLIST_SUB+= MODPLUG=""
|
|
.else
|
|
CONFIGURE_ARGS+=CONFIG_MODPLUG=n
|
|
PLIST_SUB+= MODPLUG="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MMIKMOD}
|
|
LIB_DEPENDS+= libmikmod.so:${PORTSDIR}/audio/libmikmod
|
|
CONFIGURE_ARGS+=CONFIG_MIKMOD=y
|
|
PLIST_SUB+= MIKMOD=""
|
|
.else
|
|
PLIST_SUB+= MIKMOD="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MMUSEPACK}
|
|
LIB_DEPENDS+= libmpcdec.so:${PORTSDIR}/audio/musepack
|
|
CONFIGURE_ARGS+=CONFIG_MPC=y
|
|
PLIST_SUB+= MPC=""
|
|
.else
|
|
CONFIGURE_ARGS+=CONFIG_MPC=n
|
|
PLIST_SUB+= MPC="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MOPUS}
|
|
LIB_DEPENDS+= libopusfile.so:${PORTSDIR}/audio/opusfile
|
|
CONFIGURE_ARGS+=CONFIG_OPUS=y
|
|
PLIST_SUB+= OPUS=""
|
|
.else
|
|
CONFIGURE_ARGS+=CONFIG_OPUS=n
|
|
PLIST_SUB+= OPUS="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MVORBIS} || ${PORT_OPTIONS:MTREMOR}
|
|
LIB_DEPENDS+= libvorbisfile.so:${PORTSDIR}/audio/libvorbis
|
|
CONFIGURE_ARGS+=CONFIG_VORBIS=y
|
|
PLIST_SUB+= VORBIS=""
|
|
.else
|
|
CONFIGURE_ARGS+=CONFIG_VORBIS=n
|
|
PLIST_SUB+= VORBIS="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MTREMOR}
|
|
LIB_DEPENDS+= libvorbisidec.so:${PORTSDIR}/audio/libtremor
|
|
CONFIGURE_ARGS+=CONFIG_TREMOR=y
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MMP4}
|
|
LIB_DEPENDS+= libfaad.so:${PORTSDIR}/audio/faad
|
|
LIB_DEPENDS+= libmp4v2.so:${PORTSDIR}/multimedia/mp4v2
|
|
CONFIGURE_ARGS+=CONFIG_MP4=y
|
|
PLIST_SUB+= MP4=""
|
|
.else
|
|
CONFIGURE_ARGS+=CONFIG_MP4=n
|
|
PLIST_SUB+= MP4="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MAAC}
|
|
LIB_DEPENDS+= libfaad.so:${PORTSDIR}/audio/faad
|
|
CONFIGURE_ARGS+=CONFIG_AAC=y
|
|
PLIST_SUB+= AAC=""
|
|
.else
|
|
CONFIGURE_ARGS+=CONFIG_AAC=n
|
|
PLIST_SUB+= AAC="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MWAVPACK}
|
|
LIB_DEPENDS+= libwavpack.so:${PORTSDIR}/audio/wavpack
|
|
CONFIGURE_ARGS+=CONFIG_WAVPACK=y
|
|
PLIST_SUB+= WAVPACK=""
|
|
.else
|
|
CONFIGURE_ARGS+=CONFIG_WAVPACK=n
|
|
PLIST_SUB+= WAVPACK="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MFFMPEG}
|
|
BUILD_DEPENDS+= ffmpeg>=2:${PORTSDIR}/multimedia/ffmpeg
|
|
RUN_DEPENDS+= ffmpeg>=2:${PORTSDIR}/multimedia/ffmpeg
|
|
CONFIGURE_ARGS+=CONFIG_FFMPEG=y
|
|
PLIST_SUB+= FFMPEG=""
|
|
.else
|
|
CONFIGURE_ARGS+=CONFIG_FFMPEG=n
|
|
PLIST_SUB+= FFMPEG="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MAO}
|
|
LIB_DEPENDS+= libao.so:${PORTSDIR}/audio/libao
|
|
CONFIGURE_ARGS+=CONFIG_AO=y
|
|
PLIST_SUB+= AO=""
|
|
.else
|
|
CONFIGURE_ARGS+=CONFIG_AO=n
|
|
PLIST_SUB+= AO="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MPULSEAUDIO}
|
|
LIB_DEPENDS+= libpulse.so:${PORTSDIR}/audio/pulseaudio
|
|
CONFIGURE_ARGS+=CONFIG_PULSE=y
|
|
PLIST_SUB+= PULSEAUDIO=""
|
|
.else
|
|
CONFIGURE_ARGS+=CONFIG_PULSE=n
|
|
PLIST_SUB+= PULSEAUDIO="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MCDDB} && ${PORT_OPTIONS:MCDIO}
|
|
LIB_DEPENDS+= libcddb.so:${PORTSDIR}/audio/libcddb
|
|
CONFIGURE_ARGS+=CONFIG_CDDB=y
|
|
.else
|
|
CONFIGURE_ARGS+=CONFIG_CDDB=n
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MCDIO}
|
|
LIB_DEPENDS+= libcdio_cdda.so:${PORTSDIR}/sysutils/libcdio-paranoia
|
|
CONFIGURE_ARGS+=CONFIG_CDIO=y
|
|
PLIST_SUB+= CDIO=""
|
|
.else
|
|
CONFIGURE_ARGS+=CONFIG_CDIO=n
|
|
PLIST_SUB+= CDIO="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MCUE}
|
|
LIB_DEPENDS+= libcue.so:${PORTSDIR}/textproc/libcue
|
|
CONFIGURE_ARGS+=CONFIG_CUE=y
|
|
PLIST_SUB+= CUE=""
|
|
.else
|
|
CONFIGURE_ARGS+=CONFIG_CUE=n
|
|
PLIST_SUB+= CUE="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MDISCID}
|
|
LIB_DEPENDS+= libdiscid.so:${PORTSDIR}/audio/libdiscid
|
|
CONFIGURE_ARGS+=CONFIG_DISCID=y
|
|
.else
|
|
CONFIGURE_ARGS+=CONFIG_DISCID=n
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MJACK}
|
|
LIB_DEPENDS+= libjack.so:${PORTSDIR}/audio/jack
|
|
CONFIGURE_ARGS+=CONFIG_JACK=y
|
|
PLIST_SUB+= JACK=""
|
|
.else
|
|
CONFIGURE_ARGS+=CONFIG_JACK=n
|
|
PLIST_SUB+= JACK="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MSAMPLERATE} && ${PORT_OPTIONS:MJACK}
|
|
LIB_DEPENDS+= libsamplerate.so:${PORTSDIR}/audio/libsamplerate
|
|
CONFIGURE_ARGS+=CONFIG_SAMPLERATE=y
|
|
.else
|
|
CONFIGURE_ARGS+=CONFIG_SAMPLERATE=n
|
|
.endif
|
|
|
|
post-patch:
|
|
@${REINPLACE_CMD} -e 's,doc/cmus/examples,examples/cmus,g' \
|
|
${WRKSRC}/Doc/cmus.txt
|
|
@${REINPLACE_CMD} -e 's,/usr,${PREFIX},g' ${WRKSRC}/Doc/cmus.txt
|
|
|
|
post-install:
|
|
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/cmus*
|
|
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/cmus/[io]p/*.so
|
|
|
|
.include <bsd.port.mk>
|