Skip to content

Commit

Permalink
Replace all uses of libncurses and libtermcap with their wide character
Browse files Browse the repository at this point in the history
variants.  This allows usable file system images (i.e. those with both a
shell and an editor) to be created with only one copy of the curses library.

Exp-run:	antoine
PR:		189842
Discussed with:	bapt
Sponsored by:	DARPA, AFRL
  • Loading branch information
brooksdavis committed Jul 17, 2014
1 parent 1dcd556 commit ea5a037
Show file tree
Hide file tree
Showing 41 changed files with 81 additions and 85 deletions.
4 changes: 2 additions & 2 deletions bin/csh/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ MLINKS= csh.1 tcsh.1
# utilities of the same name are handled with the associated manpage,
# builtin.1 in share/man/man1/.

DPADD= ${LIBTERMCAP} ${LIBCRYPT}
LDADD= -ltermcap -lcrypt
DPADD= ${LIBTERMCAPW} ${LIBCRYPT}
LDADD= -ltermcapw -lcrypt

LINKS= ${BINDIR}/csh ${BINDIR}/tcsh

Expand Down
4 changes: 2 additions & 2 deletions bin/ls/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ LDADD= -lutil
.if !defined(RELEASE_CRUNCH) && \
${MK_LS_COLORS} != no
CFLAGS+= -DCOLORLS
DPADD+= ${LIBTERMCAP}
LDADD+= -ltermcap
DPADD+= ${LIBTERMCAPW}
LDADD+= -ltermcapw
.endif

.include <bsd.prog.mk>
4 changes: 2 additions & 2 deletions bin/sh/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS}
# utilities of the same name are handled with the associated manpage,
# builtin.1 in share/man/man1/.

DPADD= ${LIBEDIT} ${LIBTERMCAP}
LDADD= -ledit -ltermcap
DPADD= ${LIBEDIT} ${LIBTERMCAPW}
LDADD= -ledit -ltermcapw

CFLAGS+=-DSHELL -I. -I${.CURDIR}
# for debug:
Expand Down
4 changes: 2 additions & 2 deletions games/grdc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

PROG= grdc
MAN= grdc.6
DPADD= ${LIBNCURSES}
LDADD= -lncurses
DPADD= ${LIBNCURSESW}
LDADD= -lncursesw

.include <bsd.prog.mk>
4 changes: 2 additions & 2 deletions gnu/lib/libreadline/readline/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ${.OBJDIR}/${_h}: ${SRCDIR}/${_h}
${INSTALL} ${.ALLSRC} ${.TARGET}
.endfor

DPADD= ${LIBTERMCAP}
LDADD= -ltermcap
DPADD= ${LIBTERMCAPW}
LDADD= -ltermcapw

.include <bsd.lib.mk>
4 changes: 2 additions & 2 deletions gnu/usr.bin/gdb/gdb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ GDBLIBS= ${OBJ_GDB}/libgdb/libgdb.a
# global symbols visible.
LDFLAGS+= -Wl,-E

DPADD= ${GDBLIBS} ${BULIBS} ${LIBM} ${LIBREADLINE} ${LIBTERMCAP} ${LIBGNUREGEX}
LDADD= ${GDBLIBS} ${BULIBS} -lm ${LIBREADLINE} -ltermcap -lgnuregex
DPADD= ${GDBLIBS} ${BULIBS} ${LIBM} ${LIBREADLINE} ${LIBTERMCAPW} ${LIBGNUREGEX}
LDADD= ${GDBLIBS} ${BULIBS} -lm ${LIBREADLINE} -ltermcapw -lgnuregex

NO_PIE= yes

Expand Down
4 changes: 2 additions & 2 deletions gnu/usr.bin/gdb/gdbtui/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ GDBLIBS= ${OBJ_GDB}/libgdb/libgdb.a
# global symbols visible.
LDFLAGS+= -Wl,-E

DPADD= ${GDBLIBS} ${BULIBS} ${LIBM} ${LIBREADLINE} ${LIBTERMCAP} ${LIBGNUREGEX}
LDADD= ${GDBLIBS} ${BULIBS} -lm ${LIBREADLINE} -ltermcap -lgnuregex
DPADD= ${GDBLIBS} ${BULIBS} ${LIBM} ${LIBREADLINE} ${LIBTERMCAPW} ${LIBGNUREGEX}
LDADD= ${GDBLIBS} ${BULIBS} -lm ${LIBREADLINE} -ltermcapw -lgnuregex

