Created
February 21, 2012 09:07
-
-
Save jkp/1875320 to your computer and use it in GitHub Desktop.
Homebrew formula for cmake with Xcode 4.3 fixes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Cmake < Formula | |
head 'https://github.com/jkp/CMake.git', :tag => 'b8aa20c2913e91609c424d55fbb3d56cc5cd3dba' | |
homepage 'http://www.cmake.org/' | |
def install | |
# A framework-installed expat will be detected and mess things up. | |
if File.exist? "/Library/Frameworks/expat.framework" | |
opoo "/Library/Frameworks/expat.framework detected" | |
puts <<-EOS.undent | |
This will be picked up by CMake's build system and likey cause the | |
build to fail, trying to link to a 32-bit version of expat. | |
You may need to move this file out of the way for this brew to work. | |
EOS | |
end | |
if ENV['GREP_OPTIONS'] == "--color=always" | |
opoo "GREP_OPTIONS is set to '--color=always'" | |
puts <<-EOS.undent | |
Having `GREP_OPTIONS` set this way causes CMake builds to fail. | |
You will need to `unset GREP_OPTIONS` before brewing. | |
EOS | |
end | |
system "./bootstrap", "--prefix=#{prefix}", | |
"--system-libs", | |
"--no-system-libarchive", | |
"--datadir=/share/cmake", | |
"--docdir=/share/doc/cmake", | |
"--mandir=/share/man" | |
system "make" | |
system "make install" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment