diff options
| author | Matthias Granberry | 2012-06-07 15:56:47 -0500 |
|---|---|---|
| committer | Adam Vandenberg | 2012-08-29 09:22:03 -0700 |
| commit | ddd62a4fb8e0174d594124614cbd3d6ba2483bc0 (patch) | |
| tree | f5872e3f71ecbc991a9a17dc8886c119b6069bdf /Library | |
| parent | a3f0696505de765fa589e930976a4cf69d167d7c (diff) | |
| download | homebrew-ddd62a4fb8e0174d594124614cbd3d6ba2483bc0.tar.bz2 | |
Miredo 1.2.5
Miredo is an open-source implementation of the Teredo
transitional IPV6 tunneling package. The recipe Includes a
patch to include a usable default configuration for OS X and
fix an upstream compilation issue on OS X. The compile fix
should be unnecessary upon the next upstream release.
Closes #12673.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/miredo.rb | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/Library/Formula/miredo.rb b/Library/Formula/miredo.rb new file mode 100644 index 000000000..8f2593aa4 --- /dev/null +++ b/Library/Formula/miredo.rb @@ -0,0 +1,76 @@ +require 'formula' + +class Miredo < Formula + homepage 'http://www.remlab.net/miredo/' + url 'http://www.remlab.net/files/miredo/miredo-1.2.5.tar.xz' + sha1 '3aa4f35e78ffaca2c8652f428401be6e384888c9' + + depends_on 'xz' => :build + depends_on 'judy' + + def patches + DATA + end + + def install + args = %W[ + --prefix=#{prefix} + --sysconfdir=#{etc} + --localstatedir=#{var} + ] + + system "./configure", *args + system "make install" + end + + def caveats; <<-EOS.undent + You must also install tuntap. + + The TunTap project provides kernel extensions for Mac OS X that allow + creation of virtual network interfaces. + + http://tuntaposx.sourceforge.net/ + + Because these are kernel extensions, there is no Homebrew formula for tuntap. + EOS + end +end + +__END__ +diff -ur a/misc/miredo.conf-in b/misc/miredo.conf-in +--- a/misc/miredo.conf-in 2009-07-06 10:56:14.000000000 -0500 ++++ b/misc/miredo.conf-in 2012-06-07 15:09:34.000000000 -0500 +@@ -8,7 +8,7 @@ + #RelayType client + + # Name of the network tunneling interface. +-InterfaceName teredo ++#InterfaceName teredo + + # Depending on the local firewall/NAT rules, you might need to force + # Miredo to use a fixed UDP port and or IPv4 address. +diff -ur a/src/relayd.c b/src/relayd.c +--- a/src/relayd.c 2012-03-02 11:21:57.000000000 -0600 ++++ b/src/relayd.c 2012-06-07 14:49:08.000000000 -0500 +@@ -257,9 +257,21 @@ + memcpy (&s.addr, addr, sizeof (s.addr)); + s.mtu = (uint16_t)mtu; + ++#ifdef MSG_NOSIGNAL + if ((send (fd, &s, sizeof (s), MSG_NOSIGNAL) != sizeof (s)) + || (recv (fd, &res, sizeof (res), MSG_WAITALL) != sizeof (res))) + return -1; ++#else ++ int set = 1; ++ setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, (void *)&set, sizeof(int)); ++ ++ if ((send (fd, &s, sizeof (s), 0) != sizeof (s)) ++ || (recv (fd, &res, sizeof (res), MSG_WAITALL) != sizeof (res))) ++ res = -1; ++ ++ set = 0; ++ setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, (void *)&set, sizeof(int)); ++#endif + + return res; + } |
