diff options
| author | David Holm | 2014-02-02 10:07:25 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2014-02-02 10:07:29 +0000 |
| commit | a88c596361ad1b74c0bb122abf954744a678ac21 (patch) | |
| tree | cb7e635beeba46a4746e21395fefe766be0267f3 /Library/Formula | |
| parent | b97c7fade879ed671783b32d41cb89a7bb5fb83b (diff) | |
| download | homebrew-a88c596361ad1b74c0bb122abf954744a678ac21.tar.bz2 | |
plan9port 20140123 (new formula)
Closes #26323.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/plan9port.rb | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Library/Formula/plan9port.rb b/Library/Formula/plan9port.rb new file mode 100644 index 000000000..a997142c8 --- /dev/null +++ b/Library/Formula/plan9port.rb @@ -0,0 +1,31 @@ +require "formula" + +class Plan9port < Formula + homepage "http://swtch.com/plan9port/" + url "https://plan9port.googlecode.com/files/plan9port-20140123.tgz" + sha1 "0b207cdaac9df2dd1ae7f8e156c4ffcc625d594c" + + def install + ENV["PLAN9_TARGET"] = libexec + system "./INSTALL" + + libexec.install Dir["*"] + bin.install_symlink Dir["#{libexec}/bin/9"] + Dir["#{libexec}/mac/*.app"].each {|path| mv path, prefix } + end + + test do + (testpath/"test.c").write <<-EOS.undent + #include <u.h> + #include <libc.h> + #include <stdio.h> + + int main(void) { + return printf("Hello World\\n"); + } + EOS + system "#{bin}/9", "9c", "test.c" + system "#{bin}/9", "9l", "-o", "test", "test.o" + assert_equal "Hello World\n", `./test` + end +end |
