From root@gits.dyndns.org  Thu May 16 23:53:01 2002
Return-Path: <root@gits.dyndns.org>
Received: from smtp.noos.fr (zola.noos.net [212.198.2.76])
	by hub.freebsd.org (Postfix) with ESMTP id AB6B337B407
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 16 May 2002 23:52:59 -0700 (PDT)
Received: (qmail 11539468 invoked by uid 0); 17 May 2002 06:52:57 -0000
Received: from unknown (HELO gits.gits.dyndns.org) ([212.198.230.194]) (envelope-sender <root@gits.dyndns.org>)
          by 212.198.2.76 (qmail-ldap-1.03) with SMTP
          for <FreeBSD-gnats-submit@freebsd.org>; 17 May 2002 06:52:57 -0000
Received: from gits.gits.dyndns.org (kzff6f53u807z16k@localhost [127.0.0.1])
	by gits.gits.dyndns.org (8.12.3/8.12.3) with ESMTP id g4H6qui2012901
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 17 May 2002 08:52:56 +0200 (CEST)
	(envelope-from root@gits.dyndns.org)
Received: (from root@localhost)
	by gits.gits.dyndns.org (8.12.3/8.12.3/Submit) id g4H6qtcg012900;
	Fri, 17 May 2002 08:52:55 +0200 (CEST)
	(envelope-from root)
Message-Id: <200205170652.g4H6qtcg012900@gits.gits.dyndns.org>
Date: Fri, 17 May 2002 08:52:55 +0200 (CEST)
From: Cyrille Lefevre <cyrille.lefevre@laposte.net>
Reply-To: Cyrille Lefevre <cyrille.lefevre@laposte.net>
To: FreeBSD-gnats-submit@freebsd.org
Subject: installing curses programs and terminfo database
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         38168
>Category:       bin
>Synopsis:       [patch] [request] installing curses-based versions of programs and terminfo database
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 17 00:00:12 PDT 2002
>Closed-Date:    
>Last-Modified:  Sat Jan 26 03:40:05 UTC 2008
>Originator:     Cyrille Lefevre
>Release:        FreeBSD 4.6-PRERELEASE i386
>Organization:
ACME
>Environment:
System: FreeBSD gits 4.6-PRERELEASE FreeBSD 4.6-PRERELEASE #5: Tue May 14 02:10:24 CEST 2002 root@:/disk2/4.x-stable/src/sys/compile/CUSTOM i386

>Description:
	this patch-set install ncurses version of the following
	commands as well as the terminfo database :

		nclear ninfocmp ntic ntoe ntput ntset
		ncaptoinfo ninfotocap nreset

	they are installed w/ a "n" prefix to avoid conflict w/
	the BSD one (clean, reset, tput, tset).

	src/etc/defaults/make.conf
		NO_CURSES, NO_TERMINFO and NO_TERMTYPES descrition added.

	src/etc/mtree/BSD.usr.dist
		terminfo directories added.

	src/usr.bin/Makefile
	src/share/Makefile
		SUBDIR conditionally enhanced regarding NO_CURSES and/or
		NO_TERMINFO.

	src/usr.bin/nclear/Makefile
	src/usr.bin/ninfocmp/Makefile
	src/usr.bin/ntic/Makefile
	src/usr.bin/ntoe/Makefile
	src/usr.bin/ntput/Makefile
	src/usr.bin/ntset/Makefile
		new files

	src/usr.bin/ntic/Makefile.nc
		new file included by ncurses related Makefiles.

	src/share/terminfo/Makefile
		new file
		conditionnaly compile the old or the new terminfo
		database according to NO_TERMTYPES.

	src/share/terminfo/termtypes.ti
		new file
		not provided since it is too big for a PR (800+ KB).
		a newer one may be found at the following URL :

			http://tuxedo.org/~esr/terminfo/termtypes.ti.gz

	PS : since the src/contrib/ncurses/misc/terminfo.src terminfo
	database is out-of-date, it isn't used by default.

	also, see PR#30812 about the termcap database update.
>How-To-Repeat:
	n/a
>Fix:
	take care, this patch is in two part. the first one
	has been obtain using cvs diff, and the second one
	using diff /dev/null ...

Index: etc/defaults/make.conf
===================================================================
RCS file: /home/ncvs/src/etc/defaults/Attic/make.conf,v
retrieving revision 1.97.2.65
diff -u -r1.97.2.65 make.conf
--- etc/defaults/make.conf	15 May 2002 12:51:27 -0000	1.97.2.65
+++ etc/defaults/make.conf	17 May 2002 05:06:44 -0000
@@ -100,6 +100,9 @@
 #NO_SENDMAIL=	true	# do not build sendmail and related programs
 #NO_SHAREDOCS=	true	# do not build the 4.4BSD legacy docs
 #NO_TCSH=	true	# do not build and install /bin/csh (which is tcsh)
+#NO_CURSES=	true	# do not build curses related programs
+#NO_TERMINFO=	true	# do not build the terminfo database
+#NO_TERMTYPES=	true	# do not use the new tuxedo termcap database
 #NO_X=		true	# do not compile in XWindows support (e.g. doscmd)
 #NOCRYPT=	true	# do not build any crypto code
 #NOGAMES=	true	# do not build games (games/ subdir)
Index: etc/mtree/BSD.usr.dist
===================================================================
RCS file: /home/ncvs/src/etc/mtree/BSD.usr.dist,v
retrieving revision 1.188.2.36
diff -u -r1.188.2.36 BSD.usr.dist
--- etc/mtree/BSD.usr.dist	28 Apr 2002 05:28:20 -0000	1.188.2.36
+++ etc/mtree/BSD.usr.dist	28 Apr 2002 21:23:31 -0000
@@ -761,6 +761,132 @@
	     ..
	     pcvtfonts
	     ..
+            terminfo
+		0
+		..
+		1
+		..
+		2
+		..
+		3
+		..
+		4
+		..
+		5
+		..
+		6
+		..
+		7
+		..
+		8
+		..
+		9
+		..
+		A
+		..
+		B
+		..
+		C
+		..
+		D
+		..
+		E
+		..
+		F
+		..
+		G
+		..
+		H
+		..
+		I
+		..
+		J
+		..
+		K
+		..
+		L
+		..
+		M
+		..
+		N
+		..
+		O
+		..
+		P
+		..
+		Q
+		..
+		R
+		..
+		S
+		..
+		T
+		..
+		U
+		..
+		V
+		..
+		W
+		..
+		X
+		..
+		Y
+		..
+		Z
+		..
+		a
+		..
+		b
+		..
+		c
+		..
+		d
+		..
+		e
+		..
+		f
+		..
+		g
+		..
+		h
+		..
+		i
+		..
+		j
+		..
+		k
+		..
+		l
+		..
+		m
+		..
+		n
+		..
+		o
+		..
+		p
+		..
+		q
+		..
+		r
+		..
+		s
+		..
+		t
+		..
+		u
+		..
+		v
+		..
+		w
+		..
+		x
+		..
+		y
+		..
+		z
+		..
+            ..
	 ..
	 mk
	 ..
Index: usr.bin/Makefile
===================================================================
RCS file: /home/ncvs/src/usr.bin/Makefile,v
retrieving revision 1.144.2.12
diff -u -r1.144.2.12 Makefile
--- usr.bin/Makefile	14 Apr 2002 10:15:36 -0000	1.144.2.12
+++ usr.bin/Makefile	17 May 2002 05:18:35 -0000
@@ -217,6 +217,17 @@
 SUBDIR+=vacation 
 .endif
 
+.if !defined(NO_CURSES)
+SUBDIR+=nclear \
+	ninfocmp \
+	ntic \
+	ntoe \
+	ntput \
+	ntset
+.elif !defined(NO_TERMINFO)
+SUBDIR+=ntic
+.endif
+
 .if ${MACHINE_ARCH} == "i386"
 # Things that don't compile on alpha or are aout specific:
 SUBDIR+=ar \
Index: share/Makefile
===================================================================
RCS file: /home/ncvs/src/share/Makefile,v
retrieving revision 1.22.2.4
diff -u -r1.22.2.4 Makefile
--- share/Makefile	12 Mar 2002 17:13:32 -0000	1.22.2.4
+++ share/Makefile	15 Apr 2002 18:54:14 -0000
@@ -18,4 +18,8 @@
 SUBDIR+= sendmail
 .endif
 
+.if !defined(NO_TERMINFO)
+SUBDIR+= terminfo
+.endif
+
 .include <bsd.subdir.mk>
