Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Oct 2017 17:15:06 +0000 (UTC)
From:      Adam Weinberger <adamw@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r453244 - in head: . editors/vim
Message-ID:  <201710311715.v9VHF6Wa078360@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adamw
Date: Tue Oct 31 17:15:06 2017
New Revision: 453244
URL: https://svnweb.freebsd.org/changeset/ports/453244

Log:
  Alter language bindings
  
  Separate python2 and python3 bindings[1], to allow each to be enabled
  independently or concurrently. py27 is still the default.
  
  As long as I'm messing with language bindings, turn the Tcl and Lua
  options off by default. This does NOT in any way affect support for
  editing those types of files (including indenting, completion,
  highlighting, linting, etc.)---it only affects plugins written in
  Tcl or Lua or interactive debugging.
  
  Suggested by:	mat [1]

Modified:
  head/UPDATING
  head/editors/vim/Makefile

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Tue Oct 31 15:45:59 2017	(r453243)
+++ head/UPDATING	Tue Oct 31 17:15:06 2017	(r453244)
@@ -5,6 +5,20 @@ they are unavoidable.
 You should get into the habit of checking this file for changes each time
 you update your ports collection, before attempting any port upgrades.
 
+20171031:
+  AFFECTS: users of editors/vim
+  AUTHOR: adamw@FreeBSD.org
+
+  The default vim language bindings have changed. Python 2 and 3 bindings
+  may now be enabled independently (the default vim package will continue
+  to depend on python-2.7).
+
+  Lua and Tcl bindings have been disabled by default. If you need these
+  bindings, you'll need to compile vim yourself. Note that bindings are
+  only for plugins written in those languages, and for interactive
+  debugging. Editing, indenting, linting, completing, and syntax-highlighting
+  those languages is NOT affected.
+
 20171026:
   AFFECTS: users of devel/universal-ctags
   AUTHOR: rodrigo@FreeBSD.org

Modified: head/editors/vim/Makefile
==============================================================================
--- head/editors/vim/Makefile	Tue Oct 31 15:45:59 2017	(r453243)
+++ head/editors/vim/Makefile	Tue Oct 31 17:15:06 2017	(r453244)
@@ -4,6 +4,7 @@
 PORTNAME=	vim
 PORTVERSION=	8.0.1231
 DISTVERSIONPREFIX=	v
+PORTREVISION=	1
 CATEGORIES=	editors
 
 MAINTAINER=	adamw@FreeBSD.org
@@ -37,15 +38,16 @@ MAKE_ARGS+=	CC="${CC}" \
 		VIMRUNTIMEDIR=${PREFIX}/share/vim/${VIM_VER} \
 		VIMRCLOC=${ETCDIR} \
 		CONF_OPT_MULTIBYTE=--enable-multibyte \
-		CONF_TERM_LIB=--with-tlib=ncurses
+		CONF_TERM_LIB=--with-tlib=ncurses \
+		CONF_OPT_PYTHON="${CONF_OPT_PYTHON}"
 
 # OPTIONS
-OPTIONS_DEFAULT=	CSCOPE DEFAULT_VIMRC EXUBERANT_CTAGS GTK2 LUA PERL PYTHON RUBY TCL
+OPTIONS_DEFAULT=	CSCOPE DEFAULT_VIMRC EXUBERANT_CTAGS GTK2 PERL PYTHON2 RUBY
 OPTIONS_DEFINE=		CSCOPE DEFAULT_VIMRC EXUBERANT_CTAGS NLS XTERM_SAVE
 OPTIONS_SINGLE=		UI
 OPTIONS_SINGLE_UI=	ATHENA CONSOLE GNOME GTK2 GTK3 MOTIF X11
 OPTIONS_GROUP=		LANGBIND
-OPTIONS_GROUP_LANGBIND=	LUA PERL PYTHON RUBY TCL
+OPTIONS_GROUP_LANGBIND=	LUA PERL PYTHON2 PYTHON3 RUBY TCL
 OPTIONS_SUB=		yes
 
 .if defined(LITE)
