[58560] trunk/dports/sysutils/tmux

toby at macports.org toby at macports.org
Wed Sep 30 20:45:39 PDT 2009


Revision: 58560
          http://trac.macports.org/changeset/58560
Author:   toby at macports.org
Date:     2009-09-30 20:45:38 -0700 (Wed, 30 Sep 2009)
Log Message:
-----------
patch for more efficient window renaming
install example configs

Modified Paths:
--------------
    trunk/dports/sysutils/tmux/Portfile

Added Paths:
-----------
    trunk/dports/sysutils/tmux/files/osdep-darwin.c.diff

Modified: trunk/dports/sysutils/tmux/Portfile
===================================================================
--- trunk/dports/sysutils/tmux/Portfile	2009-10-01 01:53:53 UTC (rev 58559)
+++ trunk/dports/sysutils/tmux/Portfile	2009-10-01 03:45:38 UTC (rev 58560)
@@ -4,6 +4,7 @@
 
 name             tmux
 version          1.0
+revision         1
 categories       sysutils
 maintainers      toby
 description      terminal multiplexer
@@ -22,7 +23,7 @@
 
 depends_lib      port:ncurses
 
-patchfiles       GNUmakefile.diff
+patchfiles       GNUmakefile.diff osdep-darwin.c.diff
 
 post-configure {
 	reinplace "s|__PREFIX__|${prefix}|g" "${worksrcpath}/GNUmakefile"
@@ -31,4 +32,11 @@
 	reinplace "s|__LDFLAGS__|${configure.ldflags}|" "${worksrcpath}/GNUmakefile"
 }
 
+post-destroot {
+	xinstall -m 0755 -d ${destroot}${prefix}/share/doc/tmux
+	foreach file [glob ${worksrcpath}/examples/*] {
+		xinstall -m 0644 $file ${destroot}${prefix}/share/doc/tmux
+	}
+}
+
 livecheck.regex  tmux tmux-(\[^ \]+) released

Added: trunk/dports/sysutils/tmux/files/osdep-darwin.c.diff
===================================================================
--- trunk/dports/sysutils/tmux/files/osdep-darwin.c.diff	                        (rev 0)
+++ trunk/dports/sysutils/tmux/files/osdep-darwin.c.diff	2009-10-01 03:45:38 UTC (rev 58560)
@@ -0,0 +1,35 @@
+--- osdep-darwin.c.orig	2009-09-30 20:30:00.000000000 -0700
++++ osdep-darwin.c	2009-09-30 20:30:25.000000000 -0700
+@@ -19,6 +19,7 @@
+ #include <sys/types.h>
+ #include <sys/sysctl.h>
+ 
++#include <libproc.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
+@@ -30,18 +31,15 @@
+ char *
+ osdep_get_name(int fd, unused char *tty)
+ {
+-	int	mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, 0 };
+-        size_t	size;
+-	struct kinfo_proc kp;
++	int pid;
++	char name[PATH_MAX], *p;
+ 
+-	if ((mib[3] = tcgetpgrp(fd)) == -1)
++	if ((pid = tcgetpgrp(fd)) == -1)
+ 		return (NULL);
+ 
+-	size = sizeof kp;
+-	if (sysctl(mib, 4, &kp, &size, NULL, 0) == -1)
+-		return (NULL);
+-	if (*kp.kp_proc.p_comm == '\0')
++	if (proc_pidpath(pid, name, sizeof name) <= 0)
+ 		return (NULL);
+ 
+-	return (strdup(kp.kp_proc.p_comm));
++	p = strrchr(name, '/');
++	return strdup(p ? p + 1 : name);
+ }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090930/ff993137/attachment.html>


More information about the macports-changes mailing list