homebrew-core/Formula/treefrog.rb
2017-05-27 04:52:43 -07:00

55 lines
1.6 KiB
Ruby

class Treefrog < Formula
desc "High-speed C++ MVC Framework for Web Application"
homepage "http://www.treefrogframework.org/"
url "https://github.com/treefrogframework/treefrog-framework/archive/v1.17.0.tar.gz"
sha256 "8e9ca157610848ba5290a37377d1787a16fada8e32babb7400464485b6873e19"
head "https://github.com/treefrogframework/treefrog-framework.git", :branch => "master"
bottle do
sha256 "b7d5f5213a6f49bc1eea50eba4a1b0fae2ac5397414b5df090b4fd29cff7119c" => :sierra
sha256 "b99147d19cb7b77bf2711353da0942bc8bea4996886dc4b382d3ef200b82c767" => :el_capitan
end
deprecated_option "with-qt5" => "with-qt"
option "with-mysql", "enable --with-mysql option for Qt build"
option "with-postgresql", "enable --with-postgresql option for Qt build"
option "with-qt", "build and link with QtGui module"
depends_on :macos => :el_capitan
depends_on :xcode => [:build, "8.0"]
qt_build_options = []
qt_build_options << "with-mysql" if build.with?("mysql")
qt_build_options << "with-postgresql" if build.with?("postgresql")
depends_on "qt" => qt_build_options
def install
args = ["--prefix=#{prefix}"]
args << "--enable-gui-mod" if build.with? "qt"
system "./configure", *args
cd "src" do
system "make"
system "make", "install"
end
cd "tools" do
system "make"
system "make", "install"
end
end
test do
system bin/"tspawn", "new", "hello"
assert File.exist?("hello")
cd "hello" do
assert File.exist?("hello.pro")
system HOMEBREW_PREFIX/"opt/qt/bin/qmake"
assert File.exist?("Makefile")
system "make"
system bin/"treefrog", "-v"
end
end
end