@@ -129,9 +131,15 @@ PERL_MAKE_ARGS=		CONF_OPT_PERL=--enable-perlinterp
 PERL_MAKE_ARGS_OFF=	CONF_OPT_PERL=--disable-perlinterp
 PERL_USES=		perl5
 
-PYTHON_MAKE_ARGS_OFF=	CONF_OPT_PYTHON="--disable-pythoninterp --disable-python3interp"
-PYTHON_USES=		python
+PYTHON2_VARS=		CONF_OPT_PYTHON+=--enable-pythoninterp
+PYTHON2_VARS_OFF=	CONF_OPT_PYTHON+=--disable-pythoninterp
+PYTHON2_BUILD_DEPENDS=	python${PYTHON2_DEFAULT}:lang/python${PYTHON2_DEFAULT:S/.//}
+PYTHON2_RUN_DEPENDS=	${PYTHON2_BUILD_DEPENDS}
 
+PYTHON3_VARS=		CONF_OPT_PYTHON+=--enable-python3interp
+PYTHON3_VARS_OFF=	CONF_OPT_PYTHON+=--disable-python3interp
+PYTHON3_USES=		python:3.4+
+
 RUBY_MAKE_ARGS=		CONF_OPT_RUBY=--enable-rubyinterp
 RUBY_MAKE_ARGS_OFF=	CONF_OPT_RUBY=--disable-rubyinterp
 RUBY_USE=		RUBY=yes
@@ -140,16 +148,6 @@ TCL_MAKE_ARGS=		CONF_OPT_TCL="--enable-tclinterp --wit
 TCL_MAKE_ARGS_OFF=	CONF_OPT_TCL=--disable-tclinterp
 TCL_USES=		tcl:85+
 
-.include <bsd.port.pre.mk>
-
-.if ${PORT_OPTIONS:MPYTHON}
-.if ${PYTHON_REL} < 3000
-MAKE_ARGS+=	CONF_OPT_PYTHON="--enable-pythoninterp --disable-python3interp"
-.else
-MAKE_ARGS+=	CONF_OPT_PYTHON="--enable-python3interp --disable-pythoninterp"
-.endif
-.endif
-
 post-extract:
 	${INSTALL_DATA} ${FILESDIR}/vietnamese_viscii.vim ${WRKSRC}/runtime/keymap
 
@@ -158,6 +156,8 @@ post-patch:
 	@${ECHO_CMD} '#define SYS_GVIMRC_FILE "'${ETCDIR}'/gvimrc"' >> ${WRKSRC}/src/feature.h
 	@${REINPLACE_CMD} -e 's|-liconv|${ICONV_LIB}|g; s|/usr/local|${LOCALBASE}|g' \
 		${WRKSRC}/src/auto/configure
+# Work around qa-check shebang error
+	@${REINPLACE_CMD} -e 1d ${WRKSRC}/runtime/tools/demoserver.py
 
 pre-configure:
 	@${CP} ${WRKSRC}/src/config.mk.dist ${WRKSRC}/src/auto/config.mk
@@ -185,10 +185,6 @@ post-patch-EXUBERANT_CTAGS-on:
 post-patch-LUA-on:
 	@${REINPLACE_CMD} -e 's|set dummy lua;|set dummy ${LUA_CMD};|g' ${WRKSRC}/src/auto/configure
 
-post-patch-PYTHON-off:
-# Work around qa-check shebang error
-	@${REINPLACE_CMD} -e 1d ${WRKSRC}/runtime/tools/demoserver.py
-
 post-patch-XTERM_SAVE-on:
 	@${REINPLACE_CMD} -e '/FEAT_XTERM_SAVE/ s|.*|#define FEAT_XTERM_SAVE|' ${WRKSRC}/src/feature.h
 
@@ -202,4 +198,4 @@ post-install-NLS-off:
 	@${MKDIR} ${STAGEDIR}${DATADIR}/${VIM_VER}/keymap
 	${INSTALL_DATA} ${WRKSRC}/runtime/keymap/* ${STAGEDIR}${DATADIR}/${VIM_VER}/keymap
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710311715.v9VHF6Wa078360>