diff options
Diffstat (limited to 'Library/Formula/erlang.rb')
| -rw-r--r-- | Library/Formula/erlang.rb | 36 | 
1 files changed, 19 insertions, 17 deletions
diff --git a/Library/Formula/erlang.rb b/Library/Formula/erlang.rb index b6505161b..1c3aad278 100644 --- a/Library/Formula/erlang.rb +++ b/Library/Formula/erlang.rb @@ -1,10 +1,9 @@ -require 'formula' -  # Major releases of erlang should typically start out as separate formula in  # Homebrew-versions, and only be merged to master when things like couchdb and  # elixir are compatible.  class Erlang < Formula -  homepage 'http://www.erlang.org' +  homepage "http://www.erlang.org" +  revision 1    stable do      # Download tarball from GitHub; it is served faster than the official tarball. @@ -12,7 +11,7 @@ class Erlang < Formula      sha256 "3fe1de7915cd603ebabe103d5d94b8f440fe57ad8e6f62bd6837b6949e08ba1a"    end -  head 'https://github.com/erlang/otp.git' +  head "https://github.com/erlang/otp.git"    bottle do      sha1 "d57bf012cf0ce9eb4ba8afc862c668c2f5c56142" => :yosemite @@ -30,10 +29,13 @@ class Erlang < Formula      sha256 "dd42b0104418de18e2247608a337bcd3bb24c59bbc36294deb5fae73ab6c90d6"    end -  option 'disable-hipe', "Disable building hipe; fails on various OS X systems" -  option 'with-native-libs', 'Enable native library compilation' -  option 'with-dirty-schedulers', 'Enable experimental dirty schedulers' -  option 'no-docs', 'Do not install documentation' +  option "without-hipe", "Disable building hipe; fails on various OS X systems" +  option "with-native-libs", "Enable native library compilation" +  option "with-dirty-schedulers", "Enable experimental dirty schedulers" +  option "without-docs", "Do not install documentation" + +  deprecated_option "disable-hipe" => "without-hipe" +  deprecated_option "no-docs" => "without-docs"    depends_on "autoconf" => :build    depends_on "automake" => :build @@ -50,7 +52,7 @@ class Erlang < Formula      # other modules doesn't fail with an unintelligable error.      %w[LIBS FLAGS AFLAGS ZFLAGS].each { |k| ENV.delete("ERL_#{k}") } -    ENV["FOP"] = "#{HOMEBREW_PREFIX}/bin/fop" if build.with? 'fop' +    ENV["FOP"] = "#{HOMEBREW_PREFIX}/bin/fop" if build.with? "fop"      # Do this if building from a checkout to generate configure      system "./otp_build autoconf" if File.exist? "otp_build" @@ -73,27 +75,27 @@ class Erlang < Formula      args << "--enable-dirty-schedulers" if build.with? "dirty-schedulers"      args << "--enable-wx" if build.with? "wxmac" -    if MacOS.version >= :snow_leopard and MacOS::CLT.installed? +    if MacOS.version >= :snow_leopard && MacOS::CLT.installed?        args << "--with-dynamic-trace=dtrace"      end -    if build.include? 'disable-hipe' +    if build.without? "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 -      args << '--disable-hipe' +      args << "--disable-hipe"      else -      args << '--enable-hipe' +      args << "--enable-hipe"      end      system "./configure", *args      system "make"      ENV.j1 # Install is not thread-safe; can try to create folder twice and fail -    system "make install" +    system "make", "install" -    unless build.include? 'no-docs' -      (lib/'erlang').install resource('man').files('man') -      doc.install resource('html') +    if build.with? "docs" +      (lib/"erlang").install resource("man").files("man") +      doc.install resource("html")      end    end  | 
