bin/71801: Add ncurses utility programs: infocmp, tic and toe.
Thierry Thomas
thierry at FreeBSD.org
Thu Sep 16 13:40:20 PDT 2004
>Number: 71801
>Category: bin
>Synopsis: Add ncurses utility programs: infocmp, tic and toe.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Thu Sep 16 20:40:19 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator: Thierry Thomas
>Release: FreeBSD 5.3-BETA4
>Organization:
FreeBSD
>Environment:
System: FreeBSD ws90bj.pompo.net 5.3-BETA4 FreeBSD 5.3-BETA4 #0: Thu Sep 16 00:17:00 CEST 2004 thierry at ws90bj.pompo.net:/usr/obj/usr/src/sys/WS90BJ-040826 i386
>Description:
- tic is the the terminfo entry-description compiler;
- toe lists the table of terminfo entries;
- infocmp compares or prints out terminfo descriptions.
infotocap and captoinfo are links to tic:
- captoinfo converts a termcap description into a terminfo description;
- infotocap converts a terminfo description into a termcap description.
Reason:
- the port x11/rxvt-unicode needs tic to add an entry for itself; without
it, its $TERM must be defined as rxvt;
- the port devel/ncurses cannot be packaged: "conflicts with system ncurses".
Remarks:
- no initial terminfo database is installed;
- these programs are installed by compat/linux.
Next step will be to upgrade the base libncurses to a version supporting
wide chars, but this is another story...
>How-To-Repeat:
N/A.
>Fix:
Please apply the following patch:
--- ncurses.diff begins here ---
diff -urN src.orig/usr.bin/Makefile src/usr.bin/Makefile
--- src.orig/usr.bin/Makefile Thu Jul 8 00:48:30 2004
+++ src/usr.bin/Makefile Wed Sep 15 21:51:18 2004
@@ -76,6 +76,7 @@
${_host} \
id \
indent \
+ infocmp \
ipcrm \
ipcs \
join \
@@ -173,8 +174,10 @@
tee \
telnet \
tftp \
+ tic \
time \
tip \
+ toe \
top \
touch \
tput \
diff -urN src.orig/usr.bin/infocmp/Makefile src/usr.bin/infocmp/Makefile
--- src.orig/usr.bin/infocmp/Makefile Thu Jan 1 01:00:00 1970
+++ src/usr.bin/infocmp/Makefile Thu Sep 16 21:21:35 2004
@@ -0,0 +1,58 @@
+# $FreeBSD$
+
+NCURSES= ${.CURDIR}/../../contrib/ncurses
+LIBCURD= ${.CURDIR}/../../lib/libncurses
+INFOCMPDIR= ${NCURSES}/progs
+.PATH: ${INFOCMPDIR}
+.PATH: ${NCURSES}/man
+
+PROG= infocmp
+CFLAGS+= -DNDEBUG -I. -I${INFOCMPDIR} -I${NCURSES}/include -I${LIBCURD}
+
+DPADD= ${LIBNCURSES}
+LDADD= -lncurses
+
+AWK?= awk
+TERMINFODIR?= ${SHAREDIR}/misc
+
+GENHDR = ncurses_def.h \
+ parametrized.h \
+ transform.h
+GENSRC = termsort.c
+
+SRCS= ${GENHDR} \
+ dump_entry.c \
+ infocmp.c
+
+CLEANFILES+= ${GENHDR} ${GENSRC}
+MANFILTER= sed -e 's|@TERMINFO@|${TERMINFODIR}/terminfo|g' \
+ -e 's|1M|1|g;s|(3X)|(3)|g'
+
+MANm= infocmp.1m
+# Generate the MAN list from MANm
+.for page in ${MANm}
+CLEANFILES+=${page:T:S/m$//}
+MAN+=${page:T:S/m$//}
+${page:T:S/m$//}: ${page}
+ cat ${.ALLSRC} > ${.TARGET}
+.endfor
+
+# Generated headers
+ncurses_def.h:
+ AWK=${AWK} sh ${NCURSES}/include/MKncurses_def.sh \
+ ${NCURSES}/include/ncurses_defs > ncurses_def.h
+
+parametrized.h:
+ AWK=${AWK} sh ${NCURSES}/include/MKparametrized.sh \
+ ${NCURSES}/include/Caps > $@
+
+termsort.c: $(INFOCMPDIR)/MKtermsort.sh
+ sh -c "$(INFOCMPDIR)/MKtermsort.sh $(AWK) $(NCURSES)/include/Caps" >$@
+
+transform.h: termsort.c
+ echo "#define PROG_CAPTOINFO \"captoinfo\"" > $@
+ echo "#define PROG_INFOTOCAP \"infotocap\"" >>$@
+ echo "#define PROG_RESET \"reset\"" >>$@
+ echo "#define PROG_INIT \"init\"" >>$@
+
+.include <bsd.prog.mk>
diff -urN src.orig/usr.bin/tic/Makefile src/usr.bin/tic/Makefile
--- src.orig/usr.bin/tic/Makefile Thu Jan 1 01:00:00 1970
+++ src/usr.bin/tic/Makefile Thu Sep 16 21:08:25 2004
@@ -0,0 +1,65 @@
+# $FreeBSD$
+
+NCURSES= ${.CURDIR}/../../contrib/ncurses
+LIBCURD= ${.CURDIR}/../../lib/libncurses
+TICDIR= ${NCURSES}/progs
+.PATH: ${TICDIR}
+.PATH: ${NCURSES}/man
+
+PROG= tic
+CFLAGS+= -DNDEBUG -I. -I${TICDIR} -I${NCURSES}/include -I${LIBCURD}
+
+DPADD= ${LIBNCURSES}
+LDADD= -lncurses
+
+LINKS= ${BINDIR}/tic ${BINDIR}/infotocap
+LINKS+= ${BINDIR}/tic ${BINDIR}/captoinfo
+
+AWK?= awk
+TERMINFODIR?= ${SHAREDIR}/misc
+
+GENHDR = ncurses_def.h \
+ parametrized.h \
+ transform.h
+GENSRC = termsort.c
+
+SRCS= ${GENHDR} \
+ dump_entry.c \
+ tic.c
+
+CLEANFILES+= ${GENHDR} ${GENSRC}
+MANFILTER= sed -e 's|@TERMINFO@|${TERMINFODIR}/terminfo|g' \
+ -e 's|@INFOCMP@|infocmp|g' \
+ -e 's|@CAPTOINFO@|captoinfo|g' \
+ -e 's|@INFOTOCAP@|infotocap|g' \
+ -e 's|@TOE@|toe|g' \
+ -e 's|1M|1|g;s|(3X)|(3)|g'
+
+MANm= captoinfo.1m infotocap.1m tic.1m
+# Generate the MAN list from MANm
+.for page in ${MANm}
+CLEANFILES+=${page:T:S/m$//}
+MAN+=${page:T:S/m$//}
+${page:T:S/m$//}: ${page}
+ cat ${.ALLSRC} > ${.TARGET}
+.endfor
+
+# Generated headers
+ncurses_def.h:
+ AWK=${AWK} sh ${NCURSES}/include/MKncurses_def.sh \
+ ${NCURSES}/include/ncurses_defs > ncurses_def.h
+
+parametrized.h:
+ AWK=${AWK} sh ${NCURSES}/include/MKparametrized.sh \
+ ${NCURSES}/include/Caps > $@
+
+termsort.c: $(TICDIR)/MKtermsort.sh
+ sh -c "$(TICDIR)/MKtermsort.sh $(AWK) $(NCURSES)/include/Caps" >$@
+
+transform.h: termsort.c
+ echo "#define PROG_CAPTOINFO \"captoinfo\"" > $@
+ echo "#define PROG_INFOTOCAP \"infotocap\"" >>$@
+ echo "#define PROG_RESET \"reset\"" >>$@
+ echo "#define PROG_INIT \"init\"" >>$@
+
+.include <bsd.prog.mk>
diff -urN src.orig/usr.bin/toe/Makefile src/usr.bin/toe/Makefile
--- src.orig/usr.bin/toe/Makefile Thu Jan 1 01:00:00 1970
+++ src/usr.bin/toe/Makefile Thu Sep 16 21:11:58 2004
@@ -0,0 +1,62 @@
+# $FreeBSD$
+
+NCURSES= ${.CURDIR}/../../contrib/ncurses
+LIBCURD= ${.CURDIR}/../../lib/libncurses
+TOEDIR= ${NCURSES}/progs
+.PATH: ${TOEDIR}
+.PATH: ${NCURSES}/man
+
+PROG= toe
+CFLAGS+= -DNDEBUG -I. -I${TOEDIR} -I${NCURSES}/include -I${LIBCURD}
+
+DPADD= ${LIBNCURSES}
+LDADD= -lncurses
+
+AWK?= awk
+TERMINFODIR?= ${SHAREDIR}/misc
+
+GENHDR = ncurses_def.h \
+ parametrized.h \
+ transform.h
+GENSRC = termsort.c
+
+SRCS= ${GENHDR} \
+ dump_entry.c \
+ toe.c
+
+CLEANFILES+= ${GENHDR} ${GENSRC}
+MANFILTER= sed -e 's|@TERMINFO@|${TERMINFODIR}/terminfo|g' \
+ -e 's|@INFOCMP@|infocmp|g' \
+ -e 's|@CAPTOINFO@|captoinfo|g' \
+ -e 's|@INFOTOCAP@|infotocap|g' \
+ -e 's|@TIC@|tic|g' \
+ -e 's|1M|1|g;s|(3X)|(3)|g'
+
+MANm= toe.1m
+# Generate the MAN list from MANm
+.for page in ${MANm}
+CLEANFILES+=${page:T:S/m$//}
+MAN+=${page:T:S/m$//}
+${page:T:S/m$//}: ${page}
+ cat ${.ALLSRC} > ${.TARGET}
+.endfor
+
+# Generated headers
+ncurses_def.h:
+ AWK=${AWK} sh ${NCURSES}/include/MKncurses_def.sh \
+ ${NCURSES}/include/ncurses_defs > ncurses_def.h
+
+parametrized.h:
+ AWK=${AWK} sh ${NCURSES}/include/MKparametrized.sh \
+ ${NCURSES}/include/Caps > $@
+
+termsort.c: $(TOEDIR)/MKtermsort.sh
+ sh -c "$(TOEDIR)/MKtermsort.sh $(AWK) $(NCURSES)/include/Caps" >$@
+
+transform.h: termsort.c
+ echo "#define PROG_CAPTOINFO \"captoinfo\"" > $@
+ echo "#define PROG_INFOTOCAP \"infotocap\"" >>$@
+ echo "#define PROG_RESET \"reset\"" >>$@
+ echo "#define PROG_INIT \"init\"" >>$@
+
+.include <bsd.prog.mk>
--- ncurses.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list