diff options
Diffstat (limited to 'audio/sox/Makefile')
-rw-r--r-- | audio/sox/Makefile | 91 |
1 files changed, 79 insertions, 12 deletions
diff --git a/audio/sox/Makefile b/audio/sox/Makefile index a736918c962e..d2ad4a3e1ca3 100644 --- a/audio/sox/Makefile +++ b/audio/sox/Makefile @@ -6,8 +6,7 @@ # PORTNAME= sox -PORTVERSION= 13.0.0 -PORTREVISION= 1 +PORTVERSION= 14.0.1 CATEGORIES= audio MASTER_SITES= SF @@ -17,44 +16,101 @@ COMMENT= SOund eXchange - universal sound sample translator CONFLICTS= play-[0-9]* MAN1= sox.1 -MAN3= libst.3 -MAN7= soxexam.7 +MAN3= libsox.3 +MAN7= soxexam.7 soxformat.7 soxeffect.7 MLINKS= sox.1 play.1 sox.1 rec.1 GNU_CONFIGURE= yes +CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} USE_LDCONFIG= yes +USE_AUTOTOOLS= libltdl # src/Makefile uses ${RM} but never sets it MAKE_ENV+= RM="rm -f" -OPTIONS= FLAC "Enable libflac" on \ +OPTIONS= 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 \ + LADSPA "Audio plugin support" off \ LAME "Enable mp3 encoding with LAME" on \ MAD "Enable mp3 decoding with MAD" on \ + SAMPLERATE "Enable libsamplerate" on \ SNDFILE "Enable libsndfile" on \ VORBIS "Enable Ogg Vorbis support" on .include <bsd.port.pre.mk> -.if defined(WITH_FLAC) || defined(WITH_GSM) || defined(WITH_LAME) || \ - defined(WITH_MAD) || defined(WITH_SNDFILE) || defined(WITH_VORBIS) CPPFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib +LDFLAGS+= -L${LOCALBASE}/lib ${PTHREAD_LIBS} CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" + +.if !defined(WITH_LAME) && !defined(WITH_MAD) +PLIST_SUB+= PLIST_MP3="@comment " +.else +PLIST_SUB+= PLIST_MP3="" +.endif + +.if defined(WITH_AO) +CONFIGURE_ARGS+= --enable-libao +LIB_DEPENDS+= ao.3:${PORTSDIR}/audio/libao +PLIST_SUB+= PLIST_AO="" +.else +CONFIGURE_ARGS+= --disable-libao +PLIST_SUB+= PLIST_AO="@comment " +.endif + +.if defined(WITH_AMRNB) +CONFIGURE_ARGS+= --with-amr-nb +LIB_DEPENDS+= amrnb.3:${PORTSDIR}/audio/libamrnb +PLIST_SUB+= PLIST_AMRNB="" +.else +CONFIGURE_ARGS+= --without-amr-nb +PLIST_SUB+= PLIST_AMRNB="@comment " +.endif + +.if defined(WITH_AMRWB) +CONFIGURE_ARGS+= --with-amr-wb +LIB_DEPENDS+= amrwb.3:${PORTSDIR}/audio/libamrwb +PLIST_SUB+= PLIST_AMRWB="" +.else +CONFIGURE_ARGS+= --without-amr-wb +PLIST_SUB+= PLIST_AMRWB="@comment " +.endif + +.if defined(WITH_FFMPEG) +CONFIGURE_ARGS+= --with-ffmpeg +LIB_DEPENDS+= avformat:${PORTSDIR}/multimedia/ffmpeg +PLIST_SUB+= PLIST_FFMPEG="" +.else +CONFIGURE_ARGS+= --without-ffmpeg +PLIST_SUB+= PLIST_FFMPEG="@comment " .endif .if defined(WITH_VORBIS) -CONFIGURE_ARGS+= --with-ogg-vorbis +CONFIGURE_ARGS+= --with-ogg LIB_DEPENDS+= vorbis.4:${PORTSDIR}/audio/libvorbis +PLIST_SUB+= PLIST_VORBIS="" .else -CONFIGURE_ARGS+= --without-ogg-vorbis -# Above configure flag does not exist, so workaround with the below line -CONFIGURE_ENV+= ac_cv_header_vorbis_codec_h=no +CONFIGURE_ARGS+= --without-ogg +PLIST_SUB+= PLIST_VORBIS="@comment " .endif .if defined(WITH_SNDFILE) CONFIGURE_ARGS+= --with-sndfile LIB_DEPENDS+= sndfile.1:${PORTSDIR}/audio/libsndfile +PLIST_SUB+= PLIST_SNDFILE="" .else CONFIGURE_ARGS+= --without-sndfile +PLIST_SUB+= PLIST_SNDFILE="@comment " +.endif + +.if defined(WITH_LADSPA) +CONFIGURE_ARGS+= --with-ladspa +RUN_DEPENDS+= ${LOCALBASE}/lib/ladspa/filter.so:${PORTSDIR}/audio/ladspa +BUILD_DEPENDS+= ${LOCALBASE}/lib/ladspa/filter.so:${PORTSDIR}/audio/ladspa +.else +CONFIGURE_ARGS+= --without-ladspa .endif .if defined(WITH_LAME) @@ -67,8 +123,10 @@ CONFIGURE_ARGS+= --without-lame .if defined(WITH_FLAC) CONFIGURE_ARGS+= --with-flac LIB_DEPENDS+= FLAC.7:${PORTSDIR}/audio/flac +PLIST_SUB+= PLIST_FLAC="" .else CONFIGURE_ARGS+= --without-flac +PLIST_SUB+= PLIST_FLAC="@comment " .endif .if defined(WITH_MAD) @@ -81,10 +139,19 @@ CONFIGURE_ARGS+= --without-mad .if defined(WITH_GSM) CONFIGURE_ARGS+= --with-external-gsm LIB_DEPENDS+= gsm.1:${PORTSDIR}/audio/gsm +PLIST_SUB+= PLIST_GSM="" .else CONFIGURE_ARGS+= --without-external-gsm # Above configure flag does not exist, so workaround with the below line CONFIGURE_ENV+= ac_cv_header_gsm_h=no +PLIST_SUB+= PLIST_GSM="@comment " +.endif + +.if defined(WITH_SAMPLERATE) +CONFIGURE_ARGS+= --with-samplerate +LIB_DEPENDS+= samplerate.1:${PORTSDIR}/audio/libsamplerate +.else +CONFIGURE_ARGS+= --without-samplerate .endif # Tell configure that libgsm's headers are in $LOCALDIR/include |