2014-05-20 05:51:24 +00:00
|
|
|
require "formula"
|
2013-01-31 10:55:59 +00:00
|
|
|
|
|
|
|
class Libfreenect < Formula
|
2014-05-20 05:51:24 +00:00
|
|
|
homepage "http://openkinect.org"
|
|
|
|
url "https://github.com/OpenKinect/libfreenect/archive/v0.4.3.tar.gz"
|
|
|
|
sha1 "aa2784b78d2ba402cecd68eaec4a0cc6f72dc5cc"
|
2013-01-31 10:55:59 +00:00
|
|
|
|
2014-05-20 05:51:24 +00:00
|
|
|
head "https://github.com/OpenKinect/libfreenect.git"
|
2013-01-31 10:55:59 +00:00
|
|
|
|
2013-04-04 15:50:53 +00:00
|
|
|
option :universal
|
|
|
|
|
2014-05-20 05:51:24 +00:00
|
|
|
depends_on "cmake" => :build
|
|
|
|
depends_on "libusb"
|
2013-01-31 10:55:59 +00:00
|
|
|
|
|
|
|
def install
|
2014-05-10 03:54:53 +00:00
|
|
|
args = std_cmake_args
|
|
|
|
|
2013-04-04 15:50:53 +00:00
|
|
|
if build.universal?
|
|
|
|
ENV.universal_binary
|
2014-05-10 03:54:53 +00:00
|
|
|
args << "-DCMAKE_OSX_ARCHITECTURES=#{Hardware::CPU.universal_archs.as_cmake_arch_flags}"
|
2013-04-04 15:50:53 +00:00
|
|
|
end
|
2014-05-10 03:54:53 +00:00
|
|
|
|
2013-01-31 10:55:59 +00:00
|
|
|
mkdir "build" do
|
2014-05-10 03:54:53 +00:00
|
|
|
system "cmake", "..", *args
|
2013-01-31 10:55:59 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|