git: 620f205539a4 - main - editors/vim: Flavorize and update to 8.2.3394

Adam Weinberger adamw at FreeBSD.org
Thu Sep 2 06:46:36 UTC 2021


The branch main has been updated by adamw:

URL: https://cgit.FreeBSD.org/ports/commit/?id=620f205539a43fd8da97750d33eebdfc1e133330

commit 620f205539a43fd8da97750d33eebdfc1e133330
Author:     Adam Weinberger <adamw at FreeBSD.org>
AuthorDate: 2021-09-02 06:36:47 +0000
Commit:     Adam Weinberger <adamw at FreeBSD.org>
CommitDate: 2021-09-02 06:36:47 +0000

    editors/vim: Flavorize and update to 8.2.3394
    
    This commit completely rewires the vim ports. It includes the following:
    
    * `vim' is now a TUI-only package. It is what the `vim-console' port
      was.
    
    * `vim-gtk3' includes the TUI binary (vim) and a GTk3-backed GUI. It is
      what the `vim' port was.
    
    * Each GUI toolkit has a separate package. There is vim-gtk3, -gtk2,
      -motif, -athena, and -x11.
    
    * `vim-tiny' is still the same thing, except it includes a defaults.vim
      stub to silence a startup error message.
    
    * Only the python3 language binding is included by default. Perl, Ruby,
      TCL, Scheme, and Lua can still be enabled via options. But there are
      very, very few plugins that require anything other than python.
    
    * py27 support is removed entirely.
    
    * CScope support is unconditionally enabled, but vim no longer depends
      upon it. If cscope is installed, it'll be used.
    
    * The default ctags is now the version included in base. It's very
      rudimentary, but only a subset of users use ctags at all. Universal or
      exuberant ctags can still be enabled via option knobs.
---
 editors/Makefile                                   |   2 -
 editors/vim-console/Makefile                       |  12 --
 editors/vim-console/pkg-descr                      |  14 --
 editors/vim-tiny/Makefile                          |  19 ---
 editors/vim-tiny/pkg-descr                         |  15 --
 editors/vim/Makefile                               | 166 ++++++++++++---------
 editors/vim/distinfo                               |   6 +-
 editors/vim/pkg-descr                              |   6 +
 editors/{vim-tiny/pkg-plist => vim/pkg-plist-tiny} |   0
 9 files changed, 105 insertions(+), 135 deletions(-)

diff --git a/editors/Makefile b/editors/Makefile
index 071288f27a88..79b5cba41c67 100644
--- a/editors/Makefile
+++ b/editors/Makefile
@@ -261,8 +261,6 @@
     SUBDIR += vigor
     SUBDIR += vile
     SUBDIR += vim
-    SUBDIR += vim-console
-    SUBDIR += vim-tiny
     SUBDIR += vscode
     SUBDIR += web-mode
     SUBDIR += with-editor
diff --git a/editors/vim-console/Makefile b/editors/vim-console/Makefile
deleted file mode 100644
index 676344d22338..000000000000
--- a/editors/vim-console/Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-# Created by: David O'Brien (obrien at NUXI.com)
-
-PKGNAMESUFFIX=	-console
-
-COMMENT=	Improved version of the vi editor (console only)
-
-CONFLICTS_INSTALL=	vim vim-tiny
-
-CONSOLE=	yes
-MASTERDIR=	${.CURDIR}/../vim
-
-.include "${MASTERDIR}/Makefile"
diff --git a/editors/vim-console/pkg-descr b/editors/vim-console/pkg-descr
deleted file mode 100644
index bef080aff377..000000000000
--- a/editors/vim-console/pkg-descr
+++ /dev/null
@@ -1,14 +0,0 @@
-Vim is a highly configurable text editor built to enable efficient text editing.
-It is an improved version of the vi editor distributed with most UNIX systems.
-
-Vim is often called a "programmer's editor," and so useful for programming that
-many consider it an entire IDE. It's not just for programmers, though. Vim is
-perfect for all kinds of text editing, from composing email to editing
-configuration files.
-
-This is the console-only version. It differs from the main vim package only in
-lack of Gtk2 GUI and no external language bindings. The editing experience is
-identical.
-
-WWW: http://www.vim.org/
-WWW: https://github.com/vim/vim
diff --git a/editors/vim-tiny/Makefile b/editors/vim-tiny/Makefile
deleted file mode 100644
index 6982ad848100..000000000000
--- a/editors/vim-tiny/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-# Created by: Adam Weinberger <adamw at FreeBSD.org>
-
-PKGNAMESUFFIX=	-tiny
-
-COMMENT=	Improved version of the vi editor (vim binary only)
-
-CONFLICTS_INSTALL=	vim vim-console
-
-TINY=		yes
-MASTERDIR=	${.CURDIR}/../vim
-
-PORTDATA=	# Not for -tiny
-PLIST=		${.CURDIR}/pkg-plist
-
-do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/src/vim ${STAGEDIR}${PREFIX}/bin
-	${INSTALL_MAN} ${WRKSRC}/runtime/doc/vim.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
-
-.include "${MASTERDIR}/Makefile"
diff --git a/editors/vim-tiny/pkg-descr b/editors/vim-tiny/pkg-descr
deleted file mode 100644
index 58a3e04a64b2..000000000000
--- a/editors/vim-tiny/pkg-descr
+++ /dev/null
@@ -1,15 +0,0 @@
-Vim is a highly configurable text editor built to enable efficient text editing.
-It is an improved version of the vi editor distributed with most UNIX systems.
-
-Vim is often called a "programmer's editor," and so useful for programming that
-many consider it an entire IDE. It's not just for programmers, though. Vim is
-perfect for all kinds of text editing, from composing email to editing
-configuration files.
-
-This is the "tiny" version, which is console-only and contains ONLY the vim
-binary. It contains no help files, syntax files, or any other runtime files,
-and is designed only for minimal installs. You almost always want the vim
-or vim-console package instead.
-
-WWW: http://www.vim.org/
-WWW: https://github.com/vim/vim
diff --git a/editors/vim/Makefile b/editors/vim/Makefile
index 24ed2902e873..5ee67ee2e4a9 100644
--- a/editors/vim/Makefile
+++ b/editors/vim/Makefile
@@ -1,13 +1,12 @@
 # Created by: David O'Brien <obrien at cs.ucdavis.edu>
 
 PORTNAME=	vim
-PORTVERSION=	8.2.3273
-PORTREVISION=	1
+PORTVERSION=	8.2.3394
 DISTVERSIONPREFIX=	v
 CATEGORIES=	editors
 
 MAINTAINER=	adamw at FreeBSD.org
-COMMENT?=	Improved version of the vi editor
+COMMENT=	Improved version of the vi editor (${FLAVOR:U} flavor)
 
 LICENSE=	VIM
 LICENSE_NAME=	VIM License
@@ -17,10 +16,9 @@ LICENSE_PERMS=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
 USES=		cpe iconv ncurses pkgconfig shebangfix
 USE_GITHUB=	yes
 
-CONFLICTS_INSTALL?=	vim-console vim-tiny
-
 # Vim will try to link against libcanberra if it's installed
 CONFIGURE_ARGS=	--disable-canberra \
+		--enable-cscope \
 		--enable-gui=${GUI} \
 		--enable-multibyte \
 		--with-tlib=ncursesw
@@ -31,25 +29,92 @@ MAKE_ARGS=	STRIP="${STRIP_CMD}" \
 CPE_VERSION=	${PORTVERSION:R}
 GNU_CONFIGURE=	yes
 PLIST_SUB=	VIM_VER=${VIM_VER}
-PORTDATA?=	${VIM_VER}
+PORTDATA=	${VIM_VER}
 PORTSCOUT=	ignore:1
 SHEBANG_FILES=	runtime/tools/demoserver.py runtime/tools/efm_perl.pl
 VIM_VER=	${PORTNAME}${PORTVERSION:R:S|.||g}
 
-# OPTIONS for normal (non-tiny) vim
-# ### Make sure any new options are excluded below in CONSOLE/TINY
-OPTIONS_DEFAULT=	CSCOPE DEFAULT_VIMRC CTAGS_EXUBERANT GTK3 PERL PYTHON RUBY
-OPTIONS_DEFINE=		CSCOPE DEFAULT_VIMRC MAKE_JOBS NLS XTERM_SAVE
-OPTIONS_SINGLE=		CTAGS UI
+# Flavors {{{1
+# FLAVORS are used to build various Vim GUIs. The default flavor (`vim') is
+# console-only.
+FLAVORS=	console athena gtk2 gtk3 motif x11 tiny
+
+# GUI flavors
+.if ${FLAVOR:U} == console
+GUI=		no
+PLIST_SUB+=	GUI="@comment " DESKTOP="@comment "
+CONFLICTS_INSTALL=	vim-athena vim-gtk2 vim-gtk3 vim-motif vim-tiny vim-x11
+
+.elif ${FLAVOR:U} == tiny
+PKGNAMESUFFIX=	-tiny
+GUI=		no
+PLIST=		${.CURDIR}/pkg-plist-tiny
+CONFLICTS_INSTALL=	vim-athena vim-console vim-gtk2 vim-gtk3 vim-motif vim-x11
+
+.elif ${FLAVOR:U} == athena
+PKGNAMESUFFIX=	-athena
+GUI=		athena
+CONFIGURE_ARGS+=--enable-xim --enable-fontset
+PLIST_SUB+=	GUI="" DESKTOP="@comment "
+USES+=		xorg
+USE_XORG+=	ice sm x11 xaw xmu xpm xt
+CONFLICTS_INSTALL=	vim-console vim-gtk2 vim-gtk3 vim-motif vim-tiny vim-x11
+
+.elif ${FLAVOR:U} == gtk2
+PKGNAMESUFFIX=	-gtk2
+GUI=		gtk2
+INSTALLS_ICONS=	yes
+CONFIGURE_ARGS+=--enable-xim --enable-fontset
+PLIST_SUB+=	GUI="" DESKTOP=""
+USES+=		desktop-file-utils gnome xorg
+USE_GNOME=	gdkpixbuf2 gtk20
+USE_XORG=	ice sm x11 xpm xt
+CONFLICTS_INSTALL=	vim-athena vim-console vim-gtk3 vim-motif vim-tiny vim-x11
+
+.elif ${FLAVOR:U} == gtk3
+PKGNAMESUFFIX=	-gtk3
+GUI=		gtk3
+INSTALLS_ICONS=	yes
+CONFIGURE_ARGS+=--enable-xim --enable-fontset
+PLIST_SUB+=	GUI="" DESKTOP=""
+USES+=		desktop-file-utils gnome xorg
+USE_GNOME=	cairo gdkpixbuf2 gtk30
+USE_XORG=	ice sm x11 xpm xt
+CONFLICTS_INSTALL=	vim-athena vim-console vim-gtk2 vim-motif vim-tiny vim-x11
+
+.elif ${FLAVOR:U} == motif
+PKGNAMESUFFIX=	-motif
+GUI=		motif
+CONFIGURE_ARGS+=--enable-xim --enable-fontset --with-motif=lib="${MOTIFLIB}"
+CONFIGURE_ENV+=	MOTIFHOME=${LOCALBASE}
+PLIST_SUB+=	GUI="" DESKTOP="@comment "
+USES+=		motif xorg
+USE_XORG=	ice sm x11 xmu xt
+CONFLICTS_INSTALL=	vim-athena vim-console vim-gtk2 vim-gtk3 vim-tiny vim-x11
+
+.elif ${FLAVOR:U} == x11
+PKGNAMESUFFIX=	-x11
+GUI=		no
+CONFIGURE_ARGS+=--enable-xim --enable-fontset --with-x
+PLIST_SUB+=	GUI="@comment " DESKTOP="@comment "
+USES+=		xorg
+USE_XORG=	ice sm x11 xt
+CONFLICTS_INSTALL=	vim-athena vim-console vim-gtk2 vim-gtk3 vim-motif vim-tiny
+.endif
+
+# Options {{{1
+# The bulk of the OPTIONS are for normal (non-tiny) vim
+### Make sure any new options are excluded below in CONSOLE/TINY
+OPTIONS_DEFAULT=	CTAGS_BASE DEFAULT_VIMRC PYTHON
+OPTIONS_DEFINE=		DEFAULT_VIMRC MAKE_JOBS NLS XTERM_SAVE
+OPTIONS_SINGLE=		CTAGS
 OPTIONS_SINGLE_CTAGS=	CTAGS_BASE CTAGS_EXUBERANT CTAGS_UNIVERSAL
