2015-05-14 18:00:47 +00:00
|
|
|
class Usbredir < Formula
|
2015-11-25 18:32:56 +00:00
|
|
|
desc "USB traffic redirection library"
|
2016-11-05 21:55:41 +00:00
|
|
|
homepage "https://www.spice-space.org"
|
2018-12-25 21:04:51 +00:00
|
|
|
url "https://www.spice-space.org/download/usbredir/usbredir-0.8.0.tar.bz2"
|
|
|
|
sha256 "87bc9c5a81c982517a1bec70dc8d22e15ae197847643d58f20c0ced3c38c5e00"
|
2015-05-14 18:00:47 +00:00
|
|
|
|
|
|
|
depends_on "libtool" => :build
|
2015-11-25 18:08:45 +00:00
|
|
|
depends_on "pkg-config" => :build
|
2015-05-14 18:00:47 +00:00
|
|
|
|
|
|
|
depends_on "libusb"
|
|
|
|
|
|
|
|
def install
|
2018-12-25 21:04:51 +00:00
|
|
|
#https://stackoverflow.com/questions/15860127/how-to-configure-tcp-keepalive-under-mac-os-x
|
|
|
|
inreplace "usbredirserver/usbredirserver.c" do |s|
|
|
|
|
s.gsub! "SOL_TCP", "IPPROTO_TCP"
|
|
|
|
s.gsub! "TCP_KEEPIDLE", "TCP_KEEPALIVE"
|
|
|
|
end
|
|
|
|
|
2017-09-06 17:12:15 +00:00
|
|
|
system "./configure", "--disable-silent-rules",
|
2015-05-14 18:00:47 +00:00
|
|
|
"--prefix=#{prefix}"
|
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
end
|