2010-08-30 15:47:33 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Vrpn < Formula
|
2012-02-21 06:04:21 +00:00
|
|
|
homepage 'http://vrpn.org'
|
2012-07-28 23:36:27 +00:00
|
|
|
url 'ftp://ftp.cs.unc.edu/pub/packages/GRIP/vrpn/vrpn_07_30.zip'
|
|
|
|
sha1 '474f45d524ba959e93630f19666fd03d8f337d90'
|
2012-02-21 06:04:21 +00:00
|
|
|
|
2011-10-04 16:57:28 +00:00
|
|
|
head 'git://git.cs.unc.edu/vrpn.git'
|
2010-08-30 15:47:33 +00:00
|
|
|
|
2012-08-23 04:02:35 +00:00
|
|
|
option 'clients', 'Build client apps and tests'
|
|
|
|
option 'docs', 'Build doxygen-based API documentation'
|
|
|
|
|
2010-08-30 15:47:33 +00:00
|
|
|
depends_on 'cmake' => :build
|
2012-08-25 16:41:33 +00:00
|
|
|
depends_on 'libusb' # for HID support
|
2012-08-23 04:02:35 +00:00
|
|
|
depends_on 'doxygen' if build.include? 'docs'
|
2010-08-30 15:47:33 +00:00
|
|
|
|
|
|
|
def install
|
2012-05-22 21:37:04 +00:00
|
|
|
args = std_cmake_args
|
2010-08-30 15:47:33 +00:00
|
|
|
|
2012-08-23 04:02:35 +00:00
|
|
|
if build.include? 'clients'
|
2010-08-30 15:47:33 +00:00
|
|
|
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
|
2010-08-30 15:47:33 +00:00
|
|
|
system "cmake", *args
|
2012-08-25 16:41:33 +00:00
|
|
|
system "make doc" if build.include? 'docs'
|
2010-08-30 15:47:33 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|