homebrew-core/Formula/nghttp2.rb
2019-04-25 17:19:50 +08:00

55 lines
1.5 KiB
Ruby

class Nghttp2 < Formula
desc "HTTP/2 C Library"
homepage "https://nghttp2.org/"
url "https://github.com/nghttp2/nghttp2/releases/download/v1.38.0/nghttp2-1.38.0.tar.xz"
sha256 "ef75c761858241c6b4372fa6397aa0481a984b84b7b07c4ec7dc2d7b9eee87f8"
bottle do
sha256 "aebb18502b1abd48b42022d09c37eff0486bdecd250e15e2cc98ca265f06e03a" => :mojave
sha256 "20703302a2bd99bc0580c5b76fcaec062e65a6f40d356ff9f1e2d2134d92f117" => :high_sierra
sha256 "b373c7c7f0df4e544a19fb623169bc3387515eb5aa53ca4a059624c20a5dec54" => :sierra
end
head do
url "https://github.com/nghttp2/nghttp2.git"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
end
depends_on "cunit" => :build
depends_on "pkg-config" => :build
depends_on "sphinx-doc" => :build
depends_on "c-ares"
depends_on "jansson"
depends_on "jemalloc"
depends_on "libev"
depends_on "libevent"
depends_on "openssl"
def install
ENV.cxx11
args = %W[
--prefix=#{prefix}
--disable-silent-rules
--enable-app
--disable-python-bindings
--with-xml-prefix=/usr
]
# requires thread-local storage features only available in 10.11+
args << "--disable-threads" if MacOS.version < :el_capitan
system "autoreconf", "-ivf" if build.head?
system "./configure", *args
system "make"
system "make", "check"
system "make", "install"
end
test do
system bin/"nghttp", "-nv", "https://nghttp2.org"
end
end