homebrew-core/Formula/vrpn.rb

38 lines
840 B
Ruby
Raw Normal View History

require 'formula'
2011-03-10 05:11:03 +00:00
class Vrpn < Formula
homepage 'http://vrpn.org'
url 'ftp://ftp.cs.unc.edu/pub/packages/GRIP/vrpn/vrpn_07_29.zip'
md5 '422f13fc9cbb62d36c96f3cc3b06cec9'
head 'git://git.cs.unc.edu/vrpn.git'
depends_on 'libusb' # for HID support
depends_on 'cmake' => :build
depends_on 'doxygen' if ARGV.include? '--docs'
def options
[
['--clients', 'Build client apps and tests.'],
['--docs', 'Build doxygen-based API documentation']
]
end
def install
args = std_cmake_parameters.split
if ARGV.include? '--clients'
args << "-DVRPN_BUILD_CLIENTS:BOOL=ON"
else
args << "-DVRPN_BUILD_CLIENTS:BOOL=OFF"
end
args << ".."
2012-02-22 04:48:36 +00:00
mkdir "build" do
system "cmake", *args
2012-02-22 04:48:36 +00:00
system "make doc" if ARGV.include? '--docs'
system "make install"
end
end
end