2010-08-30 15:47:33 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Vrpn < Formula
|
2010-08-30 15:47:33 +00:00
|
|
|
url 'git://git.cs.unc.edu/vrpn.git', :tag => 'version_07.28'
|
|
|
|
version '07.28'
|
|
|
|
homepage 'http://vrpn.org'
|
|
|
|
|
|
|
|
depends_on 'cmake' => :build
|
|
|
|
|
|
|
|
def options
|
|
|
|
[['--clients', 'Build client apps and tests.']]
|
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
2011-04-13 08:48:00 +00:00
|
|
|
args = std_cmake_parameters.split
|
2010-08-30 15:47:33 +00:00
|
|
|
|
|
|
|
if ARGV.include? '--clients'
|
|
|
|
args << "-DVRPN_BUILD_CLIENTS:BOOL=ON"
|
|
|
|
else
|
|
|
|
args << "-DVRPN_BUILD_CLIENTS:BOOL=OFF"
|
|
|
|
end
|
|
|
|
|
|
|
|
args << ".."
|
|
|
|
|
|
|
|
Dir.mkdir "build"
|
|
|
|
Dir.chdir "build" do
|
|
|
|
system "cmake", *args
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|