2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-06-04 18:21:19 +00:00
|
|
|
|
|
|
|
class Cmake <Formula
|
2010-11-10 06:07:01 +00:00
|
|
|
url 'http://www.cmake.org/files/v2.8/cmake-2.8.3.tar.gz'
|
|
|
|
md5 'a76a44b93acf5e3badda9de111385921'
|
2009-11-30 13:57:36 +00:00
|
|
|
homepage 'http://www.cmake.org/'
|
2009-06-04 18:21:19 +00:00
|
|
|
|
2011-01-13 18:15:10 +00:00
|
|
|
def patches
|
|
|
|
# Adds support for enabling/disabling specific system libraries
|
|
|
|
# http://public.kitware.com/Bug/view.php?id=11431
|
|
|
|
# Shouldn't be needed in 2.8.4
|
|
|
|
"http://cmake.org/gitweb?p=cmake.git;a=patch;h=60d72b56"
|
|
|
|
end
|
|
|
|
|
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
|
|
|
|
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
|
|
|
|
|
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
|