pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/misc/ttyrec Fix ttyrec "Out of pty's" error.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b150e2ca42d5
branches:  trunk
changeset: 347824:b150e2ca42d5
user:      leot <leot%pkgsrc.org@localhost>
date:      Tue May 31 08:13:45 2016 +0000

description:
Fix ttyrec "Out of pty's" error.

Reported by jwodder via PR pkg/43209 (patch similar in spirit but it's a bit
less intrusive).

diffstat:

 misc/ttyrec/Makefile               |  10 +++++++++-
 misc/ttyrec/distinfo               |   7 ++++---
 misc/ttyrec/patches/patch-aa       |  24 ++++++++++++++++++++++--
 misc/ttyrec/patches/patch-io.h     |  14 ++++++++++++++
 misc/ttyrec/patches/patch-ttyrec.c |  29 ++++++++++++++++++++++++++---
 5 files changed, 75 insertions(+), 9 deletions(-)

diffs (136 lines):

diff -r e69f4c14ddc7 -r b150e2ca42d5 misc/ttyrec/Makefile
--- a/misc/ttyrec/Makefile      Tue May 31 07:21:21 2016 +0000
+++ b/misc/ttyrec/Makefile      Tue May 31 08:13:45 2016 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.14 2016/02/25 15:35:31 jperkin Exp $
+# $NetBSD: Makefile,v 1.15 2016/05/31 08:13:45 leot Exp $
 
 DISTNAME=      ttyrec-1.0.8
+PKGREVISION=   1
 CATEGORIES=    misc
 MASTER_SITES=  http://0xcc.net/ttyrec/
 
@@ -11,6 +12,13 @@
 
 CFLAGS.SunOS+= -DSVR4
 
+.include "../../mk/bsd.prefs.mk"
+
+.if !empty(OPSYS:M*BSD) || ${OPSYS} == "DragonFly" || ${OPSYS} == "Darwin"
+CFLAGS+=       -DHAVE_openpty
+LDFLAGS+=      -lutil
+.endif
+
 INSTALLATION_DIRS=     bin ${PKGMANDIR}/man1
 
 do-install:
diff -r e69f4c14ddc7 -r b150e2ca42d5 misc/ttyrec/distinfo
--- a/misc/ttyrec/distinfo      Tue May 31 07:21:21 2016 +0000
+++ b/misc/ttyrec/distinfo      Tue May 31 08:13:45 2016 +0000
@@ -1,8 +1,9 @@
-$NetBSD: distinfo,v 1.6 2015/11/08 21:02:49 dholland Exp $
+$NetBSD: distinfo,v 1.7 2016/05/31 08:13:45 leot Exp $
 
 SHA1 (ttyrec-1.0.8.tar.gz) = 645f1e2a1ac4b2a32ad314711fb3da014ce9684d
 RMD160 (ttyrec-1.0.8.tar.gz) = f7538fa742d1c1e07b8b48f3fa79cfcf13ca8044
 SHA512 (ttyrec-1.0.8.tar.gz) = b7f6f4c78c5148dacc7058534d89f13fcf333ee9e099d4475135e9c15a99a8aed72bf4bd5954652a6bb044d11ad35b4cb8d07208a5349c79c811f68fde7e8611
 Size (ttyrec-1.0.8.tar.gz) = 8528 bytes
-SHA1 (patch-aa) = 92efba673741631b4e6c5fff09039468acd75198
-SHA1 (patch-ttyrec.c) = 6fb0ff915199a6619eeb5ae6f38ab88e32c7594c
+SHA1 (patch-aa) = 319272a146906f9a65848e002532b70f5cf60440
+SHA1 (patch-io.h) = 65abb06b152acc9cfcf2dd9761986dfe84eecc68
+SHA1 (patch-ttyrec.c) = fb50614e09a6e456ab6c07adeb6449b1f59e0c04
diff -r e69f4c14ddc7 -r b150e2ca42d5 misc/ttyrec/patches/patch-aa
--- a/misc/ttyrec/patches/patch-aa      Tue May 31 07:21:21 2016 +0000
+++ b/misc/ttyrec/patches/patch-aa      Tue May 31 08:13:45 2016 +0000
@@ -1,6 +1,9 @@
-$NetBSD: patch-aa,v 1.2 2006/09/09 13:48:02 obache Exp $
+$NetBSD: patch-aa,v 1.3 2016/05/31 08:13:45 leot Exp $
 