NO_PIE= yes

Expand Down
4 changes: 2 additions & 2 deletions gnu/usr.bin/gdb/kgdb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ BULIBS= ${OBJ_BU}/libbfd/libbfd.a ${OBJ_BU}/libopcodes/libopcodes.a \
${OBJ_BU}/libiberty/libiberty.a
GDBLIBS= ${OBJ_GDB}/libgdb/libgdb.a

DPADD= ${GDBLIBS} ${BULIBS} ${LIBKVM} ${LIBM} ${LIBREADLINE} ${LIBTERMCAP} \
DPADD= ${GDBLIBS} ${BULIBS} ${LIBKVM} ${LIBM} ${LIBREADLINE} ${LIBTERMCAPW} \
${LIBGNUREGEX}
LDADD= ${GDBLIBS} ${BULIBS} -lkvm${GDB_SUFFIX} -lm ${LIBREADLINE} -ltermcap \
LDADD= ${GDBLIBS} ${BULIBS} -lkvm${GDB_SUFFIX} -lm ${LIBREADLINE} -ltermcapw \
-lgnuregex

.if defined(GDB_CROSS_DEBUGGER)
Expand Down
4 changes: 2 additions & 2 deletions gnu/usr.bin/texinfo/info/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ SRCS= dir.c display.c doc.c dribble.c echo-area.c filesys.c \

CFLAGS+= -DINFODIR=\"${INFODIR}:/usr/local/info:.\"

DPADD= ${LIBTERMCAP} ${LIBTXI}
LDADD= -ltermcap ${LIBTXI}
DPADD= ${LIBTERMCAPW} ${LIBTXI}
LDADD= -ltermcapw ${LIBTXI}

NO_PIE= yes

Expand Down
4 changes: 2 additions & 2 deletions kerberos5/usr.bin/kadmin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/roken \
DPADD= ${LIBKADM5CLNT} ${LIBKADM5SRV} ${LIBHDB} ${LIBKRB5} ${LIBHX509} \
${LIBSL} ${LIBROKEN} ${LIBVERS} ${LIBASN1} \
${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} \
${LIBEDIT} ${LIBNCURSES} ${LDAPDPADD}
${LIBEDIT} ${LIBNCURSESW} ${LDAPDPADD}
LDADD= -lkadm5clnt -lkadm5srv -lhdb -lkrb5 -lhx509 \
${LIBSL} -lroken ${LIBVERS} -lasn1 \
-lcrypto -lcrypt -lcom_err \
-ledit -lncurses ${LDAPLDADD}
-ledit -lncursesw ${LDAPLDADD}
LDFLAGS=${LDAPLDFLAGS}

NO_PIE= yes
Expand Down
4 changes: 2 additions & 2 deletions lib/libedit/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ OSRCS= chared.c common.c el.c emacs.c fcns.c filecomplete.c help.c \
hist.c key.c map.c \
parse.c prompt.c read.c refresh.c search.c sig.c term.c tty.c vi.c

DPADD= ${LIBNCURSES}
LDADD= -lncurses
DPADD= ${LIBNCURSESW}
LDADD= -lncursesw

MAN= editline.3 editrc.5

Expand Down
4 changes: 2 additions & 2 deletions libexec/telnetd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ CFLAGS+= -I${TELNETDIR}

LIBTELNET= ${.OBJDIR}/../../lib/libtelnet/libtelnet.a

DPADD= ${LIBUTIL} ${LIBTERMCAP} ${LIBTELNET}
LDADD= -lutil -ltermcap ${LIBTELNET}
DPADD= ${LIBUTIL} ${LIBTERMCAPW} ${LIBTELNET}
LDADD= -lutil -ltermcapw ${LIBTELNET}

