55 lines
1.6 KiB
Ruby
55 lines
1.6 KiB
Ruby
class Zmap < Formula
|
|
desc "Network scanner for Internet-wide network studies"
|
|
homepage "https://zmap.io"
|
|
url "https://github.com/zmap/zmap/archive/v2.1.1.tar.gz"
|
|
sha256 "29627520c81101de01b0213434adb218a9f1210bfd3f2dcfdfc1f975dbce6399"
|
|
license "Apache-2.0"
|
|
revision 2
|
|
head "https://github.com/zmap/zmap.git"
|
|
|
|
bottle do
|
|
sha256 "7f3dce955fb01597407317a81e6d1e0b60d66756e64358f11106adf5335b820a" => :catalina
|
|
sha256 "3014cc393e0d9b5e6705392a10da8588f26d668daa5660aebe252ed514bf176e" => :mojave
|
|
sha256 "99c0f7e06b2789fb57bd465a5a1fe35628b6d5e624ebba32d7f1199abc78d8bf" => :high_sierra
|
|
end
|
|
|
|
depends_on "byacc" => :build
|
|
depends_on "cmake" => :build
|
|
depends_on "gengetopt" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "gmp"
|
|
depends_on "json-c"
|
|
depends_on "libdnet"
|
|
|
|
# fix json-c 0.14 compat
|
|
# ref PR, https://github.com/zmap/zmap/pull/609
|
|
patch :DATA
|
|
|
|
def install
|
|
inreplace ["conf/zmap.conf", "src/zmap.c", "src/zopt.ggo.in"], "/etc", etc
|
|
|
|
system "cmake", ".", *std_cmake_args, "-DENABLE_DEVELOPMENT=OFF",
|
|
"-DRESPECT_INSTALL_PREFIX_CONFIG=ON"
|
|
system "make"
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
system "#{sbin}/zmap", "--version"
|
|
end
|
|
end
|
|
|
|
__END__
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 8bd825f..c70b651 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -71,7 +71,7 @@ if(WITH_JSON)
|
|
message(FATAL_ERROR "Did not find libjson")
|
|
endif()
|
|
|
|
- add_definitions("-DJSON")
|
|
+ string(REPLACE ";" " " JSON_CFLAGS "${JSON_CFLAGS}")
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${JSON_CFLAGS}")
|
|
endif()
|