60 lines
1.7 KiB
Ruby
60 lines
1.7 KiB
Ruby
class Nghttp2 < Formula
|
|
desc "HTTP/2 C Library"
|
|
homepage "https://nghttp2.org/"
|
|
url "https://github.com/nghttp2/nghttp2/releases/download/v1.35.1/nghttp2-1.35.1.tar.xz"
|
|
sha256 "9b7f5b09c3ca40a46118240bf476a5babf4bd93a1e4fde2337c308c4c5c3263a"
|
|
|
|
bottle do
|
|
sha256 "3df6011e98f13af091fcc9e4c759d9e9662ee4d9a863d88284e17b461c94be92" => :mojave
|
|
sha256 "9c21365ecf3717afe8fda8307c8b80902d7b1f24275e45b8c8458ecc5e42560c" => :high_sierra
|
|
sha256 "cb7ca00e18e43bab469ae685713bf43bd56067cd8395ad0c5921a4c9343726b9" => :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"
|
|
|
|
resource "Cython" do
|
|
url "https://files.pythonhosted.org/packages/f0/f8/7f406aac4c6919d5a4ce16509bbe059cd256e9ad94bae5ccac14094b7c51/Cython-0.29.1.tar.gz"
|
|
sha256 "18ab7646985a97e02cee72e1ddba2e732d4931d4e1732494ff30c5aa084bfb97"
|
|
end
|
|
|
|
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
|