2013-09-17 11:00:42 +02:00
|
|
|
# Created by: David O'Brien <obrien@cs.ucdavis.edu>
|
2000-07-31 21:28:41 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2013-12-02 20:48:37 +01:00
|
|
|
PORTNAME= vim
|
2016-09-17 18:04:20 +02:00
|
|
|
PORTVERSION= 7.4.2367
|
2015-06-16 15:03:46 +02:00
|
|
|
DISTVERSIONPREFIX= v
|
2000-09-26 16:48:33 +02:00
|
|
|
CATEGORIES?= editors
|
2000-07-31 21:28:41 +02:00
|
|
|
|
2013-12-02 20:42:01 +01:00
|
|
|
MAINTAINER?= sunpoet@FreeBSD.org
|
2014-02-28 02:30:02 +01:00
|
|
|
COMMENT?= Improved version of the vi editor
|
2000-07-31 21:28:41 +02:00
|
|
|
|
2014-11-24 19:29:53 +01:00
|
|
|
OPTIONS_DEFINE= CSCOPE DEFAULT_VIMRC EXUBERANT_CTAGS LUA NLS PERL PYTHON RUBY TCL XTERM_SAVE
|
2014-02-20 15:20:36 +01:00
|
|
|
OPTIONS_SINGLE= UI
|
|
|
|
OPTIONS_SINGLE_UI= ATHENA CONSOLE GNOME GTK2 MOTIF X11
|
2014-02-18 22:30:04 +01:00
|
|
|
OPTIONS_SUB= yes
|
|
|
|
ATHENA_DESC= Athena GUI toolkit
|
|
|
|
CSCOPE_DESC= cscope support
|
|
|
|
CONSOLE_DESC= Console/terminal mode
|
2014-11-24 20:35:10 +01:00
|
|
|
DEFAULT_VIMRC_DESC= Install bundled vimrc as default setting
|
2014-02-18 22:30:04 +01:00
|
|
|
EXUBERANT_CTAGS_DESC= Use exctags instead of ctags
|
|
|
|
UI_DESC= User interface
|
|
|
|
XTERM_SAVE_DESC= Restore xterm screen after exit
|
|
|
|
|
2015-06-14 11:18:40 +02:00
|
|
|
PORTSCOUT= site:https://github.com/vim/vim/releases
|
|
|
|
|
2014-02-18 22:30:04 +01:00
|
|
|
ALL_TARGET= # empty
|
2014-05-20 21:32:39 +02:00
|
|
|
MAKE_ARGS+= CC="${CC}" CONF_ARGS="--prefix=${PREFIX} ${CSCOPE_ARG}" STRIP="${STRIP_CMD}" CONF_OPT_MULTIBYTE=--enable-multibyte CONF_TERM_LIB=--with-tlib=termlib
|
2014-12-04 18:28:09 +01:00
|
|
|
MAKE_ARGS+= VIMRUNTIMEDIR=${PREFIX}/share/vim/${VIM_VER} VIMRCLOC=${ETCDIR}
|
2014-02-18 22:30:04 +01:00
|
|
|
REINPLACE_ARGS= -i ''
|
2016-03-10 20:54:00 +01:00
|
|
|
USES= cpe iconv ncurses pkgconfig shebangfix
|
2014-02-18 22:30:04 +01:00
|
|
|
WANT_GNOME= yes
|
2013-03-21 00:56:59 +01:00
|
|
|
|
2014-02-18 22:30:04 +01:00
|
|
|
PLIST_SUB= VIM_VER=${VIM_VER}
|
2014-11-16 23:55:10 +01:00
|
|
|
PORTDATA= ${VIM_VER}
|
2007-10-25 18:52:59 +02:00
|
|
|
|
2015-07-12 18:06:45 +02:00
|
|
|
VIM_VER= ${PORTNAME}${PORTVERSION:R:S|.||g}
|
2007-12-19 17:30:28 +01:00
|
|
|
|
2015-05-15 20:04:04 +02:00
|
|
|
USE_GITHUB= yes
|
|
|
|
|
2014-08-12 19:07:59 +02:00
|
|
|
CPE_VERSION= ${PORTVERSION:R}
|
|
|
|
|
2014-02-18 22:30:04 +01:00
|
|
|
SLAVEDIRS= editors/vim-lite
|
2010-10-06 08:58:45 +02:00
|
|
|
|
2014-02-18 22:30:04 +01:00
|
|
|
SHEBANG_FILES= runtime/tools/efm_perl.pl
|
2000-07-31 21:28:41 +02:00
|
|
|
|
2010-11-22 20:22:55 +01:00
|
|
|
.if defined(LITE)
|
2014-02-18 23:08:52 +01:00
|
|
|
PKGNAMESUFFIX+= -lite
|
2014-02-18 22:30:04 +01:00
|
|
|
CONFLICTS_INSTALL= vim-[0-9]*
|
2014-11-24 19:29:53 +01:00
|
|
|
OPTIONS_DEFAULT=DEFAULT_VIMRC
|
2014-02-18 22:30:04 +01:00
|
|
|
OPTIONS_EXCLUDE=ATHENA CSCOPE EXUBERANT_CTAGS GNOME GTK2 LUA MOTIF NLS PERL PYTHON RUBY TCL X11 XTERM_SAVE
|
|
|
|
OPTIONS_SLAVE= CONSOLE
|
|
|
|
MAKE_ARGS+= CONF_OPT_GUI="--enable-gui=no --without-x" \
|
|
|
|
CONF_OPT_LUA=--disable-luainterp \
|
|
|
|
CONF_OPT_PERL=--disable-perlinterp \
|
|
|
|
CONF_OPT_PYTHON="--disable-pythoninterp --disable-python3interp" \
|
|
|
|
CONF_OPT_RUBY=--disable-rubyinterp \
|
|
|
|
CONF_OPT_TCL=--disable-tclinterp
|
|
|
|
PLIST_SUB+= NON_LITE="@comment "
|
|
|
|
.else
|
|
|
|
CONFLICTS_INSTALL= vim-lite-[0-9]*
|
2014-11-24 19:29:53 +01:00
|
|
|
OPTIONS_DEFAULT=CSCOPE DEFAULT_VIMRC EXUBERANT_CTAGS GTK2 LUA PERL PYTHON RUBY TCL
|
2016-03-06 07:18:03 +01:00
|
|
|
MAKE_ARGS+= CONF_OPT_FEAT=--with-features=huge \
|
2014-02-18 22:30:04 +01:00
|
|
|
CONF_OPT_INPUT=--enable-xim \
|
|
|
|
CONF_OPT_OUTPUT=--enable-fontset
|
|
|
|
PLIST_SUB+= NON_LITE=""
|
|
|
|
.endif
|
|
|
|
|
|
|
|
ATHENA_MAKE_ARGS= CONF_OPT_GUI=--enable-gui=athena
|
2015-08-20 09:05:19 +02:00
|
|
|
ATHENA_PLIST_SUB= GUI=""
|
2014-02-18 22:30:04 +01:00
|
|
|
ATHENA_USE= XORG=xaw
|
|
|
|
CONSOLE_MAKE_ARGS= CONF_OPT_GUI="--enable-gui=no --without-x"
|
2015-08-20 09:05:19 +02:00
|
|
|
CONSOLE_PLIST_SUB= GUI="@comment "
|
2014-02-18 22:30:04 +01:00
|
|
|
CSCOPE_MAKE_ARGS= CONF_OPT_CSCOPE=--enable-cscope
|
2016-04-01 16:00:51 +02:00
|
|
|
CSCOPE_RUN_DEPENDS= cscope:devel/cscope
|
|
|
|
EXUBERANT_CTAGS_RUN_DEPENDS= exctags:devel/ctags
|
2016-07-20 17:33:20 +02:00
|
|
|
GNOME_MAKE_ARGS= CONF_OPT_GUI=--enable-gui=gnome2 X_LIBS="$$(X_LIBS) -lX11 -lXpm -lXt"
|
2015-08-20 09:05:19 +02:00
|
|
|
GNOME_PLIST_SUB= GUI=""
|
2014-02-24 19:39:50 +01:00
|
|
|
GNOME_USE= GNOME=libgnomeui XORG=glproto,xpm,xt
|
2016-07-20 17:33:20 +02:00
|
|
|
GTK2_MAKE_ARGS= CONF_OPT_GUI=--enable-gui=gtk2 X_LIBS="$$(X_LIBS) -lX11 -lXpm -lXt"
|
2015-08-20 09:05:19 +02:00
|
|
|
GTK2_PLIST_SUB= GUI=""
|
2014-02-24 19:39:50 +01:00
|
|
|
GTK2_USE= GNOME=gtk20 XORG=xpm,xt
|
|
|
|
LUA_MAKE_ARGS= CONF_OPT_LUA=--enable-luainterp=dynamic CONF_OPT_LUA_PREFIX=--with-lua-prefix=${LOCALBASE}
|
2014-02-18 22:30:04 +01:00
|
|
|
LUA_USES= lua
|
|
|
|
MOTIF_MAKE_ARGS= CONF_OPT_GUI='--enable-gui=motif --with-motif-lib="${MOTIFLIB}"' MOTIFHOME=${LOCALBASE}
|
2015-08-20 09:05:19 +02:00
|
|
|
MOTIF_PLIST_SUB= GUI=""
|
2014-02-18 22:30:04 +01:00
|
|
|
MOTIF_USES= motif
|
2014-02-25 17:50:34 +01:00
|
|
|
NLS_MAKE_ARGS= CONF_OPT_NLS=--enable-nls
|
|
|
|
NLS_MAKE_ARGS_OFF= CONF_OPT_NLS=--disable-nls
|
2014-02-18 22:30:04 +01:00
|
|
|
NLS_USES= gettext
|
|
|
|
PERL_MAKE_ARGS= CONF_OPT_PERL=--enable-perlinterp
|
|
|
|
PERL_USES= perl5
|
2014-08-19 19:17:13 +02:00
|
|
|
PYTHON_USES= python
|
2014-02-18 22:30:04 +01:00
|
|
|
RUBY_MAKE_ARGS= CONF_OPT_RUBY=--enable-rubyinterp
|
|
|
|
RUBY_USE= RUBY=yes
|
|
|
|
TCL_MAKE_ARGS= CONF_OPT_TCL="--enable-tclinterp --with-tclsh=tclsh${TCL_VER}"
|
|
|
|
TCL_USES= tcl:85+
|
2016-07-20 17:33:20 +02:00
|
|
|
X11_MAKE_ARGS= CONF_OPT_GUI="--enable-gui=no --with-x" X_LIBS="$$(X_LIBS) -lX11 -lXt"
|
2015-08-20 09:05:19 +02:00
|
|
|
X11_PLIST_SUB= GUI="@comment "
|
2014-02-24 19:39:50 +01:00
|
|
|
X11_USE= XORG=x11,xt
|
2000-07-31 21:28:41 +02:00
|
|
|
|
2014-02-18 22:30:04 +01:00
|
|
|
.include <bsd.port.pre.mk>
|
2013-03-21 00:56:59 +01:00
|
|
|
|
2014-02-18 22:30:04 +01:00
|
|
|
.if ${PORT_OPTIONS:MPYTHON}
|
2015-05-26 18:47:02 +02:00
|
|
|
.if ${PYTHON_REL} < 3000
|
2014-02-18 22:30:04 +01:00
|
|
|
MAKE_ARGS+= CONF_OPT_PYTHON="--enable-pythoninterp --disable-python3interp"
|
|
|
|
.else
|
|
|
|
MAKE_ARGS+= CONF_OPT_PYTHON="--enable-python3interp --disable-pythoninterp"
|
2013-03-21 00:56:59 +01:00
|
|
|
.endif
|
2002-07-25 18:45:44 +02:00
|
|
|
.endif
|
|
|
|
|
2007-01-02 23:41:37 +01:00
|
|
|
post-patch:
|
2016-01-03 18:50:23 +01:00
|
|
|
@${FIND} ${WRKSRC}/ -name 'Makefile' | ${XARGS} ${REINPLACE_CMD} -e 's| $$<| $$>|'
|
2014-02-18 22:30:04 +01:00
|
|
|
@${REINPLACE_CMD} -e '/^install_normal: / s|install-icons|# &|; /cd $$(DEST_BIN); ln -s/d' ${WRKSRC}/src/Makefile
|
2014-09-09 19:09:26 +02:00
|
|
|
@${REINPLACE_CMD} -e 's|-liconv|${ICONV_LIB}|g' ${WRKSRC}/src/auto/configure
|
2014-12-04 18:28:09 +01:00
|
|
|
@${ECHO_CMD} '#define SYS_VIMRC_FILE "'${ETCDIR}'/vimrc"' >> ${WRKSRC}/src/feature.h
|
|
|
|
@${ECHO_CMD} '#define SYS_GVIMRC_FILE "'${ETCDIR}'/gvimrc"' >> ${WRKSRC}/src/feature.h
|
2007-01-02 23:41:37 +01:00
|
|
|
|
2015-08-30 05:56:22 +02:00
|
|
|
post-patch-EXUBERANT_CTAGS-off:
|
2015-09-19 07:15:05 +02:00
|
|
|
@${FIND} ${WRKSRC}/runtime/ -name 'menu*.vim' -print0 | ${XARGS} -0 ${REINPLACE_CMD} -e 's|ctags -R \.|${FIND} . -type f \\\| ${XARGS} ctags|g'
|
2015-08-30 05:56:22 +02:00
|
|
|
|
|
|
|
post-patch-EXUBERANT_CTAGS-on:
|
|
|
|
@${FIND} ${WRKSRC}/runtime/ -name 'menu*.vim' -print0 | ${XARGS} -0 ${REINPLACE_CMD} -e 's|ctags -R \.|exctags -R .|g'
|
|
|
|
|
2002-10-06 09:11:14 +02:00
|
|
|
pre-configure:
|
2014-02-18 22:30:04 +01:00
|
|
|
@${CP} ${WRKSRC}/src/config.mk.dist ${WRKSRC}/src/auto/config.mk
|
2014-04-05 18:38:09 +02:00
|
|
|
@(cd ${WRKSRC}/src/ && ${MAKE_CMD} distclean)
|
2014-02-18 22:30:04 +01:00
|
|
|
@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \
|
|
|
|
-e 's|\$$gtk_config_prefix/bin/gtk-config|\$${GTK_CONFIG}|g' \
|
|
|
|
-e 's|\$$gtk_config_exec_prefix/bin/gtk-config|\$${GTK_CONFIG}|g' \
|
2014-02-24 19:44:16 +01:00
|
|
|
-e 's|set dummy lua;|set dummy ${LUA_CMD};|g' ${WRKSRC}/src/auto/configure
|
2015-08-30 05:56:22 +02:00
|
|
|
|
|
|
|
pre-configure-XTERM_SAVE-on:
|
2014-02-18 22:30:04 +01:00
|
|
|
@${REINPLACE_CMD} -e '/FEAT_XTERM_SAVE/ s|.*|#define FEAT_XTERM_SAVE|' ${WRKSRC}/src/feature.h
|
2000-07-31 21:28:41 +02:00
|
|
|
|
2010-09-17 02:46:45 +02:00
|
|
|
post-configure:
|
2014-04-05 18:38:09 +02:00
|
|
|
@(cd ${WRKSRC}/src/ && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} scratch config)
|
2014-02-18 22:30:04 +01:00
|
|
|
@${REINPLACE_CMD} -e 's|#define HAVE_SYSINFO 1|/* #undef HAVE_SYSINFO */|' ${WRKSRC}/src/auto/config.h
|
2004-01-05 08:27:36 +01:00
|
|
|
|
2000-07-31 21:28:41 +02:00
|
|
|
post-install:
|
2014-02-18 22:30:04 +01:00
|
|
|
${MKDIR} ${STAGEDIR}${DATADIR}/${VIM_VER}/lang/
|
|
|
|
.for file in evim rview rvim vimdiff
|
|
|
|
${TEST} -e ${STAGEDIR}${PREFIX}/bin/${file} || ${LN} -fs vim ${STAGEDIR}${PREFIX}/bin/${file}
|
|
|
|
.endfor
|
2014-02-24 19:39:50 +01:00
|
|
|
.if !${PORT_OPTIONS:MCONSOLE} && !${PORT_OPTIONS:MX11}
|
2014-02-18 22:30:04 +01:00
|
|
|
.for file in eview gview gvim gvimdiff rgview rgvim
|
|
|
|
${TEST} -e ${STAGEDIR}${PREFIX}/bin/${file} || ${LN} -fs vim ${STAGEDIR}${PREFIX}/bin/${file}
|
|
|
|
.endfor
|
2012-09-29 01:29:02 +02:00
|
|
|
.endif
|
2015-07-06 19:46:30 +02:00
|
|
|
|
|
|
|
post-install-DEFAULT_VIMRC-on:
|
2014-12-04 18:28:09 +01:00
|
|
|
${MKDIR} ${STAGEDIR}${ETCDIR}
|
|
|
|
${INSTALL_DATA} ${FILESDIR}/vimrc ${STAGEDIR}${ETCDIR}/gvimrc.sample
|
|
|
|
${INSTALL_DATA} ${FILESDIR}/vimrc ${STAGEDIR}${ETCDIR}/vimrc.sample
|
2015-07-06 19:46:30 +02:00
|
|
|
|
|
|
|
post-install-NLS-off:
|
2014-02-18 22:30:04 +01:00
|
|
|
${MKDIR} ${STAGEDIR}${DATADIR}/${VIM_VER}/keymap/
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/runtime/keymap/* ${STAGEDIR}${DATADIR}/${VIM_VER}/keymap/
|
2015-07-06 19:46:30 +02:00
|
|
|
${INSTALL_DATA} ${FILESDIR}/vietnamese_viscii.vim ${STAGEDIR}${DATADIR}/${VIM_VER}/keymap/
|
|
|
|
|
|
|
|
post-install-NLS-on:
|
2014-02-18 22:30:04 +01:00
|
|
|
${INSTALL_DATA} ${FILESDIR}/vietnamese_viscii.vim ${STAGEDIR}${DATADIR}/${VIM_VER}/keymap/
|
2012-09-29 01:29:02 +02:00
|
|
|
|
2014-02-18 22:30:04 +01:00
|
|
|
.include <bsd.port.post.mk>
|