homebrew-core/Formula/pegtl.rb
2019-04-11 11:05:26 +02: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.8.0.tar.gz"
sha256 "655197f9ff543fb6319cec9b86bb34147dd54c42dde78b89ff93d15c762d5f73"
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