class Zabbix < Formula desc "Availability and monitoring solution" homepage "https://www.zabbix.com/" url "https://downloads.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/4.4.1/zabbix-4.4.1.tar.gz" sha256 "0bf74e597dd41a558305fe17a2b1ed6fe2d77044b87696a92e4227fbf315564a" bottle do sha256 "13c5f69c5c3db5364354d414970b66f7c236607ef68a7fff82fe893b9c557390" => :catalina sha256 "4ac089f569f90b6f5c9cc2816d7ccc45fe83192955ae097c47ae064e3159207e" => :mojave sha256 "c1cf86f2ef15c6c59420df806b6c542de45322fdc62d4f4081257d8ae7468dd1" => :high_sierra end depends_on "openssl@1.1" depends_on "pcre" def brewed_or_shipped(db_config) brewed_db_config = "#{HOMEBREW_PREFIX}/bin/#{db_config}" (File.exist?(brewed_db_config) && brewed_db_config) || which(db_config) end def install sdk = MacOS::CLT.installed? ? "" : MacOS.sdk_path args = %W[ --disable-dependency-tracking --prefix=#{prefix} --sysconfdir=#{etc}/zabbix --enable-agent --with-iconv=#{sdk}/usr --with-libpcre=#{Formula["pcre"].opt_prefix} --with-openssl=#{Formula["openssl@1.1"].opt_prefix} ] if MacOS.version == :el_capitan && MacOS::Xcode.version >= "8.0" inreplace "configure", "clock_gettime(CLOCK_REALTIME, &tp);", "undefinedgibberish(CLOCK_REALTIME, &tp);" end system "./configure", *args system "make", "install" end test do system sbin/"zabbix_agentd", "--print" end end