diff options
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/cmake.rb | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Library/Formula/cmake.rb b/Library/Formula/cmake.rb index c074e7839..12718bfcd 100644 --- a/Library/Formula/cmake.rb +++ b/Library/Formula/cmake.rb @@ -1,12 +1,16 @@ require 'formula' class NoExpatFramework < Requirement + def expat_framework + '/Library/Frameworks/expat.framework' + end + satisfy :build_env => false do - not File.exist? "/Library/Frameworks/expat.framework" + not File.exist? expat_framework end def message; <<-EOS.undent - Detected /Library/Frameworks/expat.framework + Detected #{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. @@ -16,7 +20,6 @@ class NoExpatFramework < Requirement end end - class Cmake < Formula homepage 'http://www.cmake.org/' url 'http://www.cmake.org/files/v2.8/cmake-2.8.10.1.tar.gz' @@ -45,7 +48,8 @@ class Cmake < Formula system "make install" end - def test - system "#{bin}/cmake", "-E", "echo", "testing" + test do + File.open('CMakeLists.txt', 'w') {|f| f.write('find_package(Ruby)') } + system "#{bin}/cmake", '.' end end |
