MFC r261296:

Merge from CheriBSD:
commit c1acf022c5
Author: Brooks Davis <brooks@one-eyed-alien.net>
Date:   Fri Jan 17 21:46:44 2014 +0000

	Add an option WITHOUT_NCURSESW to suppress building and linking to
	libncursesw.  While wide character support it useful we'd like to
	only need one ncurses library on embedded systems.

Sponsored by:	DARPA, AFRL
This commit is contained in:
Brooks Davis 2014-03-01 03:09:16 +00:00
parent 03240cdb60
commit 25821aeb14
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=262643
10 changed files with 84 additions and 15 deletions

View File

@ -3,11 +3,21 @@
DIALOG= ${.CURDIR}/../../../contrib/dialog
PROG= dialog
DPADD= ${LIBDIALOG} ${LIBNCURSESW} ${LIBM}
LDADD= -ldialog -lncursesw -lm
DPADD= ${LIBDIALOG} ${LIBM}
LDADD= -ldialog -lm
CFLAGS+= -I${.CURDIR} -I${DIALOG}
.PATH: ${DIALOG}
WARNS?= 6
.include <bsd.own.mk>
.if ${MK_NCURSESW} == "no"
DPADD+= ${LIBNCURSES}
LDADD+= -lncurses
.else
DPADD+= ${LIBNCURSESW}
LDADD+= -lncursesw
.endif
.include <bsd.prog.mk>

View File

@ -1,6 +1,11 @@
# $FreeBSD$
SUBDIR= ncurses form menu panel \
ncursesw formw menuw panelw
.include <bsd.own.mk>
SUBDIR= ncurses form menu panel
.if ${MK_NCURSESW} != "no"
SUBDIR+= ncursesw formw menuw panelw
.endif
.include <bsd.subdir.mk>

View File

@ -313,6 +313,7 @@ __DEFAULT_YES_OPTIONS = \
MAILWRAPPER \
MAKE \
MAN \
NCURSESW \
NDIS \
NETCAT \
NETGRAPH \

View File

@ -16,7 +16,16 @@ CFLAGS+= -DINET6
WARNS?= 0
DPADD= ${LIBNCURSESW} ${LIBM} ${LIBDEVSTAT} ${LIBKVM}
LDADD= -lncursesw -lm -ldevstat -lkvm
DPADD= ${LIBM} ${LIBDEVSTAT} ${LIBKVM}
LDADD= -lm -ldevstat -lkvm
.if ${MK_NCURSESW} == "no"
DPADD+= ${LIBNCURSES}
LDADD+= -lncurses
.else
CFLAGS+= -DUSE_WIDECHAR
DPADD+= ${LIBNCURSESW}
LDADD+= -lncursesw
.endif
.include <bsd.prog.mk>

View File

@ -84,7 +84,11 @@ main(int argc, char **argv)
size_t size;
double t;
#ifdef USE_WIDECHAR
(void) setlocale(LC_ALL, "");
#else
(void) setlocale(LC_TIME, "");
#endif
argc--, argv++;
while (argc > 0) {

View File

@ -36,7 +36,7 @@ CFLAGS+=-I${.CURDIR} -I${SRCDIR} -I${SRCDIR}/regex
DPADD= ${LIBUTIL}
LDADD= -lutil
.if defined(RESCUE) || defined(RELEASE_CRUNCH)
.if defined(RESCUE) || defined(RELEASE_CRUNCH) || ${MK_NCURSESW} == "no"
DPADD+= ${LIBNCURSES}
LDADD+= -lncurses
.else

View File

@ -2,10 +2,20 @@
BINDIR= /usr/libexec/bsdinstall
PROG= distextract
DPADD= ${LIBARCHIVE} ${LIBNCURSESW} ${LIBDIALOG} ${LIBM}
LDADD= -larchive -lncursesw -ldialog -lm
DPADD= ${LIBARCHIVE} ${LIBDIALOG} ${LIBM}
LDADD= -larchive -ldialog -lm
WARNS?= 6
NO_MAN= true
.include <bsd.own.mk>
.if ${MK_NCURSESW} == "no"
DPADD+= ${LIBNCURSES}
LDADD+= -lncurses
.else
DPADD+= ${LIBNCURSESW}
LDADD+= -lncursesw
.endif
.include <bsd.prog.mk>

View File

@ -2,10 +2,20 @@
BINDIR= /usr/libexec/bsdinstall
PROG= distfetch
DPADD= ${LIBFETCH} ${LIBNCURSESW} ${LIBDIALOG} ${LIBM}
LDADD= -lfetch -lncursesw -ldialog -lm
DPADD= ${LIBFETCH} ${LIBDIALOG} ${LIBM}
LDADD= -lfetch -ldialog -lm
WARNS?= 6
NO_MAN= true
.include <bsd.own.mk>
.if ${MK_NCURSESW} == "no"
DPADD+= ${LIBNCURSES}
LDADD+= -lncurses
.else
DPADD+= ${LIBNCURSESW}
LDADD+= -lncursesw
.endif
.include <bsd.prog.mk>

View File

@ -5,8 +5,8 @@ PROG= partedit
LINKS= ${BINDIR}/partedit ${BINDIR}/autopart \
${BINDIR}/partedit ${BINDIR}/scriptedpart
SYMLINKS= ${BINDIR}/partedit /usr/sbin/sade
DPADD= ${LIBGEOM} ${LIBNCURSESW} ${LIBUTIL} ${LIBDIALOG} ${LIBM}
LDADD= -lgeom -lncursesw -lutil -ldialog -lm
DPADD= ${LIBGEOM} ${LIBUTIL} ${LIBDIALOG} ${LIBM}
LDADD= -lgeom -lutil -ldialog -lm
PARTEDIT_ARCH= ${MACHINE}
.if ${MACHINE} == "i386" || ${MACHINE} == "amd64"
@ -22,4 +22,14 @@ SRCS= diskeditor.c partedit.c gpart_ops.c partedit_${PARTEDIT_ARCH}.c \
WARNS?= 3
MAN= sade.8
.include <bsd.own.mk>
.if ${MK_NCURSESW} == "no"
DPADD+= ${LIBNCURSES}
LDADD+= -lncurses
.else
DPADD+= ${LIBNCURSESW}
LDADD+= -lncursesw
.endif
.include <bsd.prog.mk>

View File

@ -7,7 +7,17 @@ CFLAGS+= -I${.CURDIR}/../../contrib/dialog -I.
WARNS?= 3
DPADD= ${LIBDIALOG} ${LIBNCURSESW} ${LIBM}
LDADD= -ldialog -lncursesw -lm
DPADD= ${LIBDIALOG} ${LIBM}
LDADD= -ldialog -lm
.include <bsd.own.mk>
.if ${MK_NCURSESW} == "no"
DPADD+= ${LIBNCURSES}
LDADD+= -lncurses
.else
DPADD+= ${LIBNCURSESW}
LDADD+= -lncursesw
.endif
.include <bsd.prog.mk>