.if ${MK_OPENSSL} != "no"
SRCS+= authenc.c
Expand Down
4 changes: 2 additions & 2 deletions rescue/rescue/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ CRUNCH_SRCDIRS+= bin
CRUNCH_PROGS_bin= cat chflags chio chmod cp date dd df echo \
ed expr getfacl hostname kenv kill ln ls mkdir mv \
pkill ps pwd realpath rm rmdir setfacl sh stty sync test
CRUNCH_LIBS+= -lcrypt -ledit -ljail -lkvm -ll -ltermcap -lutil
CRUNCH_LIBS+= -lcrypt -ledit -ljail -lkvm -ll -ltermcapw -lutil
CRUNCH_BUILDTOOLS+= bin/sh

# Additional options for specific programs
Expand Down Expand Up @@ -118,7 +118,7 @@ CRUNCH_PROGS_sbin+= zpool
# crunchgen does not like C++ programs; this should be fixed someday
# CRUNCH_PROGS+= devd

CRUNCH_LIBS+= -lalias -lcam -lcurses -ldevstat -lipsec
CRUNCH_LIBS+= -lalias -lcam -lncursesw -ldevstat -lipsec
.if ${MK_ZFS} != "no"
CRUNCH_LIBS+= -lavl -lzfs_core -lzfs -lnvpair -lpthread -luutil -lumem
.endif
Expand Down
4 changes: 2 additions & 2 deletions sbin/fsdb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ SRCS= fsdb.c fsdbutil.c \
pass5.c setup.c utilities.c ffs_subr.c ffs_tables.c globs.c
CFLAGS+= -I${.CURDIR}/../fsck_ffs
WARNS?= 2
LDADD= -ledit -ltermcap
DPADD= ${LIBEDIT} ${LIBTERMCAP}
LDADD= -ledit -ltermcapw
DPADD= ${LIBEDIT} ${LIBTERMCAPW}
.PATH: ${.CURDIR}/../fsck_ffs ${.CURDIR}/../../sys/ufs/ffs

.include <bsd.prog.mk>
4 changes: 2 additions & 2 deletions sbin/gvinum/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ MAN= gvinum.8
WARNS?= 2
CFLAGS+= -I${.CURDIR}/../../sys -I${DESTDIR}/${INCLUDEDIR}/edit

DPADD= ${LIBEDIT} ${LIBTERMCAP} ${LIBDEVSTAT} ${LIBKVM} ${LIBGEOM}
LDADD= -ledit -ltermcap -ldevstat -lkvm -lgeom
DPADD= ${LIBEDIT} ${LIBTERMCAPW} ${LIBDEVSTAT} ${LIBKVM} ${LIBGEOM}
LDADD= -ledit -ltermcapw -ldevstat -lkvm -lgeom

.PATH: ${.CURDIR}/../../sys/geom/vinum

Expand Down
4 changes: 2 additions & 2 deletions secure/usr.bin/sftp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
SRCS+= roaming_dummy.c
.endif

DPADD= ${LIBSSH} ${LIBEDIT} ${LIBNCURSES}
LDADD= -lssh -ledit -lncurses
DPADD= ${LIBSSH} ${LIBEDIT} ${LIBNCURSESW}
LDADD= -lssh -ledit -lncursesw
USEPRIVATELIB= ssh

.if ${MK_LDNS} != "no"
Expand Down
4 changes: 2 additions & 2 deletions tools/bsdbox/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ CRUNCH_SRCDIRS+= bin
# statically - and that ends very badly.
CRUNCH_SHLIBS+= -lc -lutil -lcrypt
CRUNCH_LIBS+= -lkvm -lmemstat -lnetgraph
CRUNCH_LIBS+= -lcrypt -ledit -ll -ltermcap
CRUNCH_LIBS+= -lcrypt -ledit -ll -ltermcapw

###################################################################
# Programs from standard /sbin
Expand All @@ -70,7 +70,7 @@ CRUNCH_LIBS+= -lcrypt -ledit -ll -ltermcap
#
CRUNCH_SRCDIRS+= sbin

CRUNCH_LIBS+= -lalias -lcam -lcurses -ldevstat -lipsec
CRUNCH_LIBS+= -lalias -lcam -lcursesw -ldevstat -lipsec
# Don't forget this - ifconfig, etc -adrian
CRUNCH_LIBS+= -lgeom -lbsdxml -ljail -lkiconv -lmd -lsbuf -lufs

