2013-03-21 18:32:34 +01:00
|
|
|
# Created by: 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
|
2013-10-19 18:43:32 +02:00
|
|
|
PORTVERSION= 14.4.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
|
|
|
|
2012-09-23 23:19:18 +02:00
|
|
|
LICENSE= LGPL21 GPLv2
|
|
|
|
LICENSE_COMB= dual
|
|
|
|
|
2004-12-21 11:42:02 +01:00
|
|
|
CONFLICTS= play-[0-9]*
|
2004-08-19 14:47:48 +02:00
|
|
|
|
2006-09-05 00:00:44 +02:00
|
|
|
GNU_CONFIGURE= yes
|
2013-04-23 01:19:08 +02:00
|
|
|
USES= pkgconfig
|
2007-07-07 15:38:15 +02:00
|
|
|
USE_LDCONFIG= yes
|
2013-10-19 18:43:32 +02:00
|
|
|
USE_AUTOTOOLS= aclocal autoconf automake libltdl
|
2001-10-22 20:44:30 +02:00
|
|
|
|
2013-03-21 18:32:34 +01:00
|
|
|
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
|
2009-09-18 21:32:50 +02:00
|
|
|
# Default LAME to off for packages so we don't end up RESTRICTED
|
2013-03-21 18:32:34 +01:00
|
|
|
.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>
|
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}
|
2008-09-24 14:12:26 +02:00
|
|
|
CONFIGURE_ARGS+= --with-pkgconfigdir="${PREFIX}/libdata/pkgconfig"
|
2009-09-18 21:32:50 +02:00
|
|
|
CONFIGURE_ARGS+= --with-distro="${CONFIGURE_TARGET} ${PKGNAME}"
|
2008-02-16 00:29:27 +01:00
|
|
|
|
2013-03-21 18:32:34 +01:00
|
|
|
.if ${PORT_OPTIONS:MALSA}
|
2010-12-16 18:34:41 +01:00
|
|
|
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
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-alsa
|
|
|
|
.endif
|
|
|
|
|
2013-03-21 18:32:34 +01:00
|
|
|
.if ${PORT_OPTIONS:MAO}
|
2009-09-18 21:32:50 +02:00
|
|
|
CONFIGURE_ARGS+= --with-ao
|
2010-06-06 22:39:21 +02:00
|
|
|
LIB_DEPENDS+= ao.4:${PORTSDIR}/audio/libao
|
2008-02-16 00:29:27 +01:00
|
|
|
.else
|
2009-09-18 21:32:50 +02:00
|
|
|
CONFIGURE_ARGS+= --without-ao
|
2008-02-16 00:29:27 +01:00
|
|
|
.endif
|
|
|
|
|
2013-03-21 18:32:34 +01:00
|
|
|
.if ${PORT_OPTIONS:MAMRNB}
|
2009-09-18 21:32:50 +02:00
|
|
|
CONFIGURE_ARGS+= --with-amrnb
|
2008-02-16 00:29:27 +01:00
|
|
|
LIB_DEPENDS+= amrnb.3:${PORTSDIR}/audio/libamrnb
|
|
|
|
.else
|
2009-09-18 21:32:50 +02:00
|
|
|
CONFIGURE_ARGS+= --without-amrnb
|
2008-02-16 00:29:27 +01:00
|
|
|
.endif
|
|
|
|
|
2013-03-21 18:32:34 +01:00
|
|
|
.if ${PORT_OPTIONS:MAMRWB}
|
2009-09-18 21:32:50 +02:00
|
|
|
CONFIGURE_ARGS+= --with-amrwb
|
2008-02-16 00:29:27 +01:00
|
|
|
LIB_DEPENDS+= amrwb.3:${PORTSDIR}/audio/libamrwb
|
|
|
|
.else
|
2009-09-18 21:32:50 +02:00
|
|
|
CONFIGURE_ARGS+= --without-amrwb
|
2008-02-16 00:29:27 +01:00
|
|
|
.endif
|
|
|
|
|
2013-03-21 18:32:34 +01:00
|
|
|
.if ${PORT_OPTIONS:MFFMPEG}
|
2008-02-16 00:29:27 +01:00
|
|
|
CONFIGURE_ARGS+= --with-ffmpeg
|
2013-10-19 18:43:32 +02:00
|
|
|
LIB_DEPENDS+= libavcodec.so:${PORTSDIR}/multimedia/ffmpeg
|
2008-02-16 00:29:27 +01:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-ffmpeg
|
2003-07-17 06:52:08 +02:00
|
|
|
.endif
|
|
|
|
|
2013-03-21 18:32:34 +01:00
|
|
|
.if ${PORT_OPTIONS:MVORBIS}
|
2009-09-18 21:32:50 +02:00
|
|
|
CONFIGURE_ARGS+= --with-oggvorbis
|
2007-07-28 14:27:31 +02:00
|
|
|
LIB_DEPENDS+= vorbis.4:${PORTSDIR}/audio/libvorbis
|
2001-10-22 20:44:30 +02:00
|
|
|
.else
|
2009-09-18 21:32:50 +02:00
|
|
|
CONFIGURE_ARGS+= --without-oggvorbis
|
2007-07-07 15:38:15 +02:00
|
|
|
.endif
|
|
|
|
|
2013-03-21 18:32:34 +01:00
|
|
|
.if ${PORT_OPTIONS:MSNDFILE}
|
2007-07-07 15:38:15 +02:00
|
|
|
CONFIGURE_ARGS+= --with-sndfile
|
|
|
|
LIB_DEPENDS+= sndfile.1:${PORTSDIR}/audio/libsndfile
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-sndfile
|
2008-02-16 00:29:27 +01:00
|
|
|
.endif
|
|
|
|
|
2013-03-21 18:32:34 +01:00
|
|
|
.if ${PORT_OPTIONS:MLADSPA}
|
2008-02-16 00:29:27 +01:00
|
|
|
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
|
|
|
|
|
2013-03-21 18:32:34 +01:00
|
|
|
.if ${PORT_OPTIONS:MLAME}
|
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
|
|
|
|
|
2013-03-21 18:32:34 +01:00
|
|
|
.if ${PORT_OPTIONS:MFLAC}
|
2007-07-07 15:38:15 +02:00
|
|
|
CONFIGURE_ARGS+= --with-flac
|
2013-06-09 21:30:58 +02:00
|
|
|
LIB_DEPENDS+= FLAC:${PORTSDIR}/audio/flac
|
2007-07-07 15:38:15 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-flac
|
2003-07-17 06:52:08 +02:00
|
|
|
.endif
|
|
|
|
|
2013-03-21 18:32:34 +01:00
|
|
|
.if ${PORT_OPTIONS:MMAD}
|
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
|
|
|
|
|
2013-03-21 18:32:34 +01:00
|
|
|
.if ${PORT_OPTIONS:MPNG}
|
2008-12-15 15:56:34 +01:00
|
|
|
CONFIGURE_ARGS+= --with-png
|
2012-06-01 07:26:28 +02:00
|
|
|
LIB_DEPENDS+= png15:${PORTSDIR}/graphics/png
|
2008-12-15 15:56:34 +01:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-png
|
|
|
|
.endif
|
|
|
|
|
2013-03-21 18:32:34 +01:00
|
|
|
.if ${PORT_OPTIONS:MGSM}
|
2009-09-18 21:32:50 +02:00
|
|
|
CONFIGURE_ARGS+= --with-gsm
|
2006-09-05 00:00:44 +02:00
|
|
|
LIB_DEPENDS+= gsm.1:${PORTSDIR}/audio/gsm
|
|
|
|
.else
|
2009-09-18 21:32:50 +02:00
|
|
|
CONFIGURE_ARGS+= --with-gsm
|
|
|
|
# We cannot ask for gsm to be enabled without it trying to use external gsm,
|
2011-06-11 04:47:50 +02:00
|
|
|
# so force the autoconf checks to fail
|
|
|
|
CONFIGURE_ENV+= ac_cv_header_gsm_h=no ac_cv_header_gsm_gsm_h=no \
|
|
|
|
ac_cv_lib_gsm_gsm_create=no
|
2008-02-16 00:29:27 +01:00
|
|
|
.endif
|
|
|
|
|
2013-03-21 18:32:34 +01:00
|
|
|
.if ${PORT_OPTIONS:MID3TAG}
|
2009-09-18 21:32:50 +02:00
|
|
|
CONFIGURE_ARGS+= --with-id3tag
|
|
|
|
LIB_DEPENDS+= id3tag.0:${PORTSDIR}/audio/libid3tag
|
2008-02-16 00:29:27 +01:00
|
|
|
.else
|
2009-09-18 21:32:50 +02:00
|
|
|
CONFIGURE_ARGS+= --without-id3tag
|
2006-09-05 00:00:44 +02:00
|
|
|
.endif
|
|
|
|
|
2013-03-21 18:32:34 +01:00
|
|
|
.if ${PORT_OPTIONS:MWAVPACK}
|
2008-09-24 14:12:26 +02:00
|
|
|
CONFIGURE_ARGS+= --with-wavpack
|
2010-04-10 16:38:28 +02:00
|
|
|
LIB_DEPENDS+= wavpack.2:${PORTSDIR}/audio/wavpack
|
2008-09-24 14:12:26 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-wavpack
|
|
|
|
.endif
|
|
|
|
|
2013-10-19 18:43:32 +02:00
|
|
|
post-patch:
|
|
|
|
@${REINPLACE_CMD} -e 's/ CODEC_ID/ AV_CODEC_ID/g' \
|
|
|
|
-e 's/ CodecID/ AVCodecID/g' \
|
|
|
|
${WRKSRC}/src/ffmpeg.c
|
|
|
|
|
2013-03-21 18:32:34 +01:00
|
|
|
.include <bsd.port.mk>
|