2009-10-30 10:44:15 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Libusb < Formula
|
2010-04-27 18:52:57 +00:00
|
|
|
homepage 'http://www.libusb.org/'
|
2012-06-05 20:33:58 +00:00
|
|
|
url 'http://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.9/libusb-1.0.9.tar.bz2'
|
|
|
|
sha256 'e920eedc2d06b09606611c99ec7304413c6784cba6e33928e78243d323195f9b'
|
|
|
|
|
2012-01-17 18:35:27 +00:00
|
|
|
head 'git://git.libusb.org/libusb.git'
|
2009-10-30 10:44:15 +00:00
|
|
|
|
2013-04-14 02:08:56 +00:00
|
|
|
conflicts_with 'libusbx',
|
2013-03-12 13:44:04 +00:00
|
|
|
:because => 'both provide libusb compatible libraries'
|
|
|
|
|
2012-08-12 17:56:43 +00:00
|
|
|
if build.head?
|
2012-07-07 18:08:22 +00:00
|
|
|
depends_on :automake
|
|
|
|
depends_on :libtool
|
2012-02-28 15:39:22 +00:00
|
|
|
end
|
|
|
|
|
2012-08-12 17:56:43 +00:00
|
|
|
option :universal
|
|
|
|
|
2009-10-30 10:44:15 +00:00
|
|
|
def install
|
2012-08-12 17:56:43 +00:00
|
|
|
ENV.universal_binary if build.universal?
|
2013-03-10 04:18:18 +00:00
|
|
|
|
|
|
|
if build.head?
|
|
|
|
inreplace "configure.ac", "AM_CONFIG_HEADER", "AC_CONFIG_HEADERS"
|
|
|
|
system "./autogen.sh"
|
|
|
|
end
|
|
|
|
|
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
|