pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/x11/vte3 vte3: Don't use packet mode on SunOS.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/dc950551d323
branches:  trunk
changeset: 309718:dc950551d323
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Fri Jun 22 14:34:43 2018 +0000

description:
vte3: Don't use packet mode on SunOS.

Fixes runtime pty handling.  Bump PKGREVISION.

diffstat:

 x11/vte3/Makefile                 |   3 ++-
 x11/vte3/distinfo                 |   6 +++---
 x11/vte3/patches/patch-src_pty.cc |  37 ++++++++++++++++++++++++++++++++++---
 x11/vte3/patches/patch-src_vte.cc |  39 +++++++++++++++++++++++++++++++++++++--
 4 files changed, 76 insertions(+), 9 deletions(-)

diffs (143 lines):

diff -r 42bc301206f1 -r dc950551d323 x11/vte3/Makefile
--- a/x11/vte3/Makefile Fri Jun 22 14:20:45 2018 +0000
+++ b/x11/vte3/Makefile Fri Jun 22 14:34:43 2018 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.14 2018/06/12 23:00:34 youri Exp $
+# $NetBSD: Makefile,v 1.15 2018/06/22 14:34:43 jperkin Exp $
 
 DISTNAME=      vte-0.52.2
 PKGNAME=       ${DISTNAME:S/vte/vte3/}
+PKGREVISION=   1
 CATEGORIES=    x11
 MASTER_SITES=  ${MASTER_SITE_GNOME:=sources/vte/0.52/}
 EXTRACT_SUFX=  .tar.xz
diff -r 42bc301206f1 -r dc950551d323 x11/vte3/distinfo
--- a/x11/vte3/distinfo Fri Jun 22 14:20:45 2018 +0000
+++ b/x11/vte3/distinfo Fri Jun 22 14:34:43 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2018/06/21 09:34:50 jperkin Exp $
+$NetBSD: distinfo,v 1.8 2018/06/22 14:34:43 jperkin Exp $
 
 SHA1 (vte-0.52.2.tar.xz) = be8de64f8584ada23461db8e0a4dce2e650de5ce
 RMD160 (vte-0.52.2.tar.xz) = 3707a2a4a0ca7bbc562dbf2d570e7e4a4a15afef
@@ -6,6 +6,6 @@
 Size (vte-0.52.2.tar.xz) = 1011696 bytes
 SHA1 (patch-configure) = 9a570f27c0ec4e4680d517a8c2498b37728d52ae
 SHA1 (patch-src_app_app.cc) = 99fa242665d799205df305af5c0b15938db92c7c
-SHA1 (patch-src_pty.cc) = cc2e0be62a90ffefcb21f8b07cb25f281b30df1e
-SHA1 (patch-src_vte.cc) = b07315fef8593e6b51427ac039b9b4724e9fd18b
+SHA1 (patch-src_pty.cc) = 4bcd447b214d59da69ea8c0bc5100cce27623f63
+SHA1 (patch-src_vte.cc) = 9886ae82daa8c4ad55ce85e2dec3216d3e46221a
 SHA1 (patch-src_vtedraw.cc) = 1deab7738ae7c7bbb53e5b951df4d8a6ad9312f9
diff -r 42bc301206f1 -r dc950551d323 x11/vte3/patches/patch-src_pty.cc
--- a/x11/vte3/patches/patch-src_pty.cc Fri Jun 22 14:20:45 2018 +0000
+++ b/x11/vte3/patches/patch-src_pty.cc Fri Jun 22 14:34:43 2018 +0000
@@ -1,9 +1,10 @@
-$NetBSD: patch-src_pty.cc,v 1.2 2018/05/15 09:50:49 jperkin Exp $
+$NetBSD: patch-src_pty.cc,v 1.3 2018/06/22 14:34:43 jperkin Exp $
 
 NetBSD fix
 Use correct includes on SunOS.
+Don't use packet mode on SunOS.
 
---- src/pty.cc.orig    2018-04-09 21:43:51.000000000 +0000
+--- src/pty.cc.orig    2018-05-21 19:30:33.000000000 +0000
 +++ src/pty.cc
 @@ -60,7 +60,9 @@
  #ifdef HAVE_PTY_H
@@ -16,7 +17,22 @@
  #include <stropts.h>
  #endif
  #include <glib.h>
