2009-10-30 10:44:15 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Libusb < Formula
|
2010-05-06 22:45:32 +00:00
|
|
|
url 'http://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.8/libusb-1.0.8.tar.bz2'
|
2010-04-27 18:52:57 +00:00
|
|
|
homepage 'http://www.libusb.org/'
|
2010-05-06 22:45:32 +00:00
|
|
|
md5 '37d34e6eaa69a4b645a19ff4ca63ceef'
|
2012-01-17 18:35:27 +00:00
|
|
|
head 'git://git.libusb.org/libusb.git'
|
2009-10-30 10:44:15 +00:00
|
|
|
|
2011-01-02 11:28:46 +00:00
|
|
|
def options
|
|
|
|
[["--universal", "Build a universal binary."]]
|
|
|
|
end
|
|
|
|
|
2012-02-28 15:39:22 +00:00
|
|
|
if ARGV.build_head? and MacOS.xcode_version >= "4.3"
|
|
|
|
depends_on "automake" => :build
|
|
|
|
depends_on "libtool" => :build
|
|
|
|
end
|
|
|
|
|
2009-10-30 10:44:15 +00:00
|
|
|
def install
|
2011-04-21 16:42:27 +00:00
|
|
|
ENV.universal_binary if ARGV.build_universal?
|
2012-01-17 18:35:27 +00:00
|
|
|
system "./autogen.sh" if ARGV.build_head?
|
2009-12-24 10:54:58 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking"
|
2009-10-30 10:44:15 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|