homebrew-core/Formula/pegtl.rb
2017-09-25 00:06:03 -07:00

19 lines
645 B
Ruby

class Pegtl < Formula
desc "Parsing Expression Grammar Template Library"
homepage "https://github.com/taocpp/PEGTL"
url "https://github.com/taocpp/PEGTL/archive/2.2.0.tar.gz"
sha256 "ac9e4a1fe73e72bfe0c22e1d3cd05bb8ce9cfdfcc6e517bbdd4a17dd9731cac7"
bottle :unneeded
def install
prefix.install "include"
rm "src/example/pegtl/CMakeLists.txt"
(pkgshare/"examples").install (buildpath/"src/example/pegtl").children
end
test do
system ENV.cxx, pkgshare/"examples/hello_world.cpp", "-std=c++11", "-o", "helloworld"
assert_equal "Good bye, homebrew!\n", shell_output("./helloworld 'Hello, homebrew!'")
end
end