---- Makefile.orig      2006-06-12 00:52:50.000000000 +0900
+- Do not force CC or CFLAGS
+- Honor LDFLAGS
+
+--- Makefile.orig      2006-06-11 15:52:50.000000000 +0000
 +++ Makefile
 @@ -1,5 +1,3 @@
 -CC = gcc
@@ -8,3 +11,20 @@
  VERSION = 1.0.8
  
  TARGET = ttyrec ttyplay ttytime
+@@ -10,13 +8,13 @@ DIST =      ttyrec.c ttyplay.c ttyrec.h io.c 
+ all: $(TARGET)
+ 
+ ttyrec: ttyrec.o io.o
+-      $(CC) $(CFLAGS) -o ttyrec ttyrec.o io.o
++      $(CC) $(CFLAGS) $(LDFLAGS) -o ttyrec ttyrec.o io.o
+ 
+ ttyplay: ttyplay.o io.o
+-      $(CC) $(CFLAGS) -o ttyplay ttyplay.o io.o
++      $(CC) $(CFLAGS) $(LDFLAGS) -o ttyplay ttyplay.o io.o
+ 
+ ttytime: ttytime.o io.o
+-      $(CC) $(CFLAGS) -o ttytime ttytime.o io.o
++      $(CC) $(CFLAGS) $(LDFLAGS) -o ttytime ttytime.o io.o
+ 
+ clean:
+       rm -f *.o $(TARGET) ttyrecord *~
diff -r e69f4c14ddc7 -r b150e2ca42d5 misc/ttyrec/patches/patch-io.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/ttyrec/patches/patch-io.h    Tue May 31 08:13:45 2016 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-io.h,v 1.1 2016/05/31 08:13:45 leot Exp $
+
+Add set_progname() prototype.
+
+--- io.h.orig  2006-06-11 15:52:50.000000000 +0000
++++ io.h
+@@ -5,6 +5,7 @@
+ 
+ int     read_header     (FILE *fp, Header *h);
+ int     write_header    (FILE *fp, Header *h);
++void  set_progname    (const char *name);
+ FILE*   efopen          (const char *path, const char *mode);
+ int     edup            (int oldfd);
+ int     edup2           (int oldfd, int newfd);
diff -r e69f4c14ddc7 -r b150e2ca42d5 misc/ttyrec/patches/patch-ttyrec.c
--- a/misc/ttyrec/patches/patch-ttyrec.c        Tue May 31 07:21:21 2016 +0000
+++ b/misc/ttyrec/patches/patch-ttyrec.c        Tue May 31 08:13:45 2016 +0000
@@ -1,10 +1,33 @@
-$NetBSD: patch-ttyrec.c,v 1.1 2015/11/08 21:02:49 dholland Exp $
+$NetBSD: patch-ttyrec.c,v 1.2 2016/05/31 08:13:45 leot Exp $
 
+- add <signal.h> (needed by kill(2))
+- use <util.h> on NetBSD, OpenBSD and Mac OS X
 - remove union wait
 
---- ttyrec.c~  2006-06-11 15:52:50.000000000 +0000
+--- ttyrec.c.orig      2006-06-11 15:52:50.000000000 +0000
 +++ ttyrec.c
-@@ -203,15 +203,11 @@ doinput()
+@@ -49,6 +49,7 @@
+ #include <sys/time.h>
+ #include <sys/file.h>
+ #include <sys/signal.h>
++#include <signal.h>
+ #include <stdio.h>
+ #include <time.h>
+ #include <unistd.h>
+@@ -71,8 +72,12 @@
+ #define _(FOO) FOO
+ 
+ #ifdef HAVE_openpty
++#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
++#include <util.h>
++#else
+ #include <libutil.h>
+ #endif
++#endif
+ 
+ #if defined(SVR4) && !defined(CDEL)
+ #if defined(_POSIX_VDISABLE)
+@@ -203,15 +208,11 @@ doinput()
  void
  finish()
  {



Home | Main Index | Thread Index | Old Index