aboutsummaryrefslogtreecommitdiffstats
path: root/main/sox
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-06-22 07:44:20 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-06-22 13:18:41 +0000
commit3570515bc4aba95787c16968bfdb3aae53090225 (patch)
tree4cf288eb5689bec96638c09479b22cc3f3581901 /main/sox
parente5755547ac6c582d6a663ce081c064e97beb55a2 (diff)
downloadaports-3570515bc4aba95787c16968bfdb3aae53090225.tar.bz2
aports-3570515bc4aba95787c16968bfdb3aae53090225.tar.xz
main/ffmpeg: upgrade to 0.8 and rebuild dependants
Diffstat (limited to 'main/sox')
-rw-r--r--main/sox/APKBUILD21
-rw-r--r--main/sox/sox-ffmpeg-0.8.patch38
2 files changed, 53 insertions, 6 deletions
diff --git a/main/sox/APKBUILD b/main/sox/APKBUILD
index 771d5d5f69..f6c3e80828 100644
--- a/main/sox/APKBUILD
+++ b/main/sox/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=sox
pkgver=14.3.2
-pkgrel=0
+pkgrel=1
pkgdesc="The Swiss Army knife of sound processing tools"
url="http://sox.sourceforge.net/"
arch="all"
@@ -12,11 +12,17 @@ makedepends="ffmpeg-dev libao-dev libvorbis-dev libogg-dev lame-dev
depends=
subpackages="$pkgname-dev $pkgname-doc"
source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz
- sox-uclibc.patch"
+ sox-uclibc.patch
+ sox-ffmpeg-0.8.patch
+ "
prepare() {
cd "$srcdir"/$pkgname-$pkgver
- patch -p1 -i ../sox-uclibc.patch
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
}
build() {
@@ -24,7 +30,6 @@ build() {
./configure --prefix=/usr \
--sysconfdir=/etc \
--with-dyn-default \
- --disable-nls \
--with-distro="Alpine Linux" || return 1
make || return 1
}
@@ -33,7 +38,11 @@ package() {
cd "$srcdir"/$pkgname-$pkgver
make DESTDIR="$pkgdir" install || return 1
ln -sf play "$pkgdir"/usr/bin/rec || return 1
- ln -sf ../man1/sox.1.gz "$pkgdir"/usr/share/man/man7/soxeffect.7
+ ln -sf ../man1/sox.1.gz "$pkgdir"/usr/share/man/man7/soxeffect.7 || return 1
+ rm "$pkgdir"/usr/lib/*.la \
+ "$pkgdir"/usr/lib/sox/*.a \
+ "$pkgdir"/usr/lib/sox/*.la \
}
md5sums="e9d35cf3b0f8878596e0b7c49f9e8302 sox-14.3.2.tar.gz
-d8267f718ba6b4fb2f48c5104af31364 sox-uclibc.patch"
+d8267f718ba6b4fb2f48c5104af31364 sox-uclibc.patch
+f99f0c37c31dd103921292a1d89ad266 sox-ffmpeg-0.8.patch"
diff --git a/main/sox/sox-ffmpeg-0.8.patch b/main/sox/sox-ffmpeg-0.8.patch
new file mode 100644
index 0000000000..74b8cacdff
--- /dev/null
+++ b/main/sox/sox-ffmpeg-0.8.patch
@@ -0,0 +1,38 @@
+--- ./src/ffmpeg.c.orig
++++ ./src/ffmpeg.c
+@@ -91,7 +91,7 @@
+
+ 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 +182,7 @@
+ /* 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 +273,7 @@
+
+ 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 +423,7 @@
+ 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;
+