59 lines
1.5 KiB
Ruby
59 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.41.0/nghttp2-1.41.0.tar.xz"
|
|
sha256 "abc25b8dc601f5b3fefe084ce50fcbdc63e3385621bee0cbfa7b57f9ec3e67c2"
|
|
license "MIT"
|
|
|
|
bottle do
|
|
sha256 "d81b96cf82189cd4049ff7fe400a4e5b05eed38029d34e8325b751e7b9f3d730" => :catalina
|
|
sha256 "718a1b33f18b2b72b92110d2fb3f83e9ab6e4831f9bc2bdf7636757129104552" => :mojave
|
|
sha256 "f56e7c923879fd77d7c9737395c7c5df1ab3e9ffa03baa900385b53a91469803" => :high_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@1.1"
|
|
|
|
uses_from_macos "zlib"
|
|
|
|
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
|