2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-10-13 01:37:13 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Portaudio < Formula
|
2009-10-13 01:37:13 +00:00
|
|
|
homepage 'http://www.portaudio.com'
|
2012-08-27 02:33:52 +00:00
|
|
|
url 'http://www.portaudio.com/archives/pa_stable_v19_20111121.tgz'
|
|
|
|
sha1 'f07716c470603729a55b70f5af68f4a6807097eb'
|
2009-10-13 01:37:13 +00:00
|
|
|
|
2011-03-21 21:24:22 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
|
|
|
|
2012-08-12 17:58:35 +00:00
|
|
|
option :universal
|
|
|
|
|
2012-03-18 20:33:24 +00:00
|
|
|
fails_with :llvm do
|
|
|
|
build 2334
|
|
|
|
end
|
2009-10-13 01:37:13 +00:00
|
|
|
|
2012-06-10 16:32:25 +00:00
|
|
|
# Fix PyAudio compilation on Lion
|
|
|
|
def patches
|
2012-08-27 02:33:52 +00:00
|
|
|
{ :p0 =>
|
|
|
|
"https://trac.macports.org/export/94150/trunk/dports/audio/portaudio/files/patch-include__pa_mac_core.h.diff"
|
|
|
|
}
|
2012-09-05 04:04:01 +00:00
|
|
|
end if MacOS.version >= :lion
|
2012-06-10 16:32:25 +00:00
|
|
|
|
2011-03-21 21:24:22 +00:00
|
|
|
def install
|
2012-08-12 17:58:35 +00:00
|
|
|
ENV.universal_binary if build.universal?
|
2011-04-28 16:25:40 +00:00
|
|
|
|
2011-12-22 17:01:52 +00:00
|
|
|
args = [ "--prefix=#{prefix}",
|
|
|
|
"--disable-debug",
|
|
|
|
"--disable-dependency-tracking",
|
|
|
|
# portaudio builds universal unless told not to
|
2012-08-27 02:33:52 +00:00
|
|
|
"--enable-mac-universal=#{build.universal? ? 'yes' : 'no'}" ]
|
2011-12-22 17:01:52 +00:00
|
|
|
|
|
|
|
system "./configure", *args
|
2009-10-13 01:37:13 +00:00
|
|
|
system "make install"
|
2011-01-17 22:37:30 +00:00
|
|
|
|
|
|
|
# Need 'pa_mac_core.h' to compile PyAudio
|
|
|
|
include.install "include/pa_mac_core.h"
|
2009-10-13 01:37:13 +00:00
|
|
|
end
|
|
|
|
end
|