diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-sound/sox | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-sound/sox')
-rw-r--r-- | media-sound/sox/Manifest | 2 | ||||
-rw-r--r-- | media-sound/sox/files/sox-14.4.0-avcodec54.patch | 103 | ||||
-rw-r--r-- | media-sound/sox/files/sox-14.4.0-ffmpeg.patch | 11 | ||||
-rw-r--r-- | media-sound/sox/files/sox-14.4.0-libav-9.patch | 39 | ||||
-rw-r--r-- | media-sound/sox/files/sox-14.4.1-ffmpeg2.patch | 16 | ||||
-rw-r--r-- | media-sound/sox/files/sox-14.4.1-ffmpeg24.patch | 17 | ||||
-rw-r--r-- | media-sound/sox/files/sox-14.4.1-uclibc.patch | 21 | ||||
-rw-r--r-- | media-sound/sox/metadata.xml | 14 | ||||
-rw-r--r-- | media-sound/sox/sox-14.4.1.ebuild | 92 | ||||
-rw-r--r-- | media-sound/sox/sox-14.4.2.ebuild | 77 |
10 files changed, 392 insertions, 0 deletions
diff --git a/media-sound/sox/Manifest b/media-sound/sox/Manifest new file mode 100644 index 000000000000..5af964ada4cc --- /dev/null +++ b/media-sound/sox/Manifest @@ -0,0 +1,2 @@ +DIST sox-14.4.1.tar.gz 1111653 SHA256 9a8c2c6fe51e608da346a157e111508a957af9e3ecf3de26781d36e9a67fa89b SHA512 a35c0f424ffaa51d06291e69b28ae7f2248a750fa8aded911dcd7e123877ecb5142c292f943eb723142c50dbd890b58163c6ef24c9c0573377855fad1b36fb25 WHIRLPOOL e1523027ea5221f31b9b6f8ff90503555d25fb68d3a35d5a7442142503140ed702a03d84a833056255cd2efa21b15d31358968ffbd1d252176996ed7e24bcf24 +DIST sox-14.4.2.tar.gz 1134299 SHA256 b45f598643ffbd8e363ff24d61166ccec4836fea6d3888881b8df53e3bb55f6c SHA512 b5c6203f4f5577503a034fe5b3d6a033ee97fe4d171c533933e2b036118a43a14f97c9668433229708609ccf9ee16abdeca3fc7501aa0aafe06baacbba537eca WHIRLPOOL dbed6c60eb96cf946168666d39d3310c669e22136a982dc3547125a30214916e8ab99542dee124d5dc570d32dda8921ff003e6bfe9fd6292d82df2344b9d5fdb diff --git a/media-sound/sox/files/sox-14.4.0-avcodec54.patch b/media-sound/sox/files/sox-14.4.0-avcodec54.patch new file mode 100644 index 000000000000..a9551f8e945d --- /dev/null +++ b/media-sound/sox/files/sox-14.4.0-avcodec54.patch @@ -0,0 +1,103 @@ +Fix build with ffmpeg 0.11. +https://bugs.gentoo.org/show_bug.cgi?id=407621 + +Index: sox-14.4.0/m4/ffmpeg.m4 +=================================================================== +--- sox-14.4.0.orig/m4/ffmpeg.m4 ++++ sox-14.4.0/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: sox-14.4.0/src/ffmpeg.c +=================================================================== +--- sox-14.4.0.orig/src/ffmpeg.c ++++ sox-14.4.0/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 --git a/media-sound/sox/files/sox-14.4.0-ffmpeg.patch b/media-sound/sox/files/sox-14.4.0-ffmpeg.patch new file mode 100644 index 000000000000..74dcc57901d4 --- /dev/null +++ b/media-sound/sox/files/sox-14.4.0-ffmpeg.patch @@ -0,0 +1,11 @@ +--- sox-14.4.0/src/ffmpeg.h ++++ sox-14.4.0/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 --git a/media-sound/sox/files/sox-14.4.0-libav-9.patch b/media-sound/sox/files/sox-14.4.0-libav-9.patch new file mode 100644 index 000000000000..d969cbc1b32c --- /dev/null +++ b/media-sound/sox/files/sox-14.4.0-libav-9.patch @@ -0,0 +1,39 @@ +diff -burN sox-14.4.0.old//src/ffmpeg.c sox-14.4.0/src/ffmpeg.c +--- sox-14.4.0.old//src/ffmpeg.c 2012-11-25 21:59:45.990825656 +0100 ++++ sox-14.4.0/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 --git a/media-sound/sox/files/sox-14.4.1-ffmpeg2.patch b/media-sound/sox/files/sox-14.4.1-ffmpeg2.patch new file mode 100644 index 000000000000..2c359363fcf8 --- /dev/null +++ b/media-sound/sox/files/sox-14.4.1-ffmpeg2.patch @@ -0,0 +1,16 @@ +Index: sox-14.4.1/src/ffmpeg.c +=================================================================== +--- sox-14.4.1.orig/src/ffmpeg.c ++++ sox-14.4.1/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 --git a/media-sound/sox/files/sox-14.4.1-ffmpeg24.patch b/media-sound/sox/files/sox-14.4.1-ffmpeg24.patch new file mode 100644 index 000000000000..88653ccbc817 --- /dev/null +++ b/media-sound/sox/files/sox-14.4.1-ffmpeg24.patch @@ -0,0 +1,17 @@ +Index: sox-14.4.1/src/ffmpeg.c +=================================================================== +--- sox-14.4.1.orig/src/ffmpeg.c ++++ sox-14.4.1/src/ffmpeg.c +@@ -263,8 +263,12 @@ static int stopread(sox_format_t * ft) + if (ffmpeg->audio_stream >= 0) + stream_component_close(ffmpeg, ffmpeg->audio_stream); + if (ffmpeg->ctxt) { ++#if LIBAVFORMAT_VERSION_INT > AV_VERSION_INT(53,25,0) ++ avformat_close_input(&ffmpeg->ctxt); ++#else + av_close_input_file(ffmpeg->ctxt); + ffmpeg->ctxt = NULL; /* safety */ ++#endif + } + + free(ffmpeg->audio_buf_raw); diff --git a/media-sound/sox/files/sox-14.4.1-uclibc.patch b/media-sound/sox/files/sox-14.4.1-uclibc.patch new file mode 100644 index 000000000000..84a37d346147 --- /dev/null +++ b/media-sound/sox/files/sox-14.4.1-uclibc.patch @@ -0,0 +1,21 @@ +Index: sox-14.4.1/src/formats.c +=================================================================== +--- sox-14.4.1.orig/src/formats.c ++++ sox-14.4.1/src/formats.c +@@ -409,7 +409,7 @@ static void UNUSED rewind_pipe(FILE * fp + #if defined _FSTDIO || defined _NEWLIB_VERSION || defined __APPLE__ + fp->_p -= PIPE_AUTO_DETECT_SIZE; + fp->_r += PIPE_AUTO_DETECT_SIZE; +-#elif defined __GLIBC__ ++#elif defined __GLIBC__ && ! defined __UCLIBC__ + fp->_IO_read_ptr = fp->_IO_read_base; + #elif defined _MSC_VER || defined _WIN32 || defined _WIN64 || defined _ISO_STDIO_ISO_H + fp->_ptr = fp->_base; +@@ -417,7 +417,6 @@ static void UNUSED rewind_pipe(FILE * fp + /* To fix this #error, either simply remove the #error line and live without + * file-type detection with pipes, or add support for your compiler in the + * lines above. Test with cat monkey.wav | ./sox --info - */ +- #error FIX NEEDED HERE + #define NO_REWIND_PIPE + (void)fp; + #endif diff --git a/media-sound/sox/metadata.xml b/media-sound/sox/metadata.xml new file mode 100644 index 000000000000..b3cb9b5d9c38 --- /dev/null +++ b/media-sound/sox/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>sound</herd> + <use> + <flag name="amr">Enables Adaptive Multi-Rate Audio support</flag> + <flag name="id3tag">Enables ID3 tagging with id3tag library</flag> + <flag name="opus">Enables reading Ogg Opus files.</flag> + <flag name="twolame">Enables twolame support (MPEG Audio Layer 2 encoder)</flag> + </use> + <upstream> + <remote-id type="sourceforge">sox</remote-id> + </upstream> +</pkgmetadata> diff --git a/media-sound/sox/sox-14.4.1.ebuild b/media-sound/sox/sox-14.4.1.ebuild new file mode 100644 index 000000000000..e9f67fe88546 --- /dev/null +++ b/media-sound/sox/sox-14.4.1.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 +inherit eutils flag-o-matic autotools + +DESCRIPTION="The swiss army knife of sound processing programs" +HOMEPAGE="http://sox.sourceforge.net" +SRC_URI="mirror://sourceforge/sox/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-solaris" +IUSE="alsa amr ao debug encode ffmpeg flac id3tag ladspa mad ogg openmp oss png pulseaudio sndfile static-libs twolame wavpack" + +# libtool required for libltdl +RDEPEND=">=sys-devel/libtool-2.2.6b + >=media-sound/gsm-1.0.12-r1 + alsa? ( media-libs/alsa-lib ) + amr? ( media-libs/opencore-amr ) + ao? ( media-libs/libao ) + encode? ( >=media-sound/lame-3.98.4 ) + ffmpeg? ( >=virtual/ffmpeg-0.9 ) + flac? ( >=media-libs/flac-1.1.3 ) + id3tag? ( media-libs/libid3tag ) + ladspa? ( media-libs/ladspa-sdk ) + mad? ( media-libs/libmad ) + ogg? ( media-libs/libvorbis media-libs/libogg ) + png? ( media-libs/libpng sys-libs/zlib ) + pulseaudio? ( media-sound/pulseaudio ) + sndfile? ( >=media-libs/libsndfile-1.0.11 ) + twolame? ( media-sound/twolame ) + wavpack? ( media-sound/wavpack )" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +DOCS=( AUTHORS ChangeLog NEWS README ) + +src_prepare() { + sed -i -e 's:CFLAGS="-g":CFLAGS="$CFLAGS -g":' configure || die #386027 + + epatch \ + "${FILESDIR}"/${PN}-14.4.1-uclibc.patch \ + "${FILESDIR}"/${PN}-14.4.0-ffmpeg.patch \ + "${FILESDIR}"/${PN}-14.4.0-avcodec54.patch \ + "${FILESDIR}"/${PN}-14.4.0-libav-9.patch + + if has_version '>=media-video/ffmpeg-2' ; then + epatch "${FILESDIR}"/${PN}-14.4.1-ffmpeg2.patch + sed -i -e 's/ CODEC_ID/ AV_CODEC_ID/g' \ + -e 's/ CodecID/ AVCodecID/g' \ + src/ffmpeg.c || die + epatch "${FILESDIR}"/${PN}-14.4.1-ffmpeg24.patch + fi + eautoreconf +} + +src_configure() { + # Fixes wav segfaults. See Bug #35745. + append-flags -fsigned-char + + econf \ + $(use_with alsa) \ + $(use_with amr amrnb) \ + $(use_with amr amrwb) \ + $(use_with ao) \ + $(use_enable debug) \ + $(use_with encode lame) \ + $(use_with ffmpeg) \ + $(use_with flac) \ + $(use_with id3tag) \ + $(use_with ladspa) \ + $(use_with mad) \ + $(use_enable openmp gomp) \ + $(use_with ogg oggvorbis) \ + $(use_with oss) \ + $(use_with png) \ + $(use_with pulseaudio) \ + $(use_with sndfile) \ + $(use_enable static-libs static) \ + $(use_with twolame) \ + $(use_with wavpack) \ + --with-distro="Gentoo" +} + +src_install() { + default + # libltdl is used for loading plugins, keeping libtool files with empty + # dependency_libs what otherwise would be -exec rm -f {} + + find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} + +} diff --git a/media-sound/sox/sox-14.4.2.ebuild b/media-sound/sox/sox-14.4.2.ebuild new file mode 100644 index 000000000000..7dc1a267eb8d --- /dev/null +++ b/media-sound/sox/sox-14.4.2.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools + +DESCRIPTION="The swiss army knife of sound processing programs" +HOMEPAGE="http://sox.sourceforge.net" +SRC_URI="mirror://sourceforge/sox/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-solaris" +IUSE="alsa amr ao debug encode flac id3tag ladspa mad ogg openmp oss opus png pulseaudio sndfile static-libs twolame wavpack" + +RDEPEND=" + dev-libs/libltdl:0= + >=media-sound/gsm-1.0.12-r1 + alsa? ( media-libs/alsa-lib ) + amr? ( media-libs/opencore-amr ) + ao? ( media-libs/libao ) + encode? ( >=media-sound/lame-3.98.4 ) + flac? ( >=media-libs/flac-1.1.3 ) + id3tag? ( media-libs/libid3tag ) + ladspa? ( media-libs/ladspa-sdk ) + mad? ( media-libs/libmad ) + ogg? ( media-libs/libvorbis media-libs/libogg ) + opus? ( media-libs/opus media-libs/opusfile ) + png? ( media-libs/libpng:0= sys-libs/zlib ) + pulseaudio? ( media-sound/pulseaudio ) + sndfile? ( >=media-libs/libsndfile-1.0.11 ) + twolame? ( media-sound/twolame ) + wavpack? ( media-sound/wavpack )" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +DOCS=( AUTHORS ChangeLog NEWS README ) + +src_prepare() { + sed -i -e 's:CFLAGS="-g":CFLAGS="$CFLAGS -g":' configure.ac || die #386027 + + eautoreconf +} + +src_configure() { + econf \ + $(use_with alsa) \ + $(use_with amr amrnb) \ + $(use_with amr amrwb) \ + $(use_with ao) \ + $(use_enable debug) \ + $(use_with encode lame) \ + $(use_with flac) \ + $(use_with id3tag) \ + $(use_with ladspa) \ + $(use_with mad) \ + $(use_enable openmp) \ + $(use_with ogg oggvorbis) \ + $(use_with oss) \ + $(use_with opus) \ + $(use_with png) \ + $(use_with pulseaudio) \ + $(use_with sndfile) \ + $(use_enable static-libs static) \ + $(use_with twolame) \ + $(use_with wavpack) \ + --with-distro="Gentoo" +} + +src_install() { + default + # libltdl is used for loading plugins, keeping libtool files with empty + # dependency_libs what otherwise would be -exec rm -f {} + + find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} + +} |