diff options
| author | Mike McQuaid | 2013-01-27 22:37:22 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2013-01-30 21:29:20 -0800 |
| commit | 2de4a910d453aeae6fd29c3cc9f413f439d69d4c (patch) | |
| tree | 52be13db6c14a4565295ffa6a9e094e48293c9e3 | |
| parent | b2702e3ae059009b7c6fa90fb8e624a731737364 (diff) | |
| download | homebrew-2de4a910d453aeae6fd29c3cc9f413f439d69d4c.tar.bz2 | |
cmake: general cleanup and improve test.
| -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 |
