summaryrefslogtreecommitdiffstats
path: root/system/ttyrec
diff options
context:
space:
mode:
Diffstat (limited to 'system/ttyrec')
-rw-r--r--system/ttyrec/ttyrec-1.0.8-flags.patch19
-rw-r--r--system/ttyrec/ttyrec-1.0.8-glibc-2.30.patch30
-rw-r--r--system/ttyrec/ttyrec-1.0.8.RHEL5.patch33
-rw-r--r--system/ttyrec/ttyrec.SlackBuild22
4 files changed, 65 insertions, 39 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 0000000000..34687d9b8b
--- /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 0000000000..174fc7786e
--- /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 900b017cb9..0000000000
--- 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 caecc00574..b416afbb02 100644
--- a/system/ttyrec/ttyrec.SlackBuild
+++ b/system/ttyrec/ttyrec.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for ttyrec
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=ttyrec
VERSION=${VERSION:-1.0.8}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -69,10 +79,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
@@ -95,4 +105,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE