blob: dd5f351d102b07365f6160be6a6f94e648ad64c2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
  | 
require 'formula'
class Vrpn < Formula
  homepage 'http://vrpn.org'
  url 'http://www.cs.unc.edu/Research/vrpn/downloads/vrpn_07_31.zip'
  sha1 'a78dd36cd301a7def2d54576cfa63604a8729ace'
  head 'git://git.cs.unc.edu/vrpn.git'
  option 'clients', 'Build client apps and tests'
  option 'docs', 'Build doxygen-based API documentation'
  depends_on 'cmake' => :build
  depends_on 'libusb' # for HID support
  depends_on 'doxygen' if build.include? 'docs'
  def install
    args = std_cmake_args
    if build.include? 'clients'
      args << "-DVRPN_BUILD_CLIENTS:BOOL=ON"
    else
      args << "-DVRPN_BUILD_CLIENTS:BOOL=OFF"
    end
    args << ".."
    mkdir "build" do
      system "cmake", *args
      system "make doc" if build.include? 'docs'
      system "make install"
    end
  end
end
  |