cppp 2.6 (new formula)

Closes #1522.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
master
Filippo Valsorda 2016-05-29 03:24:14 +02:00 committed by Dominyk Tiller
parent 3e78724f6c
commit 5a1d58b393
1 changed files with 31 additions and 0 deletions

31
Formula/cppp.rb Normal file
View File

@ -0,0 +1,31 @@
class Cppp < Formula
desc "Partial Preprocessor for C"
homepage "http://www.muppetlabs.com/~breadbox/software/cppp.html"
url "http://www.muppetlabs.com/~breadbox/pub/software/cppp-2.6.tar.gz"
sha256 "d42cd410882c3b660c77122b232f96c209026fe0a38d819c391307761e651935"
def install
system "make"
bin.install "cppp"
end
test do
(testpath/"hello.c").write <<-EOS.undent
/* Comments stand for code */
#ifdef FOO
/* FOO is defined */
# ifdef BAR
/* FOO & BAR are defined */
# else
/* BAR is not defined */
# endif
#else
/* FOO is not defined */
# ifndef BAZ
/* FOO & BAZ are undefined */
# endif
#endif
EOS
system "#{bin}/cppp", "-DFOO", "hello.c"
end
end