diff options
| author | Daniel Cavanagh | 2012-03-18 15:30:31 +1000 |
|---|---|---|
| committer | Adam Vandenberg | 2012-10-24 07:00:17 -0700 |
| commit | a85b390876dc519e124d0b23beec891132dd3096 (patch) | |
| tree | 4cb644363af145ceee2ff100c84612122a1707eb /Library | |
| parent | 055f91974ba685efd80c1cf926bcf2ef12945d49 (diff) | |
| download | homebrew-a85b390876dc519e124d0b23beec891132dd3096.tar.bz2 | |
honeyd 1.5c
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Closes #11027.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/honeyd.rb | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/Library/Formula/honeyd.rb b/Library/Formula/honeyd.rb new file mode 100644 index 000000000..47f433f44 --- /dev/null +++ b/Library/Formula/honeyd.rb @@ -0,0 +1,48 @@ +require 'formula' + +class Libevent1 < Formula + homepage 'http://libevent.org/' + url 'https://github.com/downloads/libevent/libevent/libevent-1.4.14b-stable.tar.gz' + sha1 '4a834364c28ad652ddeb00b5f83872506eede7d4' +end + +class Honeyd < Formula + homepage 'http://honeyd.org/' + url 'http://www.honeyd.org/uploads/honeyd-1.5c.tar.gz' + sha1 '342cc53e8d23c84ecb91c7b66c6e93e7ed2a992a' + + depends_on 'libdnet' + + # make the setrlimit function work + # honeyd is no longer developed so patching upstream won't happen + def patches + DATA + end + + def install + libevent1_prefix = libexec/'libevent1' + Libevent1.new.brew do + system './configure', "--prefix=#{libevent1_prefix}" + system 'make install' + end + + system './configure', "--prefix=#{prefix}", + "--with-libevent=#{libevent1_prefix}" + system 'make install' + end +end + +__END__ +diff --git a/honeyd.c b/honeyd.c +index d6dd8e6..bfff951 100644 +--- a/honeyd.c ++++ b/honeyd.c +@@ -450,7 +450,7 @@ honeyd_init(void) + + /* Raising file descriptor limits */ + rl.rlim_max = RLIM_INFINITY; +- rl.rlim_cur = RLIM_INFINITY; ++ rl.rlim_cur = OPEN_MAX; + if (setrlimit(RLIMIT_NOFILE, &rl) == -1) { + /* Linux does not seem to like this */ + if (getrlimit(RLIMIT_NOFILE, &rl) == -1) |
