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.5.1.tar.gz"
|
|
sha256 "7cc2ba1a23c2e834c7dbe1e22a55d521f3aed4d511467b6e2a1034d33f34410f"
|
|
|
|
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
|