2010-03-19 06:38:44 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Trafshow < Formula
|
2010-03-19 06:38:44 +00:00
|
|
|
homepage 'http://soft.risp.ru/trafshow/index_en.shtml'
|
2012-07-17 16:37:43 +00:00
|
|
|
url 'ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/trafshow-5.2.3.tgz'
|
|
|
|
sha1 '1c68f603f12357e932c83de850366c9b46e53d89'
|
|
|
|
|
|
|
|
depends_on :libtool
|
2010-06-05 05:25:02 +00:00
|
|
|
|
|
|
|
def patches
|
|
|
|
files = %w[patch-domain_resolver.c patch-colormask.c patch-trafshow.c patch-trafshow.1 patch-configure]
|
|
|
|
{
|
|
|
|
:p0 =>
|
2012-01-23 01:09:28 +00:00
|
|
|
files.collect{|p| "https://trac.macports.org/export/68507/trunk/dports/net/trafshow/files/#{p}"}
|
2010-06-05 05:25:02 +00:00
|
|
|
}
|
|
|
|
end
|
2010-03-19 06:38:44 +00:00
|
|
|
|
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"], "."
|
2013-07-10 02:30:15 +00:00
|
|
|
elsif MacOS.version <= :leopard
|
2012-09-10 02:08:31 +00:00
|
|
|
cp Dir["#{MacOS::Xcode.prefix}/usr/share/libtool/config.*"], "."
|
2012-07-17 16:37:43 +00:00
|
|
|
else
|
2012-09-10 02:08:31 +00:00
|
|
|
cp Dir["#{MacOS::Xcode.prefix}/usr/share/libtool/config/config.*"], "."
|
2012-07-17 16:37:43 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2010-03-19 06:38:44 +00:00
|
|
|
def install
|
2012-07-17 16:37:43 +00:00
|
|
|
copy_libtool_files!
|
|
|
|
system "./configure", "--disable-debug",
|
|
|
|
"--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--disable-slang"
|
2010-03-19 06:38:44 +00:00
|
|
|
system "make"
|
2010-06-05 05:25:02 +00:00
|
|
|
|
|
|
|
bin.install "trafshow"
|
|
|
|
man1.install "trafshow.1"
|
|
|
|
etc.install ".trafshow" => "trafshow.default"
|
2010-03-19 06:38:44 +00:00
|
|
|
end
|
|
|
|
end
|