2013-03-12 13:44:04 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Libusbx < Formula
|
|
|
|
homepage 'http://libusbx.org'
|
2013-09-15 23:13:33 +00:00
|
|
|
url 'http://downloads.sourceforge.net/project/libusbx/releases/1.0.17/source/libusbx-1.0.17.tar.bz2'
|
|
|
|
sha1 'a491054e7f4f3f52b12bd567335180586a54ae16'
|
2013-03-12 13:44:04 +00:00
|
|
|
|
2013-09-22 01:47:22 +00:00
|
|
|
head do
|
|
|
|
url 'https://github.com/libusbx/libusbx.git'
|
2013-03-12 13:44:04 +00:00
|
|
|
|
|
|
|
depends_on :automake
|
|
|
|
depends_on :libtool
|
|
|
|
end
|
|
|
|
|
2013-09-22 01:47:22 +00:00
|
|
|
|
|
|
|
conflicts_with 'libusb',
|
|
|
|
:because => 'both provide libusb compatible libraries'
|
|
|
|
|
2013-03-12 13:44:04 +00:00
|
|
|
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?
|
|
|
|
system "./autogen.sh" if build.head?
|
|
|
|
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 "./configure", *args
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|