5c93643ee7
When a requirement is specified like: satisfy { which "foo" } There is no reason that we should inject all of ENV.userpaths! into the build environment. Instead, infer the directory to be added to PATH from the Pathname that is returned. This is another step towards condensing the "which program" requirements down into a one-liner DSL element.
26 lines
581 B
Ruby
26 lines
581 B
Ruby
require 'formula'
|
|
|
|
class LionOrNewer < Requirement
|
|
fatal true
|
|
|
|
satisfy MacOS.version >= :lion
|
|
|
|
def message
|
|
"rhash requires `wcsdup` which isn't in the SDK before Lion."
|
|
end
|
|
end
|
|
|
|
|
|
class Rhash < Formula
|
|
homepage 'http://rhash.anz.ru/'
|
|
url 'http://downloads.sourceforge.net/project/rhash/rhash/1.2.10/rhash-1.2.10-src.tar.gz'
|
|
sha1 '130f55faf3f13760ef0ab6a25e52db5052064c63'
|
|
|
|
depends_on LionOrNewer.new
|
|
|
|
def install
|
|
system 'make', 'install', "PREFIX=",
|
|
"DESTDIR=#{prefix}",
|
|
"CC=#{ENV.cc}"
|
|
end
|
|
end
|