2014-07-19 17:14:44 +00:00
|
|
|
require "formula"
|
2009-10-30 10:44:15 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Libusb < Formula
|
2014-07-19 17:14:44 +00:00
|
|
|
homepage "http://libusb.info"
|
|
|
|
url "https://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.19/libusb-1.0.19.tar.bz2"
|
|
|
|
sha256 "6c502c816002f90d4f76050a6429c3a7e0d84204222cbff2dce95dd773ba6840"
|
2012-06-05 20:33:58 +00:00
|
|
|
|
2014-02-22 19:27:52 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2014-07-19 17:41:37 +00:00
|
|
|
sha1 "978dfaba5e7a6b624f33e5e927994e89c9f22509" => :mavericks
|
|
|
|
sha1 "f1e2c2b829556cc5ce5965a709ae0fb6c2e29dc9" => :mountain_lion
|
|
|
|
sha1 "6e15e38d4c0cc8bd162b0dc475099b25ff651636" => :lion
|
2014-02-22 19:27:52 +00:00
|
|
|
end
|
|
|
|
|
2013-09-22 01:47:21 +00:00
|
|
|
head do
|
2014-07-19 17:14:44 +00:00
|
|
|
url "https://github.com/libusb/libusb.git"
|
2009-10-30 10:44:15 +00:00
|
|
|
|
2014-06-02 02:38:18 +00:00
|
|
|
depends_on "autoconf" => :build
|
|
|
|
depends_on "automake" => :build
|
|
|
|
depends_on "libtool" => :build
|
2012-02-28 15:39:22 +00:00
|
|
|
end
|
|
|
|
|
2012-08-12 17:56:43 +00:00
|
|
|
option :universal
|
2014-07-19 17:14:44 +00:00
|
|
|
option "no-runtime-logging", "Build without runtime logging functionality"
|
|
|
|
option "with-default-log-level-debug", "Build with default runtime log level of debug (instead of none)"
|
2013-09-22 01:47:21 +00:00
|
|
|
|
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
|
|
|
|
2014-02-02 19:09:28 +00:00
|
|
|
args = %W[--disable-dependency-tracking --prefix=#{prefix}]
|
2014-07-19 17:14:44 +00:00
|
|
|
args << "--disable-log" if build.include? "no-runtime-logging"
|
2014-03-06 20:40:26 +00:00
|
|
|
args << "--enable-debug-log" if build.with? "default-log-level-debug"
|
2013-03-10 04:18:18 +00:00
|
|
|
|
2014-02-02 19:09:28 +00:00
|
|
|
system "./autogen.sh" if build.head?
|
|
|
|
system "./configure", *args
|
2009-10-30 10:44:15 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|