2012-05-05 04:07:36 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Serf < Formula
|
|
|
|
homepage 'http://code.google.com/p/serf/'
|
|
|
|
url 'http://serf.googlecode.com/files/serf-1.1.0.tar.bz2'
|
|
|
|
sha1 '231af70b7567a753b49df4216743010c193884b7'
|
|
|
|
|
2012-08-10 05:17:14 +00:00
|
|
|
option :universal
|
|
|
|
|
2012-08-02 16:00:30 +00:00
|
|
|
depends_on :libtool
|
|
|
|
|
2012-05-05 04:07:36 +00:00
|
|
|
def install
|
2012-08-10 05:17:14 +00:00
|
|
|
ENV.universal_binary if build.universal?
|
2012-08-02 16:00:30 +00:00
|
|
|
if MacOS.mountain_lion?
|
|
|
|
# Fixes a bad path returned by `apr-1-config --cpp` on ML.
|
|
|
|
# https://github.com/mxcl/homebrew/issues/13586
|
|
|
|
ENV['CPP'] = "#{ENV.cc} -E"
|
|
|
|
# Use HB libtool not the one from apr that also has a bad path.
|
|
|
|
ENV['APR_LIBTOOL'] = 'glibtool'
|
2012-08-06 10:57:03 +00:00
|
|
|
# Especially for Xcode-only, the apr hearders are needed by glibtool
|
|
|
|
ENV.append 'CPPFLAGS', "-I#{MacOS.sdk_path}/usr/include/apr-1"
|
2012-08-02 16:00:30 +00:00
|
|
|
end
|
2012-05-05 04:07:36 +00:00
|
|
|
system "./configure", "--disable-debug",
|
|
|
|
"--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|