diff options
| author | Markus Prinz | 2009-10-26 23:13:36 +0100 |
|---|---|---|
| committer | Max Howell | 2009-11-07 18:22:35 +0000 |
| commit | e5fb87cd0409dde8141b7b4822cf5cf1610d8196 (patch) | |
| tree | abe2f42a592b634c7fb3e4a59cc64b42393a7a7d /Library | |
| parent | b2b90f08d9b4f46380fa8d1dc43e5593b71a109b (diff) | |
| download | homebrew-e5fb87cd0409dde8141b7b4822cf5cf1610d8196.tar.bz2 | |
Fortune Formula
Adds the fortune program along with cookie files.
Signed-off-by: Max Howell <max@methylblue.com>
I replaced the sed usage with our safer inreplace function.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/fortune.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Library/Formula/fortune.rb b/Library/Formula/fortune.rb new file mode 100644 index 000000000..bb714e1fc --- /dev/null +++ b/Library/Formula/fortune.rb @@ -0,0 +1,28 @@ +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' + + def options + [ + ['--no-offensive', "Don't install potentially offenive fortune files"] + ] + end + + 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' + + system "make install" + end +end |
