2015-08-01 14:29:57 +00:00
|
|
|
class Pegtl < Formula
|
|
|
|
desc "Parsing Expression Grammar Template Library"
|
|
|
|
homepage "https://github.com/ColinH/PEGTL"
|
|
|
|
url "https://github.com/ColinH/PEGTL/archive/1.1.0.tar.gz"
|
|
|
|
sha256 "7131df800d4647610c68cb120c58fb34ede9adfad741c502785cdfe8aab698db"
|
|
|
|
|
2015-10-23 12:21:17 +00:00
|
|
|
bottle :unneeded
|
|
|
|
|
2015-08-01 14:29:57 +00:00
|
|
|
def install
|
|
|
|
include.install "pegtl.hh", "pegtl"
|
|
|
|
pkgshare.install "examples"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system ENV.cxx, pkgshare/"examples/hello_world.cc", "-std=c++11", "-stdlib=libc++", "-lc++", "-o", "helloworld"
|
|
|
|
assert_equal "Good bye, homebrew!\n", shell_output("./helloworld 'Hello, homebrew!'")
|
|
|
|
end
|
|
|
|
end
|