2014-03-30 23:36:44 +00:00
|
|
|
require "formula"
|
|
|
|
|
|
|
|
class Qbs < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Qt Build Suite"
|
2015-04-25 03:12:19 +00:00
|
|
|
homepage "https://wiki.qt.io/Qt_Build_Suite"
|
2015-04-27 00:47:53 +00:00
|
|
|
url "https://download.qt.io/official_releases/qbs/1.4.0/qbs-1.4.0.src.tar.gz"
|
2015-04-25 03:12:19 +00:00
|
|
|
sha1 "4c70247155281b9536a6fab6672cd5f53610cfa1"
|
2014-07-30 08:48:17 +00:00
|
|
|
|
2014-09-04 07:02:23 +00:00
|
|
|
bottle do
|
2015-04-25 04:06:46 +00:00
|
|
|
sha256 "fa881458fc8700b9160bde642842e0baf75a4e221909a890c7ed6c1f191c4e32" => :yosemite
|
|
|
|
sha256 "e211c32a20804c5d8386d825bb3846a6bb2b5bc360f2abdab577d5dc7288402f" => :mavericks
|
|
|
|
sha256 "fbf2045061fdb7c148ec4c32843e29078810282ae28eb13c1289904953a3209d" => :mountain_lion
|
2014-09-04 07:02:23 +00:00
|
|
|
end
|
|
|
|
|
2014-03-30 23:36:44 +00:00
|
|
|
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
|
|
|
|
|
2015-04-19 22:50:35 +00:00
|
|
|
system "#{bin}/qbs", "setup-toolchains", "--detect", "--settings-dir", testpath
|
|
|
|
system "#{bin}/qbs", "run", "--settings-dir", testpath, "-f", "test.qbp", "profile:clang"
|
2014-10-30 09:02:01 +00:00
|
|
|
end
|
2014-03-30 23:36:44 +00:00
|
|
|
end
|