2010-03-01 13:09:52 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Yaws < Formula
|
|
|
|
homepage 'http://yaws.hyber.org'
|
2012-01-01 04:19:57 +00:00
|
|
|
url 'http://yaws.hyber.org/download/yaws-1.92.tar.gz'
|
|
|
|
md5 'd0c05d2041df79089f7de5d8437ee34b'
|
2010-03-01 13:09:52 +00:00
|
|
|
|
|
|
|
depends_on 'erlang'
|
2010-04-07 05:58:35 +00:00
|
|
|
|
2010-03-01 13:09:52 +00:00
|
|
|
def options
|
2012-01-01 04:19:57 +00:00
|
|
|
[
|
|
|
|
["--with-yapp", "Build and install yaws applications"],
|
|
|
|
['--32-bit', "Build 32-bit only."]
|
|
|
|
]
|
2010-03-01 13:09:52 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
2012-01-01 04:19:57 +00:00
|
|
|
if ARGV.build_32_bit?
|
|
|
|
%w{ CFLAGS LDFLAGS }.each do |compiler_flag|
|
|
|
|
ENV.remove compiler_flag, "-arch x86_64"
|
|
|
|
ENV.append compiler_flag, "-arch i386"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2012-02-21 06:04:21 +00:00
|
|
|
cd 'yaws' do
|
2010-03-01 13:09:52 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}"
|
|
|
|
system "make install"
|
|
|
|
|
|
|
|
if ARGV.include? '--with-yapp'
|
2012-02-21 06:04:21 +00:00
|
|
|
cd 'applications/yapp' do
|
2010-03-01 13:09:52 +00:00
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2010-04-07 05:58:35 +00:00
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
Usually you want to build yapp (yaws applications) as well.
|
|
|
|
To do so, use:
|
|
|
|
brew install yaws --with-yapp
|
2010-03-01 13:09:52 +00:00
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|