fragroute: fix no-clt build

Closes Homebrew/homebrew#42494.

Closes Homebrew/homebrew#43894.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
This commit is contained in:
Dominyk Tiller 2015-09-14 02:25:02 +01:00
parent 1634aa257b
commit b1d592a3ed

View file

@ -1,5 +1,5 @@
class Fragroute < Formula
desc "Intercepts, modifies, and rewrites egress traffic for a specified host"
desc "Intercepts, modifies and rewrites egress traffic for a specified host"
homepage "http://www.monkey.org/~dugsong/fragroute/"
url "http://www.monkey.org/~dugsong/fragroute/fragroute-1.2.tar.gz"
sha256 "6899a61ecacba3bb400a65b51b3c0f76d4e591dbf976fba0389434a29efc2003"
@ -8,26 +8,33 @@ class Fragroute < Formula
depends_on "libevent"
patch :p0 do
url "https://trac.macports.org/export/105753/trunk/dports/net/fragroute/files/configure.patch"
url "https://raw.githubusercontent.com/Homebrew/patches/2f5cab626/fragroute/configure.patch"
sha256 "215e21d92304e47239697945963c61445f961762aea38afec202e4dce4487557"
end
patch :p0 do
url "https://trac.macports.org/export/105753/trunk/dports/net/fragroute/files/fragroute.c.patch"
url "https://raw.githubusercontent.com/Homebrew/patches/2f5cab626/fragroute/fragroute.c.patch"
sha256 "f4475dbe396ab873dcd78e3697db9d29315dcc4147fdbb22acb6391c0de011eb"
end
patch :p0 do
url "https://trac.macports.org/export/105753/trunk/dports/net/fragroute/files/pcaputil.c.patch"
url "https://raw.githubusercontent.com/Homebrew/patches/2f5cab626/fragroute/pcaputil.c.patch"
sha256 "c1036f61736289d3e9b9328fcb723dbe609453e5f2aab4875768068faade0391"
end
def install
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--mandir=#{man}",
"--with-libevent=#{Formula["libevent"].opt_prefix}",
"--with-libdnet=#{Formula["libdnet"].opt_prefix}"
args = %W[
--disable-dependency-tracking
--prefix=#{prefix}
--mandir=#{man}
--sysconfdir=#{etc}
--with-libevent=#{Formula["libevent"].opt_prefix}
--with-libdnet=#{Formula["libdnet"].opt_prefix}
]
args << "--with-libpcap=#{MacOS.sdk_path}/usr" unless MacOS::CLT.installed?
system "./configure", *args
system "make", "install"
end
end