protobuf: use --with-test
This commit is contained in:
parent
7d97884f47
commit
77bd173057
1 changed files with 18 additions and 17 deletions
|
@ -11,6 +11,14 @@ class Protobuf < Formula
|
|||
patch :p1, :DATA
|
||||
end
|
||||
|
||||
bottle do
|
||||
revision 3
|
||||
sha256 "37b136dbe120923bbdccc4131d52b7a4738a9b776bb676e4fc75c908f9ad6e20" => :el_capitan
|
||||
sha256 "79242567bd4febd993338c2203a2734217b18ecf7803d998da1a20660eac15a6" => :yosemite
|
||||
sha256 "8404ff6169a09b622535d47b18993ed0ea90819e9434d169545db5d9442381bd" => :mavericks
|
||||
sha256 "2861639d01fdf0cb8fc70194bde36fd0f16010022c1f2c72e6236aad48fdf522" => :mountain_lion
|
||||
end
|
||||
|
||||
devel do
|
||||
url "https://github.com/google/protobuf/archive/v3.0.0-beta-1-bzl-fix.tar.gz"
|
||||
sha256 "1b364aff3557c98087969befffd2c8479e6fe70ab3a85009dc260ab65232357a"
|
||||
|
@ -21,16 +29,9 @@ class Protobuf < Formula
|
|||
depends_on "libtool" => :build
|
||||
end
|
||||
|
||||
bottle do
|
||||
revision 3
|
||||
sha256 "37b136dbe120923bbdccc4131d52b7a4738a9b776bb676e4fc75c908f9ad6e20" => :el_capitan
|
||||
sha256 "79242567bd4febd993338c2203a2734217b18ecf7803d998da1a20660eac15a6" => :yosemite
|
||||
sha256 "8404ff6169a09b622535d47b18993ed0ea90819e9434d169545db5d9442381bd" => :mavericks
|
||||
sha256 "2861639d01fdf0cb8fc70194bde36fd0f16010022c1f2c72e6236aad48fdf522" => :mountain_lion
|
||||
end
|
||||
|
||||
# this will double the build time approximately if enabled
|
||||
option "with-check", "Run build-time check"
|
||||
option "with-test", "Run build-time check"
|
||||
deprecated_option "with-check" => "with-test"
|
||||
|
||||
option :universal
|
||||
option :cxx11
|
||||
|
@ -80,7 +81,7 @@ class Protobuf < Formula
|
|||
"--prefix=#{prefix}",
|
||||
"--with-zlib"
|
||||
system "make"
|
||||
system "make", "check" if build.with? "check" || build.bottle?
|
||||
system "make", "check" if build.with?("test") || build.bottle?
|
||||
system "make", "install"
|
||||
|
||||
# Install editor support and examples
|
||||
|
@ -110,6 +111,12 @@ class Protobuf < Formula
|
|||
end
|
||||
end
|
||||
|
||||
def caveats; <<-EOS.undent
|
||||
Editor support and examples have been installed to:
|
||||
#{doc}
|
||||
EOS
|
||||
end
|
||||
|
||||
test do
|
||||
testdata = if devel?
|
||||
<<-EOS.undent
|
||||
|
@ -133,16 +140,10 @@ class Protobuf < Formula
|
|||
}
|
||||
EOS
|
||||
end
|
||||
(testpath/"test.proto").write(testdata)
|
||||
(testpath/"test.proto").write testdata
|
||||
system bin/"protoc", "test.proto", "--cpp_out=."
|
||||
system "python", "-c", "import google.protobuf" if build.with? "python"
|
||||
end
|
||||
|
||||
def caveats; <<-EOS.undent
|
||||
Editor support and examples have been installed to:
|
||||
#{doc}
|
||||
EOS
|
||||
end
|
||||
end
|
||||
|
||||
__END__
|
||||
|
|
Loading…
Reference in a new issue