Expand Down
4 changes: 2 additions & 2 deletions tools/tools/net80211/stumbler/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

PROG= stumbler
BINDIR= /usr/local/bin
DPADD= ${LIBPCAP} ${LIBNCURSES}
LDADD= -lpcap -lncurses
DPADD= ${LIBPCAP} ${LIBNCURSESW}
LDADD= -lpcap -lncursesw
CFLAGS=-g
MAN=

Expand Down
4 changes: 2 additions & 2 deletions usr.bin/clang/clang.prog.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ DPADD+= ${.OBJDIR}/../../../lib/clang/lib${lib}/lib${lib}.a
LDADD+= ${.OBJDIR}/../../../lib/clang/lib${lib}/lib${lib}.a
.endfor

DPADD+= ${LIBNCURSES}
LDADD+= -lncurses
DPADD+= ${LIBNCURSESW}
LDADD+= -lncursesw

BINDIR?= /usr/bin

Expand Down
4 changes: 2 additions & 2 deletions usr.bin/ee/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ CFLAGS+= -DHAS_NCURSES -DHAS_UNISTD -DHAS_STDARG -DHAS_STDLIB \
PROG= ee
LINKS= ${BINDIR}/ee ${BINDIR}/ree ${BINDIR}/ee ${BINDIR}/edit
MLINKS= ee.1 ree.1 ee.1 edit.1
DPADD= ${LIBNCURSES}
LDADD= -lncurses
DPADD= ${LIBNCURSESW}
LDADD= -lncursesw

WARNS?= 2

Expand Down
4 changes: 2 additions & 2 deletions usr.bin/ftp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ CFLAGS+= -DINET6
.endif

CFLAGS+= -I${.CURDIR} -I${TNFTP}
LDADD= -ledit -ltermcap -lutil
DPADD= ${LIBEDIT} ${LIBTERMCAP} ${LIBUTIL}
LDADD= -ledit -ltermcapw -lutil
DPADD= ${LIBEDIT} ${LIBTERMCAPW} ${LIBUTIL}

WARNS?= 2

Expand Down
4 changes: 2 additions & 2 deletions usr.bin/less/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ SRCS= main.c screen.c brac.c ch.c charset.c cmdbuf.c command.c cvt.c \
signal.c tags.c ttyin.c version.c
SCRIPTS=lesspipe.sh zless.sh
SCRIPTSNAME_lesspipe.sh=lesspipe.sh
DPADD= ${LIBTERMCAP}
LDADD= -ltermcap
DPADD= ${LIBTERMCAPW}
LDADD= -ltermcapw
LINKS= ${BINDIR}/less ${BINDIR}/more \
${BINDIR}/zless ${BINDIR}/bzless \
${BINDIR}/zless ${BINDIR}/xzless \
Expand Down
4 changes: 2 additions & 2 deletions usr.bin/msgs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# $FreeBSD$

PROG= msgs
DPADD= ${LIBTERMCAP}
LDADD= -ltermcap
DPADD= ${LIBTERMCAPW}
LDADD= -ltermcapw

.include <bsd.prog.mk>
4 changes: 2 additions & 2 deletions usr.bin/ncal/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

PROG= ncal

DPADD= ${LIBCALENDAR} ${LIBTERMCAP}
LDADD= -lcalendar -ltermcap
DPADD= ${LIBCALENDAR} ${LIBTERMCAPW}
LDADD= -lcalendar -ltermcapw

LINKS= ${BINDIR}/ncal ${BINDIR}/cal
MLINKS= ncal.1 cal.1
Expand Down
4 changes: 2 additions & 2 deletions usr.bin/tabs/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# $FreeBSD$

PROG= tabs
DPADD= ${LIBTERMCAP}
LDADD= -ltermcap
DPADD= ${LIBTERMCAPW}
LDADD= -ltermcapw

.include <bsd.prog.mk>
4 changes: 2 additions & 2 deletions usr.bin/telnet/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ WARNS?= 2

LIBTELNET= ${.OBJDIR}/../../lib/libtelnet/libtelnet.a

DPADD= ${LIBTERMCAP} ${LIBTELNET}
LDADD= -ltermcap ${LIBTELNET}
DPADD= ${LIBTERMCAPW} ${LIBTELNET}
LDADD= -ltermcapw ${LIBTELNET}

.if !defined(RELEASE_CRUNCH)
CFLAGS+= -DIPSEC
Expand Down
4 changes: 2 additions & 2 deletions usr.bin/tftp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PROG= tftp
SRCS= main.c tftp-file.c tftp-io.c tftp-options.c tftp-transfer.c
SRCS+= tftp-utils.c tftp.c
CFLAGS+=-I${.CURDIR}/../../libexec/tftpd
DPADD= ${LIBEDIT} ${LIBTERMCAP}
LDADD= -ledit -ltermcap
DPADD= ${LIBEDIT} ${LIBTERMCAPW}
LDADD= -ledit -ltermcapw

.include <bsd.prog.mk>
4 changes: 2 additions & 2 deletions usr.bin/tput/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# $FreeBSD$

PROG= tput
DPADD= ${LIBTERMCAP}
LDADD= -ltermcap
DPADD= ${LIBTERMCAPW}
LDADD= -ltermcapw
SCRIPTS=clear.sh
MLINKS= tput.1 clear.1

Expand Down
5 changes: 3 additions & 2 deletions usr.bin/tset/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# @(#)Makefile 8.1 (Berkeley) 6/9/93
# $FreeBSD$

PROG= tset
SRCS= map.c misc.c set.c term.c tset.c wrterm.c

DPADD= ${LIBTERMCAP}
LDADD= -ltermcap
DPADD= ${LIBTERMCAPW}
LDADD= -ltermcapw
LINKS= ${BINDIR}/tset ${BINDIR}/reset
MLINKS= tset.1 reset.1

Expand Down
4 changes: 2 additions & 2 deletions usr.bin/ul/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

PROG= ul

DPADD= ${LIBTERMCAP}
LDADD= -ltermcap
DPADD= ${LIBTERMCAPW}
LDADD= -ltermcapw

.include <bsd.prog.mk>
4 changes: 2 additions & 2 deletions usr.bin/units/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ PROG= units
FILES= units.lib
FILESDIR= ${SHAREDIR}/misc

LDADD+=-ledit -ltermcap
DPADD+=${LIBEDIT} ${LIBTERMCAP}
LDADD+=-ledit -ltermcapw
DPADD+=${LIBEDIT} ${LIBTERMCAPW}

.if ${MK_TESTS} != "no"
SUBDIR+= tests
Expand Down
5 changes: 0 additions & 5 deletions usr.bin/vi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,9 @@ CFLAGS+=-I${.CURDIR} -I${SRCDIR} -I${SRCDIR}/regex
DPADD= ${LIBUTIL}
LDADD= -lutil

.if defined(RESCUE) || defined(RELEASE_CRUNCH)
DPADD+= ${LIBNCURSES}
LDADD+= -lncurses
.else
CFLAGS+= -DUSE_WIDECHAR
DPADD+= ${LIBNCURSESW}
LDADD+= -lncursesw
.endif

.if ${MK_ICONV} == "yes" && !defined(RESCUE) && !defined(RELEASE_CRUNCH)
CFLAGS+= -DUSE_ICONV
Expand Down
4 changes: 2 additions & 2 deletions usr.sbin/cdcontrol/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

PROG= cdcontrol

DPADD= ${LIBEDIT} ${LIBTERMCAP}
LDADD= -ledit -ltermcap
DPADD= ${LIBEDIT} ${LIBTERMCAPW}
LDADD= -ledit -ltermcapw

.include <bsd.prog.mk>
4 changes: 2 additions & 2 deletions usr.sbin/lpr/lpc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ CFLAGS+= -I${.CURDIR}/../common_source

WARNS?= 0

DPADD= ${LIBLPR} ${LIBEDIT} ${LIBTERMCAP}
LDADD= ${LIBLPR} -ledit -ltermcap
DPADD= ${LIBLPR} ${LIBEDIT} ${LIBTERMCAPW}
LDADD= ${LIBLPR} -ledit -ltermcapw

NO_PIE= yes

Expand Down
Loading

0 comments on commit ea5a037

Please sign in to comment.