This patch adds a python3 flavor to vim. OK?.
Index: Makefile
===================================================================
RCS file: /cvs/ports/editors/vim/Makefile,v
retrieving revision 1.131
diff -u -p -r1.131 Makefile
--- Makefile 4 Oct 2013 08:45:21 -0000 1.131
+++ Makefile 13 Oct 2013 16:48:28 -0000
@@ -6,7 +6,7 @@ COMMENT-lang= vi clone, NLS subpackage
VERSION= 7.4.45
DISTNAME= vim-${VERSION}
PKGNAME-main= vim-${VERSION}
-REVISION-main= 0
+REVISION-main= 1
PKGNAME-lang= vim-lang-${VERSION}
P= vim${VERSION:R:S/.//}
CATEGORIES= editors
@@ -34,7 +34,7 @@ MULTI_PACKAGES= -main -lang
FULLPKGNAME-lang= vim-lang-${VERSION}
FULLPKGPATH-lang= ${PKGPATH},-lang
-FLAVORS= huge gtk2 athena motif no_x11 perl python ruby
+FLAVORS= huge gtk2 athena motif no_x11 perl python python3 ruby
FLAVOR?= gtk2
CONFIGURE_STYLE=gnu
@@ -56,10 +56,28 @@ WANTLIB+= m perl util
.if ${FLAVOR:Mpython}
MODULES+= lang/python
CONFIGURE_ENV+= vi_cv_path_python=${MODPY_BIN}
-CONFIGURE_ARGS+= --enable-pythoninterp \
+CONFIGURE_ARGS+= --enable-pythoninterp=yes --enable-python3interp=no \
--with-python-config-dir=${MODPY_LIBDIR}/config
LIB_DEPENDS+= ${MODPY_LIB_DEPENDS}
WANTLIB+= m pthread util ${MODPY_WANTLIB}
+.endif
+
+.if ${FLAVOR:Mpython3}
+MODULES+= lang/python
+MODPY_MAJOR_VERSION = 3
+CONFIGURE_ENV+= vi_cv_path_python3=${MODPY_BIN}
+CONFIGURE_ARGS+= --enable-python3interp=yes --enable-pythoninterp=no \
+ --with-python3-config-dir=${MODPY_LIBDIR}/config-${MODPY_VERSION}m
+LIB_DEPENDS+= ${MODPY_LIB_DEPENDS}
+WANTLIB+= m pthread util ${MODPY_WANTLIB}
+.endif
+
+# Some parts of vim (like python autocompletion) require a version of vim
+# compiled with "+python" or "+python3". If python2 and python3 are enabled
+# in configure, vim is compiled with "+python/dyn" and "+python3/dyn" and that
+# breaks some plugins.
+.if ${FLAVOR:Mpython} && ${FLAVOR:Mpython3}
+ERRORS= "Fatal: You only can select one python flavor"
.endif
.if ${FLAVOR:Mruby}
Index: pkg/DESCR-main
===================================================================
RCS file: /cvs/ports/editors/vim/pkg/DESCR-main,v
retrieving revision 1.1
diff -u -p -r1.1 DESCR-main
--- pkg/DESCR-main 21 Nov 2006 11:25:03 -0000 1.1
+++ pkg/DESCR-main 13 Oct 2013 16:48:28 -0000
@@ -19,5 +19,6 @@ Flavors:
no_x11 - build without X11 support;
perl - build with Perl support;
python - build with Python support;
+ python3 - build with Python3 support;
ruby - build with Ruby support;
huge - build with --with-features=huge.