homebrew-core/Formula/ib.rb
Daniel Hood 6def13d690 ib 0.7.1 (new formula)
Closes .

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-11-25 08:41:19 +00:00

52 lines
1.3 KiB
Ruby

class Ib < Formula
desc "C/C++ build tool that automatically resolves included source"
homepage "https://github.com/JasonL9000/ib"
url "https://github.com/JasonL9000/ib/archive/0.7.1.tar.gz"
sha256 "a5295f76ed887291b6bf09b6ad6e3832a39e28d17c13566889d5fcae8708d2ec"
depends_on :python
def install
prefix.install "common.cfg", "debug.cfg", "release.cfg", "asan.cfg", "__ib__"
bin.install "ib"
end
test do
mkdir testpath/"example" do
(testpath/"example/debug.cfg").write <<-EOS.undent
cc = Obj(
tool='clang',
flags=[ '--std=c++14' ],
hdrs_flags=[ '-MM', '-MG' ],
incl_dirs=[]
)
link = Obj(
tool='gcc',
flags=[ '-pthread' ],
libs=[ 'stdc++' ],
static_libs=[],
lib_dirs=[]
)
make = Obj(
tool='make',
flags=[],
all_pseudo_target='all'
)
EOS
(testpath/"example/hello.cc").write <<-EOS.undent
#include <iostream>
int main(int, char*[]) {
std::cout << "Hello World!" << std::endl;
return 0;
}
EOS
touch testpath/"example/__ib__"
system "#{bin}/ib", "hello"
system "../out/debug/hello"
end
end
end