homebrew-core/Formula/cmake.rb

68 lines
2.1 KiB
Ruby
Raw Normal View History

2011-03-10 05:11:03 +00:00
class Cmake < Formula
desc "Cross-platform make"
2015-10-17 08:34:49 +00:00
homepage "https://www.cmake.org/"
url "https://cmake.org/files/v3.7/cmake-3.7.1.tar.gz"
sha256 "449a5bce64dbd4d5b9517ebd1a1248ed197add6ad27934478976fd5f1f9330e1"
head "https://cmake.org/cmake.git"
2013-08-08 09:46:22 +00:00
bottle do
2015-09-18 14:12:21 +00:00
cellar :any_skip_relocation
2016-12-01 04:54:44 +00:00
sha256 "2220cacb9082f8239edba730a60821c31950ae01efc121948cfe673410bd0376" => :sierra
sha256 "6e1486bcc9d1f0483319cd7b730492ab8a35bf9b7aa747eddafab9035c849017" => :el_capitan
sha256 "c8086bc9f149cb0b944273497a40ac0dfd23b7bb720f95f57e313e82ede73dea" => :yosemite
end
option "without-docs", "Don't build man pages"
option "with-completion", "Install Bash completion (Has potential problems with system bash)"
2015-11-16 07:04:49 +00:00
depends_on "sphinx-doc" => :build if build.with? "docs"
# 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.
2016-07-22 03:23:11 +00:00
# For the GUI application please instead use `brew cask install cmake`.
def install
args = %W[
--prefix=#{prefix}
--no-system-libs
--parallel=#{ENV.make_jobs}
--datadir=/share/cmake
--docdir=/share/doc/cmake
--mandir=/share/man
--system-zlib
--system-bzip2
]
2016-07-22 03:23:11 +00:00
# https://github.com/Homebrew/legacy-homebrew/issues/45989
if MacOS.version <= :lion
args << "--no-system-curl"
else
args << "--system-curl"
end
if build.with? "docs"
# There is an existing issue around macOS & Python locale setting
2015-11-16 07:04:49 +00:00
# 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"
end
system "./bootstrap", *args
2010-07-15 04:50:29 +00:00
system "make"
2014-09-14 07:18:46 +00:00
system "make", "install"
if build.with? "completion"
cd "Auxiliary/bash-completion/" do
bash_completion.install "ctest", "cmake", "cpack"
end
end
2016-07-22 03:23:11 +00:00
elisp.install "Auxiliary/cmake-mode.el"
end
test do
2014-09-14 07:18:46 +00:00
(testpath/"CMakeLists.txt").write("find_package(Ruby)")
2016-07-22 03:23:11 +00:00
system bin/"cmake", "."
end
end