svn commit: r261296 - in head: gnu/usr.bin/dialog lib/ncurses share/mk usr.bin/systat usr.bin/vi usr.sbin/bsdinstall/distextract usr.sbin/bsdinstall/distfetch usr.sbin/bsdinstall/partedit usr.sbin/...
Brooks Davis
brooks at FreeBSD.org
Thu Jan 30 21:08:39 UTC 2014
Author: brooks
Date: Thu Jan 30 21:08:36 2014
New Revision: 261296
URL: http://svnweb.freebsd.org/changeset/base/261296
Log:
Merge from CheriBSD:
commit c1acf022c533c5ae27e0cd556977eafe3f5959eb
Author: Brooks Davis <brooks at 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.
MFC after: 4 weeks
Sponsored by: DARPA, AFRL
Modified:
head/gnu/usr.bin/dialog/Makefile
head/lib/ncurses/Makefile
head/share/mk/bsd.own.mk
head/usr.bin/systat/Makefile
head/usr.bin/systat/main.c
head/usr.bin/vi/Makefile
head/usr.sbin/bsdinstall/distextract/Makefile
head/usr.sbin/bsdinstall/distfetch/Makefile
head/usr.sbin/bsdinstall/partedit/Makefile
head/usr.sbin/tzsetup/Makefile
Modified: head/gnu/usr.bin/dialog/Makefile
==============================================================================
--- head/gnu/usr.bin/dialog/Makefile Thu Jan 30 20:54:56 2014 (r261295)
+++ head/gnu/usr.bin/dialog/Makefile Thu Jan 30 21:08:36 2014 (r261296)
@@ -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>
Modified: head/lib/ncurses/Makefile
==============================================================================
--- head/lib/ncurses/Makefile Thu Jan 30 20:54:56 2014 (r261295)
+++ head/lib/ncurses/Makefile Thu Jan 30 21:08:36 2014 (r261296)
@@ -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>
Modified: head/share/mk/bsd.own.mk
==============================================================================
--- head/share/mk/bsd.own.mk Thu Jan 30 20:54:56 2014 (r261295)
+++ head/share/mk/bsd.own.mk Thu Jan 30 21:08:36 2014 (r261296)
@@ -314,6 +314,7 @@ __DEFAULT_YES_OPTIONS = \
MAILWRAPPER \
MAKE \
MAN \
+ NCURSESW \
NDIS \
NETCAT \
NETGRAPH \
Modified: head/usr.bin/systat/Makefile
==============================================================================
--- head/usr.bin/systat/Makefile Thu Jan 30 20:54:56 2014 (r261295)
+++ head/usr.bin/systat/Makefile Thu Jan 30 21:08:36 2014 (r261296)
@@ -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>
Modified: head/usr.bin/systat/main.c
==============================================================================
--- head/usr.bin/systat/main.c Thu Jan 30 20:54:56 2014 (r261295)
+++ head/usr.bin/systat/main.c Thu Jan 30 21:08:36 2014 (r261296)
@@ -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) {
Modified: head/usr.bin/vi/Makefile
==============================================================================
--- head/usr.bin/vi/Makefile Thu Jan 30 20:54:56 2014 (r261295)
+++ head/usr.bin/vi/Makefile Thu Jan 30 21:08:36 2014 (r261296)
@@ -36,7 +36,7 @@ CFLAGS+=-I${.CURDIR} -I${SRCDIR} -I${SRC
DPADD= ${LIBUTIL}
LDADD= -lutil
-.if defined(RESCUE) || defined(RELEASE_CRUNCH)
+.if defined(RESCUE) || defined(RELEASE_CRUNCH) || ${MK_NCURSESW} == "no"
DPADD+= ${LIBNCURSES}
LDADD+= -lncurses
.else
Modified: head/usr.sbin/bsdinstall/distextract/Makefile
==============================================================================
--- head/usr.sbin/bsdinstall/distextract/Makefile Thu Jan 30 20:54:56 2014 (r261295)
+++ head/usr.sbin/bsdinstall/distextract/Makefile Thu Jan 30 21:08:36 2014 (r261296)
@@ -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>
Modified: head/usr.sbin/bsdinstall/distfetch/Makefile
==============================================================================
--- head/usr.sbin/bsdinstall/distfetch/Makefile Thu Jan 30 20:54:56 2014 (r261295)
+++ head/usr.sbin/bsdinstall/distfetch/Makefile Thu Jan 30 21:08:36 2014 (r261296)
@@ -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>
Modified: head/usr.sbin/bsdinstall/partedit/Makefile
==============================================================================
--- head/usr.sbin/bsdinstall/partedit/Makefile Thu Jan 30 20:54:56 2014 (r261295)
+++ head/usr.sbin/bsdinstall/partedit/Makefile Thu Jan 30 21:08:36 2014 (r261296)
@@ -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.
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>
Modified: head/usr.sbin/tzsetup/Makefile
==============================================================================
--- head/usr.sbin/tzsetup/Makefile Thu Jan 30 20:54:56 2014 (r261295)
+++ head/usr.sbin/tzsetup/Makefile Thu Jan 30 21:08:36 2014 (r261296)
@@ -7,7 +7,17 @@ CFLAGS+= -I${.CURDIR}/../../contrib/dial
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>
More information about the svn-src-all
mailing list