2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-30 05:19:25 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Tmux < Formula
|
2009-12-17 23:10:48 +00:00
|
|
|
homepage 'http://tmux.sourceforge.net'
|
2013-06-20 23:08:35 +00:00
|
|
|
url 'http://downloads.sourceforge.net/project/tmux/tmux/tmux-1.8/tmux-1.8.tar.gz'
|
2013-03-27 01:25:16 +00:00
|
|
|
sha1 '08677ea914e1973ce605b0008919717184cbd033'
|
2009-09-30 05:19:25 +00:00
|
|
|
|
2013-09-22 01:47:45 +00:00
|
|
|
head do
|
|
|
|
url 'git://git.code.sf.net/p/tmux/tmux-code'
|
2012-01-28 00:47:31 +00:00
|
|
|
|
2012-07-07 18:08:22 +00:00
|
|
|
depends_on :automake
|
|
|
|
depends_on :libtool
|
2012-02-28 15:39:22 +00:00
|
|
|
end
|
|
|
|
|
2013-09-22 01:47:45 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
|
|
|
depends_on 'libevent'
|
|
|
|
|
2013-04-02 20:59:32 +00:00
|
|
|
def patches
|
|
|
|
# Fixes installation failure on Snow Leopard
|
|
|
|
# http://sourceforge.net/mailarchive/forum.php?thread_name=CAJfQvvc2QDU%3DtXWb-sc-NK0J8cgnDRMDod6CNKO1uYqu%3DY5CXg%40mail.gmail.com&forum_name=tmux-users
|
2013-04-11 08:34:08 +00:00
|
|
|
# http://sourceforge.net/p/tmux/tickets/41/
|
|
|
|
# Fixes abnormal displaying Korean letters on Mac OS X
|
|
|
|
# https://gist.github.com/niceview/5343842
|
2013-08-04 19:41:33 +00:00
|
|
|
# Accepted upstream, can be removed in next version.
|
2013-08-06 22:06:04 +00:00
|
|
|
DATA unless build.head?
|
2013-04-02 20:59:32 +00:00
|
|
|
end
|
|
|
|
|
2009-09-30 05:19:25 +00:00
|
|
|
def install
|
2012-08-23 04:14:18 +00:00
|
|
|
system "sh", "autogen.sh" if build.head?
|
2012-01-28 00:47:31 +00:00
|
|
|
|
2011-07-12 02:02:24 +00:00
|
|
|
ENV.append "LDFLAGS", '-lresolv'
|
|
|
|
system "./configure", "--disable-dependency-tracking",
|
2012-10-02 06:57:42 +00:00
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--sysconfdir=#{etc}"
|
2009-09-30 05:19:25 +00:00
|
|
|
system "make install"
|
2011-07-12 02:02:24 +00:00
|
|
|
|
2013-05-03 18:03:31 +00:00
|
|
|
bash_completion.install "examples/bash_completion_tmux.sh" => 'tmux'
|
2013-08-04 19:41:33 +00:00
|
|
|
(share/'tmux').install "examples"
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
Exmample configurations have been installed to:
|
|
|
|
#{share}/tmux/examples
|
|
|
|
EOS
|
2012-08-14 02:20:53 +00:00
|
|
|
end
|
|
|
|
|
2012-04-07 04:36:24 +00:00
|
|
|
def test
|
2012-05-15 21:36:45 +00:00
|
|
|
system "#{bin}/tmux", "-V"
|
2012-04-07 04:36:24 +00:00
|
|
|
end
|
2009-09-30 05:19:25 +00:00
|
|
|
end
|
2012-07-08 19:39:12 +00:00
|
|
|
|
2013-04-02 20:59:32 +00:00
|
|
|
__END__
|
|
|
|
diff --git a/osdep-darwin.c b/osdep-darwin.c
|
|
|
|
index 23de9d5..b5efe84 100644
|
|
|
|
--- a/osdep-darwin.c
|
|
|
|
+++ b/osdep-darwin.c
|
|
|
|
@@ -33,17 +33,17 @@ struct event_base *osdep_event_init(void);
|
|
|
|
char *
|
|
|
|
osdep_get_name(int fd, unused char *tty)
|
|
|
|
{
|
|
|
|
- struct proc_bsdshortinfo bsdinfo;
|
|
|
|
+ struct proc_bsdinfo bsdinfo;
|
|
|
|
pid_t pgrp;
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
if ((pgrp = tcgetpgrp(fd)) == -1)
|
|
|
|
return (NULL);
|
|
|
|
|
|
|
|
- ret = proc_pidinfo(pgrp, PROC_PIDT_SHORTBSDINFO, 0,
|
|
|
|
+ ret = proc_pidinfo(pgrp, PROC_PIDTBSDINFO, 0,
|
|
|
|
&bsdinfo, sizeof bsdinfo);
|
|
|
|
- if (ret == sizeof bsdinfo && *bsdinfo.pbsi_comm != '\0')
|
|
|
|
- return (strdup(bsdinfo.pbsi_comm));
|
|
|
|
+ if (ret == sizeof bsdinfo && *bsdinfo.pbi_comm != '\0')
|
|
|
|
+ return (strdup(bsdinfo.pbi_comm));
|
|
|
|
return (NULL);
|
|
|
|
}
|
2013-04-11 08:34:08 +00:00
|
|
|
|
|
|
|
diff --git a/utf8.c b/utf8.c
|
|
|
|
index 88d847a..34e5087 100644
|
|
|
|
--- a/utf8.c
|
|
|
|
+++ b/utf8.c
|
|
|
|
@@ -173,7 +173,7 @@ struct utf8_width_entry utf8_width_table[] = {
|
|
|
|
{ 0x30000, 0x3fffd, 2, NULL, NULL },
|
|
|
|
{ 0x00711, 0x00711, 0, NULL, NULL },
|
|
|
|
{ 0x0fe00, 0x0fe0f, 0, NULL, NULL },
|
|
|
|
- { 0x01160, 0x011ff, 0, NULL, NULL },
|
|
|
|
+ { 0x01160, 0x011ff, 1, NULL, NULL },
|
|
|
|
{ 0x0180b, 0x0180d, 0, NULL, NULL },
|
|
|
|
{ 0x10a3f, 0x10a3f, 0, NULL, NULL },
|
|
|
|
{ 0x00981, 0x00981, 0, NULL, NULL },
|