Created
September 5, 2009 17:45
-
-
Save archaelus/181466 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'brewkit' | |
class ErlangManuals <Formula | |
@version='5.7.3-snapshot' | |
@homepage='http://www.erlang.org' | |
@url='http://erlang.org/download/snapshots/otp_man_R13B02_2009-09-04_18.tar.gz' | |
@md5='fa8f96159bd9a88aa2fb9e4d79d7affe' | |
end | |
class ErlangHtmldocs <Formula | |
@version='5.7.3-snapshot' | |
@homepage='http://www.erlang.org' | |
@url='http://erlang.org/download/snapshots/otp_html_R13B02_2009-09-04_18.tar.gz' | |
@md5='fa8f96159bd9a88aa2fb9e4d79d7affe' | |
def doc | |
prefix+'share'+'doc'+'erlang'+version | |
end | |
def install | |
FileUtils.cp_r "*", doc | |
end | |
end | |
class Erlang <Formula | |
@version='5.7.3-snapshot' | |
@homepage='http://www.erlang.org' | |
@url='http://erlang.org/download/snapshots/otp_src_R13B02.tar.gz' | |
@md5='80048e589272db810f5d536f47050ab8' | |
def options | |
[ | |
['--64bit', "Build a 64bit version of Erlang."], | |
] | |
end | |
configure_args = ["--disable-debug", | |
"--prefix='#{prefix}'", | |
"--enable-kernel-poll", | |
"--enable-threads", | |
"--enable-dynamic-ssl-lib", | |
"--enable-smp-support", | |
"--enable-hipe", | |
] | |
def install | |
ENV.deparallelize | |
if ARGV.include? '--64bit' | |
configure_args.push("--enable-m64-build") | |
configure_args.push("--enable-darwin-64bit") | |
end | |
system "./configure", *configure_args | |
system "make" | |
system "make install" | |
ErlangManuals.new.brew { man.install Dir['man/*'] } | |
ErlangHtmlDocs.new.brew { doc.install "html" } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment