pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/misc/fep make it work under linux again.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c5780515a095
branches:  trunk
changeset: 499193:c5780515a095
user:      christos <christos%pkgsrc.org@localhost>
date:      Tue Sep 13 19:25:57 2005 +0000

description:
make it work under linux again.

diffstat:

 misc/fep/Makefile         |    4 +-
 misc/fep/distinfo         |    6 +-
 misc/fep/patches/patch-aa |   13 +++-
 misc/fep/patches/patch-aj |  122 +++++++++++++++++++++++++++++++++++----------
 4 files changed, 107 insertions(+), 38 deletions(-)

diffs (truncated from 384 to 300 lines):

diff -r 0a53ffe72009 -r c5780515a095 misc/fep/Makefile
--- a/misc/fep/Makefile Tue Sep 13 14:39:26 2005 +0000
+++ b/misc/fep/Makefile Tue Sep 13 19:25:57 2005 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.14 2005/03/24 21:12:57 wiz Exp $
+# $NetBSD: Makefile,v 1.15 2005/09/13 19:25:57 christos Exp $
 
 DISTNAME=      fep
 PKGNAME=       fep-1.0
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    misc
 MASTER_SITES=  ftp://ftp.sra.co.jp/pub/cmd/fep/
 
diff -r 0a53ffe72009 -r c5780515a095 misc/fep/distinfo
--- a/misc/fep/distinfo Tue Sep 13 14:39:26 2005 +0000
+++ b/misc/fep/distinfo Tue Sep 13 19:25:57 2005 +0000
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.6 2005/02/24 11:02:52 agc Exp $
+$NetBSD: distinfo,v 1.7 2005/09/13 19:25:57 christos Exp $
 
 SHA1 (fep.tar.gz) = 73fa55337b12dba3b91c9895e2c9adbbdfa9d960
 RMD160 (fep.tar.gz) = 2a8b9eeecd5c76bec5cdb524ae6c650f298ccbde
 Size (fep.tar.gz) = 40137 bytes
-SHA1 (patch-aa) = fd1fa7e7978d007bcccd55726d47ce66edd585f2
+SHA1 (patch-aa) = ea6b9663acc544e4e57c14f45468a03fc457e353
 SHA1 (patch-ab) = 3d05ad0b25a56ce588e7d31afa7685b18ca94bd6
 SHA1 (patch-ac) = 6f989e576260e95c035cb12c13d43b095414913b
 SHA1 (patch-ad) = 696b57cb1b282e01549995b1bbf51b10aa881f0b
@@ -12,7 +12,7 @@
 SHA1 (patch-ag) = 1a8cd62babb699ff85ec4e8ec56ef844f7f401c7
 SHA1 (patch-ah) = c08a2af68c59f254cd33969a98d2376047ae4f0f
 SHA1 (patch-ai) = f5b420c63c13612182ff5c093277e9a6bd608e48
-SHA1 (patch-aj) = 47983e99dd157e16b155e96d39bbea8039f291ad
+SHA1 (patch-aj) = b8f53a04a078c730bb69e9d55b4a50f21c360c99
 SHA1 (patch-ak) = c7e65cb589f9267a11b688a8773704c7e13ab8a3
 SHA1 (patch-al) = b6f57757e7374e3268e45ac0a294c45d0bff7258
 SHA1 (patch-am) = 4b19832075292802c1ddf2fdc9083b7379eb4066
diff -r 0a53ffe72009 -r c5780515a095 misc/fep/patches/patch-aa
--- a/misc/fep/patches/patch-aa Tue Sep 13 14:39:26 2005 +0000
+++ b/misc/fep/patches/patch-aa Tue Sep 13 19:25:57 2005 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-aa,v 1.6 2003/11/11 10:42:32 wiz Exp $
+$NetBSD: patch-aa,v 1.7 2005/09/13 19:25:57 christos Exp $
 
---- Makefile.orig      Thu Jun 10 04:51:22 1993
-+++ Makefile
-@@ -15,17 +15,21 @@ OBJ        = fep_main.o fep_edit.o fep_hist.o f
+--- Makefile.orig      1993-06-09 22:51:22.000000000 -0400
++++ Makefile   2004-02-20 09:37:24.000000000 -0500
+@@ -15,17 +15,24 @@
  DISTRIBUTION\
        = Makefile fep.1 $(HEADER) $(SRC) feprc.sample README
  
@@ -20,6 +20,9 @@
  
 -CFLAGS        = $(DEBUG) $(CONFIG)
 +CFLAGS        += $(DEBUG) $(CONFIG)
++.if exists(/dev/ptmx)
++CFLAGS        += -DHAVE_PTMX
++.endif
 +.if exists(/usr/lib/libcompat.a)
 +LDFLAGS = -ltermcap -lcompat
 +.else
@@ -28,7 +31,7 @@
  
  all: $(TARGET)
  
-@@ -37,7 +41,7 @@ argv: fep_com.c
+@@ -37,7 +44,7 @@
  
  install: $(TARGET)
        install -s $(TARGET) $(INSTDIR)
diff -r 0a53ffe72009 -r c5780515a095 misc/fep/patches/patch-aj
--- a/misc/fep/patches/patch-aj Tue Sep 13 14:39:26 2005 +0000
+++ b/misc/fep/patches/patch-aj Tue Sep 13 19:25:57 2005 +0000
@@ -1,8 +1,16 @@
-$NetBSD: patch-aj,v 1.3 2003/11/11 10:42:32 wiz Exp $
+$NetBSD: patch-aj,v 1.4 2005/09/13 19:25:57 christos Exp $
 
---- fep_main.c.orig    Thu Jun 10 04:53:06 1993
-+++ fep_main.c
-@@ -10,8 +10,17 @@ static char rcsid[]=
+--- fep_main.c.orig    1993-06-09 22:53:06.000000000 -0400
++++ fep_main.c 2004-02-20 09:50:33.000000000 -0500
+@@ -3,15 +3,25 @@
+ #ifndef lint
+ static char rcsid[]=
+ "$Id: patch-aj,v 1.4 2005/09/13 19:25:57 christos Exp $ (SRA)";
+-#endif lint
++#endif /* lint */
+ 
+ #include <stdio.h>
+ #include <signal.h>
  #include <sys/types.h>
  #include <sys/stat.h>
  #include <sys/ioctl.h>
@@ -13,6 +21,7 @@
 +#ifndef _POSIX_VDISABLE
 +#define _POSIX_VDISABLE '\0'
 +#endif
++#include <stdlib.h>
 +#endif
 +#else
  #include <sgtty.h>
@@ -21,7 +30,7 @@
  #include <sys/time.h>
  #include <sys/resource.h>
  #include <sys/errno.h>
-@@ -30,7 +39,7 @@ static char rcsid[]=
+@@ -30,7 +40,7 @@
  #ifdef STAT
    static char fep_statrc[] = FEP_STAT;
  #endif
@@ -30,7 +39,7 @@
  
  char  *myself;                        /* the command name */
  char  *prompt = "";                   /* prompt string */
-@@ -38,9 +47,9 @@ char *delimiters = DEFAULT_DELIMITERS;
+@@ -38,9 +48,9 @@
                                        /* delimiter characters */
  int   master;                         /* file discriptor for pty master */
  int   slave;                          /* file discriptor for pty slave */
@@ -43,7 +52,7 @@
  int   selectnfds;                     /* max (fileno(stdin), master) + 1*/
  int   child_pid;                      /* child pid */
  int   ptyflag = ON;                   /* flag to use pty or not */
-@@ -48,27 +57,34 @@ int        histlen = -1;                   /* history length */
+@@ -48,27 +58,34 @@
  int   debug = OFF;                    /* debug switch */
  int   auto_tty_fix = ON;              /* fix tty mode automaticaly */
  FILE  *script_fp = NULL;              /* script file pointer */
@@ -84,7 +93,7 @@
  
  char  master_tty[16];                 /* master tty name */
  char  slave_tty[16];                  /* slave tty name */
-@@ -112,6 +128,10 @@ main(argc, argv)
+@@ -112,6 +129,10 @@
  
      myself = argv[0];
  
@@ -95,7 +104,16 @@
      /*
       * Initialize binding table
       */
-@@ -276,7 +296,7 @@ DEFAULT:
+@@ -172,7 +193,7 @@
+                   histlen = atoi (argv[1]);
+               }
+               else {
+-                  histlen = atoi (&argv[1] + 2);
++                  histlen = atoi (argv[1] + 2);
+               }
+               break;
+ 
+@@ -276,7 +297,7 @@
  fix_signal ()
  {
  #ifdef SIGWINCH
@@ -104,7 +122,7 @@
  #endif
  
      sighup = signal (SIGHUP, terminate);
-@@ -336,7 +356,7 @@ input_handler()
+@@ -336,7 +357,7 @@
        if (Through == OFF && Transparency == OFF && script_fp)
            fwrite (inputline, sizeof(CHAR), strlen (inputline), script_fp);
      }
@@ -113,7 +131,7 @@
  }
  
  #define INPUT_BUFFER_SIZE 1024
-@@ -384,7 +404,8 @@ getcharacter()
+@@ -384,7 +405,8 @@
  {
      char c;
      int n;
@@ -123,7 +141,7 @@
  #ifdef USE_TIMEOUT
      struct timeval **timeout = auto_tty_fix ? timeout_list : notimeout;
  #else
-@@ -396,9 +417,8 @@ getcharacter()
+@@ -396,9 +418,8 @@
      /*
       * Sorry, this cording depends to an implementation of getc().
       */
@@ -135,7 +153,7 @@
  
  RETRY:
      readfd = selectmask;
-@@ -409,13 +429,13 @@ RETRY:
+@@ -409,13 +430,13 @@
      while ((nfound = select (selectnfds, &readfd, 0, 0, *timeout)) < 0)
        if (errno != EINTR) {
                perror ("select");
@@ -151,7 +169,7 @@
        int nbyte;
  
        /*
-@@ -451,7 +471,7 @@ RETRY:
+@@ -451,7 +472,7 @@
      /*
       * Found input from terminal
       */
@@ -160,7 +178,7 @@
  
  #ifndef USE_TIMEOUT
        /*
-@@ -467,8 +487,8 @@ RETRY:
+@@ -467,8 +488,8 @@
        RETURNCHAR:
        if ((c = getc (stdin)) == EOF) {
            if (debug)
@@ -171,7 +189,7 @@
        }
        else
            return (c & CHARMASK);
-@@ -596,7 +616,7 @@ buf_put (bp, s)
+@@ -596,7 +617,7 @@
  
  swallow_output()
  {
@@ -180,7 +198,7 @@
      int r;
      int nbyte;
      int ncount = 10;
-@@ -604,7 +624,7 @@ swallow_output()
+@@ -604,7 +625,7 @@
      while (
        ncount-- &&
        select (selectnfds, &readfd, 0, 0, TIMEOUT_NOBLOCK) > 0 &&
@@ -189,7 +207,7 @@
      ) {
        nbyte = buf_read (master, output_buffer);
        if (nbyte > 0) {
-@@ -636,21 +656,23 @@ swallow_output()
+@@ -636,21 +657,23 @@
  #include <sys/m_wait.h>
  #endif
  
@@ -217,7 +235,7 @@
  }
  
  exec_to_command(argv)
-@@ -675,13 +697,37 @@ exec_to_command(argv)
+@@ -675,13 +698,37 @@
      dup2 (slave, 2);
      (void) close (slave);
  
@@ -256,7 +274,7 @@
  fix_tty()
  {
      struct tchars tcbuf;
-@@ -719,6 +765,7 @@ fix_tty()
+@@ -719,6 +766,7 @@
      ioctl (0, TIOCSETC, (char *) & tcbuf);
      ioctl (0, TIOCSLTC, (char *) & lcbuf);
  }
@@ -264,7 +282,7 @@
  
  kill_process()
  {
-@@ -727,7 +774,9 @@ kill_process()
+@@ -727,7 +775,9 @@
        (void) killpg (child_pid, SIGTERM);
  }
  
@@ -275,7 +293,7 @@
  {
      extern int errno;
  
-@@ -759,10 +808,14 @@ terminate()
+@@ -759,10 +809,14 @@
            if (killpg (child_pid, SIGKILL) < 0)
                perror ("kill");
  
@@ -291,10 +309,53 @@
  }
  
  get_pty_master()
-@@ -796,11 +849,15 @@ get_pty_master()
+@@ -775,6 +829,41 @@
+       master = 1;
+       return;
+     }
++#ifdef HAVE_PTMX
++    if ((master = open("/dev/ptmx", O_RDWR)) == -1) {
++      perror ("Couldn't open pseudo tty");
++      kill_process ();
++      exit (1);
++    }
++    if (grantpt (master) == -1) {
++      perror ("grantpt");
++      kill_process ();
++      exit (1);
++    }
++    if (unlockpt (master) == -1) {
++      perror ("grantpt");
++      kill_process ();
++      exit (1);



Home | Main Index | Thread Index | Old Index