diff options
| author | Jack Nagel | 2013-04-01 11:53:13 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-04-02 13:17:24 -0500 |
| commit | da184c25e9dd8882c7464b891d4349a8aa4c5442 (patch) | |
| tree | e407252edec868072aff29a6917963d50d44f7c6 /Library | |
| parent | a82080bd2b85bbdc4072373605c94017f43358f8 (diff) | |
| download | homebrew-da184c25e9dd8882c7464b891d4349a8aa4c5442.tar.bz2 | |
Move x86_64 Requirement into core
Closes #18886.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/minizinc.rb | 15 | ||||
| -rw-r--r-- | Library/Formula/postgres-xc.rb | 14 | ||||
| -rw-r--r-- | Library/Formula/pypy.rb | 33 | ||||
| -rw-r--r-- | Library/Homebrew/dependency_collector.rb | 1 | ||||
| -rw-r--r-- | Library/Homebrew/requirements.rb | 20 |
5 files changed, 30 insertions, 53 deletions
diff --git a/Library/Formula/minizinc.rb b/Library/Formula/minizinc.rb index 2ca498b76..af387d243 100644 --- a/Library/Formula/minizinc.rb +++ b/Library/Formula/minizinc.rb @@ -1,24 +1,11 @@ require 'formula' -class X86_64_Architecture < Requirement - fatal true - - satisfy MacOS.prefer_64_bit? - - def message; <<-EOS.undent - Your system appears to run on a 32-bit architecture. - Minizinc only supports 64-bit architectures, sorry. - EOS - end -end - - class Minizinc < Formula homepage 'http://www.g12.csse.unimelb.edu.au/minizinc/' url 'http://www.g12.csse.unimelb.edu.au/minizinc/downloads/release-1.6/minizinc-1.6-x86_64-apple-darwin.tar.gz' sha1 '71f0e08962eb8bb44c463851f0144c8b006fdb80' - depends_on X86_64_Architecture + depends_on :arch => :x86_64 def patches # remove echoed recommendations about linking directories diff --git a/Library/Formula/postgres-xc.rb b/Library/Formula/postgres-xc.rb index f7f3e81af..b7b5f85be 100644 --- a/Library/Formula/postgres-xc.rb +++ b/Library/Formula/postgres-xc.rb @@ -1,23 +1,11 @@ require 'formula' -class X86_64_Architecture < Requirement - fatal true - - satisfy MacOS.prefer_64_bit? - - def message; <<-EOS.undent - Your system appears to run on a 32-bit architecture. - Postgres-XC only supports 64-bit architectures, sorry. - EOS - end -end - class PostgresXc < Formula homepage 'http://postgres-xc.sourceforge.net/' url 'http://sourceforge.net/projects/postgres-xc/files/Version_1.0/pgxc-v1.0.2.tar.gz' sha1 'f427f37eb141ad9d00374fc1100a55dd09718fed' - depends_on X86_64_Architecture + depends_on :arch => :x86_64 depends_on 'readline' depends_on 'libxml2' if MacOS.version == :leopard # Leopard libxml is too old depends_on 'ossp-uuid' => :recommended diff --git a/Library/Formula/pypy.rb b/Library/Formula/pypy.rb index 76deb32cc..11e556762 100644 --- a/Library/Formula/pypy.rb +++ b/Library/Formula/pypy.rb @@ -7,16 +7,9 @@ end class Pypy < Formula homepage 'http://pypy.org/' - - if MacOS.prefer_64_bit? - url 'https://bitbucket.org/pypy/pypy/downloads/pypy-1.9-osx64.tar.bz2' - version '1.9' - sha1 '825e15724419fbdb6fe215eeea044f9181883c90' - else - url 'http://pypy.org/download/pypy-1.4.1-osx.tar.bz2' - version '1.4.1' - sha1 '961470e7510c47b8f56e6cc6da180605ba058cb6' - end + url 'https://bitbucket.org/pypy/pypy/downloads/pypy-1.9-osx64.tar.bz2' + version '1.9' + sha1 '825e15724419fbdb6fe215eeea044f9181883c90' devel do url 'https://bitbucket.org/pypy/pypy/downloads/pypy-2.0-beta1-osx64.tar.bz2' @@ -24,6 +17,8 @@ class Pypy < Formula sha1 'e4938fdf33072e457fee6cb22798ec08b5a01978' end + depends_on :arch => :x86_64 + def install rmtree 'site-packages' @@ -60,8 +55,7 @@ class Pypy < Formula end end - def caveats - message = <<-EOS.undent + def caveats; <<-EOS.undent A "distutils.cfg" has been written to: #{distutils} specifing the install-scripts folder as: @@ -78,15 +72,6 @@ class Pypy < Formula See: https://github.com/mxcl/homebrew/wiki/Homebrew-and-Python EOS - - unless MacOS.prefer_64_bit? - message += "\n" + <<-EOS.undent - Outdated PyPy 1.4.1 is the last version with official 32-bit Mac binary. - Consider to build modern version yourself: http://pypy.org/download.html#building-from-source - EOS - end - - return message end # The HOMEBREW_PREFIX location of site-packages @@ -101,10 +86,6 @@ class Pypy < Formula # The Cellar location of distutils def distutils - if MacOS.prefer_64_bit? - prefix+"lib-python/2.7/distutils" - else - prefix+"lib-python/modified-2.5.2/distutils" - end + prefix+"lib-python/2.7/distutils" end end diff --git a/Library/Homebrew/dependency_collector.rb b/Library/Homebrew/dependency_collector.rb index 92450a771..cfbb06695 100644 --- a/Library/Homebrew/dependency_collector.rb +++ b/Library/Homebrew/dependency_collector.rb @@ -89,6 +89,7 @@ private when :postgresql then PostgresqlDependency.new(tag) when :tex then TeXDependency.new(tag) when :clt then CLTDependency.new(tag) + when :arch then ArchRequirement.new(tag) else raise "Unsupported special dependency #{spec}" end diff --git a/Library/Homebrew/requirements.rb b/Library/Homebrew/requirements.rb index 1f58e6b0a..988a0a6c0 100644 --- a/Library/Homebrew/requirements.rb +++ b/Library/Homebrew/requirements.rb @@ -334,3 +334,23 @@ class CLTDependency < Requirement EOS end end + +class ArchRequirement < Requirement + fatal true + + def initialize(arch) + @arch = arch + super + end + + satisfy do + case @arch + when :x86_64 then MacOS.prefer_64_bit? + end + end + + def message; <<-EOS.undent + This formula requires an #{@arch} architecture. + EOS + end +end |
