homebrew-core/Formula/qbs.rb

42 lines
956 B
Ruby
Raw Normal View History

require "formula"
class Qbs < Formula
homepage "http://qt-project.org/wiki/qbs"
2014-10-29 18:24:47 +00:00
url "http://download.qt-project.org/official_releases/qbs/1.3.2/qbs-1.3.2.src.tar.gz"
sha1 "ce2d807c145e239d39e360521d62486eb1e3d108"
bottle do
cellar :any
sha1 "cc8d1816df4336ab9d8745e332efb3081ac8abf7" => :yosemite
sha1 "f95dc259474a8006364b62f7fcbc943783a6ccd9" => :mavericks
sha1 "bbdadfad3bc1d7a6024b42245999d460ad719515" => :mountain_lion
end
depends_on "qt5"
def install
system "qmake", "qbs.pro", "-r"
system "make", "install", "INSTALL_ROOT=#{prefix}"
end
2014-10-30 09:02:01 +00:00
test do
(testpath/"test.c").write <<-EOS.undent
int main() {
return 0;
}
EOS
(testpath/"test.qbp").write <<-EOS.undent
import qbs
CppApplication {
name: "test"
files: "test.c"
consoleApplication: true
}
EOS
system "#{bin}/qbs", "run", "-f", "test.qbp", "profile:clang"
end
end