19 lines
645 B
Ruby
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.4.0.tar.gz"
|
|
sha256 "45b5c84e390439b99efcb60efd1cb69c7e7b0089362d270c3a84d44479dc81cb"
|
|
|
|
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
|