aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/sox.rb
diff options
context:
space:
mode:
authorMisty De Meo2011-09-01 13:59:04 -0500
committerAdam Vandenberg2011-09-01 13:00:54 -0700
commit4daa0571326fe5662d8239157e27e2b0b6bd586f (patch)
tree92873a733bf53941f10c3414e380fe2498fc1295 /Library/Formula/sox.rb
parent0271b146952409e35ba2cf64c1206ba3693b4aa7 (diff)
downloadhomebrew-4daa0571326fe5662d8239157e27e2b0b6bd586f.tar.bz2
sox: Fix compilation with ffmpeg >= 0.7
ffmpeg compilation broke against ffmpeg 0.7; this patch from the official sox git repo lets it build against the version we use. The patch should be able to be removed in the next version. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula/sox.rb')
-rw-r--r--Library/Formula/sox.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/Library/Formula/sox.rb b/Library/Formula/sox.rb
index 0be5828df..cd1199a4e 100644
--- a/Library/Formula/sox.rb
+++ b/Library/Formula/sox.rb
@@ -11,6 +11,13 @@ class Sox < Formula
depends_on 'libao' => :optional
depends_on 'mad' # see commit message
+ def patches
+ # sox does not build against libav >= 0.7.0
+ # http://sox.git.sourceforge.net/git/gitweb.cgi?p=sox/sox;a=commitdiff;h=c81a45e9b54fdb8c1835aeb575e748ec6d7c921d
+ # Can be removed in the next release
+ DATA
+ end
+
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}",
@@ -18,3 +25,21 @@ class Sox < Formula
system "make install"
end
end
+
+__END__
+--- a/src/ffmpeg.c
++++ b/src/ffmpeg.c
+@@ -50,6 +50,13 @@
+ #include <ctype.h>
+ #include "ffmpeg.h"
+
++#ifndef CODEC_TYPE_AUDIO
++#define CODEC_TYPE_AUDIO AVMEDIA_TYPE_AUDIO
++#endif
++#ifndef PKT_FLAG_KEY
++#define PKT_FLAG_KEY AV_PKT_FLAG_KEY
++#endif
++
+ /* Private data for ffmpeg files */
+ typedef struct {
+ int audio_index;