--- /dev/null	Fri May 17 08:37:42 2002
+++ usr.bin/nclear/Makefile	Fri May 17 07:02:46 2002
@@ -0,0 +1,48 @@
+# $FreeBSD$
+
+THIS=	clear
+
+.if exists(${.CURDIR}/../ntic/Makefile.nc)
+.include "${.CURDIR}/../ntic/Makefile.nc"
+.endif
+
+NCURSES=	${.CURDIR}/../../contrib/ncurses
+LIBNCURSES=	${.CURDIR}/../../lib/libncurses
+
+.PATH:	${NCURSES}/progs
+.PATH:	${NCURSES}/include
+.PATH:	${NCURSES}/man
+
+AWK?=	awk
+
+PROG=	${NCPREFIX}${THIS}
+SRCS=	${PROG:S/^${NCPREFIX}//}.c
+
+CFLAGS+= -I. -I${NCURSES}/progs -I${NCURSES}/include -I${LIBNCURSES}
+DPADD=	${LIBTERMCAP}
+LDADD=	-ltermcap
+
+# Generated headers
+GENHDR=	ncurses_def.h
+
+CLEANFILES+= ${GENHDR}
+
+${PROG:S/^${NCPREFIX}//}.o: ${GENHDR}
+
+ncurses_def.h:  MKncurses_def.sh ncurses_defs
+	AWK=${AWK} sh ${NCURSES}/include/MKncurses_def.sh \
+	    ${NCURSES}/include/ncurses_defs > ncurses_def.h
+
+# MAN page junk
+MAN1=	${PROG}.1
+
+MANFILTER= sed -e 's|@TERMINFO@|${TERMINFODIR}|g' \
+	       -e 's|@TPUT@|${TPUT}|g'
+
+# Generate the MAN1 links
+.for page in ${MAN1}
+${page:T}: ${page:S/^${NCPREFIX}//}
+	ln -s ${.ALLSRC} ${.TARGET}
+.endfor
+
+.include <bsd.prog.mk>
--- /dev/null	Fri May 17 08:37:42 2002
+++ usr.bin/ninfocmp/Makefile	Fri May 17 07:02:54 2002
@@ -0,0 +1,60 @@
+# $FreeBSD$
+
+THIS=	infocmp
+
+.if exists(${.CURDIR}/../ntic/Makefile.nc)
+.include "${.CURDIR}/../ntic/Makefile.nc"
+.endif
+
+NCURSES=	${.CURDIR}/../../contrib/ncurses
+LIBNCURSES=	${.CURDIR}/../../lib/libncurses
+
+.PATH:	${NCURSES}/progs
+.PATH:	${NCURSES}/include
+.PATH:	${NCURSES}/man
+
+AWK?=	awk
+
+PROG=	${NCPREFIX}${THIS}
+SRCS=	${PROG:S/^${NCPREFIX}//}.c dump_entry.c
+
+CFLAGS+= -I. -I${NCURSES}/progs -I${NCURSES}/include -I${LIBNCURSES}
+DPADD=	${LIBTERMCAP}
+LDADD=	-ltermcap
+
+# Generated headers
+GENHDR=	ncurses_def.h parametrized.h termsort.c
+
+CLEANFILES+= ${GENHDR}
+
+${PROG:S/^${NCPREFIX}//}.o: ${GENHDR}
+
+ncurses_def.h:  MKncurses_def.sh ncurses_defs
+	AWK=${AWK} sh ${NCURSES}/include/MKncurses_def.sh \
+	    ${NCURSES}/include/ncurses_defs > ncurses_def.h
+
+parametrized.h: MKparametrized.sh Caps
+	AWK=${AWK} sh ${NCURSES}/include/MKparametrized.sh \
+	    ${NCURSES}/include/Caps > $@
+
+termsort.c: MKtermsort.sh Caps
+	sh ${NCURSES}/progs/MKtermsort.sh \
+	    ${AWK} ${NCURSES}/include/Caps > $@
+
+# MAN page junk
+MAN1m=	${PROG}.1m
+
+MANFILTER= sed -e 's|@TERMINFO@|${TERMINFODIR}|g'
+
+# Generate the MAN8 list from MAN1m
+.for page in ${MAN1m}
+CLEANFILES+=${page:T:S/1m$/8/g}
+MAN8+=${page:T:S/1m$/8/g}
+all-man: ${page:T:S/1m$/8/g}
+${page:T:S/1m$/8/g}: ${page:S/^${NCPREFIX}//}
+	ln -s ${.ALLSRC} ${.TARGET}
+.endfor
+
+.include <bsd.prog.mk>
+
+.SUFFIXES: .1m .8
--- /dev/null	Fri May 17 08:37:42 2002
+++ usr.bin/ntic/Makefile	Fri May 17 07:03:02 2002
@@ -0,0 +1,73 @@
+# $FreeBSD$
+
+THIS=	tic
+
+.if exists(${.CURDIR}/../ntic/Makefile.nc)
+.include "${.CURDIR}/../ntic/Makefile.nc"
+.endif
+
+NCURSES=	${.CURDIR}/../../contrib/ncurses
+LIBNCURSES=	${.CURDIR}/../../lib/libncurses
+
+.PATH:	${NCURSES}/progs
+.PATH:	${NCURSES}/include
+.PATH:	${NCURSES}/man
+
+AWK?=	awk
+
+PROG=	${NCPREFIX}${THIS}
+SRCS=	${PROG:S/^${NCPREFIX}//}.c dump_entry.c
+
+CFLAGS+= -I. -I${NCURSES}/progs -I${NCURSES}/include -I${LIBNCURSES}
+DPADD=	${LIBTERMCAP}
+LDADD=	-ltermcap
+
+LINKS=	${BINDIR}/${PROG} ${BINDIR}/${CAPTOINFO} \
+	${BINDIR}/${PROG} ${BINDIR}/${INFOTOCAP}
+
+# Generated headers
+GENHDR=	ncurses_def.h parametrized.h transform.h termsort.c
+
+CLEANFILES+= ${GENHDR}
+
+${PROG:S/^${NCPREFIX}//}.o: ${GENHDR}
+
+ncurses_def.h:  MKncurses_def.sh ncurses_defs
+	AWK=${AWK} sh ${NCURSES}/include/MKncurses_def.sh \
+	    ${NCURSES}/include/ncurses_defs > ncurses_def.h
+
+parametrized.h: MKparametrized.sh Caps
+	AWK=${AWK} sh ${NCURSES}/include/MKparametrized.sh \
+	    ${NCURSES}/include/Caps > $@
+
+transform.h:
+	echo "#define PROG_CAPTOINFO \"${CAPTOINFO}\"" >$@
+	echo "#define PROG_INFOTOCAP \"${INFOTOCAP}\"" >>$@
+	echo "#define PROG_RESET     \"${RESET}\""     >>$@
+	echo "#define PROG_INIT      \"${INIT}\""      >>$@
+
+termsort.c: MKtermsort.sh Caps
+	sh ${NCURSES}/progs/MKtermsort.sh \
+	    ${AWK} ${NCURSES}/include/Caps > $@
+
+# MAN page junk
+MAN1m=	${PROG}.1m
+
+MANFILTER= sed -e 's|@TERMINFO@|${TERMINFODIR}|g' \
+	       -e 's|@INFOCMP@|${INFOCMP}|g' \
+	       -e 's|@CAPTOINFO@|${CAPTOINFO}|g' \
+	       -e 's|@INFOTOCAP@|${INFOTOCAP}|g' \
+	       -e 's|@TOE@|${TOE}|g'
+
+# Generate the MAN8 list from MAN1m
+.for page in ${MAN1m}
+CLEANFILES+=${page:T:S/1m$/8/g}
+MAN8+=${page:T:S/1m$/8/g}
+all-man: ${page:T:S/1m$/8/g}
+${page:T:S/1m$/8/g}: ${page:S/^${NCPREFIX}//}
+	ln -s ${.ALLSRC} ${.TARGET}
+.endfor
+
+.include <bsd.prog.mk>
+
+.SUFFIXES: .1m .8
--- /dev/null	Fri May 17 08:37:42 2002
+++ usr.bin/ntic/Makefile.nc	Fri May 17 06:51:51 2002
@@ -0,0 +1,16 @@
+# $FreeBSD$
+
+TERMINFODIR?=	${SHAREDIR}/misc/terminfo
+
+NCPREFIX=	n
+
+CLEAR?=		${NCPREFIX}clear
+INFOCMP?=	${NCPREFIX}infocmp
+TIC?=		${NCPREFIX}tic
+CAPTOINFO?=	${NCPREFIX}captoinfo
+INFOTOCAP?=	${NCPREFIX}infotocap
+INIT?=		${NCPREFIX}init
+TOE?=		${NCPREFIX}toe
+TPUT?=		${NCPREFIX}tput
+TSET?=		${NCPREFIX}tset
+RESET?=		${NCPREFIX}reset
--- /dev/null	Fri May 17 08:37:42 2002
+++ usr.bin/ntoe/Makefile	Fri May 17 07:03:09 2002
@@ -0,0 +1,56 @@
+# $FreeBSD$
+
+THIS=	toe
+
+.if exists(${.CURDIR}/../ntic/Makefile.nc)
+.include "${.CURDIR}/../ntic/Makefile.nc"
+.endif
+
+NCURSES=	${.CURDIR}/../../contrib/ncurses
+LIBNCURSES=	${.CURDIR}/../../lib/libncurses
+
+.PATH:	${NCURSES}/progs
+.PATH:	${NCURSES}/include
+.PATH:	${NCURSES}/man
+
+AWK?=	awk
+
+PROG=	${NCPREFIX}${THIS}
+SRCS=	${PROG:S/^${NCPREFIX}//}.c
+
+CFLAGS+= -I. -I${NCURSES}/progs -I${NCURSES}/include -I${LIBNCURSES}
+DPADD=	${LIBTERMCAP}
+LDADD=	-ltermcap
+
+# Generated headers
+GENHDR=	ncurses_def.h
+
+CLEANFILES+= ${GENHDR}
+
+${PROG:S/^${NCPREFIX}//}.o: ${GENHDR}
+
+ncurses_def.h:  MKncurses_def.sh ncurses_defs
+	AWK=${AWK} sh ${NCURSES}/include/MKncurses_def.sh \
+	    ${NCURSES}/include/ncurses_defs > ncurses_def.h
+
+# MAN page junk
+MAN1m=	${PROG}.1m
+
+MANFILTER= sed -e 's|@TERMINFO@|${TERMINFODIR}|g' \
+               -e 's|@INFOCMP@|${INFOCMP}|g' \
+               -e 's|@CAPTOINFO@|${CAPTOINFO}|g' \
+               -e 's|@INFOTOCAP@|${INFOTOCAP}|g' \
+               -e 's|@TIC@|${TIC}|g'
+
+# Generate the MAN8 list from MAN1m
+.for page in ${MAN1m}
+CLEANFILES+=${page:T:S/1m$/8/g}
+MAN8+=${page:T:S/1m$/8/g}
+all-man: ${page:T:S/1m$/8/g}
+${page:T:S/1m$/8/g}: ${page:S/^${NCPREFIX}//}
+	ln -s ${.ALLSRC} ${.TARGET}
+.endfor
+
+.include <bsd.prog.mk>
+
+.SUFFIXES: .1m .8
--- /dev/null	Fri May 17 08:37:42 2002
+++ usr.bin/ntput/Makefile	Fri May 17 07:03:17 2002
@@ -0,0 +1,58 @@
+# $FreeBSD$
+
+THIS=	tput
+
+.if exists(${.CURDIR}/../ntic/Makefile.nc)
+.include "${.CURDIR}/../ntic/Makefile.nc"
+.endif
+
+NCURSES=	${.CURDIR}/../../contrib/ncurses
+LIBNCURSES=	${.CURDIR}/../../lib/libncurses
+
+.PATH:	${NCURSES}/progs
+.PATH:	${NCURSES}/include
+.PATH:	${NCURSES}/man
+
+AWK?=	awk
+
+PROG=	${NCPREFIX}${THIS}
+SRCS=	${PROG:S/^${NCPREFIX}//}.c
+
+CFLAGS+= -I. -I${NCURSES}/progs -I${NCURSES}/include -I${LIBNCURSES}
+DPADD=	${LIBTERMCAP}
+LDADD=	-ltermcap
+
+# Generated headers
+GENHDR=	ncurses_def.h termsort.c transform.h
+
+CLEANFILES+= ${GENHDR}
+
+${PROG:S/^${NCPREFIX}//}.o: ${GENHDR}
+
+ncurses_def.h:  MKncurses_def.sh ncurses_defs
+	AWK=${AWK} sh ${NCURSES}/include/MKncurses_def.sh \
+	    ${NCURSES}/include/ncurses_defs > ncurses_def.h
+
+termsort.c: MKtermsort.sh Caps
+	sh ${NCURSES}/progs/MKtermsort.sh \
+	    ${AWK} ${NCURSES}/include/Caps > $@
+
+transform.h:
+	echo "#define PROG_CAPTOINFO \"${CAPTOINFO}\"" >$@
+	echo "#define PROG_INFOTOCAP \"${INFOTOCAP}\"" >>$@
+	echo "#define PROG_RESET     \"${RESET}\""     >>$@
+	echo "#define PROG_INIT      \"${INIT}\""      >>$@
+
+# MAN page junk
+MAN1=	${PROG}.1
+
+MANFILTER= sed -e 's|@TERMINFO@|${TERMINFODIR}|g' \
+	       -e 's|@CLEAR@|${CLEAR}|g'
+
+# Generate the MAN1 links
+.for page in ${MAN1}
+${page:T}: ${page:S/^${NCPREFIX}//}
+	ln -s ${.ALLSRC} ${.TARGET}
+.endfor
+
+.include <bsd.prog.mk>
--- /dev/null	Fri May 17 08:37:42 2002
+++ usr.bin/ntset/Makefile	Fri May 17 07:03:27 2002
@@ -0,0 +1,55 @@
+# $FreeBSD$
+
+THIS=	tset
+
+.if exists(${.CURDIR}/../ntic/Makefile.nc)
+.include "${.CURDIR}/../ntic/Makefile.nc"
+.endif
+
+NCURSES=	${.CURDIR}/../../contrib/ncurses
+LIBNCURSES=	${.CURDIR}/../../lib/libncurses
+
+.PATH:	${NCURSES}/progs
+.PATH:	${NCURSES}/include
+.PATH:	${NCURSES}/man
+
+AWK?=	awk
+
+PROG=	${NCPREFIX}${THIS}
+SRCS=	${PROG:S/^${NCPREFIX}//}.c
+
+CFLAGS+= -I. -I${NCURSES}/progs -I${NCURSES}/include -I${LIBNCURSES}
+DPADD=	${LIBTERMCAP}
+LDADD=	-ltermcap
+
+LINKS=	${BINDIR}/${PROG} ${BINDIR}/${RESET}
+
+# Generated headers
+GENHDR=	ncurses_def.h transform.h
+
+CLEANFILES+= ${GENHDR}
+
+${PROG:S/^${NCPREFIX}//}.o: ${GENHDR}
+
+ncurses_def.h:  MKncurses_def.sh ncurses_defs
+	AWK=${AWK} sh ${NCURSES}/include/MKncurses_def.sh \
+	    ${NCURSES}/include/ncurses_defs > ncurses_def.h
+
+transform.h:
+	echo "#define PROG_CAPTOINFO \"${CAPTOINFO}\"" >$@
+	echo "#define PROG_INFOTOCAP \"${INFOTOCAP}\"" >>$@
+	echo "#define PROG_RESET     \"${RESET}\""     >>$@
+	echo "#define PROG_INIT      \"${INIT}\""      >>$@
+
+# MAN page junk
+MAN1=	${PROG}.1
+
+MANFILTER= sed -e 's|@TERMINFO@|${TERMINFODIR}|g'
+
+# Generate the MAN1 links
+.for page in ${MAN1}
+${page:T}: ${page:S/^${NCPREFIX}//}
+	ln -s ${.ALLSRC} ${.TARGET}
+.endfor
+
+.include <bsd.prog.mk>
--- /dev/null	Fri May 17 08:37:42 2002
+++ share/terminfo/Makefile	Fri May 17 08:35:27 2002
@@ -0,0 +1,29 @@
+# $FreeBSD$
+
+.if exists(${.CURDIR}/../../usr.bin/ntic/Makefile.nc)
+.include "${.CURDIR}/../../usr.bin/ntic/Makefile.nc"
+.endif
+
+NCURSES=	${.CURDIR}/../../contrib/ncurses
+
+.if defined(NO_TERMTYPES)
+TERMINFOSRC=	${NCURSES}/misc/terminfo.src
+.else
+TERMINFOSRC=	${.CURDIR}/termtypes.ti
+.endif
+
+TERMINFO=	terminfo.src
+
+FILES=		${TERMINFO}
+FILESDIR=	${BINDIR}/misc
+CLEANFILES+=	${FILES}
+
+all: ${FILES}
+
+${TERMINFO}: ${TERMINFOSRC}
+	ln -fs ${TERMINFOSRC} ${.TARGET}
+
+afterinstall:
+	${TIC} ${TERMINFO}
+
+.include <bsd.prog.mk>
>Release-Note:
>Audit-Trail:

From: Cyrille Lefevre <cyrille.lefevre@laposte.net>
To: Thomas Dickey <dickey@herndon4.his.com>
Cc: freebsd gnats <freebsd-gnats-submit@freebsd.org>,
	freebsd bugs <freebsd-bugs@freebsd.org>
Subject: Re: bin/38168: installing curses programs and terminfo database
Date: Mon, 20 May 2002 14:23:45 +0200 (CEST)

 --ELM1021897425-24078-0_
 Content-Transfer-Encoding: 7bit
 Content-Type: text/plain; charset=US-ASCII
 
 On May 17, 2002 03:30:47 pm -0400, Thomas Dickey wrote:
 > not exactly - a current (since early 2000) ncurses terminfo.src contains all
 > of the information in termtypes.ti, along with lots of bug-fixes that I made
 > while incorporating the information.  I use that to generate a corresponding
 > termcap.src (which appears to have fewer errors than FreeBSD's termcap file ;-)
 
 oops, you are right and I'm totally wrong... my apologies ;^)
 
 I've considered that the ncurses databases where obsolete because
 FreeBSD uses it's own termcap database instead of the ncurses one,
 while, in fact, it appear that ncurses databases are up-to-date.
 
 so, src/contrib/ncurses/misc/terminfo.src may be updated using
 this one :
 > ftp://invisible-island.net/ncurses/terminfo.src.gz
 850+ KB
 
 and src/contrib/ncurses/misc/termcap.src may be imported from :
 > ftp://invisible-island.net/ncurses/termcap.src.gz
 750+ KB
 
 humm! the first comment says :
 
 # This version of terminfo.src is distributed with ncurses.
                   ^^^^^^^^^^^^ should be termcap.src
 
 see attached patches which updated existing ones.
 
 Cyrille.
 -- 
 Cyrille Lefevre                 mailto:cyrille.lefevre@laposte.net
 
 --ELM1021897425-24078-0_
 Content-Transfer-Encoding: 7bit
 Content-Type: text/x-patch
 Content-Disposition: attachment; filename=ncurses-2.patch
 Content-Description: ncurses-2.patch
 
 --- usr.bin/nclear/Makefile.old	Fri May 17 07:02:46 2002
 +++ usr.bin/nclear/Makefile	Mon May 20 13:30:27 2002
 @@ -30,8 +30,7 @@
  ${PROG:S/^${NCPREFIX}//}.o: ${GENHDR}
  
  ncurses_def.h:  MKncurses_def.sh ncurses_defs
 -	AWK=${AWK} sh ${NCURSES}/include/MKncurses_def.sh \
 -	    ${NCURSES}/include/ncurses_defs > ncurses_def.h
 +	AWK=${AWK} sh ${.ALLSRC} > ${.TARGET}
  
  # MAN page junk
  MAN1=	${PROG}.1
 --- usr.bin/ninfocmp/Makefile.old	Fri May 17 07:02:54 2002
 +++ usr.bin/ninfocmp/Makefile	Mon May 20 13:38:08 2002
 @@ -30,16 +30,13 @@
  ${PROG:S/^${NCPREFIX}//}.o: ${GENHDR}
  
  ncurses_def.h:  MKncurses_def.sh ncurses_defs
 -	AWK=${AWK} sh ${NCURSES}/include/MKncurses_def.sh \
 -	    ${NCURSES}/include/ncurses_defs > ncurses_def.h
 +	AWK=${AWK} sh ${.ALLSRC} > ${.TARGET}
  
  parametrized.h: MKparametrized.sh Caps
 -	AWK=${AWK} sh ${NCURSES}/include/MKparametrized.sh \
 -	    ${NCURSES}/include/Caps > $@
 +	AWK=${AWK} sh ${.ALLSRC} > ${.TARGET}
  
  termsort.c: MKtermsort.sh Caps
 -	sh ${NCURSES}/progs/MKtermsort.sh \
 -	    ${AWK} ${NCURSES}/include/Caps > $@
 +	set ${.ALLSRC}; sh $$1 ${AWK} $$2 > ${.TARGET}
  
  # MAN page junk
  MAN1m=	${PROG}.1m
 --- usr.bin/ntic/Makefile.old	Mon May 20 13:36:27 2002
 +++ usr.bin/ntic/Makefile	Mon May 20 13:34:43 2002
 @@ -33,12 +33,10 @@
  ${PROG:S/^${NCPREFIX}//}.o: ${GENHDR}
  
  ncurses_def.h:  MKncurses_def.sh ncurses_defs
 -	AWK=${AWK} sh ${NCURSES}/include/MKncurses_def.sh \
 -	    ${NCURSES}/include/ncurses_defs > ncurses_def.h
 +	AWK=${AWK} sh ${.ALLSRC} > ${.TARGET}
  
  parametrized.h: MKparametrized.sh Caps
 -	AWK=${AWK} sh ${NCURSES}/include/MKparametrized.sh \
 -	    ${NCURSES}/include/Caps > $@
 +	AWK=${AWK} sh ${.ALLSRC} > ${.TARGET}
  
  transform.h:
  	echo "#define PROG_CAPTOINFO \"${CAPTOINFO}\"" >$@
 @@ -47,8 +45,7 @@
  	echo "#define PROG_INIT      \"${INIT}\""      >>$@
  
  termsort.c: MKtermsort.sh Caps
 -	sh ${NCURSES}/progs/MKtermsort.sh \
 -	    ${AWK} ${NCURSES}/include/Caps > $@
 +	set ${.ALLSRC}; sh $$1 ${AWK} $$2 > ${.TARGET}
  
  # MAN page junk
  MAN1m=	${PROG}.1m
 --- usr.bin/ntoe/Makefile.old	Mon May 20 13:39:35 2002
 +++ usr.bin/ntoe/Makefile	Mon May 20 13:38:38 2002
 @@ -30,8 +30,7 @@
  ${PROG:S/^${NCPREFIX}//}.o: ${GENHDR}
  
  ncurses_def.h:  MKncurses_def.sh ncurses_defs
 -	AWK=${AWK} sh ${NCURSES}/include/MKncurses_def.sh \
 -	    ${NCURSES}/include/ncurses_defs > ncurses_def.h
 +	AWK=${AWK} sh ${.ALLSRC} > ${.TARGET}
  
  # MAN page junk
  MAN1m=	${PROG}.1m
 --- usr.bin/ntput/Makefile.old	Fri May 17 07:03:17 2002
 +++ usr.bin/ntput/Makefile	Mon May 20 13:47:10 2002
 @@ -30,12 +30,10 @@
  ${PROG:S/^${NCPREFIX}//}.o: ${GENHDR}
  
  ncurses_def.h:  MKncurses_def.sh ncurses_defs
 -	AWK=${AWK} sh ${NCURSES}/include/MKncurses_def.sh \
 -	    ${NCURSES}/include/ncurses_defs > ncurses_def.h
 +	AWK=${AWK} sh ${.ALLSRC} > ${.TARGET}
  
  termsort.c: MKtermsort.sh Caps
 -	sh ${NCURSES}/progs/MKtermsort.sh \
 -	    ${AWK} ${NCURSES}/include/Caps > $@
 +	set ${.ALLSRC}; sh $$1 ${AWK} $$2 > ${.TARGET}
  
  transform.h:
  	echo "#define PROG_CAPTOINFO \"${CAPTOINFO}\"" >$@
 --- usr.bin/ntset/Makefile.old	Fri May 17 07:03:27 2002
 +++ usr.bin/ntset/Makefile	Mon May 20 13:42:25 2002
 @@ -32,8 +32,7 @@
  ${PROG:S/^${NCPREFIX}//}.o: ${GENHDR}
  
  ncurses_def.h:  MKncurses_def.sh ncurses_defs
 -	AWK=${AWK} sh ${NCURSES}/include/MKncurses_def.sh \
 -	    ${NCURSES}/include/ncurses_defs > ncurses_def.h
 +	AWK=${AWK} sh ${.ALLSRC} > ${.TARGET}
  
  transform.h:
  	echo "#define PROG_CAPTOINFO \"${CAPTOINFO}\"" >$@
 --- share/terminfo/Makefile.old	Fri May 17 08:35:27 2002
 +++ share/terminfo/Makefile	Sun May 19 08:00:20 2002
 @@ -6,9 +6,16 @@
  
  NCURSES=	${.CURDIR}/../../contrib/ncurses
  
 +.PATH:	${NCURSES}/include
 +.PATH:	${NCURSES}/man
 +
 +NO_TERMTYPES=	yes	# ncurses terminfo database appear to be up-to-date.
 +
  .if defined(NO_TERMTYPES)
 +# ftp://invisible-island.net/ncurses/terminfo.src.gz
  TERMINFOSRC=	${NCURSES}/misc/terminfo.src
  .else
 +# http://tuxedo.org/terminfo/termtypes.ti.gz
  TERMINFOSRC=	${.CURDIR}/termtypes.ti
  .endif
  
 @@ -16,7 +23,11 @@
  
  FILES=		${TERMINFO}
  FILESDIR=	${BINDIR}/misc
 -CLEANFILES+=	${FILES}
 +CLEANFILES+=	${FILES} ${MAN}
 +
 +MAN5=		terminfo.5
 +
 +MANFILTER=	sed -e 's|@TERMINFO@|${TERMINFODIR}|g'
  
  all: ${FILES}
  
 @@ -25,5 +36,9 @@
  
  afterinstall:
  	${TIC} ${TERMINFO}
 +
 +# sources order is important.
 +terminfo.5: MKterminfo.sh terminfo.head Caps terminfo.tail
 +	sh ${.ALLSRC} > ${.TARGET}
  
  .include <bsd.prog.mk>
 
 --ELM1021897425-24078-0_--

From: "Thomas E. Dickey" <dickey@herndon4.his.com>
To: Cyrille Lefevre <cyrille.lefevre@laposte.net>
Cc: freebsd gnats <freebsd-gnats-submit@freebsd.org>,
	freebsd bugs <freebsd-bugs@freebsd.org>
Subject: Re: bin/38168: installing curses programs and terminfo database
Date: Mon, 20 May 2002 09:38:33 -0400 (EDT)

 On Mon, 20 May 2002, Cyrille Lefevre wrote:
 
 > # This version of terminfo.src is distributed with ncurses.
 >                   ^^^^^^^^^^^^ should be termcap.src
 
 the termcap.src file is generated from the terminfo.src file (which
 actually contains some information which is used only for termcap).
 
 -- 
 T.E.Dickey <dickey@herndon4.his.com>
 http://invisible-island.net
 ftp://invisible-island.net
 

From: "Thomas E. Dickey" <dickey@herndon4.his.com>
To: Cyrille Lefevre <cyrille.lefevre@laposte.net>
Cc: freebsd gnats <freebsd-gnats-submit@freebsd.org>,
	freebsd bugs <freebsd-bugs@freebsd.org>
Subject: Re: bin/38168: installing curses programs and terminfo database
Date: Mon, 20 May 2002 09:38:59 -0400 (EDT)

 On Mon, 20 May 2002, Cyrille Lefevre wrote:
 
 > see attached patches which updated existing ones.
 
 will see - when I get home...
 
 -- 
 T.E.Dickey <dickey@herndon4.his.com>
 http://invisible-island.net
 ftp://invisible-island.net
 

From: Cyrille Lefevre <cyrille.lefevre@laposte.net>
To: freebsd gnats <freebsd-gnats-submit@freebsd.org>
Cc:  
Subject: Re: bin/38168: installing curses programs and terminfo database
Date: Thu, 11 Jul 2002 02:55:52 +0200

 message resent due to mta misconfigation.
 
 On Thu, Jul 11, 2002 at 01:52:48AM +0200, Cyrille Lefevre wrote:
 > humm! just seen that make depend don't work as expected. here is the fix.
 
 --- usr.bin/nclear/Makefile.old	Thu Jul 11 01:50:34 2002
 +++ usr.bin/nclear/Makefile	Tue Jul  9 22:43:36 2002
 @@ -27,7 +27,7 @@
  
  CLEANFILES+= ${GENHDR}
  
 -${PROG:S/^${NCPREFIX}//}.o: ${GENHDR}
 +beforedepend ${PROG:S/^${NCPREFIX}//}.o: ${GENHDR}
  
  ncurses_def.h:  MKncurses_def.sh ncurses_defs
  	AWK=${AWK} sh ${.ALLSRC} > ${.TARGET}
 --- usr.bin/ninfocmp/Makefile.old	Thu Jul 11 01:50:38 2002
 +++ usr.bin/ninfocmp/Makefile	Tue Jul  9 22:45:21 2002
 @@ -27,7 +27,7 @@
  
  CLEANFILES+= ${GENHDR}
  
 -${PROG:S/^${NCPREFIX}//}.o: ${GENHDR}
 +beforedepend ${PROG:S/^${NCPREFIX}//}.o: ${GENHDR}
  
  ncurses_def.h:  MKncurses_def.sh ncurses_defs
  	AWK=${AWK} sh ${.ALLSRC} > ${.TARGET}
 --- usr.bin/ntic/Makefile.old	Thu Jul 11 01:50:41 2002
 +++ usr.bin/ntic/Makefile	Tue Jul  9 22:43:19 2002
 @@ -30,7 +30,7 @@
  
  CLEANFILES+= ${GENHDR}
  
 -${PROG:S/^${NCPREFIX}//}.o: ${GENHDR}
 +beforedepend ${PROG:S/^${NCPREFIX}//}.o: ${GENHDR}
  
  ncurses_def.h:  MKncurses_def.sh ncurses_defs
  	AWK=${AWK} sh ${.ALLSRC} > ${.TARGET}
 --- usr.bin/ntoe/Makefile.old	Thu Jul 11 01:50:43 2002
 +++ usr.bin/ntoe/Makefile	Tue Jul  9 22:45:12 2002
 @@ -27,7 +27,7 @@
  
  CLEANFILES+= ${GENHDR}
  
 -${PROG:S/^${NCPREFIX}//}.o: ${GENHDR}
 +beforedepend ${PROG:S/^${NCPREFIX}//}.o: ${GENHDR}
  
  ncurses_def.h:  MKncurses_def.sh ncurses_defs
  	AWK=${AWK} sh ${.ALLSRC} > ${.TARGET}
 --- usr.bin/ntput/Makefile.old	Thu Jul 11 01:50:46 2002
 +++ usr.bin/ntput/Makefile	Tue Jul  9 22:45:53 2002
 @@ -27,7 +27,7 @@
  
  CLEANFILES+= ${GENHDR}
  
 -${PROG:S/^${NCPREFIX}//}.o: ${GENHDR}
 +beforedepend ${PROG:S/^${NCPREFIX}//}.o: ${GENHDR}
  
  ncurses_def.h:  MKncurses_def.sh ncurses_defs
  	AWK=${AWK} sh ${.ALLSRC} > ${.TARGET}
 --- usr.bin/ntset/Makefile.old	Thu Jul 11 01:50:49 2002
 +++ usr.bin/ntset/Makefile	Tue Jul  9 22:46:08 2002
 @@ -29,7 +29,7 @@
  
  CLEANFILES+= ${GENHDR}
  
 -${PROG:S/^${NCPREFIX}//}.o: ${GENHDR}
 +beforedepend ${PROG:S/^${NCPREFIX}//}.o: ${GENHDR}
  
  ncurses_def.h:  MKncurses_def.sh ncurses_defs
  	AWK=${AWK} sh ${.ALLSRC} > ${.TARGET}
 
 Cyrille.
 -- 
 Cyrille Lefevre                 mailto:cyrille.lefevre@laposte.net

Adding to audit trail from misfiled PR bin/89452:

Date: Tue, 22 Nov 2005 18:48:32 -0500
From: Thomas Dickey <dickey@his.com>

 I see this:
 
 >src/share/terminfo/termtypes.ti
 >new file
 >not provided since it is too big for a PR (800+ KB).
 >a newer one may be found at the following URL :
 >
 >http://tuxedo.org/~esr/terminfo/termtypes.ti.gz
 >
 >PS : since the src/contrib/ncurses/misc/terminfo.src terminfo
 >database is out-of-date, it isn't used by default.
 
 However, esr's source is several years out of date (also the URL).
 As I make changes to ncurses, I update these files:
 
 	ftp://invisible-island.net/ncurses/terminfo.src.gz
 	ftp://invisible-island.net/ncurses/termcap.src.gz
 
 The latter is generated of course.
 
 -- 
 Thomas E. Dickey <dickey@invisible-island.net>
 http://invisible-island.net
 ftp://invisible-island.net
>Unformatted:
