2007-08-29 18:19:13 +00:00
|
|
|
COMMENT-main= vi clone, many additional features
|
|
|
|
COMMENT-lang= vi clone, NLS subpackage
|
1998-06-09 07:48:48 +00:00
|
|
|
|
2023-01-06 18:23:08 +00:00
|
|
|
# careful with PLISTs if updating; it usually works best if you use
|
|
|
|
# a gui flavour rather than no_x11
|
|
|
|
V= 9.0.1151
|
2016-10-12 09:00:14 +00:00
|
|
|
GH_ACCOUNT= vim
|
|
|
|
GH_PROJECT= vim
|
|
|
|
GH_TAGNAME= v$V
|
|
|
|
|
2022-05-28 11:09:25 +00:00
|
|
|
MASTER_SITES0= https://github.com/vim/colorschemes/archive/
|
|
|
|
DISTFILES= ${GH_DISTFILE} \
|
|
|
|
vim-colorschemes-20220522{9d3d216b72dd77a2ce4c27e8746708b916864645}.tar.gz:0
|
|
|
|
|
2022-08-11 15:02:38 +00:00
|
|
|
PKGNAME= vim-$V
|
|
|
|
FULLPKGNAME-lang= vim-lang-$V
|
2019-01-24 09:32:15 +00:00
|
|
|
FULLPKGPATH-lang= ${PKGPATH},-lang
|
2015-10-30 13:00:37 +00:00
|
|
|
P= vim${V:R:S/.//}
|
2004-07-12 19:32:59 +00:00
|
|
|
CATEGORIES= editors
|
2010-05-28 00:52:19 +00:00
|
|
|
|
2018-03-08 16:04:30 +00:00
|
|
|
HOMEPAGE= https://www.vim.org/
|
2004-07-12 19:32:59 +00:00
|
|
|
|
2020-07-11 22:54:35 +00:00
|
|
|
MAINTAINER= Stuart Henderson <stu.ports@spacehopper.org>
|
2019-03-08 01:55:36 +00:00
|
|
|
|
2004-07-12 19:32:59 +00:00
|
|
|
# donation-ware
|
2019-06-03 16:06:50 +00:00
|
|
|
PERMIT_PACKAGE= Yes
|
2013-03-16 22:56:44 +00:00
|
|
|
|
2021-07-26 20:31:16 +00:00
|
|
|
WANTLIB += c curses iconv intl m sodium
|
2017-11-02 22:07:13 +00:00
|
|
|
|
2019-05-02 01:03:11 +00:00
|
|
|
LIB_DEPENDS-main= ${LIB_DEPENDS} \
|
2021-07-26 20:31:16 +00:00
|
|
|
devel/gettext,-runtime \
|
|
|
|
security/libsodium
|
2004-07-12 19:32:59 +00:00
|
|
|
|
2010-05-28 00:52:19 +00:00
|
|
|
MULTI_PACKAGES= -main -lang
|
2004-07-12 19:32:59 +00:00
|
|
|
|
2019-03-08 01:55:36 +00:00
|
|
|
# UI flavours (pick one only)
|
2021-01-24 15:20:06 +00:00
|
|
|
FLAVORS+= gtk3 no_x11
|
2019-03-08 01:55:36 +00:00
|
|
|
# others
|
2021-01-24 15:20:06 +00:00
|
|
|
FLAVORS+= lua perl python3 ruby
|
2019-03-09 22:34:09 +00:00
|
|
|
# bump deps if changing (RUN_DEPENDS in dependent ports picks this up)
|
2019-03-08 01:55:36 +00:00
|
|
|
FLAVOR?= gtk3
|
2004-07-12 19:32:59 +00:00
|
|
|
|
2014-09-07 19:24:48 +00:00
|
|
|
.include <bsd.port.arch.mk>
|
|
|
|
.if ${FLAVOR:Mno_x11}
|
2020-12-03 21:35:55 +00:00
|
|
|
# knock out -lang on non-gui builds so that -lang includes manpages
|
|
|
|
# for the gui parts without having to flavour it
|
2014-09-07 19:24:48 +00:00
|
|
|
BUILD_PACKAGES := ${BUILD_PACKAGES:N-lang}
|
|
|
|
.endif
|
|
|
|
|
2005-12-04 14:39:13 +00:00
|
|
|
CONFIGURE_STYLE=gnu
|
2019-05-02 01:03:11 +00:00
|
|
|
USE_GMAKE= Yes
|
2016-04-26 16:37:47 +00:00
|
|
|
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
|
2017-12-15 01:44:21 +00:00
|
|
|
LDFLAGS="-L${LOCALBASE}/lib" \
|
|
|
|
ac_cv_lib_elf_main=no
|
2013-03-16 22:56:44 +00:00
|
|
|
CONFIGURE_ARGS+= --with-tlib="curses" \
|
2019-09-06 14:50:23 +00:00
|
|
|
--disable-canberra \
|
2013-03-16 22:56:44 +00:00
|
|
|
--enable-multibyte \
|
|
|
|
--enable-cscope
|
2004-07-12 19:32:59 +00:00
|
|
|
|
2022-03-21 15:28:53 +00:00
|
|
|
# not directly usable with CONFIGURE_STYLE=autoconf
|
2015-10-30 13:00:37 +00:00
|
|
|
AUTOCONF_VERSION= 2.69
|
2017-11-02 22:07:13 +00:00
|
|
|
BUILD_DEPENDS= ${MODGNU_AUTOCONF_DEPENDS} \
|
2019-05-20 22:15:00 +00:00
|
|
|
devel/gettext,-tools
|
2014-07-10 23:54:15 +00:00
|
|
|
|
2018-09-14 09:11:41 +00:00
|
|
|
.if defined(DEBUG)
|
|
|
|
MAKE_FLAGS+= STRIP=:
|
|
|
|
.endif
|
|
|
|
|
2014-07-10 23:54:15 +00:00
|
|
|
.if ${FLAVOR:Mlua}
|
|
|
|
MODULES+= lang/lua
|
2023-01-06 18:23:08 +00:00
|
|
|
MODLUA_VERSION= 5.3
|
2014-07-10 23:54:15 +00:00
|
|
|
CONFIGURE_ENV+= vi_cv_path_plain_lua=${MODLUA_BIN}
|
2019-05-02 01:03:11 +00:00
|
|
|
CONFIGURE_ARGS+= --enable-luainterp \
|
|
|
|
--with-lua-prefix=${LOCALBASE}
|
2014-07-10 23:54:15 +00:00
|
|
|
LIB_DEPENDS+= ${MODLUA_LIB_DEPENDS}
|
2019-05-01 22:05:02 +00:00
|
|
|
WANTLIB+= ${MODLUA_WANTLIB}
|
2014-07-10 23:54:15 +00:00
|
|
|
.endif
|
|
|
|
|
2011-12-02 14:36:13 +00:00
|
|
|
.if ${FLAVOR:Mperl}
|
2013-03-16 22:56:44 +00:00
|
|
|
CONFIGURE_ARGS+= --enable-perlinterp
|
2019-09-05 18:47:53 +00:00
|
|
|
WANTLIB+= perl
|
2004-07-12 19:32:59 +00:00
|
|
|
.endif
|
|
|
|
|
2013-10-14 22:13:21 +00:00
|
|
|
.if ${FLAVOR:Mpython3}
|
|
|
|
MODULES+= lang/python
|
|
|
|
CONFIGURE_ENV+= vi_cv_path_python3=${MODPY_BIN}
|
2019-05-02 01:03:11 +00:00
|
|
|
CONFIGURE_ARGS+= --enable-python3interp=yes \
|
2023-01-06 18:23:08 +00:00
|
|
|
--enable-pythoninterp=no
|
2013-10-14 22:13:21 +00:00
|
|
|
LIB_DEPENDS+= ${MODPY_LIB_DEPENDS}
|
2019-09-05 18:47:53 +00:00
|
|
|
WANTLIB+= ${MODPY_WANTLIB}
|
2013-10-14 22:13:21 +00:00
|
|
|
.endif
|
|
|
|
|
2011-12-02 14:36:13 +00:00
|
|
|
.if ${FLAVOR:Mruby}
|
2009-08-11 04:30:40 +00:00
|
|
|
MODULES+= lang/ruby
|
2019-05-02 01:03:11 +00:00
|
|
|
CONFIGURE_ARGS+= --enable-rubyinterp \
|
|
|
|
--with-ruby-command=${RUBY}
|
2009-08-11 04:30:40 +00:00
|
|
|
LIB_DEPENDS+= ${MODRUBY_LIB_DEPENDS}
|
2019-05-01 22:05:02 +00:00
|
|
|
WANTLIB+= ${MODRUBY_WANTLIB}
|
2004-07-12 19:32:59 +00:00
|
|
|
.endif
|
|
|
|
|
2019-03-08 01:55:36 +00:00
|
|
|
# GUI options, only one is allowed
|
|
|
|
.if ${FLAVOR:Mno_x11}
|
|
|
|
_GUISET+= ok
|
2013-03-16 22:56:44 +00:00
|
|
|
CONFIGURE_ARGS+= --disable-gui \
|
|
|
|
--without-x
|
2019-03-08 01:55:36 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${FLAVOR:Mgtk3}
|
|
|
|
_GUISET+= ok
|
|
|
|
LIB_DEPENDS+= x11/gtk+3
|
|
|
|
CONFIGURE_ARGS+= --enable-gui="gtk3" \
|
|
|
|
--enable-xim \
|
|
|
|
--with-x
|
2019-09-05 18:47:53 +00:00
|
|
|
WANTLIB += ICE SM X11 Xt cairo gdk-3 gdk_pixbuf-2.0 gio-2.0 glib-2.0
|
|
|
|
WANTLIB += gobject-2.0 gtk-3 pango-1.0 pangocairo-1.0
|
2019-03-08 01:55:36 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if "${_GUISET}" != ok
|
2021-01-24 15:20:06 +00:00
|
|
|
ERRORS= "Fatal: You must select one (and only one) GUI interface: no_x11 or gtk3"
|
2004-07-12 19:32:59 +00:00
|
|
|
.endif
|
2005-12-04 14:39:13 +00:00
|
|
|
|
2013-03-26 08:12:35 +00:00
|
|
|
RUN_DEPENDS-lang= editors/vim,-main
|
2006-11-21 11:25:03 +00:00
|
|
|
PKG_ARCH-lang= *
|
|
|
|
LIB_DEPENDS-lang=
|
|
|
|
WANTLIB-lang=
|
2004-07-12 19:32:59 +00:00
|
|
|
|
2005-12-04 14:39:13 +00:00
|
|
|
WRKSRC= ${WRKDIST}/src
|
2006-12-14 09:07:55 +00:00
|
|
|
SUBST_VARS= P
|
2004-07-12 19:32:59 +00:00
|
|
|
|
2022-08-11 15:02:38 +00:00
|
|
|
.if ${P} != vim90
|
2019-01-24 09:32:15 +00:00
|
|
|
ERRORS= "Fatal: Major version was updated; sync editors/vim-spell and update this check"
|
|
|
|
.endif
|
|
|
|
|
2019-03-08 01:55:36 +00:00
|
|
|
do-gen:
|
|
|
|
cd ${WRKSRC}; ${AUTOCONF_ENV} autoconf
|
2004-07-12 19:32:59 +00:00
|
|
|
|
|
|
|
post-configure:
|
|
|
|
touch ${WRKBUILD}/auto/config.mk
|
|
|
|
|
|
|
|
post-install:
|
2014-09-07 19:24:48 +00:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/vim/vimfiles/{doc,syntax}
|
2015-04-10 12:25:46 +00:00
|
|
|
${INSTALL_DATA} ${FILESDIR}/openbsd.vim \
|
2016-08-10 15:54:29 +00:00
|
|
|
${PREFIX}/share/vim/vimfiles/syntax/
|
2022-05-28 11:09:25 +00:00
|
|
|
# the new colour schemes are more consistent in different
|
|
|
|
# environments, but in some cases significantly change what
|
|
|
|
# people are familiar with.
|
|
|
|
# https://github.com/vim/colorschemes
|
|
|
|
# https://github.com/vim/vim/issues/10449#issuecomment-1140195027=
|
|
|
|
#
|
|
|
|
# install a copy of the legacy colour schemes under a different
|
|
|
|
# directory to make it easier to revert if desired.
|
|
|
|
# you can either use directly in config, or copy the relevant
|
|
|
|
# files to .vim/colors which take priority over the files
|
|
|
|
# in /usr/local/share/vim.
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/vim/${P}/colors/legacy
|
|
|
|
${INSTALL_DATA} ${WRKDIR}/colorschemes-*/legacy_colors/* \
|
|
|
|
${PREFIX}/share/vim/${P}/colors/legacy
|
2014-01-08 10:23:12 +00:00
|
|
|
|
2013-12-16 10:19:33 +00:00
|
|
|
.if ! ${FLAVOR:Mno_x11}
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/applications
|
2016-08-10 15:54:29 +00:00
|
|
|
${SUBST_DATA} ${WRKDIST}/runtime/gvim.desktop \
|
2013-12-16 10:19:33 +00:00
|
|
|
${PREFIX}/share/applications/gvim.desktop
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/pixmaps
|
|
|
|
${INSTALL_DATA} ${WRKDIST}/runtime/vim48x48.png ${PREFIX}/share/pixmaps/vim.png
|
|
|
|
|
|
|
|
RUN_DEPENDS+= devel/desktop-file-utils
|
2016-09-26 10:48:39 +00:00
|
|
|
RUN_DEPENDS+= x11/gtk+3,-guic
|
2013-12-16 10:19:33 +00:00
|
|
|
.endif
|
2013-03-16 22:56:44 +00:00
|
|
|
|
2004-07-12 19:32:59 +00:00
|
|
|
.include <bsd.port.mk>
|