2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-06-04 18:21:19 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Cmake < Formula
|
2011-12-30 22:43:36 +00:00
|
|
|
url 'http://www.cmake.org/files/v2.8/cmake-2.8.7.tar.gz'
|
|
|
|
md5 'e1b237aeaed880f65dec9c20602452f6'
|
2009-11-30 13:57:36 +00:00
|
|
|
homepage 'http://www.cmake.org/'
|
2012-01-23 04:32:15 +00:00
|
|
|
|
2012-03-09 19:59:48 +00:00
|
|
|
# Fix issues with Xcode 4.3. Remove for 2.8.8.
|
|
|
|
def patches
|
|
|
|
[ 'https://github.com/Kitware/CMake/commit/5663e.patch',
|
|
|
|
'https://github.com/Kitware/CMake/commit/4693c.patch' ]
|
|
|
|
end
|
|
|
|
|
2012-01-23 04:32:15 +00:00
|
|
|
bottle do
|
2012-04-10 16:25:08 +00:00
|
|
|
sha1 '53988412bf3ebdf85dc44e8f7656f58b927b644f' => :snowleopard
|
|
|
|
sha1 '3a57f6f44186e0dba34ef8b8fb4a9047e9e5d8a3' => :lion
|
2012-01-23 04:32:15 +00:00
|
|
|
end
|
2011-07-25 19:36:36 +00:00
|
|
|
|
2009-06-04 18:21:19 +00:00
|
|
|
def install
|
2010-12-26 21:29:01 +00:00
|
|
|
# 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
|
2011-08-25 01:35:51 +00:00
|
|
|
This will be picked up by CMake's build system and likey cause the
|
2010-12-26 21:29:01 +00:00
|
|
|
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
|
|
|
|
|
2009-08-07 14:41:43 +00:00
|
|
|
system "./bootstrap", "--prefix=#{prefix}",
|
|
|
|
"--system-libs",
|
2011-01-13 18:15:10 +00:00
|
|
|
"--no-system-libarchive",
|
2009-08-07 14:41:43 +00:00
|
|
|
"--datadir=/share/cmake",
|
|
|
|
"--docdir=/share/doc/cmake",
|
|
|
|
"--mandir=/share/man"
|
2010-07-15 04:50:29 +00:00
|
|
|
system "make"
|
2009-06-04 18:21:19 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
2009-11-30 13:57:36 +00:00
|
|
|
end
|