diff options
| author | Jack Nagel | 2013-01-18 19:30:43 -0600 | 
|---|---|---|
| committer | Jack Nagel | 2013-01-18 19:30:43 -0600 | 
| commit | 43f2bfaafcbc53a39aedf384186b604c1834af2e (patch) | |
| tree | c42688c170f8092be80a3bca20df26af125822a0 | |
| parent | 8eddbd5404fb31cc9ddaead5f14d7076ec59a2cd (diff) | |
| download | homebrew-43f2bfaafcbc53a39aedf384186b604c1834af2e.tar.bz2 | |
Use fatal DSL method in requirements
| -rw-r--r-- | Library/Formula/appledoc.rb | 5 | ||||
| -rw-r--r-- | Library/Formula/avian.rb | 6 | ||||
| -rw-r--r-- | Library/Formula/cmu-sphinxbase.rb | 5 | ||||
| -rw-r--r-- | Library/Formula/coq.rb | 5 | ||||
| -rw-r--r-- | Library/Formula/cvs2svn.rb | 6 | ||||
| -rw-r--r-- | Library/Formula/diffpdf.rb | 6 | ||||
| -rw-r--r-- | Library/Formula/elixir.rb | 6 | ||||
| -rw-r--r-- | Library/Formula/hyperestraier.rb | 6 | ||||
| -rw-r--r-- | Library/Formula/mongodb.rb | 4 | ||||
| -rw-r--r-- | Library/Formula/mupdf.rb | 6 | ||||
| -rw-r--r-- | Library/Formula/mysql-connector-odbc.rb | 5 | ||||
| -rw-r--r-- | Library/Formula/nu.rb | 5 | ||||
| -rw-r--r-- | Library/Formula/pdf2svg.rb | 6 | ||||
| -rw-r--r-- | Library/Formula/shocco.rb | 6 | ||||
| -rw-r--r-- | Library/Formula/signing-party.rb | 6 | ||||
| -rw-r--r-- | Library/Formula/squid.rb | 8 | ||||
| -rw-r--r-- | Library/Formula/subversion.rb | 18 | ||||
| -rw-r--r-- | Library/Formula/uwsgi.rb | 6 | ||||
| -rw-r--r-- | Library/Formula/wxmac.rb | 3 | 
19 files changed, 43 insertions, 75 deletions
| diff --git a/Library/Formula/appledoc.rb b/Library/Formula/appledoc.rb index 4f4814fcf..eecde22e0 100644 --- a/Library/Formula/appledoc.rb +++ b/Library/Formula/appledoc.rb @@ -1,12 +1,11 @@  require 'formula'  class LionOrNewer < Requirement +  fatal true +    def satisfied?      MacOS.version >= :lion    end -  def fatal? -    true -  end    def message      "Appledoc requires Mac OS X 10.7 (Lion) or newer."    end diff --git a/Library/Formula/avian.rb b/Library/Formula/avian.rb index 0b1dd627c..7d37eacd1 100644 --- a/Library/Formula/avian.rb +++ b/Library/Formula/avian.rb @@ -1,6 +1,8 @@  require 'formula'  class JdkInstalled < Requirement +  fatal true +    def message; <<-EOS.undent      A JDK is required. @@ -12,10 +14,6 @@ class JdkInstalled < Requirement    def satisfied?      which 'javac'    end - -  def fatal? -    true -  end  end  class Avian < Formula diff --git a/Library/Formula/cmu-sphinxbase.rb b/Library/Formula/cmu-sphinxbase.rb index b947dd946..2258fb646 100644 --- a/Library/Formula/cmu-sphinxbase.rb +++ b/Library/Formula/cmu-sphinxbase.rb @@ -1,6 +1,8 @@  require 'formula'  class HomebrewedPython < Requirement +  fatal true +    def message; <<-EOS.undent      Compiling against the system-provided Python will likely fail.      The system-provided Python includes PPC support, which will cause a compiler @@ -12,9 +14,6 @@ class HomebrewedPython < Requirement    def satisfied?      Formula.factory('python').installed?    end -  def fatal? -    false -  end  end  class CmuSphinxbase < Formula diff --git a/Library/Formula/coq.rb b/Library/Formula/coq.rb index 4505fa9da..1a163844b 100644 --- a/Library/Formula/coq.rb +++ b/Library/Formula/coq.rb @@ -1,6 +1,8 @@  require 'formula'  class TransitionalMode < Requirement +  fatal true +    def message; <<-EOS.undent      camlp5 must be compiled in transitional mode (instead of --strict mode):        brew install camlp5 @@ -12,9 +14,6 @@ class TransitionalMode < Requirement      # If installed, make sure it is transitional instead of strict.      `camlp5 -pmode 2>&1`.chomp == 'transitional'    end -  def fatal? -    true -  end  end  class Coq < Formula diff --git a/Library/Formula/cvs2svn.rb b/Library/Formula/cvs2svn.rb index 2f47a8ea4..e6bf23943 100644 --- a/Library/Formula/cvs2svn.rb +++ b/Library/Formula/cvs2svn.rb @@ -1,6 +1,8 @@  require 'formula'  class PythonWithGdbm < Requirement +  fatal true +    def message; <<-EOS.undent      The Python being used does not include gdbm support,      but it is required to build this formula: @@ -14,10 +16,6 @@ class PythonWithGdbm < Requirement    def satisfied?      quiet_system "python", "-c", "import gdbm"    end - -  def fatal? -    true -  end  end  class Cvs2svn < Formula diff --git a/Library/Formula/diffpdf.rb b/Library/Formula/diffpdf.rb index 3082a1b2b..15775363f 100644 --- a/Library/Formula/diffpdf.rb +++ b/Library/Formula/diffpdf.rb @@ -1,15 +1,13 @@  require 'formula'  class PopplerQt4 < Requirement +  fatal true +    def satisfied?      poppler = Tab.for_formula 'poppler'      poppler.installed_with? '--with-qt4'    end -  def fatal? -    true -  end -    def message; <<-EOS.undent      DiffPDF requires the Poppler-Qt4 bindings but Poppler was not installed      with support for Qt. Please reinstall Poppler using the `--with-qt4` diff --git a/Library/Formula/elixir.rb b/Library/Formula/elixir.rb index eac245a3e..96c196cbd 100644 --- a/Library/Formula/elixir.rb +++ b/Library/Formula/elixir.rb @@ -1,6 +1,8 @@  require 'formula'  class ErlangInstalled < Requirement +  fatal true +    def message; <<-EOS.undent      Erlang is required to install. @@ -15,10 +17,6 @@ class ErlangInstalled < Requirement    def satisfied?      which 'erl'    end - -  def fatal? -    true -  end  end  class Elixir < Formula diff --git a/Library/Formula/hyperestraier.rb b/Library/Formula/hyperestraier.rb index 3f44f627e..932ebc100 100644 --- a/Library/Formula/hyperestraier.rb +++ b/Library/Formula/hyperestraier.rb @@ -1,6 +1,8 @@  require 'formula'  class EucjpMecabIpadic < Requirement +  fatal true +    def initialize      @mecab_ipadic_installed = Formula.factory('mecab-ipadic').installed?    end @@ -9,10 +11,6 @@ class EucjpMecabIpadic < Requirement      @mecab_ipadic_installed && mecab_dic_charset == 'euc'    end -  def fatal? -    true -  end -    def message      if @mecab_ipadic_installed        <<-EOS.undent diff --git a/Library/Formula/mongodb.rb b/Library/Formula/mongodb.rb index 5aaedf95b..6f74fc18a 100644 --- a/Library/Formula/mongodb.rb +++ b/Library/Formula/mongodb.rb @@ -1,12 +1,12 @@  require 'formula'  class SixtyFourBitRequired < Requirement +  fatal true +    def satisfied?      MacOS.prefer_64_bit?    end -  def fatal?; true end -    def message; <<-EOS.undent      32-bit MongoDB binaries are no longer available. diff --git a/Library/Formula/mupdf.rb b/Library/Formula/mupdf.rb index 360f7b3f9..07c4fb64d 100644 --- a/Library/Formula/mupdf.rb +++ b/Library/Formula/mupdf.rb @@ -1,14 +1,12 @@  require 'formula'  class NeedsSnowLeopard < Requirement +  fatal true +    def satisfied?      MacOS.version >= :snow_leopard    end -  def fatal? -    true -  end -    def message; <<-EOS.undent      The version of Freetype that comes with Leopard is too old to build MuPDF      against. It is possible to get MuPDF working on Leopard using the Freetype diff --git a/Library/Formula/mysql-connector-odbc.rb b/Library/Formula/mysql-connector-odbc.rb index 51eeea237..5bcf3bc88 100644 --- a/Library/Formula/mysql-connector-odbc.rb +++ b/Library/Formula/mysql-connector-odbc.rb @@ -1,6 +1,8 @@  require 'formula'  class MySqlInstalled < Requirement +  fatal true +    def message; <<-EOS.undent      MySQL is required to install. @@ -18,9 +20,6 @@ class MySqlInstalled < Requirement    def satisfied?      which 'mysql_config'    end -  def fatal? -    true -  end  end  class MysqlConnectorOdbc < Formula diff --git a/Library/Formula/nu.rb b/Library/Formula/nu.rb index 20f0eadb3..0dcb9575b 100644 --- a/Library/Formula/nu.rb +++ b/Library/Formula/nu.rb @@ -1,15 +1,14 @@  require 'formula'  class NeedsLion < Requirement +  fatal true +    def satisfied?      MacOS.version >= :lion    end    def message      "Nu requires Mac OS X 10.7 or newer"    end -  def fatal? -    true -  end  end  class Nu < Formula diff --git a/Library/Formula/pdf2svg.rb b/Library/Formula/pdf2svg.rb index 65bb295b9..a36575477 100644 --- a/Library/Formula/pdf2svg.rb +++ b/Library/Formula/pdf2svg.rb @@ -1,15 +1,13 @@  require 'formula'  class PopplerGlib < Requirement +  fatal true +    def satisfied?      poppler = Tab.for_formula 'poppler'      poppler.installed_with? '--with-glib'    end -  def fatal? -    true -  end -    def message; <<-EOS.undent      pdf2svg requires the Poppler-Glib bindings but Poppler was not installed      with support for glib. Please reinstall Poppler using the `--with-glib` diff --git a/Library/Formula/shocco.rb b/Library/Formula/shocco.rb index 09b92203c..b13c443ff 100644 --- a/Library/Formula/shocco.rb +++ b/Library/Formula/shocco.rb @@ -9,6 +9,8 @@ class Pygments < Formula  end  class MarkdownProvider < Requirement +  fatal true +    def message; <<-EOS.undent      shocco requires a `markdown` command. @@ -23,10 +25,6 @@ class MarkdownProvider < Requirement    def satisfied?      which 'markdown'    end - -  def fatal? -    true -  end  end  class Shocco < Formula diff --git a/Library/Formula/signing-party.rb b/Library/Formula/signing-party.rb index 4420ebfb4..4dfd321a5 100644 --- a/Library/Formula/signing-party.rb +++ b/Library/Formula/signing-party.rb @@ -1,6 +1,8 @@  require 'formula'  class GnupgInstalled < Requirement +  fatal true +    def message; <<-EOS.undent      Gnupg is required to use these tools. @@ -16,10 +18,6 @@ class GnupgInstalled < Requirement    def satisfied?      which 'gpg' or which 'gpg2'    end - -  def fatal? -    false -  end  end  class SigningParty < Formula diff --git a/Library/Formula/squid.rb b/Library/Formula/squid.rb index 70d1454c4..cf461aad1 100644 --- a/Library/Formula/squid.rb +++ b/Library/Formula/squid.rb @@ -1,6 +1,9 @@  require 'formula'  class NoBdb5 < Requirement +  # Not fatal in case Squid starts working with a newer version of BDB. +  fatal false +    def message; <<-EOS.undent      This software can fail to compile when Berkeley-DB 5.x is installed.      You may need to try: @@ -14,11 +17,6 @@ class NoBdb5 < Requirement      f = Formula.factory("berkeley-db")      not f.installed?    end - -  # Not fatal in case Squid starts working with a newer version of BDB. -  def fatal? -    false -  end  end  class Squid < Formula diff --git a/Library/Formula/subversion.rb b/Library/Formula/subversion.rb index a9097fded..8d9514da8 100644 --- a/Library/Formula/subversion.rb +++ b/Library/Formula/subversion.rb @@ -7,16 +7,14 @@ def build_ruby?;   build.include? "ruby";   end  def with_unicode_path?; build.include? "unicode-path"; end  class UniversalNeon < Requirement +  fatal true +    def message; <<-EOS.undent        A universal build was requested, but neon was already built for a single arch.        You will need to `brew rm neon` first.      EOS    end -  def fatal? -    true -  end -    def satisfied?      f = Formula.factory('neon')      !f.installed? || archs_for_command(f.lib+'libneon.dylib').universal? @@ -24,16 +22,14 @@ class UniversalNeon < Requirement  end  class UniversalSqlite < Requirement +  fatal true +    def message; <<-EOS.undent        A universal build was requested, but sqlite was already built for a single arch.        You will need to `brew rm sqlite` first.      EOS    end -  def fatal? -    true -  end -    def satisfied?      f = Formula.factory('sqlite')      !f.installed? || archs_for_command(f.lib+'libsqlite3.dylib').universal? @@ -41,16 +37,14 @@ class UniversalSqlite < Requirement  end  class UniversalSerf < Requirement +  fatal true +    def message; <<-EOS.undent        A universal build was requested, but serf was already built for a single arch.        You will need to `brew rm serf` first.      EOS    end -  def fatal? -    true -  end -    def satisfied?      f = Formula.factory('serf')      !f.installed? || archs_for_command(f.lib+'libserf-1.0.0.0.dylib').universal? diff --git a/Library/Formula/uwsgi.rb b/Library/Formula/uwsgi.rb index 5c2d68790..255a2da2b 100644 --- a/Library/Formula/uwsgi.rb +++ b/Library/Formula/uwsgi.rb @@ -1,6 +1,8 @@  require 'formula'  class UniversalPcre < Requirement +  fatal true +    def message; <<-EOS.undent      pcre must be build universal for uwsgi to work.      You will need to: @@ -9,10 +11,6 @@ class UniversalPcre < Requirement      EOS    end -  def fatal? -    true -  end -    def satisfied?      f = Formula.factory('pcre')      f.installed? && archs_for_command(f.lib/'libpcre.dylib').universal? diff --git a/Library/Formula/wxmac.rb b/Library/Formula/wxmac.rb index 7947416d6..09af04e83 100644 --- a/Library/Formula/wxmac.rb +++ b/Library/Formula/wxmac.rb @@ -1,6 +1,8 @@  require 'formula'  class FrameworkPython < Requirement +  fatal true +    def message; <<-EOS.undent      Python needs to be built as a framework.      EOS @@ -9,7 +11,6 @@ class FrameworkPython < Requirement      q = `python -c "import distutils.sysconfig as c; print(c.get_config_var('PYTHONFRAMEWORK'))"`      not q.chomp.empty?    end -  def fatal?; true; end  end  class Wxmac < Formula | 
