304ae5c770
libusbx was merged back into libusb.
31 lines
981 B
Ruby
31 lines
981 B
Ruby
require 'formula'
|
|
|
|
class Libusb < Formula
|
|
homepage 'http://libusb.info'
|
|
url 'http://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.18/libusb-1.0.18.tar.bz2'
|
|
sha256 'c73f5cec45a5de94418da4e151b7232958571926984acfb9bce02b9424e83720'
|
|
|
|
head do
|
|
url 'https://github.com/libusb/libusb.git'
|
|
|
|
depends_on :autoconf
|
|
depends_on :automake
|
|
depends_on :libtool
|
|
end
|
|
|
|
option :universal
|
|
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)'
|
|
|
|
def install
|
|
ENV.universal_binary if build.universal?
|
|
|
|
args = %W[--disable-dependency-tracking --prefix=#{prefix}]
|
|
args << "--disable-log" if build.include? 'no-runtime-logging'
|
|
args << "--enable-debug-log" if build.include? 'with-default-log-level-debug'
|
|
|
|
system "./autogen.sh" if build.head?
|
|
system "./configure", *args
|
|
system "make install"
|
|
end
|
|
end
|