-OPTIONS_SINGLE_UI=	ATHENA CONSOLE GTK2 GTK3 MOTIF X11
 OPTIONS_GROUP=		LANGBIND
 OPTIONS_GROUP_LANGBIND=	LUA PERL PYTHON RUBY SCHEME TCL
 OPTIONS_SUB=		yes
 
 # vim-tiny excludes everything except CONSOLE, DEFAULT_VIMRC, MAKE_JOBS
-.if defined(CONSOLE) || defined(TINY)
-OPTIONS_SLAVE=		CONSOLE
+.if ${FLAVOR:U} == tiny
 OPTIONS_EXCLUDE:=	${OPTIONS_DEFINE:NDEFAULT_VIMRC:NMAKE_JOBS} \
 			${OPTIONS_SINGLE_UI:NCONSOLE} \
 			${OPTIONS_GROUP_LANGBIND} \
@@ -64,22 +129,11 @@ CTAGS_BASE_DESC=	Use system ctags
 CTAGS_EXUBERANT_DESC=	Use exctags instead of ctags
 CTAGS_UNIVERSAL_DESC=	Use uctags instead of ctags
 
-UI_DESC=		User interface
-ATHENA_DESC=		Athena GUI toolkit
-CSCOPE_DESC=		cscope support
-CONSOLE_DESC=		Console/terminal mode
-
-LANGBIND_DESC=		Optional language bindings
-SCHEME_DESC=		MzScheme (Racket) bindings
-
 # BROKEN: ruby.h: error: wrong number of arguments specified for 'deprecated' attribute
 OPTIONS_EXCLUDE_powerpc64=	RUBY
 OPTIONS_EXCLUDE_powerpc64le=	RUBY
 
 # GENERAL OPTIONS
-CSCOPE_CONFIGURE_ENABLE=cscope
-CSCOPE_RUN_DEPENDS=	cscope:devel/cscope
-
 CTAGS_EXUBERANT_RUN_DEPENDS=	exctags:devel/ctags
 CTAGS_UNIVERSAL_RUN_DEPENDS=	uctags:devel/universal-ctags
 
@@ -88,40 +142,9 @@ MAKE_JOBS_VARS_OFF=	MAKE_JOBS_UNSAFE=yes
 NLS_CONFIGURE_ENABLE=	nls
 NLS_USES=		gettext
 
-# UI
-ATHENA_PLIST_SUB=	GUI="" DESKTOP="@comment "
-ATHENA_USES=		xorg
-ATHENA_USE=		XORG=ice,sm,x11,xaw,xmu,xpm,xt
-ATHENA_VARS=		GUI=athena
-
-CONSOLE_CONFIGURE_OFF=	--enable-xim --enable-fontset
-CONSOLE_PLIST_SUB=	GUI="@comment " DESKTOP="@comment "
-CONSOLE_VARS=		GUI=no
-
-GTK2_PLIST_SUB=		GUI="" DESKTOP=""
-GTK2_USE=		GNOME=gdkpixbuf2,gtk20 XORG=ice,sm,x11,xpm,xt
-GTK2_USES=		desktop-file-utils gnome xorg
-GTK2_VARS=		GUI=gtk2 INSTALLS_ICONS=yes
-
-GTK3_PLIST_SUB=		GUI="" DESKTOP=""
-GTK3_USE=		GNOME=cairo,gdkpixbuf2,gtk30 XORG=ice,sm,x11,xpm,xt
-GTK3_USES=		desktop-file-utils gnome xorg
-GTK3_VARS=		GUI=gtk3 INSTALLS_ICONS=yes
-
-MOTIF_CONFIGURE_ENV=	MOTIFHOME=${LOCALBASE}
-MOTIF_CONFIGURE_WITH=	motif-lib="${MOTIFLIB}"
-MOTIF_PLIST_SUB=	GUI="" DESKTOP="@comment "
-MOTIF_USE=		XORG=ice,sm,x11,xmu,xt
-MOTIF_USES=		motif xorg
-MOTIF_VARS=		GUI=motif
-
-X11_CONFIGURE_WITH=	x
-X11_PLIST_SUB=		GUI="@comment " DESKTOP="@comment "
-X11_USE=		XORG=ice,sm,x11,xt
-X11_USES=		xorg
-X11_VARS=		GUI=no
-
 # LANGUAGE BINDINGS
