diff options
author | wxs <wxs@FreeBSD.org> | 2011-06-11 10:47:50 +0800 |
---|---|---|
committer | wxs <wxs@FreeBSD.org> | 2011-06-11 10:47:50 +0800 |
commit | b3d2aea0190f72a215415c910773492ce498d515 (patch) | |
tree | 6f7dfa89a05b5ecd565fdfa2fa8aa7134050f892 /audio/sox | |
parent | 74312d35447365e8759810cc798ba3a2316e25e7 (diff) | |
download | freebsd-ports-gnome-b3d2aea0190f72a215415c910773492ce498d515.tar.gz freebsd-ports-gnome-b3d2aea0190f72a215415c910773492ce498d515.tar.zst freebsd-ports-gnome-b3d2aea0190f72a215415c910773492ce498d515.zip |
- Update to 14.3.2.
- Add LICENSE.
- Add a patch to fix build if ffmpeg-devel is installed.
PR: ports/157673
Submitted by: Ryan Steinmetz <rpsfa@rit.edu>
Approved by: Dan Nelson <dnelson@allantgroup.com> (maintainer)
Diffstat (limited to 'audio/sox')
-rw-r--r-- | audio/sox/Makefile | 18 | ||||
-rw-r--r-- | audio/sox/distinfo | 4 | ||||
-rw-r--r-- | audio/sox/files/patch-ffmpeg | 55 |
3 files changed, 64 insertions, 13 deletions
diff --git a/audio/sox/Makefile b/audio/sox/Makefile index 880383e723f6..95c7465620b2 100644 --- a/audio/sox/Makefile +++ b/audio/sox/Makefile @@ -6,7 +6,7 @@ # PORTNAME= sox -PORTVERSION= 14.3.1 +PORTVERSION= 14.3.2 CATEGORIES= audio MASTER_SITES= SF @@ -23,6 +23,8 @@ GNU_CONFIGURE= yes USE_LDCONFIG= yes USE_AUTOTOOLS= libltdl USE_GNOME= pkgconfig +LICENSE_COMB= dual +LICENSE= LGPL21 GPLv2 # Default LAME to off for packages so we don't end up RESTRICTED .if defined(PACKAGE_BUILDING) @@ -51,7 +53,7 @@ OPTIONS= ALSA "ALSA output driver" off \ CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib ${PTHREAD_LIBS} -CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" +CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}" CONFIGURE_ARGS+= --with-pkgconfigdir="${PREFIX}/libdata/pkgconfig" CONFIGURE_ARGS+= --with-distro="${CONFIGURE_TARGET} ${PKGNAME}" @@ -147,8 +149,9 @@ LIB_DEPENDS+= gsm.1:${PORTSDIR}/audio/gsm .else CONFIGURE_ARGS+= --with-gsm # We cannot ask for gsm to be enabled without it trying to use external gsm, -# so workaround with the below line -CONFIGURE_ENV+= ac_cv_header_gsm_h=no +# 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 .endif .if defined(WITH_ID3TAG) @@ -165,11 +168,4 @@ LIB_DEPENDS+= wavpack.2:${PORTSDIR}/audio/wavpack CONFIGURE_ARGS+= --without-wavpack .endif -# Tell configure that libgsm's headers are in $LOCALDIR/include -post-patch: - @${REINPLACE_CMD} -Ee 's![[:<:]]gsm/gsm.h!gsm.h!' ${WRKSRC}/configure \ - ${WRKSRC}/src/gsm.c ${WRKSRC}/src/wav.c - @${REINPLACE_CMD} -Ee 's!ffmpeg/avformat.h!libavformat/avformat.h!' \ - ${WRKSRC}/configure ${WRKSRC}/src/ffmpeg.c - .include <bsd.port.post.mk> diff --git a/audio/sox/distinfo b/audio/sox/distinfo index a42ac69c28d8..cba6ab254707 100644 --- a/audio/sox/distinfo +++ b/audio/sox/distinfo @@ -1,2 +1,2 @@ -SHA256 (sox-14.3.1.tar.gz) = c4be9ebdb1e77a3bc9f3ee1f3fd274a1fe7b162a174fcc74874b231f3f1ace54 -SIZE (sox-14.3.1.tar.gz) = 1044595 +SHA256 (sox-14.3.2.tar.gz) = 0668cc087c346f7c4084ae294c676a11ddefb462974bc3f67be30d789c850e8f +SIZE (sox-14.3.2.tar.gz) = 1110175 diff --git a/audio/sox/files/patch-ffmpeg b/audio/sox/files/patch-ffmpeg new file mode 100644 index 000000000000..fd511e7348cc --- /dev/null +++ b/audio/sox/files/patch-ffmpeg @@ -0,0 +1,55 @@ +*** diff + +Update to use the new ffmpeg library API, but still work with +the old one. + +--- src/ffmpeg.c 2011-06-07 00:29:34.000000000 -0500 ++++ src/ffmpeg.c 2011-06-07 00:34:12.830996927 -0500 +@@ -50,6 +50,11 @@ + #include <ctype.h> + #include "ffmpeg.h" + ++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(52, 64, 0) ++#define AVMEDIA_TYPE_AUDIO CODEC_TYPE_AUDIO ++#define AV_PKT_FLAG_KEY PKT_FLAG_KEY ++#endif ++ + /* Private data for ffmpeg files */ + typedef struct { + int audio_index; +@@ -91,7 +96,7 @@ static int stream_component_open(priv_t + + if (!codec || avcodec_open(enc, codec) < 0) + return -1; +- if (enc->codec_type != CODEC_TYPE_AUDIO) { ++ if (enc->codec_type != AVMEDIA_TYPE_AUDIO) { + lsx_fail("ffmpeg CODEC %x is not an audio CODEC", enc->codec_type); + return -1; + } +@@ -182,7 +187,7 @@ static int startread(sox_format_t * ft) + /* Find audio stream (FIXME: allow different stream to be selected) */ + for (i = 0; (unsigned)i < ffmpeg->ctxt->nb_streams; i++) { + AVCodecContext *enc = ffmpeg->ctxt->streams[i]->codec; +- if (enc->codec_type == CODEC_TYPE_AUDIO && ffmpeg->audio_index < 0) { ++ if (enc->codec_type == AVMEDIA_TYPE_AUDIO && ffmpeg->audio_index < 0) { + ffmpeg->audio_index = i; + break; + } +@@ -273,7 +278,7 @@ static AVStream *add_audio_stream(sox_fo + + c = st->codec; + c->codec_id = codec_id; +- c->codec_type = CODEC_TYPE_AUDIO; ++ c->codec_type = AVMEDIA_TYPE_AUDIO; + + /* put sample parameters */ + c->bit_rate = 256000; /* FIXME: allow specification */ +@@ -423,7 +428,7 @@ static size_t write_samples(sox_format_t + av_init_packet(&pkt); + pkt.size = avcodec_encode_audio(c, ffmpeg->audio_buf_aligned, AVCODEC_MAX_AUDIO_FRAME_SIZE, ffmpeg->samples); + pkt.pts = av_rescale_q(c->coded_frame->pts, c->time_base, ffmpeg->audio_st->time_base); +- pkt.flags |= PKT_FLAG_KEY; ++ pkt.flags |= AV_PKT_FLAG_KEY; + pkt.stream_index = ffmpeg->audio_st->index; + pkt.data = ffmpeg->audio_buf_aligned; + |