diff options
| author | Adam Vandenberg | 2012-07-30 12:26:04 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2012-08-08 22:01:38 -0700 |
| commit | aa2c1eb6ab58b82e1b6a8ce1604f6c895a6b4ac0 (patch) | |
| tree | 685ac94268dd2e2b8103e331731687a78f76d2fc /Library/Formula | |
| parent | 8aaf46d5c0050021e3a880df39d38172bd2a66c0 (diff) | |
| download | homebrew-aa2c1eb6ab58b82e1b6a8ce1604f6c895a6b4ac0.tar.bz2 | |
fortune: use options dsl
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/fortune.rb | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/Library/Formula/fortune.rb b/Library/Formula/fortune.rb index eae492e80..99937206c 100644 --- a/Library/Formula/fortune.rb +++ b/Library/Formula/fortune.rb @@ -1,28 +1,30 @@ require 'formula' class Fortune < Formula - url 'http://ftp.ibiblio.org/pub/linux/games/amusements/fortune/fortune-mod-9708.tar.gz' homepage 'http://ftp.ibiblio.org/pub/linux/games/amusements/fortune/!INDEX.html' - md5 '81a87a44f9d94b0809dfc2b7b140a379' + url 'http://ftp.ibiblio.org/pub/linux/games/amusements/fortune/fortune-mod-9708.tar.gz' + sha1 '9f96a00dbf5d2c6b0e7324af0eae988ce6adc5ad' - def options - [['--no-offensive', "Don't install potentially offensive fortune files"]] - end + option 'no-offensive', "Don't install potentially offensive fortune files" def install ENV.deparallelize inreplace 'Makefile' do |s| - s.change_make_var! 'FORTDIR', "/usr/local/bin" # indeed, correct + # Use our selected compiler + s.change_make_var! 'CC', ENV.cc + + # Change these first two folders to the correct location in /usr/local... + s.change_make_var! 'FORTDIR', "/usr/local/bin" s.gsub! '/usr/local/man', '/usr/local/share/man' + # Now change all /usr/local at once to the prefix s.gsub! '/usr/local', prefix - s.change_make_var! 'CC', ENV.cc + # OS X only supports POSIX regexes s.change_make_var! 'REGEXDEFS', '-DHAVE_REGEX_H -DPOSIX_REGEX' # Don't install offensive fortunes - s.change_make_var! 'OFFENSIVE', '0' if ARGV.include? '--no-offensive' + s.change_make_var! 'OFFENSIVE', '0' if build.include? 'no-offensive' end - system "make install" end end |
