diff options
| author | Jack Nagel | 2012-04-28 16:31:03 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2012-04-28 16:33:55 -0500 | 
| commit | 5d5760a4cbd5a4ff48daf3208c6957198ab4d5ce (patch) | |
| tree | e21d8681c61c873d944dc49461997d46dca65383 /Library/Formula/cvs2svn.rb | |
| parent | b06f364cf1353bf77bfefbba329eba1f8b431074 (diff) | |
| download | homebrew-5d5760a4cbd5a4ff48daf3208c6957198ab4d5ce.tar.bz2 | |
cvs2svn: use a requirement for python with gdbm
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula/cvs2svn.rb')
| -rw-r--r-- | Library/Formula/cvs2svn.rb | 30 | 
1 files changed, 22 insertions, 8 deletions
| diff --git a/Library/Formula/cvs2svn.rb b/Library/Formula/cvs2svn.rb index e698828bb..6538a80b6 100644 --- a/Library/Formula/cvs2svn.rb +++ b/Library/Formula/cvs2svn.rb @@ -1,19 +1,33 @@  require 'formula' +class PythonWithGdbm < Requirement +  def message; <<-EOS.undent +    The Python being used does not include gdbm support, +    but it is required to build this formula: + +      #{`which python`.chomp} + +    Homebrew's Python includes gdbm support. +    EOS +  end + +  def satisfied? +    quiet_system "python", "-c", "import gdbm" +  end + +  def fatal? +    true +  end +end +  class Cvs2svn < Formula    url 'http://trac.macports.org/export/70472/distfiles/cvs2svn/cvs2svn-2.3.0.tar.gz'    homepage 'http://cvs2svn.tigris.org/'    md5 '6c412baec974f3ff64b9145944682a15' -  def install -    unless quiet_system "/usr/bin/env", "python", "-c", "import gdbm" -      onoe "The Python being used doesn't have gdbm support:" -      puts `which python` -      puts "The Homebrew-built Python does include gdbm support, which" -      puts "is required for this formula." -      exit 1 -    end +  depends_on PythonWithGdbm.new +  def install      system "python", "setup.py", "install", "--prefix=#{prefix}"      system "make man"      man1.install gzip('cvs2svn.1', 'cvs2git.1', 'cvs2bzr.1') | 
