2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-30 05:19:25 +00:00
|
|
|
|
|
|
|
class Tmux <Formula
|
2010-07-18 15:41:23 +00:00
|
|
|
url 'http://downloads.sourceforge.net/tmux/tmux-1.3.tar.gz'
|
|
|
|
md5 '96e60cb206de2db0610b9fb6a64c2251'
|
2009-12-17 23:10:48 +00:00
|
|
|
homepage 'http://tmux.sourceforge.net'
|
2009-09-30 05:19:25 +00:00
|
|
|
|
2010-03-22 21:19:12 +00:00
|
|
|
depends_on 'libevent'
|
|
|
|
|
2010-11-29 02:22:18 +00:00
|
|
|
def patches
|
|
|
|
# Patch originally from Macports ticket #18357
|
|
|
|
# Committed in Macports rev 58563
|
|
|
|
# https://trac.macports.org/changeset/58563
|
|
|
|
{ :p1 => DATA }
|
|
|
|
end
|
|
|
|
|
2009-09-30 05:19:25 +00:00
|
|
|
def install
|
2010-03-07 06:27:19 +00:00
|
|
|
ENV['PREFIX'] = prefix
|
2009-09-30 05:19:25 +00:00
|
|
|
system "./configure"
|
2009-12-17 23:10:48 +00:00
|
|
|
|
2010-09-08 16:07:59 +00:00
|
|
|
inreplace "GNUmakefile" do |s|
|
2009-12-17 23:10:48 +00:00
|
|
|
# Fix 'install' flags
|
2010-09-08 16:07:59 +00:00
|
|
|
s.gsub! " -g bin -o root", ""
|
2009-12-17 23:10:48 +00:00
|
|
|
# Put docs in the right place
|
2010-09-08 16:07:59 +00:00
|
|
|
s.gsub! "man/man1", "share/man/man1"
|
2009-12-17 23:10:48 +00:00
|
|
|
end
|
|
|
|
|
2009-09-30 05:19:25 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
2010-11-29 02:22:18 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
diff -Nur tmux-1.3/server.c tmux-1.3.new/server.c
|
|
|
|
--- tmux-1.3/server.c 2010-06-23 09:21:39.000000000 +1000
|
|
|
|
+++ tmux-1.3.new/server.c 2010-11-29 08:48:48.000000000 +1100
|
|
|
|
@@ -35,6 +35,8 @@
|
|
|
|
#include <time.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
+void *_vprocmgr_detach_from_console(unsigned int flags);
|
|
|
|
+
|
|
|
|
#include "tmux.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
@@ -137,8 +139,8 @@
|
|
|
|
* Must daemonise before loading configuration as the PID changes so
|
|
|
|
* $TMUX would be wrong for sessions created in the config file.
|
|
|
|
*/
|
|
|
|
- if (daemon(1, 0) != 0)
|
|
|
|
- fatal("daemon failed");
|
|
|
|
+ if (_vprocmgr_detach_from_console(0) != NULL)
|
|
|
|
+ fatalx("_vprocmgr_detach_from_console failed");
|
|
|
|
|
|
|
|
/* event_init() was called in our parent, need to reinit. */
|
|
|
|
if (event_reinit(ev_base) != 0)
|