[Bug 199567] [UPDATE] audio/sox: Update to 14.4.2
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Apr 22 23:29:06 UTC 2015
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199567
takefu at airport.fm changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #155787|0 |1
is patch| |
Attachment #155787|0 |1
is obsolete| |
Attachment #155787|text/x-c |text/plain
mime type| |
--- Comment #3 from takefu at airport.fm ---
Comment on attachment 155787
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=155787
sox_14.4.2.diff
>diff -ruN /usr/ports/audio/sox/Makefile ./Makefile
>--- /usr/ports/audio/sox/Makefile 2015-03-26 06:37:39.000000000 +0900
>+++ ./Makefile 2015-04-21 08:20:17.000000000 +0900
>@@ -2,8 +2,8 @@
> # $FreeBSD: head/audio/sox/Makefile 382272 2015-03-25 21:37:39Z marino $
>
> PORTNAME= sox
>-PORTVERSION= 14.4.1
>-PORTREVISION= 7
>+PORTVERSION= 14.4.2
>+#PORTREVISION= 0
> CATEGORIES= audio
> MASTER_SITES= SF
>
>@@ -21,9 +21,10 @@
> USES= autoreconf pkgconfig libtool
> USE_LDCONFIG= yes
>
>-OPTIONS_DEFINE= ALSA AO AMRNB AMRWB FFMPEG FLAC GSM ID3TAG LADSPA LAME \
>- MAD PNG PULSEAUDIO SNDFILE VORBIS WAVPACK
>-OPTIONS_DEFAULT= AO FFMPEG FLAC GSM ID3TAG MAD PNG SNDFILE VORBIS
>+OPTIONS_DEFINE= ALSA AO AMRNB AMRWB FLAC GSM ID3TAG LADSPA LAME \
>+ MAD PNG PULSEAUDIO SNDFILE VORBIS WAVPACK\
>+ TWOLAME OPUS
>+OPTIONS_DEFAULT= AO FLAC GSM ID3TAG MAD PNG SNDFILE VORBIS
> # Default LAME to off for packages so we don't end up RESTRICTED
> .if !defined(PACKAGE_BUILDING)
> OPTIONS_DEFAULT+= LAME
>@@ -53,9 +54,6 @@
> AMRWB_CONFIGURE_WITH= amrwb
> AMRWB_LIB_DEPENDS= libamrwb.so:${PORTSDIR}/audio/libamrwb
>
>-FFMPEG_CONFIGURE_WITH= ffmpeg
>-FFMPEG_LIB_DEPENDS= libavcodec.so:${PORTSDIR}/multimedia/ffmpeg
>-
> VORBIS_CONFIGURE_WITH= oggvorbis
> VORBIS_LIB_DEPENDS= libvorbis.so:${PORTSDIR}/audio/libvorbis
>
>@@ -89,6 +87,12 @@
> WAVPACK_CONFIGURE_WITH= wavpack
> WAVPACK_LIB_DEPENDS= libwavpack.so:${PORTSDIR}/audio/wavpack
>
>+TWOLAME_CONFIGURE_WITH= twolame
>+TWOLAME_LIB_DEPENDS= libtwolame.so:${PORTSDIR}/audio/twolame
>+
>+OPUS_CONFIGURE_WITH= opus
>+OPUS_LIB_DEPENDS= libopusfile.so:${PORTSDIR}/audio/opusfile
>+
> .include <bsd.port.options.mk>
>
> .if ! ${PORT_OPTIONS:MGSM}
>@@ -98,9 +102,10 @@
> ac_cv_lib_gsm_gsm_create=no
> .endif
>
>-post-patch:
>- @${REINPLACE_CMD} -e 's/ CODEC_ID/ AV_CODEC_ID/g' \
>- -e 's/ CodecID/ AVCodecID/g' \
>- ${WRKSRC}/src/ffmpeg.c
>+.if ${OSVERSION} > 900000
>+USE_GCC= any
>+.endif
>+
>+INSTALL_TARGET= install-strip
>
> .include <bsd.port.mk>
>diff -ruN /usr/ports/audio/sox/distinfo ./distinfo
>--- /usr/ports/audio/sox/distinfo 2014-01-23 00:30:13.000000000 +0900
>+++ ./distinfo 2015-04-20 15:07:55.000000000 +0900
>@@ -1,2 +1,2 @@
>-SHA256 (sox-14.4.1.tar.gz) = 9a8c2c6fe51e608da346a157e111508a957af9e3ecf3de26781d36e9a67fa89b
>-SIZE (sox-14.4.1.tar.gz) = 1111653
>+SHA256 (sox-14.4.2.tar.gz) = b45f598643ffbd8e363ff24d61166ccec4836fea6d3888881b8df53e3bb55f6c
>+SIZE (sox-14.4.2.tar.gz) = 1134299
>diff -ruN /usr/ports/audio/sox/files/patch-Makefile.am ./files/patch-Makefile.am
>--- /usr/ports/audio/sox/files/patch-Makefile.am 2014-03-02 20:29:25.000000000 +0900
>+++ ./files/patch-Makefile.am 1970-01-01 09:00:00.000000000 +0900
>@@ -1,14 +0,0 @@
>-Work around a ports bug wrt symlinking manpages in different
>-categories, by copying the manpage instead.
>-
>---- Makefile.am.orig 2013-01-30 11:40:06.000000000 +0900
>-+++ Makefile.am 2014-02-08 01:46:11.000000000 +0900
>-@@ -118,7 +118,7 @@
>- install-data-hook:
>- cd $(DESTDIR)$(mandir)/man1 && $(RM) play.1 && $(LN_S) sox.1 play.1
>- cd $(DESTDIR)$(mandir)/man1 && $(RM) rec.1 && $(LN_S) sox.1 rec.1
>-- cd $(DESTDIR)$(mandir)/man7 && $(RM) soxeffect.7 && $(LN_S) ../man1/sox.1 soxeffect.7
>-+ cd $(DESTDIR)$(mandir)/man7 && $(RM) soxeffect.7 && cp ../man1/sox.1 soxeffect.7
>-
>- uninstall-hook:
>- $(RM) $(DESTDIR)$(mandir)/man1/play.1
>diff -ruN /usr/ports/audio/sox/files/patch-avcodec54 ./files/patch-avcodec54
>--- /usr/ports/audio/sox/files/patch-avcodec54 2013-10-20 01:43:32.000000000 +0900
>+++ ./files/patch-avcodec54 1970-01-01 09:00:00.000000000 +0900
>@@ -1,100 +0,0 @@
>-Index: m4/ffmpeg.m4
>-===================================================================
>---- m4/ffmpeg.m4.orig
>-+++ m4/ffmpeg.m4
>-@@ -49,7 +49,7 @@ then
>- LIBS="$LIBS $FFMPEG_LIBS"
>- have_ffmpeg="no"
>- AC_CHECK_HEADERS([libavformat/avformat.h ffmpeg/avformat.h],
>-- [AC_CHECK_LIB(avformat, av_open_input_file,
>-+ [AC_CHECK_LIB(avformat, avformat_open_input,
>- [AC_CHECK_HEADERS([libavcodec/avcodec.h ffmpeg/avcodec.h],
>- [AC_CHECK_LIB(avcodec, avcodec_decode_audio3, have_ffmpeg=yes)])])
>- break])
>-Index: src/ffmpeg.c
>-===================================================================
>---- src/ffmpeg.c.orig
>-+++ src/ffmpeg.c
>-@@ -92,8 +92,10 @@ static int stream_component_open(priv_t
>- enc->workaround_bugs = 1;
>- #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
>- enc->error_resilience = 1;
>--#else
>-+#elif LIBAVCODEC_VERSION_INT < ((54<<16)+(0<<8)+0)
>- enc->error_recognition = 1;
>-+#else
>-+ ic->error_recognition = 1;
>- #endif
>-
>- if (!codec || avcodec_open(enc, codec) < 0)
>-@@ -157,7 +159,7 @@ static int audio_decode_frame(priv_t * f
>- static int startread(sox_format_t * ft)
>- {
>- priv_t * ffmpeg = (priv_t *)ft->priv;
>-- AVFormatParameters params;
>-+ AVDictionary *params;
>- int ret;
>- int i;
>-
>-@@ -172,7 +174,7 @@ static int startread(sox_format_t * ft)
>-
>- /* Open file and get format */
>- memset(¶ms, 0, sizeof(params));
>-- if ((ret = av_open_input_file(&ffmpeg->ctxt, ft->filename, NULL, 0, ¶ms)) < 0) {
>-+ if ((ret = avformat_open_input(&ffmpeg->ctxt, ft->filename, NULL, ¶ms)) < 0) {
>- lsx_fail("ffmpeg cannot open file for reading: %s (code %d)", ft->filename, ret);
>- return SOX_EOF;
>- }
>-@@ -231,7 +233,7 @@ static size_t read_samples(sox_format_t
>- /* If input buffer empty, read more data */
>- if (ffmpeg->audio_buf_index * 2 >= ffmpeg->audio_buf_size) {
>- if ((ret = av_read_frame(ffmpeg->ctxt, pkt)) < 0 &&
>-- (ret == AVERROR_EOF || url_ferror(ffmpeg->ctxt->pb)))
>-+ (ret == AVERROR_EOF || ( ffmpeg->ctxt->pb && ffmpeg->ctxt->pb->error)))
>- break;
>- ffmpeg->audio_buf_size = audio_decode_frame(ffmpeg, ffmpeg->audio_buf_aligned, AVCODEC_MAX_AUDIO_FRAME_SIZE);
>- ffmpeg->audio_buf_index = 0;
>-@@ -373,13 +375,6 @@ static int startwrite(sox_format_t * ft)
>- return SOX_EOF;
>- }
>-
>-- /* set the output parameters (must be done even if no
>-- parameters). */
>-- if (av_set_parameters(ffmpeg->ctxt, NULL) < 0) {
>-- lsx_fail("ffmpeg invalid output format parameters");
>-- return SOX_EOF;
>-- }
>--
>- /* Next line for debugging */
>- /* dump_format(ffmpeg->ctxt, 0, ft->filename, 1); */
>-
>-@@ -391,14 +386,14 @@ static int startwrite(sox_format_t * ft)
>-
>- /* open the output file, if needed */
>- if (!(ffmpeg->fmt->flags & AVFMT_NOFILE)) {
>-- if (url_fopen(&ffmpeg->ctxt->pb, ft->filename, URL_WRONLY) < 0) {
>-+ if (avio_open(&ffmpeg->ctxt->pb, ft->filename, AVIO_FLAG_WRITE) < 0) {
>- lsx_fail("ffmpeg could not open `%s'", ft->filename);
>- return SOX_EOF;
>- }
>- }
>-
>- /* write the stream header, if any */
>-- av_write_header(ffmpeg->ctxt);
>-+ avformat_write_header(ffmpeg->ctxt, NULL);
>-
>- return SOX_SUCCESS;
>- }
>-@@ -475,11 +470,7 @@ static int stopwrite(sox_format_t * ft)
>-
>- if (!(ffmpeg->fmt->flags & AVFMT_NOFILE)) {
>- /* close the output file */
>--#if (LIBAVFORMAT_VERSION_INT < 0x340000)
>-- url_fclose(&ffmpeg->ctxt->pb);
>--#else
>-- url_fclose(ffmpeg->ctxt->pb);
>--#endif
>-+ avio_close(ffmpeg->ctxt->pb);
>- }
>-
>- /* Free the output context */
>diff -ruN /usr/ports/audio/sox/files/patch-ffmpeg ./files/patch-ffmpeg
>--- /usr/ports/audio/sox/files/patch-ffmpeg 2014-01-23 02:40:44.000000000 +0900
>+++ ./files/patch-ffmpeg 1970-01-01 09:00:00.000000000 +0900
>@@ -1,11 +0,0 @@
>---- src/ffmpeg.h.orig
>-+++ src/ffmpeg.h
>-@@ -27,6 +27,8 @@
>- #include <ffmpeg/avformat.h>
>- #endif
>-
>-+#include <libavutil/mathematics.h>
>-+
>- #if defined __SUNPRO_C
>- #pragma enable_warn
>- #elif defined _MSC_VER
>diff -ruN /usr/ports/audio/sox/files/patch-ffmpeg2 ./files/patch-ffmpeg2
>--- /usr/ports/audio/sox/files/patch-ffmpeg2 2013-10-20 01:43:32.000000000 +0900
>+++ ./files/patch-ffmpeg2 1970-01-01 09:00:00.000000000 +0900
>@@ -1,16 +0,0 @@
>-Index: src/ffmpeg.c
>-===================================================================
>---- src/ffmpeg.c.orig
>-+++ src/ffmpeg.c
>-@@ -57,6 +57,11 @@
>- #define PKT_FLAG_KEY AV_PKT_FLAG_KEY
>- #endif
>-
>-+#ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE
>-+#define AVCODEC_MAX_AUDIO_FRAME_SIZE (192000 * 4)
>-+#endif
>-+
>-+
>- /* Private data for ffmpeg files */
>- typedef struct {
>- int audio_index;
>diff -ruN /usr/ports/audio/sox/files/patch-libav9 ./files/patch-libav9
>--- /usr/ports/audio/sox/files/patch-libav9 2013-10-20 01:43:32.000000000 +0900
>+++ ./files/patch-libav9 1970-01-01 09:00:00.000000000 +0900
>@@ -1,39 +0,0 @@
>-diff -burN src/ffmpeg.c sox-14.4.0/src/ffmpeg.c
>---- src/ffmpeg.c.orig 2012-11-25 21:59:45.990825656 +0100
>-+++ src/ffmpeg.c 2012-11-25 22:07:06.436809624 +0100
>-@@ -98,7 +98,7 @@
>- ic->error_recognition = 1;
>- #endif
>-
>-- if (!codec || avcodec_open(enc, codec) < 0)
>-+ if (!codec || avcodec_open2(enc, codec, NULL) < 0)
>- return -1;
>- if (enc->codec_type != AVMEDIA_TYPE_AUDIO) {
>- lsx_fail("ffmpeg CODEC %x is not an audio CODEC", enc->codec_type);
>-@@ -180,7 +180,7 @@
>- }
>-
>- /* Get CODEC parameters */
>-- if ((ret = av_find_stream_info(ffmpeg->ctxt)) < 0) {
>-+ if ((ret = avformat_find_stream_info(ffmpeg->ctxt, NULL)) < 0) {
>- lsx_fail("ffmpeg could not find CODEC parameters for %s", ft->filename);
>- return SOX_EOF;
>- }
>-@@ -274,7 +274,7 @@
>- AVCodecContext *c;
>- AVStream *st;
>-
>-- st = av_new_stream(oc, 1);
>-+ st = avformat_new_stream(oc, NULL);
>- if (!st) {
>- lsx_fail("ffmpeg could not alloc stream");
>- return NULL;
>-@@ -308,7 +308,7 @@
>- }
>-
>- /* open it */
>-- if (avcodec_open(c, codec) < 0) {
>-+ if (avcodec_open2(c, codec, NULL) < 0) {
>- lsx_fail("ffmpeg could not open CODEC");
>- return SOX_EOF;
>- }
>diff -ruN /usr/ports/audio/sox/pkg-plist ./pkg-plist
>--- /usr/ports/audio/sox/pkg-plist 2014-08-16 01:21:03.000000000 +0900
>+++ ./pkg-plist 2015-04-20 15:07:47.000000000 +0900
>@@ -5,8 +5,8 @@
> include/sox.h
> lib/libsox.a
> lib/libsox.so
>-lib/libsox.so.2
>-lib/libsox.so.2.0.1
>+lib/libsox.so.3
>+lib/libsox.so.3.0.0
> man/man1/play.1.gz
> man/man1/rec.1.gz
> man/man1/sox.1.gz
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list