aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/vi/Makefile
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2013-08-11 20:03:12 +0000
committerPeter Wemm <peter@FreeBSD.org>2013-08-11 20:03:12 +0000
commitf0957ccae4f402b93cf27b125542343d28b53109 (patch)
tree7c1ae67d07b93aea05bfea51c590c1112b65042b /usr.bin/vi/Makefile
parentebe2785690e3a82421eac98f089a934901731af5 (diff)
parentbe3e4646eef6a3abcf58590dac24a5dfe54540f6 (diff)
downloadsrc-f0957ccae4f402b93cf27b125542343d28b53109.tar.gz
src-f0957ccae4f402b93cf27b125542343d28b53109.zip
Update nvi-1.79 to 2.1.1-4334a8297f
This is the gsoc-2011 project to clean up and backport multibyte support from other nvi forks in a form we can use. USE_WIDECHAR is on unless building for the rescue crunchgen. This should allow editing in the native locale encoding. USE_ICONV depends on make.conf having 'WITH_ICONV=YES' for now. This adds the ability to do things like edit a KOI8-R file while having $LANG set to (say) en_US.UTF-8. iconv is used to transcode the characters for display. Other points: * It uses gencat and catopen/etc instead of homegrown msg catalog stuff. * A lot of stuff has been trimmed out, eg: the perl and tcl bindings which we could never use in base anyway. * It uses ncursesw when in widechar mode. This could be interesting. GSoC info: http://www.google-melange.com/gsoc/proposal/review/google/gsoc2011/zy/1 Repo at: https://github.com/lichray/nvi2 Obtained from: Zhihao Yuan <lichray@gmail.com>
Notes
Notes: svn path=/head/; revision=254225
Diffstat (limited to 'usr.bin/vi/Makefile')
-rw-r--r--usr.bin/vi/Makefile85
1 files changed, 29 insertions, 56 deletions
diff --git a/usr.bin/vi/Makefile b/usr.bin/vi/Makefile
index 048c35b6f017..033c4726a142 100644
--- a/usr.bin/vi/Makefile
+++ b/usr.bin/vi/Makefile
@@ -2,14 +2,12 @@
# $FreeBSD$
#
-SRCDIR= ${.CURDIR}/../../contrib/nvi
-
-CFLAGS+= -DGTAGS
+.include <bsd.own.mk>
-#if using ncurses:
-CFLAGS+= -DSYSV_CURSES
+SRCDIR= ${.CURDIR}/../../contrib/nvi
+SUBDIR+= catalog
-WARNS?= 0
+WARNS?= 0 # some warn issues on 32 bit machines
VI= nvi
EX= nex
@@ -17,6 +15,8 @@ VIEW= nview
PROG= nvi
+CFLAGS+= -D__REGEX_PRIVATE
+
LINKS= ${BINDIR}/${VI} ${BINDIR}/${EX} ${BINDIR}/${VI} ${BINDIR}/${VIEW}
LINKS+= ${BINDIR}/${VI} ${BINDIR}/vi ${BINDIR}/${EX} ${BINDIR}/ex
LINKS+= ${BINDIR}/${VI} ${BINDIR}/view
@@ -25,34 +25,38 @@ MAN= ${SRCDIR}/docs/USD.doc/vi.man/vi.1
MLINKS+=vi.1 ex.1 vi.1 view.1
MLINKS+=vi.1 nex.1 vi.1 nview.1 vi.1 nvi.1
-CATALOGS= dutch english french german polish ru_RU.KOI8-R spanish swedish \
- uk_UA.KOI8-U
-NLLINKS= nl_NL
-ENLINKS= en_AU en_CA en_GB en_NZ en_US
-FRLINKS= fr_BE fr_CA fr_CH fr_FR
-DELINKS= de_AT de_CH de_DE
-ESLINKS= es_ES
-SVLINKS= sv_SE
-PLLINKS= pl_PL
-
.PATH: ${SRCDIR}/common
.PATH: ${SRCDIR}/ex
.PATH: ${SRCDIR}/cl
.PATH: ${SRCDIR}/vi
+.PATH: ${SRCDIR}/regex
+
+CFLAGS+=-I${.CURDIR} -I${SRCDIR} -I${SRCDIR}/regex
+
+DPADD= ${LIBUTIL}
+LDADD= -lutil
-CFLAGS+=-I${.CURDIR} -I${SRCDIR} -I${SRCDIR}/include
+.if defined(RESCUE) || defined(RELEASE_CRUNCH)
+DPADD+= ${LIBNCURSES}
+LDADD+= -lncurses
+.else
+CFLAGS+= -DUSE_WIDECHAR
+DPADD+= ${LIBNCURSESW}
+LDADD+= -lncursesw
+.endif
-DPADD= ${LIBNCURSES}
-LDADD= -lncurses
+.if ${MK_ICONV} == "yes" && !defined(RESCUE) && !defined(RELEASE_CRUNCH)
+CFLAGS+= -DUSE_ICONV
+.endif
CLEANFILES+=${EX}
# Vi curses sources
-SRCS+= cl_bsd.c cl_funcs.c cl_main.c cl_read.c cl_screen.c cl_term.c
+SRCS+= cl_funcs.c cl_main.c cl_read.c cl_screen.c cl_term.c
# General sources.
-SRCS+= cut.c delete.c exf.c key.c line.c log.c main.c mark.c msg.c options.c \
- options_f.c put.c screen.c search.c seq.c recover.c util.c
+SRCS+= conv.c cut.c delete.c encoding.c exf.c key.c line.c log.c main.c mark.c msg.c options.c \
+ options_f.c put.c recover.c screen.c search.c seq.c util.c
# Ex source.
SRCS+= ex.c ex_abbrev.c ex_append.c ex_args.c ex_argv.c ex_at.c ex_bang.c \
@@ -63,7 +67,7 @@ SRCS+= ex.c ex_abbrev.c ex_append.c ex_args.c ex_argv.c ex_at.c ex_bang.c \
ex_read.c ex_screen.c ex_script.c ex_set.c ex_shell.c \
ex_shift.c ex_source.c ex_stop.c ex_subst.c ex_tag.c \
ex_txt.c ex_undo.c ex_usage.c ex_util.c ex_version.c ex_visual.c \
- ex_write.c ex_yank.c ex_z.c ex_tcl.c ex_perl.c
+ ex_write.c ex_yank.c ex_z.c
# Vi source.
SRCS+= getc.c v_at.c v_ch.c v_cmd.c v_delete.c v_ex.c v_increment.c v_init.c \
@@ -75,38 +79,7 @@ SRCS+= getc.c v_at.c v_ch.c v_cmd.c v_delete.c v_ex.c v_increment.c v_init.c \
# Vi screen source.
SRCS+= vs_line.c vs_msg.c vs_refresh.c vs_relative.c vs_smap.c vs_split.c
-FILES= ${CATALOGS:S;^;${SRCDIR}/catalog/;}
-FILESDIR= /usr/share/vi/catalog
-SYMLINKS=
-.for l in ${NLLINKS}
-SYMLINKS+= dutch ${FILESDIR}/$l.ISO8859-1
-SYMLINKS+= dutch ${FILESDIR}/$l.ISO8859-15
-.endfor
-.for l in ${ENLINKS}
-SYMLINKS+= english ${FILESDIR}/$l.ISO8859-1
-SYMLINKS+= english ${FILESDIR}/$l.ISO8859-15
-SYMLINKS+= english ${FILESDIR}/$l.US-ASCII
-.endfor
-SYMLINKS+= english ${FILESDIR}/POSIX
-SYMLINKS+= english ${FILESDIR}/C
-.for l in ${FRLINKS}
-SYMLINKS+= french ${FILESDIR}/$l.ISO8859-1
-SYMLINKS+= french ${FILESDIR}/$l.ISO8859-15
-.endfor
-.for l in ${DELINKS}
-SYMLINKS+= german ${FILESDIR}/$l.ISO8859-1
-SYMLINKS+= german ${FILESDIR}/$l.ISO8859-15
-.endfor
-.for l in ${ESLINKS}
-SYMLINKS+= spanish ${FILESDIR}/$l.ISO8859-1
-SYMLINKS+= spanish ${FILESDIR}/$l.ISO8859-15
-.endfor
-.for l in ${SVLINKS}
-SYMLINKS+= swedish ${FILESDIR}/$l.ISO8859-1
-SYMLINKS+= swedish ${FILESDIR}/$l.ISO8859-15
-.endfor
-.for l in ${PLLINKS}
-SYMLINKS+= polish ${FILESDIR}/$l.ISO8859-2
-.endfor
+# Wide char regex
+SRCS+= regcomp.c regerror.c regexec.c regfree.c
.include <bsd.prog.mk>