summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ncurses/Makefile3
-rw-r--r--lib/ncurses/config.mk7
-rw-r--r--lib/ncurses/form/Makefile6
-rw-r--r--lib/ncurses/formw/Makefile5
-rw-r--r--lib/ncurses/menu/Makefile6
-rw-r--r--lib/ncurses/menuw/Makefile5
-rw-r--r--lib/ncurses/ncurses/Makefile156
-rw-r--r--lib/ncurses/ncurses/ncurses_cfg.h13
-rw-r--r--lib/ncurses/ncursesw/Makefile7
-rw-r--r--lib/ncurses/panel/Makefile6
-rw-r--r--lib/ncurses/panelw/Makefile5
11 files changed, 195 insertions, 24 deletions
diff --git a/lib/ncurses/Makefile b/lib/ncurses/Makefile
index f711776..05cd7a2 100644
--- a/lib/ncurses/Makefile
+++ b/lib/ncurses/Makefile
@@ -1,5 +1,6 @@
# $FreeBSD$
-SUBDIR= ncurses form menu panel
+SUBDIR= ncurses form menu panel \
+ ncursesw formw menuw panelw
.include <bsd.subdir.mk>
diff --git a/lib/ncurses/config.mk b/lib/ncurses/config.mk
index 15d9547..7bc7d01 100644
--- a/lib/ncurses/config.mk
+++ b/lib/ncurses/config.mk
@@ -4,7 +4,14 @@
NCURSES_DIR= ${.CURDIR}/../../../contrib/ncurses
+.if defined(ENABLE_WIDEC)
+LIB_SUFFIX= w
+CFLAGS+= -D_XOPEN_SOURCE_EXTENDED -DENABLE_WIDEC
+NCURSES_CFG_H= ${.CURDIR}/../ncurses/ncurses_cfg.h
+.else
+LIB_SUFFIX=
NCURSES_CFG_H= ${.CURDIR}/ncurses_cfg.h
+.endif
CFLAGS+= -I.
.if exists(${.OBJDIR}/../ncurses${LIB_SUFFIX})
diff --git a/lib/ncurses/form/Makefile b/lib/ncurses/form/Makefile
index d89b96b..faeb973 100644
--- a/lib/ncurses/form/Makefile
+++ b/lib/ncurses/form/Makefile
@@ -4,7 +4,7 @@
SRCDIR= ${NCURSES_DIR}/form
-LIB= form
+LIB= form${LIB_SUFFIX}
.PATH: ${SRCDIR}
SRCS= \
@@ -54,8 +54,8 @@ CLEANFILES= ncurses_def.h
CFLAGS+= -I${SRCDIR}
CFLAGS+= -I${NCURSES_DIR}/menu
-DPADD= ${LIBNCURSES}
-LDADD= -lncurses
+DPADD= ${LIBNCURSES${LIB_SUFFIX:U}}
+LDADD= -lncurses${LIB_SUFFIX}
INCS= form.h
diff --git a/lib/ncurses/formw/Makefile b/lib/ncurses/formw/Makefile
new file mode 100644
index 0000000..5488503
--- /dev/null
+++ b/lib/ncurses/formw/Makefile
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+ENABLE_WIDEC=
+
+.include "${.CURDIR}/../form/Makefile"
diff --git a/lib/ncurses/menu/Makefile b/lib/ncurses/menu/Makefile
index 29dde8a..96bd0d0 100644
--- a/lib/ncurses/menu/Makefile
+++ b/lib/ncurses/menu/Makefile
@@ -4,7 +4,7 @@
SRCDIR= ${NCURSES_DIR}/menu
-LIB= menu
+LIB= menu${LIB_SUFFIX}
.PATH: ${SRCDIR}
SRCS= \
@@ -40,8 +40,8 @@ CLEANFILES= ncurses_def.h
CFLAGS+= -I${SRCDIR}
-DPADD= ${LIBNCURSES}
-LDADD= -lncurses
+DPADD= ${LIBNCURSES${LIB_SUFFIX:U}}
+LDADD= -lncurses${LIB_SUFFIX}
INCS= menu.h eti.h
diff --git a/lib/ncurses/menuw/Makefile b/lib/ncurses/menuw/Makefile
new file mode 100644
index 0000000..d5a100f
--- /dev/null
+++ b/lib/ncurses/menuw/Makefile
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+ENABLE_WIDEC=
+
+.include "${.CURDIR}/../menu/Makefile"
diff --git a/lib/ncurses/ncurses/Makefile b/lib/ncurses/ncurses/Makefile
index 81b89b6..bdf0be6 100644
--- a/lib/ncurses/ncurses/Makefile
+++ b/lib/ncurses/ncurses/Makefile
@@ -6,7 +6,7 @@ SHLIBDIR?= /lib
.include "${.CURDIR}/../config.mk"
-LIB= ncurses
+LIB= ncurses${LIB_SUFFIX}
SHLIB_MAJOR= 6
NO_LINT=
@@ -16,8 +16,13 @@ NCURSES_MINOR!= egrep 'NCURSES_MINOR[ ]*=' ${NCURSES_DIR}/dist.mk | sed -e 's%^
NCURSES_PATCH!= egrep 'NCURSES_PATCH[ ]*=' ${NCURSES_DIR}/dist.mk | sed -e 's%^[^0-9]*%%'
# From autoconf (!)
+.if defined(ENABLE_WIDEC)
+NCURSES_CH_T= cchar_t
+NEED_WCHAR_H= 1
+.else
NCURSES_CH_T= chtype
NEED_WCHAR_H= 0
+.endif
NCURSES_CONST= const
NCURSES_EXT_COLORS= 0
NCURSES_EXT_FUNCS= 1
@@ -211,6 +216,30 @@ SRCS+= \
lib_vidattr.c \
tty_update.c
+.if defined(ENABLE_WIDEC)
+.PATH: ${NCURSES_DIR}/ncurses/widechar
+SRCS+= \
+ charable.c \
+ lib_add_wch.c \
+ lib_box_set.c \
+ lib_cchar.c \
+ lib_erasewchar.c \
+ lib_get_wch.c \
+ lib_get_wstr.c \
+ lib_hline_set.c \
+ lib_in_wch.c \
+ lib_in_wchnstr.c \
+ lib_ins_wch.c \
+ lib_inwstr.c \
+ lib_pecho_wchar.c \
+ lib_slk_wset.c \
+ lib_unget_wch.c \
+ lib_vid_attr.c \
+ lib_vline_set.c \
+ lib_wacs.c \
+ lib_wunctrl.c
+.endif
+
.PATH: ${NCURSES_DIR}/ncurses/trace
SRCS+= \
lib_trace.c \
@@ -249,23 +278,23 @@ INCS= ${HEADERS} ${SRCHDRS}
INCSLINKS= curses.h ${INCLUDEDIR}/ncurses.h
.if !defined(NO_INSTALLLIB)
-SYMLINKS+= libncurses.a ${LIBDIR}/libcurses.a
-SYMLINKS+= libncurses.a ${LIBDIR}/libtermcap.a
-SYMLINKS+= libncurses.a ${LIBDIR}/libtermlib.a
-SYMLINKS+= libncurses.a ${LIBDIR}/libtinfo.a
+SYMLINKS+= libncurses${LIB_SUFFIX}.a ${LIBDIR}/libcurses${LIB_SUFFIX}.a
+SYMLINKS+= libncurses${LIB_SUFFIX}.a ${LIBDIR}/libtermcap${LIB_SUFFIX}.a
+SYMLINKS+= libncurses${LIB_SUFFIX}.a ${LIBDIR}/libtermlib${LIB_SUFFIX}.a
+SYMLINKS+= libncurses${LIB_SUFFIX}.a ${LIBDIR}/libtinfo${LIB_SUFFIX}.a
.endif
.if !defined(NO_PIC)
# no need for major at all, it's an ld-time redirection only
-SYMLINKS+= libncurses.so ${LIBDIR}/libcurses.so
-SYMLINKS+= libncurses.so ${LIBDIR}/libtermcap.so
-SYMLINKS+= libncurses.so ${LIBDIR}/libtermlib.so
-SYMLINKS+= libncurses.so ${LIBDIR}/libtinfo.so
+SYMLINKS+= libncurses${LIB_SUFFIX}.so ${LIBDIR}/libcurses${LIB_SUFFIX}.so
+SYMLINKS+= libncurses${LIB_SUFFIX}.so ${LIBDIR}/libtermcap${LIB_SUFFIX}.so
+SYMLINKS+= libncurses${LIB_SUFFIX}.so ${LIBDIR}/libtermlib${LIB_SUFFIX}.so
+SYMLINKS+= libncurses${LIB_SUFFIX}.so ${LIBDIR}/libtinfo${LIB_SUFFIX}.so
.endif
.if ${MK_PROFILE} != "no"
-SYMLINKS+= libncurses_p.a ${LIBDIR}/libcurses_p.a
-SYMLINKS+= libncurses_p.a ${LIBDIR}/libtermcap_p.a
-SYMLINKS+= libncurses_p.a ${LIBDIR}/libtermlib_p.a
-SYMLINKS+= libncurses_p.a ${LIBDIR}/libtinfo_p.a
+SYMLINKS+= libncurses${LIB_SUFFIX}_p.a ${LIBDIR}/libcurses${LIB_SUFFIX}_p.a
+SYMLINKS+= libncurses${LIB_SUFFIX}_p.a ${LIBDIR}/libtermcap${LIB_SUFFIX}_p.a
+SYMLINKS+= libncurses${LIB_SUFFIX}_p.a ${LIBDIR}/libtermlib${LIB_SUFFIX}_p.a
+SYMLINKS+= libncurses${LIB_SUFFIX}_p.a ${LIBDIR}/libtinfo${LIB_SUFFIX}_p.a
.endif
DOCSDIR= ${SHAREDIR}/doc/ncurses
@@ -332,6 +361,9 @@ curses.h: curses.head MKkey_defs.sh Caps
cat curses.head > $@.new
AWK=${AWK} _POSIX2_VERSION=199209 sh ${NCURSES_DIR}/include/MKkey_defs.sh \
${NCURSES_DIR}/include/Caps >> $@.new
+.if defined(ENABLE_WIDEC)
+ cat ${NCURSES_DIR}/include/curses.wide >> $@.new
+.endif
cat ${NCURSES_DIR}/include/curses.tail >> $@.new
mv -f $@.new $@
@@ -471,6 +503,21 @@ MAN= \
resizeterm.3 \
wresize.3
+.if defined(ENABLE_WIDEC)
+MAN+= \
+ curs_add_wch.3 \
+ curs_add_wchstr.3 \
+ curs_addwstr.3 \
+ curs_get_wch.3 \
+ curs_get_wstr.3 \
+ curs_in_wch.3 \
+ curs_in_wchstr.3 \
+ curs_ins_wch.3 \
+ curs_ins_wstr.3 \
+ curs_printw.3 \
+ curs_scanw.3
+.endif
+
CLEANFILES+= ${MAN:M*.3}
MAN+= term.5 terminfo.5
@@ -795,6 +842,89 @@ MLINKS= ncurses.3 curses.3 \
resizeterm.3 is_term_resized.3 \
resizeterm.3 resize_term.3
+.if defined(ENABLE_WIDEC)
+MLINKS+=curs_add_wch.3 add_wch.3 \
+ curs_add_wch.3 echo_wchar.3 \
+ curs_add_wch.3 mvadd_wch.3 \
+ curs_add_wch.3 mvwadd_wch.3 \
+ curs_add_wch.3 wadd_wch.3 \
+ curs_add_wch.3 wecho_wchar.3 \
+ curs_add_wchstr.3 add_wchnstr.3 \
+ curs_add_wchstr.3 add_wchstr.3 \
+ curs_add_wchstr.3 mvadd_wchnstr.3 \
+ curs_add_wchstr.3 mvadd_wchstr.3 \
+ curs_add_wchstr.3 mvwadd_wchnstr.3 \
+ curs_add_wchstr.3 mvwadd_wchstr.3 \
+ curs_add_wchstr.3 wadd_wchnstr.3 \
+ curs_add_wchstr.3 wadd_wchstr.3 \
+ curs_addwstr.3 addnwstr.3 \
+ curs_addwstr.3 addwstr.3 \
+ curs_addwstr.3 mvaddnwstr.3 \
+ curs_addwstr.3 mvaddwstr.3 \
+ curs_addwstr.3 mvwaddnwstr.3 \
+ curs_addwstr.3 mvwaddwstr.3 \
+ curs_addwstr.3 waddnwstr.3 \
+ curs_addwstr.3 waddwstr.3 \
+ curs_get_wch.3 get_wch.3 \
+ curs_get_wch.3 mvget_wch.3 \
+ curs_get_wch.3 mvwget_wch.3 \
+ curs_get_wch.3 unget_wch.3 \
+ curs_get_wch.3 wget_wch.3 \
+ curs_get_wstr.3 get_wstr.3 \
+ curs_get_wstr.3 getn_wstr.3 \
+ curs_get_wstr.3 mvget_wstr.3 \
+ curs_get_wstr.3 mvgetn_wstr.3 \
+ curs_get_wstr.3 mvwget_wstr.3 \
+ curs_get_wstr.3 mvwgetn_wstr.3 \
+ curs_get_wstr.3 wget_wstr.3 \
+ curs_get_wstr.3 wgetn_wstr.3 \
+ curs_in_wch.3 in_wch.3 \
+ curs_in_wch.3 mvin_wch.3 \
+ curs_in_wch.3 mvwin_wch.3 \
+ curs_in_wch.3 win_wch.3 \
+ curs_in_wchstr.3 in_wchnstr.3 \
+ curs_in_wchstr.3 in_wchstr.3 \
+ curs_in_wchstr.3 mvin_wchnstr.3 \
+ curs_in_wchstr.3 mvin_wchstr.3 \
+ curs_in_wchstr.3 mvwin_wchnstr.3 \
+ curs_in_wchstr.3 mvwin_wchstr.3 \
+ curs_in_wchstr.3 win_wchnstr.3 \
+ curs_in_wchstr.3 win_wchstr.3 \
+ curs_ins_wch.3 ins_wch.3 \
+ curs_ins_wch.3 mvins_wch.3 \
+ curs_ins_wch.3 mvwins_wch.3 \
+ curs_ins_wch.3 wins_wch.3 \
+ curs_ins_wstr.3 ins_nwstr.3 \
+ curs_ins_wstr.3 ins_wstr.3 \
+ curs_ins_wstr.3 mvins_nwstr.3 \
+ curs_ins_wstr.3 mvins_wstr.3 \
+ curs_ins_wstr.3 mvwins_nwstr.3 \
+ curs_ins_wstr.3 mvwins_wstr.3 \
+ curs_ins_wstr.3 wins_nwstr.3 \
+ curs_ins_wstr.3 wins_wstr.3 \
+ curs_inwstr.3 innwstr.3 \
+ curs_inwstr.3 inwstr.3 \
+ curs_inwstr.3 mvinnwstr.3 \
+ curs_inwstr.3 mvinwstr.3 \
+ curs_inwstr.3 mvwinnwstr.3 \
+ curs_inwstr.3 mvwinwstr.3 \
+ curs_inwstr.3 winnwstr.3 \
+ curs_inwstr.3 winwstr.3 \
+ curs_printw.3 mvprintw.3 \
+ curs_printw.3 mvwprintw.3 \
+ curs_printw.3 printw.3 \
+ curs_printw.3 vw_printw.3 \
+ curs_printw.3 vwprintw.3 \
+ curs_printw.3 wprintw.3 \
+ curs_scanw.3 mvscanw.3 \
+ curs_scanw.3 mvwscanw.3 \
+ curs_scanw.3 scanw.3 \
+ curs_scanw.3 vw_scanw.3 \
+ curs_scanw.3 vwscanw.3 \
+ curs_scanw.3 wscanw.3
+.endif
+
+
.include <bsd.lib.mk>
# Keep the .SUFFIXES line after the include of bsd.lib.mk
diff --git a/lib/ncurses/ncurses/ncurses_cfg.h b/lib/ncurses/ncurses/ncurses_cfg.h
index 68bc9b5..28745ea 100644
--- a/lib/ncurses/ncurses/ncurses_cfg.h
+++ b/lib/ncurses/ncurses/ncurses_cfg.h
@@ -142,7 +142,6 @@
#define HAVE_WORKING_POLL 1
#define HAVE_WRESIZE 1
#define MIXEDCASE_FILENAMES 1
-#define MIXEDCASE_FILENAMES 1
#define NCURSES_EXT_FUNCS 1
#define NCURSES_NO_PADDING 1
#define NCURSES_PATHSEP ':'
@@ -164,6 +163,18 @@
#define USE_STDIO_VSCAN 1
#define USE_SYSMOUSE 1
#define USE_TERMCAP 1
+#ifdef ENABLE_WIDEC
+#define USE_WIDEC_SUPPORT 1
+#define HAVE_PUTWC 1
+#define HAVE_BTOWC 1
+#define HAVE_WCTOB 1
+#define HAVE_MBTOWC 1
+#define HAVE_WCTOMB 1
+#define HAVE_MBLEN 1
+#define HAVE_MBRLEN 1
+#define HAVE_MBRTOWC 1
+#define NEED_WCHAR_H 1
+#endif
#include <ncurses_def.h>
diff --git a/lib/ncurses/ncursesw/Makefile b/lib/ncurses/ncursesw/Makefile
new file mode 100644
index 0000000..277c90b
--- /dev/null
+++ b/lib/ncurses/ncursesw/Makefile
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+ENABLE_WIDEC=
+
+.PATH: ${.CURDIR}/../ncurses
+
+.include "${.CURDIR}/../ncurses/Makefile"
diff --git a/lib/ncurses/panel/Makefile b/lib/ncurses/panel/Makefile
index c47ad62..1f73491 100644
--- a/lib/ncurses/panel/Makefile
+++ b/lib/ncurses/panel/Makefile
@@ -4,7 +4,7 @@
SRCDIR= ${NCURSES_DIR}/panel
-LIB= panel
+LIB= panel${LIB_SUFFIX}
.PATH: ${SRCDIR}
SRCS= \
@@ -29,8 +29,8 @@ CLEANFILES= ncurses_def.h
CFLAGS+= -I${SRCDIR}
-DPADD= ${LIBNCURSES}
-LDADD= -lncurses
+DPADD= ${LIBNCURSES${LIB_SUFFIX:U}}
+LDADD= -lncurses${LIB_SUFFIX}
INCS= panel.h
diff --git a/lib/ncurses/panelw/Makefile b/lib/ncurses/panelw/Makefile
new file mode 100644
index 0000000..7642e34
--- /dev/null
+++ b/lib/ncurses/panelw/Makefile
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+ENABLE_WIDEC=
+
+.include "${.CURDIR}/../panel/Makefile"
OpenPOWER on IntegriCloud