2010-05-07 22:39:03 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Socat < Formula
|
2010-05-07 22:39:03 +00:00
|
|
|
homepage 'http://www.dest-unreach.org/socat/'
|
2012-06-07 16:09:26 +00:00
|
|
|
url 'http://www.dest-unreach.org/socat/download/socat-1.7.2.1.tar.bz2'
|
|
|
|
sha1 'c48cbba5e4d20fcf04b327e40d878b7322be82fd'
|
|
|
|
|
|
|
|
devel do
|
|
|
|
url 'http://www.dest-unreach.org/socat/download/socat-2.0.0-b5.tar.bz2'
|
|
|
|
sha1 'd75c0abc816f9bb8ee1e36f6ca4fe58d7e56f2a4'
|
|
|
|
end
|
2010-05-07 22:39:03 +00:00
|
|
|
|
2012-11-10 01:55:57 +00:00
|
|
|
depends_on 'gnu-readline'
|
2011-11-25 21:52:47 +00:00
|
|
|
|
2012-03-05 20:32:26 +00:00
|
|
|
def patches
|
2012-06-07 16:09:26 +00:00
|
|
|
# Socat devs are aware; see:
|
|
|
|
# https://trac.macports.org/ticket/32044
|
|
|
|
p = { :p0 => "https://trac.macports.org/export/90442/trunk/dports/sysutils/socat/files/patch-xioexit.c.diff" }
|
2012-08-25 17:19:14 +00:00
|
|
|
p[:p1] = DATA if build.devel?
|
2012-06-07 16:09:26 +00:00
|
|
|
p
|
2012-03-05 20:32:26 +00:00
|
|
|
end
|
2011-06-12 23:38:51 +00:00
|
|
|
|
2012-03-05 20:32:26 +00:00
|
|
|
def install
|
|
|
|
ENV.enable_warnings # -w causes build to fail
|
|
|
|
system "./configure", "--prefix=#{prefix}", "--mandir=#{man}"
|
2010-05-07 22:39:03 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
2012-06-07 16:09:26 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
diff --git a/sysincludes.h b/sysincludes.h
|
|
|
|
index ee25556..8a57422 100644
|
|
|
|
--- a/sysincludes.h
|
|
|
|
+++ b/sysincludes.h
|
|
|
|
@@ -5,6 +5,10 @@
|
|
|
|
#ifndef __sysincludes_h_included
|
|
|
|
#define __sysincludes_h_included 1
|
|
|
|
|
|
|
|
+#if __APPLE__
|
|
|
|
+#define __APPLE_USE_RFC_3542 1
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
#if HAVE_LIMITS_H
|
|
|
|
#include <limits.h> /* USHRT_MAX */
|
|
|
|
#endif
|