diff options
| author | Alex Dunn | 2015-04-04 21:46:37 -0700 |
|---|---|---|
| committer | Xu Cheng | 2015-04-06 17:42:20 +0800 |
| commit | 401886b43a5fd784da1d422a4d5d07e1984f3843 (patch) | |
| tree | 454417388eb63f49c69cfbdef42139b28910ebbe /Library/Formula | |
| parent | 95108f6b81cc9925b73beba6ba225c120d1a4888 (diff) | |
| download | homebrew-401886b43a5fd784da1d422a4d5d07e1984f3843.tar.bz2 | |
re2c 0.14.2
Closes #38376.
Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/re2c.rb | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/Library/Formula/re2c.rb b/Library/Formula/re2c.rb index 436608101..194d3c370 100644 --- a/Library/Formula/re2c.rb +++ b/Library/Formula/re2c.rb @@ -1,9 +1,7 @@ -require "formula" - class Re2c < Formula homepage "http://re2c.org" - url "https://downloads.sourceforge.net/project/re2c/re2c/0.14.1/re2c-0.14.1.tar.gz" - sha1 "b6af07ed6b57ef20936555c95ffb9f177aae3c28" + url "https://downloads.sourceforge.net/project/re2c/re2c/0.14.2/re2c-0.14.2.tar.gz" + sha256 "a702eb63977af4715555edb41eba3b47bbfdcdb44b566d146869a7db022f1c30" bottle do cellar :any @@ -13,8 +11,31 @@ class Re2c < Formula end def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", + system "./configure", "--disable-debug", + "--disable-dependency-tracking", "--prefix=#{prefix}" system "make", "install" end + + test do + (testpath/"test.c").write <<-EOS.undent + unsigned int stou (const char * s) + { + # define YYCTYPE char + const YYCTYPE * YYCURSOR = s; + unsigned int result = 0; + + for (;;) + { + /*!re2c + re2c:yyfill:enable = 0; + + "\x00" { return result; } + [0-9] { result = result * 10 + c; continue; } + */ + } + } + EOS + system bin/"re2c", "-is", testpath/"test.c" + end end |
