diff options
-rw-r--r-- | misc/tmux/Makefile | 5 | ||||
-rw-r--r-- | misc/tmux/distinfo | 13 | ||||
-rw-r--r-- | misc/tmux/patches/patch-aa | 82 | ||||
-rw-r--r-- | misc/tmux/patches/patch-ab | 15 | ||||
-rw-r--r-- | misc/tmux/patches/patch-ac | 168 | ||||
-rw-r--r-- | misc/tmux/patches/patch-ad | 19 |
6 files changed, 16 insertions, 286 deletions
diff --git a/misc/tmux/Makefile b/misc/tmux/Makefile index d59b5c2fd47..8cea39f9175 100644 --- a/misc/tmux/Makefile +++ b/misc/tmux/Makefile @@ -1,7 +1,6 @@ -# $NetBSD: Makefile,v 1.1.1.1 2009/03/06 12:16:17 hasso Exp $ +# $NetBSD: Makefile,v 1.2 2009/05/02 10:50:57 hasso Exp $ -DISTNAME= tmux-0.7 -PKGREVISION= 1 +DISTNAME= tmux-0.8 CATEGORIES= misc MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=tmux/} diff --git a/misc/tmux/distinfo b/misc/tmux/distinfo index a6280532f42..67ae244d049 100644 --- a/misc/tmux/distinfo +++ b/misc/tmux/distinfo @@ -1,9 +1,6 @@ -$NetBSD: distinfo,v 1.1.1.1 2009/03/06 12:16:17 hasso Exp $ +$NetBSD: distinfo,v 1.2 2009/05/02 10:50:57 hasso Exp $ -SHA1 (tmux-0.7.tar.gz) = 11c27de5de98367ea2c94ea70ef098e5e70eeead -RMD160 (tmux-0.7.tar.gz) = 81f60d21230b995651e91e18e587d484e40f6c96 -Size (tmux-0.7.tar.gz) = 163951 bytes -SHA1 (patch-aa) = 8144db4780da4731b88666a75759211cb7c5a633 -SHA1 (patch-ab) = 0de94fd65799bbf1447fbc204e8d6885bcd08aae -SHA1 (patch-ac) = 305dd0b74ad7b8a07de529f52a93dcb889c5578e -SHA1 (patch-ad) = 83155287cee869f9b44885e0f662001e0875da3a +SHA1 (tmux-0.8.tar.gz) = 87a9db829ff36cc432114672f7354a74d673832b +RMD160 (tmux-0.8.tar.gz) = 81f828e0af59a994e0b4ba86ab17421ffd7d7e98 +Size (tmux-0.8.tar.gz) = 175515 bytes +SHA1 (patch-aa) = d8edf7fba23ddeadc1fe62567d96ac06fa5c7e85 diff --git a/misc/tmux/patches/patch-aa b/misc/tmux/patches/patch-aa index 63cc655e312..a5ad1db8ae4 100644 --- a/misc/tmux/patches/patch-aa +++ b/misc/tmux/patches/patch-aa @@ -1,81 +1,17 @@ -$NetBSD: patch-aa,v 1.1.1.1 2009/03/06 12:16:17 hasso Exp $ +$NetBSD: patch-aa,v 1.2 2009/05/02 10:50:58 hasso Exp $ -Do not add -W* flags to CFLAGS. -NetBSD has not got strtonum(3) and strnvis(3) so use the compat/ -alternatives. -Add settings for Darwin, obtained from GNUmakefile. -Do not use rough install(1) commands, use cleaner INSTALL_* ones. - ---- Makefile.orig 2009-02-07 00:36:34.000000000 -0800 +--- Makefile.orig 2009-04-27 17:38:18.000000000 +0200 +++ Makefile -@@ -46,10 +46,10 @@ SRCS= tmux.c server.c server-msg.c serve - options.c options-cmd.c paste.c colour.c utf8.c clock.c \ - tty.c tty-term.c tty-keys.c tty-write.c util.c names.c \ - osdep-unknown.c osdep-openbsd.c osdep-freebsd.c osdep-linux.c \ -- osdep-darwin.c attributes.c -+ osdep-darwin.c osdep-netbsd.c attributes.c - - CC?= cc --INCDIRS+= -I. -I- -I/usr/local/include -+INCDIRS+= -I. -I/usr/local/include - CFLAGS+= -DMETA="'${META}'" - .ifdef PROFILE - # Don't use ccache -@@ -64,10 +64,10 @@ CFLAGS+= -DBUILD="\"$(VERSION) ($(DATE)) - CFLAGS+= -DBUILD="\"$(VERSION)\"" - .endif - #CFLAGS+= -pedantic -std=c99 --CFLAGS+= -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 --CFLAGS+= -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations --CFLAGS+= -Wwrite-strings -Wshadow -Wpointer-arith -Wcast-qual -Wsign-compare --CFLAGS+= -Wundef -Wbad-function-cast -Winline -Wcast-align -+#CFLAGS+= -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -+#CFLAGS+= -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -+#CFLAGS+= -Wwrite-strings -Wshadow -Wpointer-arith -Wcast-qual -Wsign-compare -+#CFLAGS+= -Wundef -Wbad-function-cast -Winline -Wcast-align - - PREFIX?= /usr/local - INSTALLDIR= install -d -@@ -80,6 +80,14 @@ LDFLAGS+= -pg - .endif - LIBS+= -lutil -lncurses +@@ -91,10 +91,10 @@ LIBS+= -lcrypt -+# Darwin -+.if ${OS} == "Darwin" + # NetBSD + .if ${OS} == "NetBSD" +-INCDIRS= -Icompat +INCDIRS+= -Icompat -+SRCS+= compat/strtonum.c compat/bsd-poll.c compat/vis.c -+CFLAGS+= -DNO_STRTONUM -DNO_SETRESUID -DNO_SETRESGID -DNO_SETPROCTITLE \ -+ -DNO_QUEUE_H -DNO_TREE_H -DBROKEN_POLL -+.endif -+ - # FreeBSD and DragonFly - .if ${OS} == "FreeBSD" || ${OS} == "DragonFly" - INCDIRS+= -Icompat -@@ -88,6 +96,15 @@ CFLAGS+= -DUSE_LIBUTIL_H -DNO_QUEUE_H -D + SRCS+= compat/strtonum.c compat/vis.c LIBS+= -lcrypt +-CFLAGS+=-DNO_STRTONUM ++CFLAGS+=-DNO_STRTONUM -DNO_QUEUE_H -DNO_TREE_H .endif -+# NetBSD -+.if ${OS} == "NetBSD" -+INCDIRS+= -Icompat -+SRCS+= compat/strtonum.c compat/vis.c -+LIBS+= -lcrypt -+CFLAGS+=-DNO_STRTONUM -+.endif -+ -+ OBJS= ${SRCS:S/.c/.o/:S/.y/.o/} - - DISTDIR= ${PROG}-${VERSION} -@@ -134,7 +151,7 @@ update-index.html: - sed "s/%%VERSION%%/${VERSION}/g" index.html.in >index.html - - install: all -- ${INSTALLDIR} ${DESTDIR}${PREFIX}/bin -- ${INSTALLBIN} ${PROG} ${DESTDIR}${PREFIX}/bin/${PROG} -- ${INSTALLDIR} ${DESTDIR}${PREFIX}/man/man1 -- ${INSTALLMAN} ${PROG}.1 ${DESTDIR}${PREFIX}/man/man1/ -+ ${INSTALL_PROGRAM_DIR} ${DESTDIR}${PREFIX}/bin -+ ${INSTALL_PROGRAM} ${PROG} ${DESTDIR}${PREFIX}/bin/${PROG} -+ ${INSTALL_MAN_DIR} ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1 -+ ${INSTALL_MAN} ${PROG}.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/ diff --git a/misc/tmux/patches/patch-ab b/misc/tmux/patches/patch-ab deleted file mode 100644 index d5dbbb32434..00000000000 --- a/misc/tmux/patches/patch-ab +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-ab,v 1.1.1.1 2009/03/06 12:16:17 hasso Exp $ - -NetBSD is supported via osdep-netbsd.c. - ---- osdep-unknown.c.orig 2009-01-20 23:17:53.000000000 +0100 -+++ osdep-unknown.c -@@ -17,7 +17,7 @@ - */ - - #if !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__linux__) && \ -- !defined(__APPLE__) -+ !defined(__APPLE__) && !defined(__NetBSD__) - - #include <sys/types.h> - diff --git a/misc/tmux/patches/patch-ac b/misc/tmux/patches/patch-ac deleted file mode 100644 index fcc1e8a76b7..00000000000 --- a/misc/tmux/patches/patch-ac +++ /dev/null @@ -1,168 +0,0 @@ -$NetBSD: patch-ac,v 1.1.1.1 2009/03/06 12:16:17 hasso Exp $ - -get_argv0() and get_proc_argv0() functions for NetBSD. - ---- osdep-netbsd.c.orig 2009-02-22 16:30:11.000000000 +0100 -+++ osdep-netbsd.c -@@ -0,0 +1,161 @@ -+/* -+ * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> -+ * -+ * Permission to use, copy, modify, and distribute this software for any -+ * purpose with or without fee is hereby granted, provided that the above -+ * copyright notice and this permission notice appear in all copies. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -+ * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER -+ * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING -+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -+ */ -+ -+#ifdef __NetBSD__ -+ -+#include <sys/param.h> -+#include <sys/proc.h> -+#include <sys/stat.h> -+#include <sys/sysctl.h> -+#include <sys/user.h> -+ -+#include <err.h> -+#include <errno.h> -+#include <stdint.h> -+#include <stdlib.h> -+#include <string.h> -+#include <unistd.h> -+ -+char *get_argv0(int, char *); -+char *get_proc_argv0(pid_t); -+ -+#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0])) -+ -+#define is_runnable(p) \ -+ ((p)->p_stat == LSRUN || (p)->p_stat == SIDL) -+#define is_stopped(p) \ -+ ((p)->p_stat == LSSTOP || (p)->p_stat == SZOMB) -+ -+char * -+get_argv0(int fd, char *tty) -+{ -+ int mib[4] = { CTL_KERN, KERN_PROC2, KERN_PROC_PGRP, 0 }; -+ struct stat sb; -+ size_t len; -+ struct kinfo_proc2 *buf, *newbuf, *p, *bestp; -+ char *procname; -+ u_int i; -+ -+ buf = NULL; -+ -+ if (stat(tty, &sb) == -1) -+ return (NULL); -+ if ((mib[3] = tcgetpgrp(fd)) == -1) -+ return (NULL); -+ -+retry: -+ if (sysctl(mib, nitems(mib), NULL, &len, NULL, 0) == -1) -+ return (NULL); -+ len = (len * 5) / 4; -+ -+ if ((newbuf = realloc(buf, len)) == NULL) { -+ free(buf); -+ return (NULL); -+ } -+ buf = newbuf; -+ -+ if (sysctl(mib, nitems(mib), buf, &len, NULL, 0) == -1) { -+ if (errno == ENOMEM) -+ goto retry; -+ free(buf); -+ return (NULL); -+ } -+ -+ bestp = NULL; -+ for (i = 0; i < len / sizeof (struct kinfo_proc); i++) { -+ if (buf[i].p_tdev != sb.st_rdev) -+ continue; -+ p = &buf[i]; -+ if (bestp == NULL) { -+ bestp = p; -+ continue; -+ } -+ -+ if (is_runnable(p) && !is_runnable(bestp)) -+ bestp = p; -+ else if (!is_runnable(p) && is_runnable(bestp)) -+ continue; -+ -+ if (!is_stopped(p) && is_stopped(bestp)) -+ bestp = p; -+ else if (is_stopped(p) && !is_stopped(bestp)) -+ continue; -+ -+ if (p->p_estcpu > bestp->p_estcpu) -+ bestp = p; -+ else if (p->p_estcpu < bestp->p_estcpu) -+ continue; -+ -+ if (p->p_slptime < bestp->p_slptime) -+ bestp = p; -+ else if (p->p_slptime > bestp->p_slptime) -+ continue; -+ -+ if (strcmp(p->p_comm, p->p_comm) < 0) -+ bestp = p; -+ else if (strcmp(p->p_comm, p->p_comm) > 0) -+ continue; -+ -+ if (p->p_pid > bestp->p_pid) -+ bestp = p; -+ } -+ if (bestp != NULL) { -+ procname = get_proc_argv0(bestp->p_pid); -+ if (procname == NULL || *procname == '\0') { -+ free(procname); -+ procname = strdup(bestp->p_comm); -+ } -+ } else -+ procname = NULL; -+ -+ -+ free(buf); -+ return (procname); -+} -+ -+char * -+get_proc_argv0(pid_t pid) -+{ -+ int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_ARGS, 0 }; -+ size_t size, size2; -+ char *args, *args2, *procname; -+ -+ mib[3] = pid; -+ procname = NULL; -+ -+ args = NULL; -+ size = 128; -+ while (size < SIZE_MAX / 2) { -+ size *= 2; -+ if ((args2 = realloc(args, size)) == NULL) -+ break; -+ args = args2; -+ size2 = size; -+ if (sysctl(mib, 4, args, &size2, NULL, 0) == -1) { -+ if (errno == ENOMEM) -+ continue; -+ break; -+ } -+ if (size2 > 0 && *args != '\0') -+ procname = strdup(args); -+ break; -+ } -+ free(args); -+ -+ return (procname); -+} -+ -+#endif diff --git a/misc/tmux/patches/patch-ad b/misc/tmux/patches/patch-ad deleted file mode 100644 index 28cff2e86f6..00000000000 --- a/misc/tmux/patches/patch-ad +++ /dev/null @@ -1,19 +0,0 @@ -$NetBSD: patch-ad,v 1.1.1.1 2009/03/06 12:16:17 hasso Exp $ - -get_argv0() function prototype is: - - char *get_argv0(int, char *); - -so respect it in order to build on unknown platforms. - ---- osdep-unknown.c.orig 2009-02-18 09:36:41 +0200 -+++ osdep-unknown.c 2009-02-18 09:37:30 +0200 -@@ -24,7 +24,7 @@ - #include "tmux.h" - - char * --get_argv0(unused pid_t pgrp) -+get_argv0(unused int fd, unused char *tty) - { - return (NULL); - } |