2011-03-10 05:11:03 +00:00
|
|
|
class Cmake < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Cross-platform make"
|
2015-10-17 08:34:49 +00:00
|
|
|
homepage "https://www.cmake.org/"
|
2015-12-04 00:07:36 +00:00
|
|
|
url "https://cmake.org/files/v3.4/cmake-3.4.1.tar.gz"
|
|
|
|
sha256 "d41462bdd80dc37f0d5608167b354bb3af8c068eee640be04c907154c5c113e2"
|
2015-10-17 11:22:29 +00:00
|
|
|
head "https://cmake.org/cmake.git"
|
2013-08-08 09:46:22 +00:00
|
|
|
|
2014-08-06 19:42:13 +00:00
|
|
|
bottle do
|
2015-09-18 14:12:21 +00:00
|
|
|
cellar :any_skip_relocation
|
2015-12-04 00:22:39 +00:00
|
|
|
sha256 "34257a08a944ecdf27fa15b7a12a59a3d6f844eee1612b139cb8d98f15025d7d" => :el_capitan
|
|
|
|
sha256 "5ff7e68c06ad6556b3f1440f992ea37af457ff7a998e59e2cf83cdda9119c0a4" => :yosemite
|
|
|
|
sha256 "f507463c578d2b34713e28d843b530f7787631bdd009084db6cbdef8ea9cc6f9" => :mavericks
|
2014-08-06 19:42:13 +00:00
|
|
|
end
|
|
|
|
|
2014-10-19 17:11:19 +00:00
|
|
|
option "without-docs", "Don't build man pages"
|
2015-08-18 18:18:38 +00:00
|
|
|
option "with-completion", "Install Bash completion (Has potential problems with system bash)"
|
2015-01-29 20:42:28 +00:00
|
|
|
|
2015-11-16 07:04:49 +00:00
|
|
|
depends_on "sphinx-doc" => :build if build.with? "docs"
|
2015-01-02 12:19:18 +00:00
|
|
|
|
|
|
|
# The `with-qt` GUI option was removed due to circular dependencies if
|
|
|
|
# CMake is built with Qt support and Qt is built with MySQL support as MySQL uses CMake.
|
|
|
|
# For the GUI application please instead use brew install caskroom/cask/cmake.
|
2014-11-14 17:14:47 +00:00
|
|
|
|
2009-06-04 18:21:19 +00:00
|
|
|
def install
|
2012-07-11 06:25:57 +00:00
|
|
|
args = %W[
|
|
|
|
--prefix=#{prefix}
|
2015-03-23 13:00:44 +00:00
|
|
|
--no-system-libs
|
2014-12-19 18:51:34 +00:00
|
|
|
--parallel=#{ENV.make_jobs}
|
2012-07-11 06:25:57 +00:00
|
|
|
--datadir=/share/cmake
|
|
|
|
--docdir=/share/doc/cmake
|
|
|
|
--mandir=/share/man
|
2015-03-28 11:50:25 +00:00
|
|
|
--system-zlib
|
|
|
|
--system-bzip2
|
2012-07-11 06:25:57 +00:00
|
|
|
]
|
2014-11-14 17:14:47 +00:00
|
|
|
|
2015-11-15 04:25:48 +00:00
|
|
|
# https://github.com/Homebrew/homebrew/issues/45989
|
|
|
|
if MacOS.version <= :lion
|
|
|
|
args << "--no-system-curl"
|
|
|
|
else
|
|
|
|
args << "--system-curl"
|
|
|
|
end
|
|
|
|
|
2014-10-19 17:11:19 +00:00
|
|
|
if build.with? "docs"
|
2015-11-16 07:04:49 +00:00
|
|
|
# There is an existing issue around OS X & Python locale setting
|
|
|
|
# See https://bugs.python.org/issue18378#msg215215 for explanation
|
|
|
|
ENV["LC_ALL"] = "en_US.UTF-8"
|
|
|
|
args << "--sphinx-man" << "--sphinx-build=#{Formula["sphinx-doc"].opt_bin}/sphinx-build"
|
2014-10-19 17:11:19 +00:00
|
|
|
end
|
2012-07-11 06:25:57 +00:00
|
|
|
|
|
|
|
system "./bootstrap", *args
|
2010-07-15 04:50:29 +00:00
|
|
|
system "make"
|
2014-09-14 07:18:46 +00:00
|
|
|
system "make", "install"
|
2015-04-22 13:46:14 +00:00
|
|
|
|
2015-08-18 18:18:38 +00:00
|
|
|
if build.with? "completion"
|
|
|
|
cd "Auxiliary/bash-completion/" do
|
|
|
|
bash_completion.install "ctest", "cmake", "cpack"
|
|
|
|
end
|
2015-04-22 13:46:14 +00:00
|
|
|
end
|
2015-07-20 01:58:14 +00:00
|
|
|
|
|
|
|
(share/"emacs/site-lisp/cmake").install "Auxiliary/cmake-mode.el"
|
2009-06-04 18:21:19 +00:00
|
|
|
end
|
2012-04-19 20:55:15 +00:00
|
|
|
|
2013-01-27 22:37:22 +00:00
|
|
|
test do
|
2014-09-14 07:18:46 +00:00
|
|
|
(testpath/"CMakeLists.txt").write("find_package(Ruby)")
|
|
|
|
system "#{bin}/cmake", "."
|
2012-04-19 20:55:15 +00:00
|
|
|
end
|
2009-11-30 13:57:36 +00:00
|
|
|
end
|