2014-03-30 23:36:44 +00:00
|
|
|
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"
|
2014-07-30 08:48:17 +00:00
|
|
|
|
2014-09-04 07:02:23 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2014-10-29 18:35:27 +00:00
|
|
|
sha1 "cc8d1816df4336ab9d8745e332efb3081ac8abf7" => :yosemite
|
|
|
|
sha1 "f95dc259474a8006364b62f7fcbc943783a6ccd9" => :mavericks
|
|
|
|
sha1 "bbdadfad3bc1d7a6024b42245999d460ad719515" => :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
|
|
|
|
|
|
|
|
system "#{bin}/qbs", "run", "-f", "test.qbp", "profile:clang"
|
|
|
|
end
|
2014-03-30 23:36:44 +00:00
|
|
|
end
|