-@@ -624,7 +626,12 @@ _vte_pty_open_posix(void)
+@@ -605,12 +607,14 @@ fd_setup(int fd)
+                 return -1;
+         }
+ 
++#ifndef __sun
+         if (fd_set_cpkt(fd) < 0) {
+                 vte::util::restore_errno errsv;
+                 _vte_debug_print(VTE_DEBUG_PTY,
+                                  "%s failed: %s", "ioctl(TIOCPKT)", g_strerror(errsv));
+                 return -1;
+         }
++#endif
+ 
+         return 0;
+ }
+@@ -632,7 +636,12 @@ _vte_pty_open_posix(void)
          fd = posix_openpt(O_RDWR | O_NOCTTY | O_NONBLOCK | O_CLOEXEC);
  #ifndef __linux__
          /* Other kernels may not support CLOEXEC or NONBLOCK above, so try to fall back */
@@ -30,3 +46,18 @@
          if (fd == -1 && errno == EINVAL) {
                  /* Try without NONBLOCK and apply the flag afterward */
                  need_nonblocking = true;
+@@ -668,12 +677,14 @@ _vte_pty_open_posix(void)
+         }
+ #endif /* !linux */
+ 
++#ifndef __sun
+         if (fd_set_cpkt(fd) < 0) {
+                 vte::util::restore_errno errsv;
+                 _vte_debug_print(VTE_DEBUG_PTY,
+                                  "%s failed: %s", "ioctl(TIOCPKT)", g_strerror(errsv));
+                 return -1;
+         }
++#endif
+ 
+       _vte_debug_print(VTE_DEBUG_PTY, "Allocated pty on fd %d.\n", (int)fd);
+ 
diff -r 42bc301206f1 -r dc950551d323 x11/vte3/patches/patch-src_vte.cc
--- a/x11/vte3/patches/patch-src_vte.cc Fri Jun 22 14:20:45 2018 +0000
+++ b/x11/vte3/patches/patch-src_vte.cc Fri Jun 22 14:34:43 2018 +0000
@@ -1,8 +1,9 @@
-$NetBSD: patch-src_vte.cc,v 1.1 2018/05/15 09:50:49 jperkin Exp $
+$NetBSD: patch-src_vte.cc,v 1.2 2018/06/22 14:34:43 jperkin Exp $
 
 Use correct includes on SunOS.
+Don't use packet mode on SunOS.
 
---- src/vte.cc.orig    2018-04-09 21:43:51.000000000 +0000
+--- src/vte.cc.orig    2018-05-21 19:31:53.000000000 +0000
 +++ src/vte.cc
 @@ -25,6 +25,9 @@
  #include <string.h>
@@ -14,3 +15,37 @@
  #include <errno.h>
  #include <fcntl.h>
  #include <math.h>
+@@ -3970,6 +3973,9 @@ VteTerminalPrivate::pty_io_read(GIOChann
+                       bp = chunk->data + chunk->len;
+                       len = 0;
+                       do {
++#ifdef __sun
++                              int ret = read (fd, bp, rem);
++#else
+                                 /* We'd like to read (fd, bp, rem); but due to TIOCPKT mode
+                                  * there's an extra input byte returned at the beginning.
+                                  * We need to see what that byte is, but otherwise drop it
+@@ -3980,6 +3986,7 @@ VteTerminalPrivate::pty_io_read(GIOChann
+                                 int ret = read (fd, bp - 1, rem + 1);
+                                 pkt_header = bp[-1];
+                                 bp[-1] = save;
++#endif
+                               switch (ret){
+                                       case -1:
+                                               err = errno;
+@@ -3988,6 +3995,7 @@ VteTerminalPrivate::pty_io_read(GIOChann
+                                               eof = TRUE;
+                                               goto out;
+                                       default:
++#ifndef __sun
+                                                 ret--;
+ 
+                                                 if (pkt_header & TIOCPKT_IOCTL) {
+@@ -4008,6 +4016,7 @@ VteTerminalPrivate::pty_io_read(GIOChann
+                                                 } else if (pkt_header & TIOCPKT_START) {
+                                                         pty_scroll_lock_changed(false);
+                                                 }
++#endif
+ 
+                                               bp += ret;
+                                               rem -= ret;



Home | Main Index | Thread Index | Old Index