class Cmake < Formula desc "Cross-platform make" homepage "https://www.cmake.org/" url "https://github.com/Kitware/CMake/releases/download/v3.15.4/cmake-3.15.4.tar.gz" sha256 "8a211589ea21374e49b25fc1fc170e2d5c7462b795f1b29c84dd0e984301ed7a" head "https://cmake.org/cmake.git" bottle do cellar :any_skip_relocation sha256 "46d8b2170e1bc872f5d4548a730bd7829347189aa8c50843343ff2f0e4e356e4" => :catalina sha256 "ee48d9b4a0d925dcb73e300500a155497ef3d6a982cc42ded4f4f5b9d68b76c4" => :mojave sha256 "4981614f03a1bbf77147f2b5cb2e6f42439e6c41c7e947b0072d8f0401fef749" => :high_sierra end depends_on "sphinx-doc" => :build # The completions were removed because of problems with system bash # 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 --sphinx-build=#{Formula["sphinx-doc"].opt_bin}/sphinx-build --sphinx-html --sphinx-man --system-zlib --system-bzip2 --system-curl ] # 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" system "./bootstrap", *args, "--", "-DCMAKE_BUILD_TYPE=Release" system "make" system "make", "install" elisp.install "Auxiliary/cmake-mode.el" end test do (testpath/"CMakeLists.txt").write("find_package(Ruby)") system bin/"cmake", "." end end