pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/misc/tmux



Module Name:    pkgsrc
Committed By:   leot
Date:           Wed Nov 28 14:45:19 UTC 2018

Modified Files:
        pkgsrc/misc/tmux: Makefile distinfo
Added Files:
        pkgsrc/misc/tmux/patches: patch-osdep-netbsd.c

Log Message:
tmux: Add support for pane_current_path variable in NetBSD

Implement osdep_get_cwd() by using mount_procfs(8) in order to add
support for pane_current_path variable in NetBSD.

Bump PKGREVISION


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 pkgsrc/misc/tmux/Makefile
cvs rdiff -u -r1.37 -r1.38 pkgsrc/misc/tmux/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/misc/tmux/patches/patch-osdep-netbsd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/misc/tmux/Makefile
diff -u pkgsrc/misc/tmux/Makefile:1.46 pkgsrc/misc/tmux/Makefile:1.47
--- pkgsrc/misc/tmux/Makefile:1.46      Sun Oct 21 21:22:47 2018
+++ pkgsrc/misc/tmux/Makefile   Wed Nov 28 14:45:19 2018
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.46 2018/10/21 21:22:47 leot Exp $
+# $NetBSD: Makefile,v 1.47 2018/11/28 14:45:19 leot Exp $
 
 DISTNAME=      tmux-2.8
+PKGREVISION=   1
 CATEGORIES=    misc
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=tmux/}
 GITHUB_RELEASE=        ${PKGVERSION_NOREV}

Index: pkgsrc/misc/tmux/distinfo
diff -u pkgsrc/misc/tmux/distinfo:1.37 pkgsrc/misc/tmux/distinfo:1.38
--- pkgsrc/misc/tmux/distinfo:1.37      Sun Oct 21 21:22:47 2018
+++ pkgsrc/misc/tmux/distinfo   Wed Nov 28 14:45:19 2018
@@ -1,8 +1,9 @@
-$NetBSD: distinfo,v 1.37 2018/10/21 21:22:47 leot Exp $
+$NetBSD: distinfo,v 1.38 2018/11/28 14:45:19 leot Exp $
 
 SHA1 (tmux-2.8.tar.gz) = 6a469769a242c95dc8aec443b436d4f8f279f517
 RMD160 (tmux-2.8.tar.gz) = 13f097f02b2d3f489fb00af5b3f702cb2eae523f
 SHA512 (tmux-2.8.tar.gz) = e382aec122a10624953432b3c869b21d69390bc2e7d459440a46950802e39503eafb398178f8085191261925e4f0872bb99b19e0403e7beb56d3ceecc4c86b09
 Size (tmux-2.8.tar.gz) = 491195 bytes
 SHA1 (patch-Makefile.in) = dc8a351b06bf2f9f96b3dc4d944a174ef3c8d9db
+SHA1 (patch-osdep-netbsd.c) = 81d0bf9275c0c12d4f0f2adc07136e3d8948137d
 SHA1 (patch-tty-term.c) = 20bf235e61e6650bec3e7e94ea79859898039eba

Added files:

Index: pkgsrc/misc/tmux/patches/patch-osdep-netbsd.c
diff -u /dev/null pkgsrc/misc/tmux/patches/patch-osdep-netbsd.c:1.1
--- /dev/null   Wed Nov 28 14:45:19 2018
+++ pkgsrc/misc/tmux/patches/patch-osdep-netbsd.c       Wed Nov 28 14:45:19 2018
@@ -0,0 +1,43 @@
+$NetBSD: patch-osdep-netbsd.c,v 1.1 2018/11/28 14:45:19 leot Exp $
+
+Implement osdep_get_cwd() via mount_procfs(8) (inspired by osdep-sunos.c).
+
+--- osdep-netbsd.c.orig        2016-01-21 00:00:28.000000000 +0000
++++ osdep-netbsd.c
+@@ -23,10 +23,13 @@
+ 
+ #include <errno.h>
+ #include <event.h>
++#include <limits.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
+ 
++#include "tmux.h"
++
+ #define is_runnable(p) \
+         ((p)->p_stat == LSRUN || (p)->p_stat == SIDL)
+ #define is_stopped(p) \
+@@ -127,6 +130,22 @@ error:
+ char *
+ osdep_get_cwd(int fd)
+ {
++      static char     target[PATH_MAX + 1];
++      char            *path;
++      pid_t           pgrp;
++      ssize_t         n;
++
++      if ((pgrp = tcgetpgrp(fd)) == -1)
++              return (NULL);
++
++      xasprintf(&path, "/proc/%lld/cwd", (long long) pgrp);
++      n = readlink(path, target, sizeof(target) - 1);
++      free(path);
++      if (n > 0) {
++              target[n] = '\0';
++              return (target);
++      }
++
+       return (NULL);
+ }
+ 



Home | Main Index | Thread Index | Old Index