Skip to content

Instantly share code, notes, and snippets.

@jkp
Created January 30, 2012 09:01
Show Gist options
  • Select an option

  • Save jkp/1703452 to your computer and use it in GitHub Desktop.

Select an option

Save jkp/1703452 to your computer and use it in GitHub Desktop.
Homebrew formula for my branch of Cmake with Ninja build fixes
require 'formula'
class NoExpatFramework < Requirement
def message; <<-EOS.undent
Detected /Library/Frameworks/expat.framework
This will be picked up by CMake's build system and likely 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 to compile CMake.
EOS
end
def satisfied?
not File.exist? "/Library/Frameworks/expat.framework"
end
end
class Cmake < Formula
homepage 'http://www.cmake.org/'
head 'https://github.com/jkp/CMake.git', :branch => 'jkp/next'
depends_on NoExpatFramework.new
def install
args = %W[
--prefix=#{prefix}
--system-libs
--no-system-libarchive
--datadir=/share/cmake
--docdir=/share/doc/cmake
--mandir=/share/man
]
system "./bootstrap", *args
system "make"
system "make install"
end
def test
system "#{bin}/cmake", "-E", "echo", "testing"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment