Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 May 2002 08:52:55 +0200 (CEST)
From:      Cyrille Lefevre <cyrille.lefevre@laposte.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/38168: installing curses programs and terminfo database
Message-ID:  <200205170652.g4H6qtcg012900@gits.gits.dyndns.org>

next in thread | raw e-mail | index | archive | help

>Number:         38168
>Category:       bin
>Synopsis:       installing curses 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:
>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:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200205170652.g4H6qtcg012900>