2016-02-27 10:23:58 +00:00
|
|
|
class Meson < Formula
|
2016-10-04 10:27:50 +00:00
|
|
|
include Language::Python::Virtualenv
|
|
|
|
|
2016-02-27 10:23:58 +00:00
|
|
|
desc "Fast and user friendly build system"
|
|
|
|
homepage "http://mesonbuild.com/"
|
2016-10-18 08:05:07 +00:00
|
|
|
url "https://github.com/mesonbuild/meson/releases/download/0.35.1/meson-0.35.1.tar.gz"
|
|
|
|
sha256 "b47edb53bd7554cb7890a32399fdf6402e8079379393893ab3dec8fffcbfba2c"
|
2016-08-22 10:32:51 +00:00
|
|
|
head "https://github.com/mesonbuild/meson.git"
|
2016-02-27 10:23:58 +00:00
|
|
|
|
2016-04-22 21:11:02 +00:00
|
|
|
bottle do
|
2016-10-18 09:02:02 +00:00
|
|
|
sha256 "8cf2a53fe4eac6e30170cbfc5ec4641eb023227d16ff9a3370af91e80dc2dba4" => :sierra
|
|
|
|
sha256 "6519e09c6312b6614b49d58ab8cd84efe1a40fe4d8ee1a9184e01ff582c0b72b" => :el_capitan
|
|
|
|
sha256 "d51800904d6b79eabdb31acdf27a4bb7947e4fb956d58da9fd0562d9764f9371" => :yosemite
|
2016-04-22 21:11:02 +00:00
|
|
|
end
|
|
|
|
|
2016-02-27 10:23:58 +00:00
|
|
|
depends_on :python3
|
|
|
|
depends_on "ninja"
|
|
|
|
|
|
|
|
def install
|
2016-10-04 10:27:50 +00:00
|
|
|
virtualenv_create(libexec, "python3")
|
|
|
|
virtualenv_install_with_resources
|
2016-02-27 10:23:58 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"helloworld.c").write <<-EOS.undent
|
|
|
|
main() {
|
|
|
|
puts("hi");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EOS
|
|
|
|
(testpath/"meson.build").write <<-EOS.undent
|
|
|
|
project('hello', 'c')
|
|
|
|
executable('hello', 'helloworld.c')
|
|
|
|
EOS
|
|
|
|
|
|
|
|
mkdir testpath/"build" do
|
|
|
|
system "#{bin}/meson.py", ".."
|
|
|
|
assert File.exist?(testpath/"build/build.ninja")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|