55 lines
1.5 KiB
Ruby
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.37.0/nghttp2-1.37.0.tar.xz"
|
|
sha256 "aa090b164b17f4b91fe32310a1c0edf3e97e02cd9d1524eef42d60dd1e8d47b7"
|
|
|
|
bottle do
|
|
sha256 "336eb6bf2788bcf43c47e40d31e20af00685695baa74a821e4fd5bf5485bf48d" => :mojave
|
|
sha256 "c4b73515d2c207657f4d8a69b64f772d51208d069ae1f0cbd005f6d287d979f8" => :high_sierra
|
|
sha256 "e8d38af114792011b03827d512ddf9a1f9c2fe48c641f18e04bbc00d94277057" => :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
|