homebrew-core/Formula/pegtl.rb
2017-12-14 07:55:42 -08: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.3.1.tar.gz"
sha256 "5b6b3b9cac1b03d874cba1dfe67980681912ac0c75a3f3708bea227c8574f0a2"
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