Bug 38168

Summary: [patch] [request] installing curses-based versions of programs and terminfo database
Product: Base System Reporter: Cyrille Lefevre <cyrille.lefevre>
Component: binAssignee: Baptiste Daroussin <bapt>
Status: Closed FIXED    
Severity: Affects Only Me CC: jbeich
Priority: Normal    
Version: 4.6-PRERELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff
none
ncurses-2.patch none

Description Cyrille Lefevre 2002-05-17 08:00:12 UTC
	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.

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 ...
How-To-Repeat: 	n/a
Comment 1 Cyrille Lefevre 2002-05-20 13:23:45 UTC
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
Comment 2 dickey 2002-05-20 14:38:33 UTC
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
Comment 3 dickey 2002-05-20 14:38:59 UTC
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
Comment 4 Cyrille Lefevre 2002-07-11 01:55:52 UTC
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
Comment 5 Thomas E. Dickey 2005-11-22 23:48:32 UTC
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
Comment 6 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:43 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 7 Jan Beich freebsd_committer freebsd_triage 2021-02-26 19:32:56 UTC
FreeBSD >= 14 enabled terminfo and *replaced* tput/tset/etc with ncurses versions.
https://cgit.FreeBSD.org/src/commit/?id=61f66a1f4403fded9aae14d890ad96914a3c0bc1
https://cgit.FreeBSD.org/src/commit/?id=2a50a9de8340f08bd876e9e5993332ae14376f80