2009-11-17 22:41:05 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Libsndfile < Formula
|
2009-11-17 22:41:05 +00:00
|
|
|
homepage 'http://www.mega-nerd.com/libsndfile/'
|
2011-07-19 00:16:25 +00:00
|
|
|
url 'http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.25.tar.gz'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 'e95d9fca57f7ddace9f197071cbcfb92fa16748e'
|
2009-11-17 22:41:05 +00:00
|
|
|
|
2010-10-17 16:59:04 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
|
|
|
|
2012-08-12 17:55:58 +00:00
|
|
|
option :universal
|
2011-07-19 00:16:25 +00:00
|
|
|
|
2012-02-22 16:44:59 +00:00
|
|
|
def patches
|
|
|
|
# libsndfile doesn't find Carbon.h using XCode 4.3:
|
|
|
|
# fixed upstream: https://github.com/erikd/libsndfile/commit/d04e1de82ae0af48fd09d5cb09bf21b4ca8d513c
|
|
|
|
DATA
|
|
|
|
end
|
|
|
|
|
2009-11-17 22:41:05 +00:00
|
|
|
def install
|
2012-08-12 17:55:58 +00:00
|
|
|
ENV.universal_binary if build.universal?
|
2011-07-19 00:16:25 +00:00
|
|
|
|
2010-04-24 03:17:18 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
|
2009-11-17 22:41:05 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
2012-02-22 16:44:59 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
--- a/programs/sndfile-play.c 2011-03-27 22:15:31.000000000 -0700
|
|
|
|
+++ b/programs/sndfile-play.c 2012-02-24 20:02:06.000000000 -0800
|
|
|
|
@@ -58,7 +58,6 @@
|
|
|
|
#include <sys/soundcard.h>
|
|
|
|
|
|
|
|
#elif (defined (__MACH__) && defined (__APPLE__))
|
|
|
|
- #include <Carbon.h>
|
|
|
|
#include <CoreAudio/AudioHardware.h>
|
|
|
|
|
|
|
|
#elif defined (HAVE_SNDIO_H)
|