ettercap 0.8.0
Closes Homebrew/homebrew#27323. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
parent
bb509d57b1
commit
e245ca8736
1 changed files with 30 additions and 12 deletions
|
@ -2,30 +2,48 @@ require 'formula'
|
|||
|
||||
class Ettercap < Formula
|
||||
homepage 'http://ettercap.github.io/ettercap/'
|
||||
url 'https://downloads.sourceforge.net/project/ettercap/ettercap/0.7.6-Locard/ettercap-0.7.6.tar.gz'
|
||||
sha1 '55818952a8c28beb1b650f3ccc9600a2d784a18f'
|
||||
url "https://github.com/Ettercap/ettercap/archive/v0.8.0.tar.gz"
|
||||
sha1 "008fca94bbd67b578699300eb321766cd41fbfff"
|
||||
|
||||
head "https://github.com/Ettercap/ettercap.git"
|
||||
|
||||
option "without-curses", "Install without curses interface"
|
||||
option "without-plugins", "Install without plugins support"
|
||||
option "with-ipv6", "Install with IPv6 support"
|
||||
|
||||
depends_on 'cmake' => :build
|
||||
depends_on 'ghostscript' => :build
|
||||
depends_on 'pcre'
|
||||
depends_on 'libnet'
|
||||
depends_on 'curl' # require libcurl >= 7.26.0
|
||||
depends_on 'gtk+' => :optional
|
||||
depends_on 'luajit' => :optional
|
||||
|
||||
# fixes absence of strndup function on 10.6 and lower; merged upstream
|
||||
def patches
|
||||
if MacOS.version < :lion
|
||||
"https://github.com/Ettercap/ettercap/commit/1692218693ed419465466299c8c76da41c37c945.patch"
|
||||
end
|
||||
[
|
||||
# Fixes issue #326: redefinition of 'bpf_program', 'bpf_version',
|
||||
# and 'bpf_insn' in ec_send.c on Mac OS X.
|
||||
# url: https://github.com/Ettercap/ettercap/issues/326
|
||||
"https://github.com/Ettercap/ettercap/commit/4aaaa2.patch",
|
||||
# Fixes issue #344: undefined symbol safe_free_mem caused by the previous fix.
|
||||
# url: https://github.com/Ettercap/ettercap/issues/344
|
||||
"https://github.com/Ettercap/ettercap/commit/33ac95.patch",
|
||||
]
|
||||
end
|
||||
|
||||
def install
|
||||
libnet = Formula['libnet'].opt_lib
|
||||
args = std_cmake_args
|
||||
|
||||
args = ['..'] + std_cmake_args + [
|
||||
"-DINSTALL_SYSCONFDIR=#{etc}",
|
||||
'-DENABLE_GTK=OFF',
|
||||
"-DHAVE_LIBNET:FILEPATH=#{libnet}/libnet.dylib"
|
||||
]
|
||||
# specify build type manually since std_cmake_args sets the build type to "None".
|
||||
args << "-DCMAKE_BUILD_TYPE=Release"
|
||||
|
||||
args << "-DINSTALL_SYSCONFDIR=#{etc}"
|
||||
args << "-DENABLE_CURSES=OFF" if build.without? "curses"
|
||||
args << "-DENABLE_PLUGINS=OFF" if build.without? "plugins"
|
||||
args << "-DENABLE_IPV6=ON" if build.with? "ipv6"
|
||||
args << "-DENABLE_GTK=OFF" if build.without? "gtk+"
|
||||
args << "-DENABLE_LUA=ON" if build.with? "luajit"
|
||||
args << ".."
|
||||
|
||||
mkdir "build" do
|
||||
system "cmake", *args
|
||||
|
|
Loading…
Reference in a new issue