+LANGBIND_DESC=		Optional language bindings
+
 LUA_CONFIGURE_ENABLE=	luainterp
 LUA_CONFIGURE_WITH=	lua-prefix=${LOCALBASE}
 LUA_USES=		lua
@@ -129,12 +152,14 @@ LUA_USES=		lua
 PERL_CONFIGURE_ENABLE=	perlinterp
 PERL_USES=		perl5
 
-PYTHON_USES=		python
+PYTHON_USES=		python:3.6+
 PYTHON_USES_OFF=	python:env
+PYTHON_CONFIGURE_ARGS=	--enable-python3interp --with-python3-command=${PYTHON_CMD}
 
 RUBY_CONFIGURE_ENABLE=	rubyinterp
 RUBY_USE=		RUBY=yes
 
+SCHEME_DESC=		MzScheme (Racket) bindings
 SCHEME_CONFIGURE_ENABLE=mzschemeinterp
 SCHEME_BUILD_DEPENDS=	mzscheme:lang/racket
 SCHEME_RUN_DEPENDS=	${SCHEME_BUILD_DEPENDS}
@@ -143,17 +168,11 @@ TCL_CONFIGURE_ENABLE=	tclinterp
 TCL_CONFIGURE_WITH=	tclsh=tclsh${TCL_VER}
 TCL_USES=		tcl
 
