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
|
|
|
|
PORTVERSION= 7.4.${PATCHLEVEL}
|
2014-02-25 17:50:34 +01:00
|
|
|
PORTREVISION?= 0
|
2000-09-26 16:48:33 +02:00
|
|
|
CATEGORIES?= editors
|
2014-02-19 16:27:58 +01:00
|
|
|
MASTER_SITES= VIM:source \
|
|
|
|
${MASTER_SITE_VIM:S|unix|patches/${PORTVERSION:R}|}:patch \
|
|
|
|
LOCAL/sunpoet/${PORTNAME}:source,patch
|
|
|
|
DISTFILES= ${PORTNAME}-${PORTVERSION:R}${EXTRACT_SUFX}:source
|
2013-12-02 20:48:37 +01:00
|
|
|
DIST_SUBDIR= ${PORTNAME}
|
2014-02-18 23:08:52 +01:00
|
|
|
EXTRACT_ONLY= ${PORTNAME}-${PORTVERSION:R}${EXTRACT_SUFX}
|
2000-07-31 21:28:41 +02:00
|
|
|
|
2014-02-19 16:22:02 +01:00
|
|
|
PATCH_SITES= ${MASTER_SITE_VIM:S|unix|patches/${PORTVERSION:R}|} \
|
2014-02-18 22:30:04 +01:00
|
|
|
LOCAL/sunpoet/${PORTNAME}
|
2000-07-31 21:28:41 +02:00
|
|
|
|
2013-12-02 20:42:01 +01:00
|
|
|
MAINTAINER?= sunpoet@FreeBSD.org
|
2003-02-18 20:08:21 +01:00
|
|
|
COMMENT?= Vi "workalike", with many additional features
|
2000-07-31 21:28:41 +02:00
|
|
|
|
2014-02-18 22:30:04 +01:00
|
|
|
OPTIONS_DEFINE= CSCOPE 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
|
|
|
|
EXUBERANT_CTAGS_DESC= Use exctags instead of ctags
|
|
|
|
UI_DESC= User interface
|
|
|
|
XTERM_SAVE_DESC= Restore xterm screen after exit
|
|
|
|
|
|
|
|
ALL_TARGET= # empty
|
|
|
|
MAKE_ARGS+= CC=${CC} CONF_ARGS="--prefix=${PREFIX} ${CSCOPE_ARG}" STRIP=${STRIP_CMD} CONF_OPT_MULTIBYTE=--enable-multibyte CONF_TERM_LIB=--with-tlib=termlib
|
2011-06-18 16:37:18 +02:00
|
|
|
MAKE_JOBS_UNSAFE= yes
|
2014-02-18 22:30:04 +01:00
|
|
|
PATCH_DIST_ARGS=--batch --directory ${WRKSRC} --forward --quiet --remove-empty-files ${PATCH_DIST_STRIP}
|
|
|
|
REINPLACE_ARGS= -i ''
|
2001-05-10 02:40:33 +02:00
|
|
|
USE_BZIP2= yes
|
2014-02-18 22:30:04 +01:00
|
|
|
USES= iconv pkgconfig shebangfix
|
|
|
|
WANT_GNOME= yes
|
2013-03-21 00:56:59 +01:00
|
|
|
|
2014-02-25 17:50:34 +01:00
|
|
|
PATCHLEVEL= 192
|
2014-02-18 22:30:04 +01:00
|
|
|
PATCHFILES!= /usr/bin/jot -s " " -w "%03d" ${PATCHLEVEL} 1 ${PATCHLEVEL}
|
|
|
|
BADPATCHES= 064 087 147 # empty
|
|
|
|
.for p in ${BADPATCHES}
|
2014-02-19 16:27:58 +01:00
|
|
|
DISTFILES+= ${PORTVERSION:R}.${p}:patch
|
2014-02-18 22:30:04 +01:00
|
|
|
PATCHFILES:= ${PATCHFILES:N${p}}
|
|
|
|
.endfor
|
|
|
|
PATCHFILES:= ${PATCHFILES:C/^/${PORTVERSION:R}./g}
|
2002-02-05 18:49:36 +01:00
|
|
|
|
2014-02-18 22:30:04 +01:00
|
|
|
BUILD_WRKSRC= ${WRKDIR}/${VIM_VER}/src
|
|
|
|
CONFIGURE_WRKSRC= ${WRKDIR}/${VIM_VER}/src
|
|
|
|
INSTALL_WRKSRC= ${WRKDIR}/${VIM_VER}/src
|
|
|
|
WRKSRC= ${WRKDIR}/${VIM_VER}
|
2005-12-08 13:24:07 +01:00
|
|
|
|
2014-02-18 22:30:04 +01:00
|
|
|
PLIST_SUB= VIM_VER=${VIM_VER}
|
|
|
|
PORTDATA= *
|
2007-10-25 18:52:59 +02:00
|
|
|
|
2014-02-18 22:30:04 +01:00
|
|
|
VIM_VER= ${PORTNAME}${PORTVERSION:R:S/.//g}
|
2007-12-19 17:30:28 +01:00
|
|
|
|
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]*
|
|
|
|
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]*
|
|
|
|
OPTIONS_DEFAULT=CSCOPE EXUBERANT_CTAGS GTK2 LUA PERL PYTHON RUBY TCL
|
|
|
|
MAKE_ARGS+= CONF_OPT_FEAT=--with-features=big \
|
|
|
|
CONF_OPT_INPUT=--enable-xim \
|
|
|
|
CONF_OPT_OUTPUT=--enable-fontset
|
|
|
|
PLIST_SUB+= NON_LITE=""
|
|
|
|
.endif
|
|
|
|
|
|
|
|
ATHENA_MAKE_ARGS= CONF_OPT_GUI=--enable-gui=athena
|
|
|
|
ATHENA_USE= XORG=xaw
|
|
|
|
CONSOLE_MAKE_ARGS= CONF_OPT_GUI="--enable-gui=no --without-x"
|
|
|
|
CSCOPE_MAKE_ARGS= CONF_OPT_CSCOPE=--enable-cscope
|
|
|
|
CSCOPE_RUN_DEPENDS= ${LOCALBASE}/bin/cscope:${PORTSDIR}/devel/cscope
|
|
|
|
EXUBERANT_CTAGS_RUN_DEPENDS= ${LOCALBASE}/bin/exctags:${PORTSDIR}/devel/ctags
|
2014-02-24 19:39:50 +01:00
|
|
|
GNOME_MAKE_ARGS= CONF_OPT_GUI=--enable-gui=gnome2 X_LIBS="$(X_LIBS) -lX11 -lXpm -lXt"
|
|
|
|
GNOME_USE= GNOME=libgnomeui XORG=glproto,xpm,xt
|
|
|
|
GTK2_MAKE_ARGS= CONF_OPT_GUI=--enable-gui=gtk2 X_LIBS="$(X_LIBS) -lX11 -lXpm -lXt"
|
|
|
|
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}
|
|
|
|
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
|
|
|
|
PYTHON_USE= PYTHON=yes
|
|
|
|
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+
|
|
|
|
X11_MAKE_ARGS= CONF_OPT_GUI="--enable-gui=no --with-x" X_LIBS="$(X_LIBS) -lX11 -lXt"
|
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.options.mk>
|
|
|
|
|
2014-02-20 15:44:42 +01:00
|
|
|
.if !${PORT_OPTIONS:MATHENA} && !${PORT_OPTIONS:MCONSOLE} && !${PORT_OPTIONS:MGNOME} && !${PORT_OPTIONS:MGTK2} && !${PORT_OPTIONS:MMOTIF} && !${PORT_OPTIONS:MX11}
|
|
|
|
IGNORE= this port has new UI option (CONSOLE) for users who do not need GUI support. Please run "make config" to modify your setting
|
|
|
|
.endif
|
|
|
|
|
2014-02-24 19:39:50 +01:00
|
|
|
.if ${PORT_OPTIONS:MCONSOLE} || ${PORT_OPTIONS:MX11}
|
2014-02-18 22:30:04 +01:00
|
|
|
PLIST_SUB+= GUI="@comment "
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= GUI=""
|
2013-03-21 00:56:59 +01:00
|
|
|
.endif
|
2001-11-09 17:13:25 +01:00
|
|
|
|
2013-03-21 00:56:59 +01:00
|
|
|
.if ${PORT_OPTIONS:MEXUBERANT_CTAGS}
|
|
|
|
CTAGS_CMD= exctags -R .
|
|
|
|
.else
|
2014-02-18 22:30:04 +01:00
|
|
|
CTAGS_CMD= ${FIND} . -type f \\| ${XARGS} ctags
|
2013-03-21 00:56:59 +01:00
|
|
|
.endif
|
2007-01-03 09:40:20 +01:00
|
|
|
|
2014-02-18 22:30:04 +01:00
|
|
|
.if ${PORT_OPTIONS:MGNOME}
|
2014-02-18 23:08:52 +01:00
|
|
|
PKGNAMESUFFIX+= -gnome2
|
2014-02-18 22:30:04 +01:00
|
|
|
.endif
|
2013-03-21 00:56:59 +01: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}
|
|
|
|
.if ${PYTHON_REL} < 300
|
|
|
|
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:
|
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
|
|
|
|
@${FIND} ${WRKSRC}/runtime/ -name menu\*.vim -print0 | ${XARGS} -0 ${REINPLACE_CMD} -e 's,ctags -R \\.,${CTAGS_CMD},g'
|
|
|
|
.for badpatch in ${BADPATCHES}
|
|
|
|
@${ECHO_MSG} "===> Applying distribution patch ${badpatch}"
|
|
|
|
@${PATCH} ${PATCH_DIST_ARGS} -i ${_DISTDIR}/${PORTVERSION:R}.${badpatch}
|
|
|
|
.endfor
|
2007-01-02 23:41:37 +01:00
|
|
|
|
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
|
|
|
|
@(cd ${WRKSRC}/src/ && ${MAKE} distclean)
|
|
|
|
@${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
|
2013-03-21 00:56:59 +01:00
|
|
|
.if ${PORT_OPTIONS:MXTERM_SAVE}
|
2014-02-18 22:30:04 +01:00
|
|
|
@${REINPLACE_CMD} -e '/FEAT_XTERM_SAVE/ s|.*|#define FEAT_XTERM_SAVE|' ${WRKSRC}/src/feature.h
|
2006-09-10 04:29:51 +02:00
|
|
|
.endif
|
2000-07-31 21:28:41 +02:00
|
|
|
|
2010-09-17 02:46:45 +02:00
|
|
|
post-configure:
|
2014-02-18 22:30:04 +01:00
|
|
|
@(cd ${WRKSRC}/src/ && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS} scratch config)
|
|
|
|
@${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
|
2014-02-18 22:30:04 +01:00
|
|
|
.if !${PORT_OPTIONS:MNLS}
|
|
|
|
${MKDIR} ${STAGEDIR}${DATADIR}/${VIM_VER}/keymap/
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/runtime/keymap/* ${STAGEDIR}${DATADIR}/${VIM_VER}/keymap/
|
|
|
|
.endif
|
|
|
|
${INSTALL_DATA} ${FILESDIR}/vietnamese_viscii.vim ${STAGEDIR}${DATADIR}/${VIM_VER}/keymap/
|
|
|
|
${TOUCH} ${STAGEDIR}${DATADIR}/${VIM_VER}/lang/.keepme
|
2012-09-29 01:29:02 +02:00
|
|
|
|
2014-02-18 22:30:04 +01:00
|
|
|
.include <bsd.port.post.mk>
|