diff options
| author | Max Howell | 2010-01-13 11:06:52 +0000 |
|---|---|---|
| committer | Max Howell | 2010-01-13 11:23:11 +0000 |
| commit | 99acd7f4fb773d7af8bef08ffa6a79c2cf4c9798 (patch) | |
| tree | f8fec0fae27724f59a07b0561a9276f24e56f47a /Library/Formula/fortune.rb | |
| parent | af6d133c80c0bbf26bf752260feececc99438fd5 (diff) | |
| download | homebrew-99acd7f4fb773d7af8bef08ffa6a79c2cf4c9798.tar.bz2 | |
Use new inreplace syntax where useful
Diffstat (limited to 'Library/Formula/fortune.rb')
| -rw-r--r-- | Library/Formula/fortune.rb | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Library/Formula/fortune.rb b/Library/Formula/fortune.rb index bb714e1fc..335202058 100644 --- a/Library/Formula/fortune.rb +++ b/Library/Formula/fortune.rb @@ -14,14 +14,15 @@ class Fortune <Formula def install ENV.deparallelize - inreplace 'Makefile', 'FORTDIR=/usr/local/games', "FORTDIR=/usr/local/bin" - inreplace 'Makefile', '/usr/local', prefix - inreplace 'Makefile', 'CC=gcc', "CC=#{ENV.cc}" - # OS X only supports POSIX regexes - inreplace 'Makefile', 'REGEXDEFS=-DHAVE_REGEX_H -DBSD_REGEX', 'REGEXDEFS=-DHAVE_REGEX_H -DPOSIX_REGEX' - - # Don't install offensive fortunes - inreplace 'Makefile', 'OFFENSIVE=1', 'OFFENSIVE=0' if ARGV.include? '--no-offensive' + inreplace 'Makefile' do |contents| + contents.change_make_var! 'FORTDIR', "/usr/local/bin" # indeed, correct + contents.gsub! '/usr/local', prefix + contents.change_make_var! 'CC', ENV.cc + # OS X only supports POSIX regexes + contents.change_make_var! 'REGEXDEFS', '-DHAVE_REGEX_H -DPOSIX_REGEX' + # Don't install offensive fortunes + contents.change_make_var! 'OFFENSIVE', '0' if ARGV.include? '--no-offensive' + end system "make install" end |