+# Targets {{{1
 .include <bsd.port.pre.mk>
 
-.if ${PORT_OPTIONS:MPYTHON}
-.  if !empty(WITH_DEBUG)
+.if ${PORT_OPTIONS:MPYTHON} && !empty(WITH_DEBUG)
 CFLAGS+=		-DPy_DEBUG -DPy_DEBUG_NO_PYMALLOC
-.  endif
-.  if ${PYTHON_MAJOR_VER} == 3
-CONFIGURE_ARGS+=	--enable-python3interp --with-python3-command=${PYTHON_CMD}
-.  else
-CONFIGURE_ARGS+=	--enable-pythoninterp  --with-python-command=${PYTHON_CMD}
-.  endif
 .endif
 
 post-extract:
@@ -173,13 +192,20 @@ post-install-DEFAULT_VIMRC-on:
 	${MKDIR} ${STAGEDIR}${ETCDIR}
 	${INSTALL_DATA} ${FILESDIR}/vimrc ${STAGEDIR}${ETCDIR}/vimrc.sample
 
-.if !defined(TINY)
+.if ${FLAVOR:U} == tiny
+do-install:
+	${MKDIR} ${STAGEDIR}${DATADIR}/${VIM_VER}
+	${INSTALL_PROGRAM} ${WRKSRC}/src/vim ${STAGEDIR}${PREFIX}/bin
+	${TOUCH} ${STAGEDIR}${DATADIR}/${VIM_VER}/defaults.vim
+	${INSTALL_MAN} ${WRKSRC}/runtime/doc/vim.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
+
+.else  # flavor != tiny
 post-install:
 	${RM} ${STAGEDIR}${PREFIX}/bin/ex
 	${RM} ${STAGEDIR}${PREFIX}/bin/view
-.for F in eview evim gview gvim gvimdiff rgview rgvim rview rvim vimdiff
+.  for F in eview evim gview gvim gvimdiff rgview rgvim rview rvim vimdiff
 	${LN} -sf vim ${STAGEDIR}${PREFIX}/bin/$F
-.endfor
+.  endfor
 
 # OPTIONS
 post-patch-CTAGS_BASE-on:
diff --git a/editors/vim/distinfo b/editors/vim/distinfo
index f63fb5f51611..081caf079ae3 100644
--- a/editors/vim/distinfo
+++ b/editors/vim/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1627902718
-SHA256 (vim-vim-v8.2.3273_GH0.tar.gz) = 03c5f8962aa68107e4310895b0679c463f6aef2452759ccac50cd052eda49b76
-SIZE (vim-vim-v8.2.3273_GH0.tar.gz) = 15665556
+TIMESTAMP = 1630541775
+SHA256 (vim-vim-v8.2.3394_GH0.tar.gz) = aae16c7705bd22e1ecc9316366ad19193a980b986019557aa95f04f6bacd0b10
+SIZE (vim-vim-v8.2.3394_GH0.tar.gz) = 15708831
diff --git a/editors/vim/pkg-descr b/editors/vim/pkg-descr
index 96764a7b709e..daacdb5d7419 100644
--- a/editors/vim/pkg-descr
+++ b/editors/vim/pkg-descr
@@ -6,5 +6,11 @@ many consider it an entire IDE. It's not just for programmers, though. Vim is
 perfect for all kinds of text editing, from composing email to editing
 configuration files.
 
+FreeBSD has the following Vim packages:
+* vim: Console-only Vim (vim binary) with all runtime files
+* vim-gtk3, -gtk2, -athena, -motif, -x11: Console Vim plus a GUI (gvim binary)
+* vim-tiny: Vim binary only, with no runtime files. Not useful for most people;
+  intended for minimal (ex. jail) installations
+
 WWW: http://www.vim.org/
 WWW: https://github.com/vim/vim
diff --git a/editors/vim-tiny/pkg-plist b/editors/vim/pkg-plist-tiny
similarity index 100%
rename from editors/vim-tiny/pkg-plist
rename to editors/vim/pkg-plist-tiny


More information about the dev-commits-ports-main mailing list