1994-10-23 02:16:15 +01:00
|
|
|
# New ports collection makefile for: sox - Sound Exchange
|
|
|
|
# Date created: 17 Oct 1994
|
|
|
|
# Whom: torstenb
|
|
|
|
#
|
1999-08-25 06:36:31 +02:00
|
|
|
# $FreeBSD$
|
1994-10-23 02:16:15 +01:00
|
|
|
#
|
|
|
|
|
2000-04-08 23:25:03 +02:00
|
|
|
PORTNAME= sox
|
2008-02-16 00:29:27 +01:00
|
|
|
PORTVERSION= 14.0.1
|
1996-11-16 00:14:56 +01:00
|
|
|
CATEGORIES= audio
|
2006-09-05 00:00:44 +02:00
|
|
|
MASTER_SITES= SF
|
1994-10-23 02:16:15 +01:00
|
|
|
|
2003-07-17 06:52:08 +02:00
|
|
|
MAINTAINER= dnelson@allantgroup.com
|
2003-02-21 12:08:38 +01:00
|
|
|
COMMENT= SOund eXchange - universal sound sample translator
|
1994-10-23 02:16:15 +01:00
|
|
|
|
2004-12-21 11:42:02 +01:00
|
|
|
CONFLICTS= play-[0-9]*
|
2004-08-19 14:47:48 +02:00
|
|
|
|
2007-07-07 15:38:15 +02:00
|
|
|
MAN1= sox.1
|
2008-02-16 00:29:27 +01:00
|
|
|
MAN3= libsox.3
|
|
|
|
MAN7= soxexam.7 soxformat.7 soxeffect.7
|
2007-07-07 15:38:15 +02:00
|
|
|
MLINKS= sox.1 play.1 sox.1 rec.1
|
2006-09-05 00:00:44 +02:00
|
|
|
GNU_CONFIGURE= yes
|
2008-02-16 00:29:27 +01:00
|
|
|
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
|
2007-07-07 15:38:15 +02:00
|
|
|
USE_LDCONFIG= yes
|
2008-02-16 00:29:27 +01:00
|
|
|
USE_AUTOTOOLS= libltdl
|
2007-07-07 15:38:15 +02:00
|
|
|
# src/Makefile uses ${RM} but never sets it
|
|
|
|
MAKE_ENV+= RM="rm -f"
|
2001-10-22 20:44:30 +02:00
|
|
|
|
2008-02-16 00:29:27 +01:00
|
|
|
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 \
|
2007-07-07 15:38:15 +02:00
|
|
|
GSM "Use libgsm from ports (else use bundled lib)" on \
|
2008-02-16 00:29:27 +01:00
|
|
|
LADSPA "Audio plugin support" off \
|
2007-07-07 15:38:15 +02:00
|
|
|
LAME "Enable mp3 encoding with LAME" on \
|
|
|
|
MAD "Enable mp3 decoding with MAD" on \
|
2008-02-16 00:29:27 +01:00
|
|
|
SAMPLERATE "Enable libsamplerate" on \
|
2007-07-07 15:38:15 +02:00
|
|
|
SNDFILE "Enable libsndfile" on \
|
|
|
|
VORBIS "Enable Ogg Vorbis support" on
|
2006-06-02 17:24:22 +02:00
|
|
|
|
2005-11-23 00:55:38 +01:00
|
|
|
.include <bsd.port.pre.mk>
|
2003-07-17 06:52:08 +02:00
|
|
|
|
2006-09-05 00:00:44 +02:00
|
|
|
CPPFLAGS+= -I${LOCALBASE}/include
|
2008-02-16 00:29:27 +01:00
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib ${PTHREAD_LIBS}
|
2006-09-05 00:00:44 +02:00
|
|
|
CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
|
2008-02-16 00:29:27 +01:00
|
|
|
|
|
|
|
.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 "
|
2003-07-17 06:52:08 +02:00
|
|
|
.endif
|
|
|
|
|
2001-10-22 20:44:30 +02:00
|
|
|
.if defined(WITH_VORBIS)
|
2008-02-16 00:29:27 +01:00
|
|
|
CONFIGURE_ARGS+= --with-ogg
|
2007-07-28 14:27:31 +02:00
|
|
|
LIB_DEPENDS+= vorbis.4:${PORTSDIR}/audio/libvorbis
|
2008-02-16 00:29:27 +01:00
|
|
|
PLIST_SUB+= PLIST_VORBIS=""
|
2001-10-22 20:44:30 +02:00
|
|
|
.else
|
2008-02-16 00:29:27 +01:00
|
|
|
CONFIGURE_ARGS+= --without-ogg
|
|
|
|
PLIST_SUB+= PLIST_VORBIS="@comment "
|
2007-07-07 15:38:15 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_SNDFILE)
|
|
|
|
CONFIGURE_ARGS+= --with-sndfile
|
|
|
|
LIB_DEPENDS+= sndfile.1:${PORTSDIR}/audio/libsndfile
|
2008-02-16 00:29:27 +01:00
|
|
|
PLIST_SUB+= PLIST_SNDFILE=""
|
2007-07-07 15:38:15 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-sndfile
|
2008-02-16 00:29:27 +01:00
|
|
|
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
|
2003-07-17 06:52:08 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_LAME)
|
2007-07-07 15:38:15 +02:00
|
|
|
CONFIGURE_ARGS+= --with-lame
|
2003-07-17 06:52:08 +02:00
|
|
|
LIB_DEPENDS+= mp3lame.0:${PORTSDIR}/audio/lame
|
|
|
|
.else
|
2007-07-07 15:38:15 +02:00
|
|
|
CONFIGURE_ARGS+= --without-lame
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_FLAC)
|
|
|
|
CONFIGURE_ARGS+= --with-flac
|
|
|
|
LIB_DEPENDS+= FLAC.7:${PORTSDIR}/audio/flac
|
2008-02-16 00:29:27 +01:00
|
|
|
PLIST_SUB+= PLIST_FLAC=""
|
2007-07-07 15:38:15 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-flac
|
2008-02-16 00:29:27 +01:00
|
|
|
PLIST_SUB+= PLIST_FLAC="@comment "
|
2003-07-17 06:52:08 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_MAD)
|
2007-07-07 15:38:15 +02:00
|
|
|
CONFIGURE_ARGS+= --with-mad
|
2003-12-08 08:56:05 +01:00
|
|
|
LIB_DEPENDS+= mad.2:${PORTSDIR}/audio/libmad
|
2003-07-17 06:52:08 +02:00
|
|
|
.else
|
2007-07-07 15:38:15 +02:00
|
|
|
CONFIGURE_ARGS+= --without-mad
|
2003-07-17 06:52:08 +02:00
|
|
|
.endif
|
|
|
|
|
2006-09-05 00:00:44 +02:00
|
|
|
.if defined(WITH_GSM)
|
2007-07-07 15:38:15 +02:00
|
|
|
CONFIGURE_ARGS+= --with-external-gsm
|
2006-09-05 00:00:44 +02:00
|
|
|
LIB_DEPENDS+= gsm.1:${PORTSDIR}/audio/gsm
|
2008-02-16 00:29:27 +01:00
|
|
|
PLIST_SUB+= PLIST_GSM=""
|
2006-09-05 00:00:44 +02:00
|
|
|
.else
|
2007-07-07 15:38:15 +02:00
|
|
|
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
|
2008-02-16 00:29:27 +01:00
|
|
|
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
|
2006-09-05 00:00:44 +02:00
|
|
|
.endif
|
|
|
|
|
2007-07-07 15:38:15 +02:00
|
|
|
# Tell configure that libgsm's headers are in $LOCALDIR/include
|
2006-09-05 00:00:44 +02:00
|
|
|
post-patch:
|
2007-07-07 15:38:15 +02:00
|
|
|
@${REINPLACE_CMD} -Ee 's![[:<:]]gsm/gsm.h!gsm.h!' ${WRKSRC}/configure \
|
2006-09-05 00:00:44 +02:00
|
|
|
${WRKSRC}/src/gsm.c ${WRKSRC}/src/wav.c
|
|
|
|
|
2003-07-17 06:52:08 +02:00
|
|
|
.include <bsd.port.post.mk>
|