2010-03-01 13:09:52 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Yaws < Formula
|
|
|
|
homepage 'http://yaws.hyber.org'
|
2012-08-10 04:35:08 +00:00
|
|
|
url 'http://yaws.hyber.org/download/yaws-1.94.tar.gz'
|
|
|
|
sha1 '36295e40bb4db1812901c31d41152f942a63b5cc'
|
2010-03-01 13:09:52 +00:00
|
|
|
|
2012-08-10 04:35:08 +00:00
|
|
|
option "without-yapp", "Omit yaws applications"
|
|
|
|
option '32-bit'
|
2010-04-07 05:58:35 +00:00
|
|
|
|
2012-08-10 04:35:08 +00:00
|
|
|
depends_on 'erlang'
|
2010-03-01 13:09:52 +00:00
|
|
|
|
|
|
|
def install
|
2012-08-10 04:35:08 +00:00
|
|
|
if build.build_32_bit?
|
2012-01-01 04:19:57 +00:00
|
|
|
%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"
|
|
|
|
|
2012-08-10 04:35:08 +00:00
|
|
|
unless build.include? 'without-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
|
|
|
|
end
|