diff options
| author | Calvin Loncaric | 2014-02-13 12:26:21 -0800 |
|---|---|---|
| committer | Misty De Meo | 2014-02-15 20:46:45 -0800 |
| commit | 9ba5466e04b46ddad72818f62133b0c03c844a06 (patch) | |
| tree | dae3f0a6f4f9dc149cea18133c0eb3d5b8e0009b /Library/Formula/compcert.rb | |
| parent | e60c88e34097238a4436c8b9ee9cf75b1e285719 (diff) | |
| download | homebrew-9ba5466e04b46ddad72818f62133b0c03c844a06.tar.bz2 | |
compcert 2.1
Closes #26702.
Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Diffstat (limited to 'Library/Formula/compcert.rb')
| -rw-r--r-- | Library/Formula/compcert.rb | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Library/Formula/compcert.rb b/Library/Formula/compcert.rb new file mode 100644 index 000000000..01f3e6543 --- /dev/null +++ b/Library/Formula/compcert.rb @@ -0,0 +1,35 @@ +require "formula" + +class Compcert < Formula + homepage "http://compcert.inria.fr" + url "http://compcert.inria.fr/release/compcert-2.1.tgz" + sha1 "1ec21e43c3ac778827522d385733e36d24c5f8d4" + + depends_on "coq" => :build + depends_on "objective-caml" => :build + depends_on "camlp5" => :build + + def install + # Compcert's configure script hard-codes gcc. On Lion and under, this + # creates problems since XCode's gcc does not support CFI, + # but superenv will trick it into using clang which does. This + # causes problems with the compcert compiler at runtime. + inreplace 'configure', '${toolprefix}gcc', "${toolprefix}#{ENV.cc}" + + system "./configure", "-prefix", prefix, "ia32-macosx" + system "make", "all" + system "make", "install" + end + + test do + (testpath/"test.c").write <<-EOS.undent + #include <stdio.h> + int main(int argc, char** argv) { + printf("Hello, world!\n"); + return 0; + } + EOS + system "#{bin}/ccomp", "test.c", "-o", "test" + system "./test" + end +end |
