2011-03-10 05:11:03 +00:00
|
|
|
class Fortune < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Infamous electronic fortune-cookie generator"
|
2015-03-12 16:21:04 +00:00
|
|
|
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"
|
|
|
|
|
2015-03-12 19:16:56 +00:00
|
|
|
bottle do
|
|
|
|
sha256 "bfae1a94a0de8d9d53f28b5cfdea3b04190420dde0b83c862d6ef536c03d59ef" => :yosemite
|
|
|
|
sha256 "90e758b8875a309116e89f475d7c88da5e7e1417601705eb45abf20a5be11a8a" => :mavericks
|
|
|
|
sha256 "25958474483a88a12bf8585f21864d190179547271527af8c292bd7ecf6d5677" => :mountain_lion
|
|
|
|
end
|
|
|
|
|
2015-03-12 16:21:04 +00:00
|
|
|
option "without-offensive", "Don't install potentially offensive fortune files"
|
2009-10-26 22:13:36 +00:00
|
|
|
|
2015-03-12 16:21:04 +00:00
|
|
|
deprecated_option "no-offensive" => "without-offensive"
|
2009-10-26 22:13:36 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
ENV.deparallelize
|
|
|
|
|
2015-03-12 16:21:04 +00:00
|
|
|
inreplace "Makefile" do |s|
|
2012-07-30 19:26:04 +00:00
|
|
|
# Use our selected compiler
|
2015-03-12 16:21:04 +00:00
|
|
|
s.change_make_var! "CC", ENV.cc
|
2012-07-30 19:26:04 +00:00
|
|
|
|
|
|
|
# Change these first two folders to the correct location in /usr/local...
|
2015-03-12 16:21:04 +00:00
|
|
|
s.change_make_var! "FORTDIR", "/usr/local/bin"
|
|
|
|
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
|
2015-03-12 16:21:04 +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
|
2015-03-12 16:21:04 +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
|
2015-03-12 16:21:04 +00:00
|
|
|
s.change_make_var! "OFFENSIVE", "0" if build.include? "no-offensive"
|
2010-01-13 11:06:52 +00:00
|
|
|
end
|
2015-03-12 16:21:04 +00:00
|
|
|
|
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/fortune"
|
2009-10-26 22:13:36 +00:00
|
|
|
end
|
|
|
|
end
|