2009-10-26 22:13:36 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Fortune < Formula
|
2009-10-26 22:13:36 +00:00
|
|
|
homepage 'http://ftp.ibiblio.org/pub/linux/games/amusements/fortune/!INDEX.html'
|
2012-07-30 19:26:04 +00:00
|
|
|
url 'http://ftp.ibiblio.org/pub/linux/games/amusements/fortune/fortune-mod-9708.tar.gz'
|
|
|
|
sha1 '9f96a00dbf5d2c6b0e7324af0eae988ce6adc5ad'
|
2009-10-26 22:13:36 +00:00
|
|
|
|
2012-07-30 19:26:04 +00:00
|
|
|
option 'no-offensive', "Don't install potentially offensive fortune files"
|
2009-10-26 22:13:36 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
ENV.deparallelize
|
|
|
|
|
2010-09-08 16:07:59 +00:00
|
|
|
inreplace 'Makefile' do |s|
|
2012-07-30 19:26:04 +00:00
|
|
|
# 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"
|
2010-09-08 16:07:59 +00:00
|
|
|
s.gsub! '/usr/local/man', '/usr/local/share/man'
|
2012-07-30 19:26:04 +00:00
|
|
|
# Now change all /usr/local at once to the prefix
|
2010-09-08 16:07:59 +00:00
|
|
|
s.gsub! '/usr/local', prefix
|
2012-07-30 19:26:04 +00:00
|
|
|
|
2010-01-13 11:06:52 +00:00
|
|
|
# OS X only supports POSIX regexes
|
2010-09-08 16:07:59 +00:00
|
|
|
s.change_make_var! 'REGEXDEFS', '-DHAVE_REGEX_H -DPOSIX_REGEX'
|
2010-01-13 11:06:52 +00:00
|
|
|
# Don't install offensive fortunes
|
2012-07-30 19:26:04 +00:00
|
|
|
s.change_make_var! 'OFFENSIVE', '0' if build.include? 'no-offensive'
|
2010-01-13 11:06:52 +00:00
|
|
|
end
|
2009-10-26 22:13:36 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|