homebrew-core/Formula/ninja.rb
Frank Benkstein a59f6d2736 ninja: remove gtest resource (#25973)
Ninja has not needed GTest since v1.5.3.  It was removed in commit
ninja-build/ninja@b2fe56caaf.
2018-03-30 11:08:14 -07:00

44 lines
1.3 KiB
Ruby

class Ninja < Formula
desc "Small build system for use with gyp or CMake"
homepage "https://ninja-build.org/"
url "https://github.com/ninja-build/ninja/archive/v1.8.2.tar.gz"
sha256 "86b8700c3d0880c2b44c2ff67ce42774aaf8c28cbf57725cb881569288c1c6f4"
head "https://github.com/ninja-build/ninja.git"
bottle do
cellar :any_skip_relocation
sha256 "eeba4fff08b3ed4b308250fb650f7d06630acd18465900ba0e27cecfe925a6cc" => :high_sierra
sha256 "90ecf90948f0fa65c82011d79338d7c5ca2a4d0cb7cb8dc3892243f749fbe2eb" => :sierra
sha256 "675165ce642fa811e1a0a363be0ba66a7b907d46056f89fd20938aa33e7d59f7" => :el_capitan
end
option "without-test", "Don't run build-time tests"
deprecated_option "without-tests" => "without-test"
def install
system "python", "configure.py", "--bootstrap"
if build.with? "test"
system "./configure.py"
system "./ninja", "ninja_test"
system "./ninja_test", "--gtest_filter=-SubprocessTest.SetWithLots"
end
bin.install "ninja"
bash_completion.install "misc/bash-completion" => "ninja-completion.sh"
zsh_completion.install "misc/zsh-completion" => "_ninja"
end
test do
(testpath/"build.ninja").write <<~EOS
cflags = -Wall
rule cc
command = gcc $cflags -c $in -o $out
build foo.o: cc foo.c
EOS
system bin/"ninja", "-t", "targets"
end
end