class Cmake < Formula desc "Cross-platform make" homepage "https://www.cmake.org/" url "https://cmake.org/files/v3.9/cmake-3.9.3.tar.gz" sha256 "8eaf75e1e932159aae98ab5e7491499545554be62a08cbcbc7c75c84b999f28a" revision 1 head "https://cmake.org/cmake.git" bottle do cellar :any_skip_relocation sha256 "5adade9d76dbdeef0fcfd8dfcbee8a6359638607dc53eed6f82f6f4be6855126" => :high_sierra sha256 "7ea7a60b1ebd5859e7d8a6d9b781e3b976cfbac22ef52e06dbf9bb3f603012ac" => :el_capitan_or_later end option "without-docs", "Don't build man pages" option "with-completion", "Install Bash completion (Has potential problems with system bash)" 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. # 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 --system-curl ] if build.with? "docs" # There is an existing issue around macOS & 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" end system "./bootstrap", *args system "make" system "make", "install" if build.with? "completion" cd "Auxiliary/bash-completion/" do bash_completion.install "ctest", "cmake", "cpack" end end elisp.install "Auxiliary/cmake-mode.el" end test do (testpath/"CMakeLists.txt").write("find_package(Ruby)") system bin/"cmake", "." end end