2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-06-05 22:38:23 +00:00
|
|
|
|
2009-09-01 00:06:11 +00:00
|
|
|
class ErlangManuals <Formula
|
2010-02-24 13:28:01 +00:00
|
|
|
url 'http://www.erlang.org/download/otp_doc_man_R13B04.tar.gz'
|
2010-02-24 17:24:27 +00:00
|
|
|
md5 '681aaef70affc64743f4e8c0675034af'
|
2009-09-02 15:11:46 +00:00
|
|
|
end
|
|
|
|
|
2009-06-05 22:38:23 +00:00
|
|
|
class Erlang <Formula
|
2010-02-24 13:28:01 +00:00
|
|
|
version 'R13B04'
|
2009-12-02 11:38:15 +00:00
|
|
|
url "http://erlang.org/download/otp_src_#{version}.tar.gz"
|
2010-02-24 17:24:27 +00:00
|
|
|
md5 'ca6da4921e438891967900aa6a084341'
|
2009-10-04 09:18:07 +00:00
|
|
|
homepage 'http://www.erlang.org'
|
2009-09-02 15:11:46 +00:00
|
|
|
|
2009-12-06 15:29:16 +00:00
|
|
|
# we can't strip the beam executables or any plugins
|
|
|
|
# there isn't really anything else worth stripping and it takes a really
|
|
|
|
# long time to run `file` over everything in lib because there is almost
|
|
|
|
# 4000 files (and really erlang guys! what's with that?! Most of them should
|
|
|
|
# be in share/erlang!)
|
|
|
|
skip_clean 'lib'
|
|
|
|
# may as well skip this too, everything is just shell scripts
|
|
|
|
skip_clean 'bin'
|
2009-09-18 18:16:39 +00:00
|
|
|
|
2009-06-05 22:38:23 +00:00
|
|
|
def install
|
2009-08-07 14:41:43 +00:00
|
|
|
ENV.deparallelize
|
2009-11-09 17:56:16 +00:00
|
|
|
ENV.gcc_4_2 # see http://github.com/mxcl/homebrew/issues/#issue/120
|
|
|
|
|
2009-09-02 15:11:46 +00:00
|
|
|
config_flags = ["--disable-debug",
|
|
|
|
"--prefix=#{prefix}",
|
2009-08-10 19:06:20 +00:00
|
|
|
"--enable-kernel-poll",
|
|
|
|
"--enable-threads",
|
|
|
|
"--enable-dynamic-ssl-lib",
|
2009-11-09 17:56:16 +00:00
|
|
|
"--enable-smp-support"]
|
|
|
|
|
|
|
|
unless ARGV.include? '--disable-hipe'
|
|
|
|
# HIPE doesn't strike me as that reliable on OS X
|
|
|
|
# http://syntatic.wordpress.com/2008/06/12/macports-erlang-bus-error-due-to-mac-os-x-1053-update/
|
|
|
|
# http://www.erlang.org/pipermail/erlang-patches/2008-September/000293.html
|
|
|
|
config_flags << '--enable-hipe'
|
|
|
|
end
|
2009-09-05 22:24:57 +00:00
|
|
|
|
2009-11-11 17:25:48 +00:00
|
|
|
if Hardware.is_64_bit? and MACOS_VERSION >= 10.6
|
2009-09-05 22:24:57 +00:00
|
|
|
config_flags << "--enable-darwin-64bit"
|
|
|
|
end
|
2009-09-02 15:11:46 +00:00
|
|
|
|
|
|
|
system "./configure", *config_flags
|
2009-11-11 17:25:48 +00:00
|
|
|
system "touch lib/wx/SKIP" if MACOS_VERSION >= 10.6
|
2009-06-05 22:38:23 +00:00
|
|
|
system "make"
|
|
|
|
system "make install"
|
2009-09-02 15:11:46 +00:00
|
|
|
|
2009-09-01 00:06:11 +00:00
|
|
|
ErlangManuals.new.brew { man.install Dir['man/*'] }
|
2009-06-05 22:38:23 +00:00
|
|
|
end
|
2009-12-06 15:30:23 +00:00
|
|
|
|
|
|
|
def test
|
|
|
|
"erl -noshell -eval 'crypto:start().' -s init stop"
|
|
|
|
end
|
2009-09-05 22:24:57 +00:00
|
|
|
end
|