diff options
Diffstat (limited to 'audio/sox')
-rw-r--r-- | audio/sox/Makefile | 74 |
1 files changed, 30 insertions, 44 deletions
diff --git a/audio/sox/Makefile b/audio/sox/Makefile index 13009c9c3ece..b0fa1e1855e1 100644 --- a/audio/sox/Makefile +++ b/audio/sox/Makefile @@ -1,9 +1,5 @@ -# New ports collection makefile for: sox - Sound Exchange -# Date created: 17 Oct 1994 -# Whom: torstenb -# +# Created by: torstenb # $FreeBSD$ -# PORTNAME= sox PORTVERSION= 14.3.2 @@ -28,37 +24,27 @@ USE_LDCONFIG= yes USE_AUTOTOOLS= libltdl USE_PKGCONFIG= build +OPTIONS_DEFINE= ALSA AO AMRNB AMRWB FFMPEG FLAC GSM ID3TAG LADSPA LAME \ + MAD PNG SNDFILE VORBIS WAVPACK +OPTIONS_DEFAULT= AO FFMPEG FLAC GSM ID3TAG MAD PNG SNDFILE VORBIS # Default LAME to off for packages so we don't end up RESTRICTED -.if defined(PACKAGE_BUILDING) -_LAME= off -.else -_LAME= on -.endif - -OPTIONS= ALSA "ALSA output driver" off \ - AO "Enable libao output" on \ - AMRNB "AMR Speech Codec (Narrowband)" off \ - AMRWB "AMR Speech Codec (Wideband)" off \ - FFMPEG "Enable ffmpeg en/decoding" on \ - FLAC "Enable flac en/decoding with libflac" on \ - GSM "Use libgsm from ports (else use bundled lib)" on \ - ID3TAG "Enable mp3 tagging with libid3tag" on \ - LADSPA "Audio plugin support" off \ - LAME "Enable mp3 encoding with LAME" ${_LAME} \ - MAD "Enable mp3 decoding with MAD" on \ - PNG "Enable PNG spectrogram creation" on \ - SNDFILE "Enable libsndfile" on \ - VORBIS "Enable Ogg Vorbis support" on \ - WAVPACK "Enable Wavpack support" off - -.include <bsd.port.pre.mk> +.if !defined(PACKAGE_BUILDING) +OPTIONS_DEFAULT= LAME +.endif + +AMRNB_DESC= AMR Speech Codec (Narrowband) +AMRWB_DESC= AMR Speech Codec (Wideband) +GSM_DESC= Use libgsm from ports (else use bundled lib) +PNG_DESC= PNG spectrogram creation + +.include <bsd.port.options.mk> CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib ${PTHREAD_LIBS} CONFIGURE_ARGS+= --with-pkgconfigdir="${PREFIX}/libdata/pkgconfig" CONFIGURE_ARGS+= --with-distro="${CONFIGURE_TARGET} ${PKGNAME}" -.if defined(WITH_ALSA) +.if ${PORT_OPTIONS:MALSA} LIB_DEPENDS+= asound.2:${PORTSDIR}/audio/alsa-lib RUN_DEPENDS+= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:${PORTSDIR}/audio/alsa-plugins CONFIGURE_ARGS+= --with-alsa @@ -66,49 +52,49 @@ CONFIGURE_ARGS+= --with-alsa CONFIGURE_ARGS+= --without-alsa .endif -.if defined(WITH_AO) +.if ${PORT_OPTIONS:MAO} CONFIGURE_ARGS+= --with-ao LIB_DEPENDS+= ao.4:${PORTSDIR}/audio/libao .else CONFIGURE_ARGS+= --without-ao .endif -.if defined(WITH_AMRNB) +.if ${PORT_OPTIONS:MAMRNB} CONFIGURE_ARGS+= --with-amrnb LIB_DEPENDS+= amrnb.3:${PORTSDIR}/audio/libamrnb .else CONFIGURE_ARGS+= --without-amrnb .endif -.if defined(WITH_AMRWB) +.if ${PORT_OPTIONS:MAMRWB} CONFIGURE_ARGS+= --with-amrwb LIB_DEPENDS+= amrwb.3:${PORTSDIR}/audio/libamrwb .else CONFIGURE_ARGS+= --without-amrwb .endif -.if defined(WITH_FFMPEG) +.if ${PORT_OPTIONS:MFFMPEG} CONFIGURE_ARGS+= --with-ffmpeg LIB_DEPENDS+= avcodec.1:${PORTSDIR}/multimedia/ffmpeg .else CONFIGURE_ARGS+= --without-ffmpeg .endif -.if defined(WITH_VORBIS) +.if ${PORT_OPTIONS:MVORBIS} CONFIGURE_ARGS+= --with-oggvorbis LIB_DEPENDS+= vorbis.4:${PORTSDIR}/audio/libvorbis .else CONFIGURE_ARGS+= --without-oggvorbis .endif -.if defined(WITH_SNDFILE) +.if ${PORT_OPTIONS:MSNDFILE} CONFIGURE_ARGS+= --with-sndfile LIB_DEPENDS+= sndfile.1:${PORTSDIR}/audio/libsndfile .else CONFIGURE_ARGS+= --without-sndfile .endif -.if defined(WITH_LADSPA) +.if ${PORT_OPTIONS:MLADSPA} CONFIGURE_ARGS+= --with-ladspa RUN_DEPENDS+= ${LOCALBASE}/lib/ladspa/filter.so:${PORTSDIR}/audio/ladspa BUILD_DEPENDS+= ${LOCALBASE}/lib/ladspa/filter.so:${PORTSDIR}/audio/ladspa @@ -116,35 +102,35 @@ BUILD_DEPENDS+= ${LOCALBASE}/lib/ladspa/filter.so:${PORTSDIR}/audio/ladspa CONFIGURE_ARGS+= --without-ladspa .endif -.if defined(WITH_LAME) +.if ${PORT_OPTIONS:MLAME} CONFIGURE_ARGS+= --with-lame LIB_DEPENDS+= mp3lame.0:${PORTSDIR}/audio/lame .else CONFIGURE_ARGS+= --without-lame .endif -.if defined(WITH_FLAC) +.if ${PORT_OPTIONS:MFLAC} CONFIGURE_ARGS+= --with-flac LIB_DEPENDS+= FLAC.10:${PORTSDIR}/audio/flac .else CONFIGURE_ARGS+= --without-flac .endif -.if defined(WITH_MAD) +.if ${PORT_OPTIONS:MMAD} CONFIGURE_ARGS+= --with-mad LIB_DEPENDS+= mad.2:${PORTSDIR}/audio/libmad .else CONFIGURE_ARGS+= --without-mad .endif -.if defined(WITH_PNG) +.if ${PORT_OPTIONS:MPNG} CONFIGURE_ARGS+= --with-png LIB_DEPENDS+= png15:${PORTSDIR}/graphics/png .else CONFIGURE_ARGS+= --without-png .endif -.if defined(WITH_GSM) +.if ${PORT_OPTIONS:MGSM} CONFIGURE_ARGS+= --with-gsm LIB_DEPENDS+= gsm.1:${PORTSDIR}/audio/gsm .else @@ -155,18 +141,18 @@ CONFIGURE_ENV+= ac_cv_header_gsm_h=no ac_cv_header_gsm_gsm_h=no \ ac_cv_lib_gsm_gsm_create=no .endif -.if defined(WITH_ID3TAG) +.if ${PORT_OPTIONS:MID3TAG} CONFIGURE_ARGS+= --with-id3tag LIB_DEPENDS+= id3tag.0:${PORTSDIR}/audio/libid3tag .else CONFIGURE_ARGS+= --without-id3tag .endif -.if defined(WITH_WAVPACK) +.if ${PORT_OPTIONS:MWAVPACK} CONFIGURE_ARGS+= --with-wavpack LIB_DEPENDS+= wavpack.2:${PORTSDIR}/audio/wavpack .else CONFIGURE_ARGS+= --without-wavpack .endif -.include <bsd.port.post.mk> +.include <bsd.port.mk> |