diff options
-rw-r--r-- | system/ttyrec/ttyrec-1.0.8-flags.patch | 19 | ||||
-rw-r--r-- | system/ttyrec/ttyrec-1.0.8-glibc-2.30.patch | 30 | ||||
-rw-r--r-- | system/ttyrec/ttyrec-1.0.8.RHEL5.patch | 33 | ||||
-rw-r--r-- | system/ttyrec/ttyrec.SlackBuild | 6 |
4 files changed, 52 insertions, 36 deletions
diff --git a/system/ttyrec/ttyrec-1.0.8-flags.patch b/system/ttyrec/ttyrec-1.0.8-flags.patch new file mode 100644 index 000000000000..34687d9b8b7a --- /dev/null +++ b/system/ttyrec/ttyrec-1.0.8-flags.patch @@ -0,0 +1,19 @@ +--- a/Makefile 2017-08-26 11:47:02.981266309 +0200 ++++ b/Makefile 2017-08-26 14:33:47.161600445 +0200 +@@ -10,13 +10,13 @@ + all: $(TARGET) + + ttyrec: ttyrec.o io.o +- $(CC) $(CFLAGS) -o ttyrec ttyrec.o io.o ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o ttyrec ttyrec.o io.o + + ttyplay: ttyplay.o io.o +- $(CC) $(CFLAGS) -o ttyplay ttyplay.o io.o ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o ttyplay ttyplay.o io.o + + ttytime: ttytime.o io.o +- $(CC) $(CFLAGS) -o ttytime ttytime.o io.o ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o ttytime ttytime.o io.o + + clean: + rm -f *.o $(TARGET) ttyrecord *~ diff --git a/system/ttyrec/ttyrec-1.0.8-glibc-2.30.patch b/system/ttyrec/ttyrec-1.0.8-glibc-2.30.patch new file mode 100644 index 000000000000..174fc7786e19 --- /dev/null +++ b/system/ttyrec/ttyrec-1.0.8-glibc-2.30.patch @@ -0,0 +1,30 @@ +diff --git a/ttyrec.c b/ttyrec.c +index 3392f70..86a59ee 100644 +--- a/ttyrec.c ++++ b/ttyrec.c +@@ -57,7 +57,9 @@ + + #if defined(SVR4) + #include <fcntl.h> ++#if !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) || defined(__linux__)) + #include <stropts.h> ++#endif + #endif /* SVR4 */ + + #include <sys/time.h> +@@ -449,6 +451,7 @@ getslave() + perror("open(fd, O_RDWR)"); + fail(); + } ++#ifndef __linux__ + if (isastream(slave)) { + if (ioctl(slave, I_PUSH, "ptem") < 0) { + perror("ioctl(fd, I_PUSH, ptem)"); +@@ -466,6 +469,7 @@ getslave() + #endif + (void) ioctl(0, TIOCGWINSZ, (char *)&win); + } ++#endif + #else /* !SVR4 */ + #ifndef HAVE_openpty + line[strlen("/dev/")] = 't'; diff --git a/system/ttyrec/ttyrec-1.0.8.RHEL5.patch b/system/ttyrec/ttyrec-1.0.8.RHEL5.patch deleted file mode 100644 index 900b017cb9c9..000000000000 --- a/system/ttyrec/ttyrec-1.0.8.RHEL5.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -rupN original/Makefile new/Makefile ---- original/Makefile 2006-06-11 10:52:50.000000000 -0500 -+++ new/Makefile 2012-04-23 18:34:05.000000000 -0500 -@@ -1,5 +1,5 @@ - CC = gcc --CFLAGS = -O2 -+CFLAGS = -O2 -DHAVE_openpty - VERSION = 1.0.8 - - TARGET = ttyrec ttyplay ttytime -@@ -10,7 +10,7 @@ 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) -o ttyrec ttyrec.o io.o -lutil - - ttyplay: ttyplay.o io.o - $(CC) $(CFLAGS) -o ttyplay ttyplay.o io.o -diff -rupN original/ttyrec.c new/ttyrec.c ---- original/ttyrec.c 2006-06-11 10:52:50.000000000 -0500 -+++ new/ttyrec.c 2012-04-23 18:26:41.000000000 -0500 -@@ -71,7 +71,9 @@ - #define _(FOO) FOO - - #ifdef HAVE_openpty --#include <libutil.h> -+/* #include <libutil.h> */ -+#include <pty.h> /* for openpty and forkpty */ -+#include <utmp.h> /* for login_tty */ - #endif - - #if defined(SVR4) && !defined(CDEL) diff --git a/system/ttyrec/ttyrec.SlackBuild b/system/ttyrec/ttyrec.SlackBuild index caecc00574fc..a54cdb91261d 100644 --- a/system/ttyrec/ttyrec.SlackBuild +++ b/system/ttyrec/ttyrec.SlackBuild @@ -69,10 +69,10 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# Fixed: "Out of pty's Terminated" -patch -p1 < $CWD/ttyrec-1.0.8.RHEL5.patch +patch -p1 < $CWD/ttyrec-1.0.8-flags.patch +patch -p1 < $CWD/ttyrec-1.0.8-glibc-2.30.patch -make +make CFLAGS+="$SLKCFLAGS -DSVR4 -DHAVE_inotify -D_XOPEN_SOURCE=500" find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true |