homebrew-core/Formula/libusb.rb

39 lines
1.2 KiB
Ruby
Raw Normal View History

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"
2014-02-22 19:27:52 +00:00
bottle do
cellar :any
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
end
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
ENV.universal_binary if build.universal?
2013-03-10 04:18:18 +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"
args << "--enable-debug-log" if build.with? "default-log-level-debug"
2013-03-10 04:18:18 +00:00
system "./autogen.sh" if build.head?
system "./configure", *args
2009-10-30 10:44:15 +00:00
system "make install"
end
end