homebrew-core/Formula/md.rb
Jack Nagel 53473b6bf5 Clean up MacOS version method usage
The MacOS.version? family of methods (other than "leopard?") are poorly
defined and lead to confusing code. Replace them in formulae with more
explicit comparisons.

"MacOS.version" is a special version object that can be compared to
numerics, symbols, and strings using the standard Ruby comparison
methods.

The old methods were moved to compat when the version comparison code
was merged, and they must remain there "forever", but they should not be
used in new code.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-10 16:16:54 -05:00

18 lines
506 B
Ruby

require 'formula'
class Md < Formula
homepage 'http://opensource.apple.com/source/adv_cmds/adv_cmds-147/md/'
url 'http://opensource.apple.com/tarballs/adv_cmds/adv_cmds-147.tar.gz'
sha1 '0128de65a4da2ef9655f3b1e6a94d2f8ae292414'
# OS X up to and including Lion 10.7 includes 'md'
keg_only :provided_by_osx unless MacOS.version >= :mountain_lion
def install
cd 'md' do
system "#{ENV.cc} #{ENV.cflags} -o md md.c"
bin.install('md')
man1.install('md.1')
end
end
end