mirror of
https://github.com/mistydemeo/tigerbrew.git
synced 2026-12-02 21:49:49 -05:00
cmake: general cleanup and improve test.
This commit is contained in:
1 parent
b2702e3ae0
commit
2de4a910d4
1 file changed
+9
-5
@@ -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
|
||||
Reference in new issue
Block a user