2010-02-11 22:33:40 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Tcpflow < Formula
|
2012-04-20 12:18:18 +00:00
|
|
|
homepage 'https://github.com/simsong/tcpflow'
|
2012-09-07 03:53:58 +00:00
|
|
|
url 'https://github.com/downloads/simsong/tcpflow/tcpflow-1.3.0.tar.gz'
|
|
|
|
sha1 'fccd0a451bf138e340fc3b55dfc07924c0a811d8'
|
2010-02-11 22:33:40 +00:00
|
|
|
|
2012-08-09 14:10:39 +00:00
|
|
|
depends_on :libtool
|
|
|
|
|
2012-07-17 16:37:43 +00:00
|
|
|
def copy_libtool_files!
|
2012-08-09 14:10:39 +00:00
|
|
|
if not MacOS::Xcode.provides_autotools?
|
2012-07-17 16:37:43 +00:00
|
|
|
s = Formula.factory('libtool').share
|
|
|
|
d = "#{s}/libtool/config"
|
|
|
|
cp ["#{d}/config.guess", "#{d}/config.sub"], "."
|
2012-09-05 04:04:01 +00:00
|
|
|
elsif MacOS.version == :leopard
|
2012-07-11 01:25:16 +00:00
|
|
|
cp Dir["#{MacOS::Xcode.prefix}/usr/share/libtool/config.*"], "."
|
2011-04-08 18:16:37 +00:00
|
|
|
else
|
2012-07-11 01:25:16 +00:00
|
|
|
cp Dir["#{MacOS::Xcode.prefix}/usr/share/libtool/config/config.*"], "."
|
2010-11-14 23:16:27 +00:00
|
|
|
end
|
2012-07-17 16:37:43 +00:00
|
|
|
end
|
2010-04-19 01:06:07 +00:00
|
|
|
|
2012-07-17 16:37:43 +00:00
|
|
|
def install
|
|
|
|
copy_libtool_files!
|
2012-04-20 12:18:18 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
2012-03-18 03:44:36 +00:00
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--mandir=#{man}"
|
2010-02-11 22:33:40 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|