summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorleot <leot>2016-05-31 08:13:45 +0000
committerleot <leot>2016-05-31 08:13:45 +0000
commit88cc27af917d9d0c294995f57d763d32ae5402e0 (patch)
treedc88e4227d89c73c6a757279292986a5e86afb04 /misc
parentc0c8a65b0de92d5e321370254aad64c28e41b9be (diff)
downloadpkgsrc-88cc27af917d9d0c294995f57d763d32ae5402e0.tar.gz
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 (limited to 'misc')
-rw-r--r--misc/ttyrec/Makefile10
-rw-r--r--misc/ttyrec/distinfo7
-rw-r--r--misc/ttyrec/patches/patch-aa24
-rw-r--r--misc/ttyrec/patches/patch-io.h14
-rw-r--r--misc/ttyrec/patches/patch-ttyrec.c29
5 files changed, 75 insertions, 9 deletions
diff --git a/misc/ttyrec/Makefile b/misc/ttyrec/Makefile
index cb3ac91a6b2..6286b4d2a2e 100644
--- a/misc/ttyrec/Makefile
+++ b/misc/ttyrec/Makefile
@@ -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 @@ LICENSE= original-bsd
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 --git a/misc/ttyrec/distinfo b/misc/ttyrec/distinfo
index 39a22d48c61..1acdca8d518 100644
--- a/misc/ttyrec/distinfo
+++ b/misc/ttyrec/distinfo
@@ -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 --git a/misc/ttyrec/patches/patch-aa b/misc/ttyrec/patches/patch-aa
index a0d5b9fd6c1..8cba11a2fcd 100644
--- a/misc/ttyrec/patches/patch-aa
+++ b/misc/ttyrec/patches/patch-aa
@@ -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 @@ $NetBSD: patch-aa,v 1.2 2006/09/09 13:48:02 obache Exp $
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 --git a/misc/ttyrec/patches/patch-io.h b/misc/ttyrec/patches/patch-io.h
new file mode 100644
index 00000000000..cec527fee01
--- /dev/null
+++ b/misc/ttyrec/patches/patch-io.h
@@ -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 --git a/misc/ttyrec/patches/patch-ttyrec.c b/misc/ttyrec/patches/patch-ttyrec.c
index f8172544e73..cb2e66d99db 100644
--- a/misc/ttyrec/patches/patch-ttyrec.c
+++ b/misc/ttyrec/patches/patch-ttyrec.c
@@ -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()
{