vrpn: option syntax cleanup
This commit is contained in:
parent
e5d1c2153b
commit
b40bd732eb
1 changed files with 11 additions and 12 deletions
|
@ -1,12 +1,9 @@
|
|||
require "formula"
|
||||
|
||||
class Vrpn < Formula
|
||||
desc "Virtual reality peripheral network"
|
||||
homepage "http://vrpn.org"
|
||||
homepage "https://github.com/vrpn/vrpn/wiki"
|
||||
url "https://github.com/vrpn/vrpn/releases/download/v07.33/vrpn_07_33.zip"
|
||||
sha256 "3cb9e71f17eb756fbcf738e6d5084d47b3b122b68b66d42d6769105cb18a79be"
|
||||
|
||||
head "git://git.cs.unc.edu/vrpn.git"
|
||||
head "https://github.com/vrpn/vrpn.git"
|
||||
|
||||
bottle do
|
||||
cellar :any
|
||||
|
@ -16,30 +13,32 @@ class Vrpn < Formula
|
|||
sha256 "edc3b260768bf854f98e36e487b1064f61f046b1104abbeb38a7c4ed25877487" => :mountain_lion
|
||||
end
|
||||
|
||||
option "clients", "Build client apps and tests"
|
||||
option "with-clients", "Build client apps and tests"
|
||||
option "with-docs", "Build doxygen-based API documentation"
|
||||
|
||||
deprecated_option "docs" => "with-docs"
|
||||
deprecated_option "clients" => "with-clients"
|
||||
|
||||
depends_on "cmake" => :build
|
||||
depends_on "libusb" # for HID support
|
||||
depends_on "doxygen" => :build if build.with? "docs"
|
||||
depends_on "libusb" # for HID support
|
||||
|
||||
def install
|
||||
ENV.libstdcxx
|
||||
|
||||
args = std_cmake_args
|
||||
args << "-DCMAKE_OSX_SYSROOT=#{MacOS.sdk_path}"
|
||||
|
||||
if build.include? "clients"
|
||||
if build.with? "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.with? "docs"
|
||||
system "make install"
|
||||
system "cmake", "..", *args
|
||||
system "make", "doc" if build.with? "docs"
|
||||
system "make", "install"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue