diff options
author | tv <tv@pkgsrc.org> | 2005-01-19 16:11:41 +0000 |
---|---|---|
committer | tv <tv@pkgsrc.org> | 2005-01-19 16:11:41 +0000 |
commit | c147da3169d39ffeeb0ef4c2be294513bcfa32ab (patch) | |
tree | d5c3ce1832e6862ef85390852384e67d255b1401 /converters/hztty | |
parent | 6c126d349083a0be4d9cb2b1d1e482a59a76d5cf (diff) | |
download | pkgsrc-c147da3169d39ffeeb0ef4c2be294513bcfa32ab.tar.gz |
Fix build on Interix (mostly SVR4ish in its pty/utmp implementation).
Diffstat (limited to 'converters/hztty')
-rw-r--r-- | converters/hztty/Makefile | 8 | ||||
-rw-r--r-- | converters/hztty/distinfo | 7 | ||||
-rw-r--r-- | converters/hztty/patches/patch-aa | 19 | ||||
-rw-r--r-- | converters/hztty/patches/patch-ab | 61 | ||||
-rw-r--r-- | converters/hztty/patches/patch-ac | 35 |
5 files changed, 117 insertions, 13 deletions
diff --git a/converters/hztty/Makefile b/converters/hztty/Makefile index 76821650be7..d5f807507c1 100644 --- a/converters/hztty/Makefile +++ b/converters/hztty/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2004/12/03 15:14:52 wiz Exp $ +# $NetBSD: Makefile,v 1.6 2005/01/19 16:11:41 tv Exp $ DISTNAME= hztty-2.0 CATEGORIES= converters @@ -13,7 +13,13 @@ COMMENT= Turns a tty session between Big5/GB/HZ/Unicode PKG_INSTALLATION_TYPES= overwrite pkgviews +.include "../../mk/bsd.prefs.mk" + +.if ${OPSYS} == "Interix" +BUILD_TARGET= svr4 +.else BUILD_TARGET= bsd +.endif INSTALLATION_DIRS= bin man/man1 diff --git a/converters/hztty/distinfo b/converters/hztty/distinfo index b2cd7abbf9b..12f579eb3dd 100644 --- a/converters/hztty/distinfo +++ b/converters/hztty/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.1.1.1 2002/06/19 09:39:18 agc Exp $ +$NetBSD: distinfo,v 1.2 2005/01/19 16:11:41 tv Exp $ SHA1 (hztty-2.0.tar.gz) = db2d13f4f9d3918c1feef3ac8fb4bb24326a28ef Size (hztty-2.0.tar.gz) = 229189 bytes -SHA1 (patch-aa) = 6479d6b1d359f90e7ad6808bdb9c24c8fe10e9d6 -SHA1 (patch-ab) = fc050ecb9b5df0403b3f0307ccd741c60c693f5f +SHA1 (patch-aa) = 9091f33afb6eb5a8ca98ca937bf7e5488a337111 +SHA1 (patch-ab) = 90b052c3978838379cdf4ec4db7924419cdd8908 +SHA1 (patch-ac) = 6260fa7d189b8516f747e3f6fa846f1213c69d63 diff --git a/converters/hztty/patches/patch-aa b/converters/hztty/patches/patch-aa index fce20851c15..4eb13988cb3 100644 --- a/converters/hztty/patches/patch-aa +++ b/converters/hztty/patches/patch-aa @@ -1,8 +1,8 @@ -$NetBSD: patch-aa,v 1.1.1.1 2002/06/19 09:39:18 agc Exp $ +$NetBSD: patch-aa,v 1.2 2005/01/19 16:11:41 tv Exp $ ---- Makefile.orig Sun Jan 29 16:39:19 1995 -+++ Makefile Sun Apr 2 11:16:03 2000 -@@ -31,7 +30,7 @@ +--- Makefile.orig 1995-01-29 03:39:19.000000000 -0500 ++++ Makefile +@@ -31,7 +31,7 @@ OBJS = main.o tty.o io.o log.o hz2gb.o ${OBJ_GB_BIG5} ${OBJ_UNICODE_GB} ${OBJ_UNICODE_BIG5} DEFINES= @@ -11,7 +11,7 @@ $NetBSD: patch-aa,v 1.1.1.1 2002/06/19 09:39:18 agc Exp $ PROG = hztty LIBS= -@@ -132,7 +131,7 @@ +@@ -132,7 +132,7 @@ linux: bsd: @@ -20,3 +20,12 @@ $NetBSD: patch-aa,v 1.1.1.1 2002/06/19 09:39:18 agc Exp $ ${MAKE} ${MFLAGS} DEFINES='-DBSD' ${PROG} posix: +@@ -144,7 +144,7 @@ sys: + ${MAKE} ${MFLAGS} DEFINES='-DSYSV' ${PROG} + + svr4: +- miniconf.sh $(CPP) ++ ./miniconf.sh $(CPP) + ${MAKE} ${MFLAGS} DEFINES='-DSVR4' ${PROG} + + diff --git a/converters/hztty/patches/patch-ab b/converters/hztty/patches/patch-ab index 3b60957ba0b..0581187b747 100644 --- a/converters/hztty/patches/patch-ab +++ b/converters/hztty/patches/patch-ab @@ -1,8 +1,8 @@ -$NetBSD: patch-ab,v 1.1.1.1 2002/06/19 09:39:18 agc Exp $ +$NetBSD: patch-ab,v 1.2 2005/01/19 16:11:41 tv Exp $ ---- tty.c.orig Sun Jan 29 12:24:55 1995 -+++ tty.c Mon Oct 6 23:56:32 1997 -@@ -26,7 +26,7 @@ +--- tty.c.orig 1995-01-29 15:24:55.000000000 -0500 ++++ tty.c +@@ -26,7 +26,7 @@ static char *rcs_id="$Id: tty.c,v 2.1 19 # define TTYDEV "/dev/pty/ttyxx" #else /* !hpux */ # define PTYCHAR1 "pqrstuvwxyzPQRSTUVWXYZ" @@ -11,3 +11,56 @@ $NetBSD: patch-ab,v 1.1.1.1 2002/06/19 09:39:18 agc Exp $ # define PTYDEV "/dev/ptyxx" # define TTYDEV "/dev/ttyxx" #endif /* !hpux */ +@@ -39,6 +39,10 @@ extern char *ptsname(); + # include <sys/utsname.h> + #endif + ++#ifdef __INTERIX ++# define setpgrp() setpgid(0, 0) ++#endif ++ + static char ptydev[32]; + static char ttydev[32]; + static int pty_search(); +@@ -61,7 +65,7 @@ int get_pty (pty) + return 0; + #endif /* SYSV && SYSV386 */ + +-#if (defined(att) || defined(ATT)) && (!defined(_SEQUENT_)) ++#if (defined(att) || defined(ATT) || defined(__INTERIX)) && (!defined(_SEQUENT_)) + { + if ((*pty = open ("/dev/ptmx", O_RDWR)) < 0) + return 1; +@@ -414,7 +418,10 @@ void make_raw(oldtermptr, newtermptr) + + /******************************* UTMP stuffs *******************************/ + ++#ifndef __INTERIX + #include <utmp.h> ++#endif ++ + #ifdef HAS_UTMPX + + # include <utmpx.h> +@@ -428,6 +435,10 @@ void make_raw(oldtermptr, newtermptr) + # define getutid getutxid + # define pututline pututxline + ++# ifdef __INTERIX ++# define ut_xtime ut_tv.tv_sec ++# endif ++ + #endif + + #ifdef USE_SYSV_UTMP +@@ -507,8 +518,10 @@ void addutmp() + utmp.ut_pid = getpid(); + + # ifdef HAS_UTMPX ++# ifndef __INTERIX + utmpx.ut_syslen = 1; + utmpx.ut_session = getsid(0); ++# endif + utmpx.ut_tv.tv_usec = 0; + # endif + diff --git a/converters/hztty/patches/patch-ac b/converters/hztty/patches/patch-ac new file mode 100644 index 00000000000..5a2524f2ff6 --- /dev/null +++ b/converters/hztty/patches/patch-ac @@ -0,0 +1,35 @@ +$NetBSD: patch-ac,v 1.1 2005/01/19 16:11:41 tv Exp $ + +--- config.h.orig 2005-01-19 10:49:55.000000000 -0500 ++++ config.h +@@ -28,13 +28,16 @@ + # define USE_SYS_UTMP + # define USE_TERMIOS + # define SYSV +-# ifndef sgi ++# if !defined(sgi) && !defined(__INTERIX) + # define ATT /* no ATT for sgi */ + # endif + # ifdef sun /* Solaris 2 */ + # include <sys/strredir.h> + # define HAS_UTMPX + # endif ++# ifdef __INTERIX ++# define HAS_UTMPX ++# endif + #endif + + #ifdef SYSV386 +@@ -59,10 +62,12 @@ + # define USE_SYSV_TERMIO + # ifndef _SEQUENT_ + # define termio termios ++# ifndef __INTERIX + # undef TCGETA + # define TCGETA TCGETS + # undef TCSETA + # define TCSETA TCSETS ++# endif /* !__INTERIX */ + # endif /* _SEQUENT_ */ + #else /* USE_TERMIOS */ + # ifdef SYSV |