2010-01-28 16:57:05 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Sox < Formula
|
2011-06-25 21:06:37 +00:00
|
|
|
url 'http://downloads.sourceforge.net/project/sox/sox/14.3.2/sox-14.3.2.tar.gz'
|
2010-01-28 16:57:05 +00:00
|
|
|
homepage 'http://sox.sourceforge.net/'
|
2011-06-25 21:06:37 +00:00
|
|
|
md5 'e9d35cf3b0f8878596e0b7c49f9e8302'
|
2010-01-28 16:57:05 +00:00
|
|
|
|
2010-09-19 17:21:57 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2010-01-31 16:00:45 +00:00
|
|
|
depends_on 'libvorbis' => :optional
|
2010-08-24 16:11:26 +00:00
|
|
|
depends_on 'flac' => :optional
|
2011-09-05 21:16:13 +00:00
|
|
|
depends_on 'libsndfile' => :optional
|
2010-08-24 16:11:26 +00:00
|
|
|
depends_on 'libao' => :optional
|
2010-08-30 13:08:26 +00:00
|
|
|
depends_on 'mad' # see commit message
|
2010-01-31 16:00:45 +00:00
|
|
|
|
2011-09-01 18:59:04 +00:00
|
|
|
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
|
|
|
|
|
2010-01-28 16:57:05 +00:00
|
|
|
def install
|
2012-01-27 04:33:58 +00:00
|
|
|
ENV.x11 # For libpng, used for the optional "spectrogram" effect.
|
2010-04-07 05:58:35 +00:00
|
|
|
system "./configure", "--disable-debug", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--disable-gomp"
|
2010-01-28 16:57:05 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
2011-09-01 18:59:04 +00:00
|
|
|
|
|
|
|
__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;
|