diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/fortune.rb | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/Library/Formula/fortune.rb b/Library/Formula/fortune.rb index 99937206c..cd42ff2f8 100644 --- a/Library/Formula/fortune.rb +++ b/Library/Formula/fortune.rb @@ -1,30 +1,35 @@ -require 'formula' - class Fortune < Formula - homepage 'http://ftp.ibiblio.org/pub/linux/games/amusements/fortune/!INDEX.html' - url 'http://ftp.ibiblio.org/pub/linux/games/amusements/fortune/fortune-mod-9708.tar.gz' - sha1 '9f96a00dbf5d2c6b0e7324af0eae988ce6adc5ad' + homepage "http://ftp.ibiblio.org/pub/linux/games/amusements/fortune/!INDEX.html" + url "http://ftp.ibiblio.org/pub/linux/games/amusements/fortune/fortune-mod-9708.tar.gz" + sha256 "1a98a6fd42ef23c8aec9e4a368afb40b6b0ddfb67b5b383ad82a7b78d8e0602a" + + option "without-offensive", "Don't install potentially offensive fortune files" - option 'no-offensive', "Don't install potentially offensive fortune files" + deprecated_option "no-offensive" => "without-offensive" def install ENV.deparallelize - inreplace 'Makefile' do |s| + inreplace "Makefile" do |s| # Use our selected compiler - s.change_make_var! 'CC', ENV.cc + 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' + 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.gsub! "/usr/local", prefix # OS X only supports POSIX regexes - s.change_make_var! 'REGEXDEFS', '-DHAVE_REGEX_H -DPOSIX_REGEX' + s.change_make_var! "REGEXDEFS", "-DHAVE_REGEX_H -DPOSIX_REGEX" # Don't install offensive fortunes - s.change_make_var! 'OFFENSIVE', '0' if build.include? 'no-offensive' + s.change_make_var! "OFFENSIVE", "0" if build.include? "no-offensive" end - system "make install" + + system "make", "install" + end + + test do + system "#{bin}/fortune" end end |
