Hi. I want to add flavor support to sysutils/vimpager so that it can be used with other flavors of editors/vim port. I have to use x11 flavor of vim port for clipboard support on my desktop. I couldn't do it myself because the port is finding
I had opened a bug report about it.
PR 283220
Here is the work in progress Makefile.
vim
binary and doesn't check if the flavors are matching and as a result, specified flavor of vim doesn't get installed. I have x11 flavor of vim installed. Vim port has console flavor by default. make -V RUN_DEPENDS
does show specified flavor of vim but it doesn't install it. Thanks in advance.
Code:
# make -V RUN_DEPENDS
vim:editors/vim@console
# make FLAVOR=tiny -V RUN_DEPENDS
vim:editors/vim@tiny
# pkg info -x -g vim\*
vim-x11-9.1.0915
vimpager-2.06.20200712_1
# pkg ins -r FreeBSD vimpager
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (1 conflicting)
- vim-9.1.0915 [FreeBSD] conflicts with vim-x11-9.1.0915 [installed] on /usr/local/bin/evim
Checking integrity... done (0 conflicting)
The following 3 package(s) will be affected (of 0 checked):
Installed packages to be REMOVED:
vim-x11: 9.1.0915
New packages to be INSTALLED:
vim: 9.1.0915 [FreeBSD]
Installed packages to be REINSTALLED:
vimpager-2.06.20200712_1 [FreeBSD] (direct dependency changed: vim)
Number of packages to be removed: 1
Number of packages to be installed: 1
Number of packages to be reinstalled: 1
Proceed with this action? [y/N]:
I had opened a bug report about it.
PR 283220
Here is the work in progress Makefile.
Makefile:
PORTNAME= vimpager
DISTVERSION= 2.06.20200712
PORTREVISION= 1
CATEGORIES= sysutils
MAINTAINER= ports@FreeBSD.org
COMMENT= Use Vim/NeoVim as a pager
.if ${FLAVOR:U} == gtk2
COMMENT+= (gtk2 flavor)
.endif
.if ${FLAVOR:U} == gtk3
COMMENT+= (gtk3 flavor)
.endif
.if ${FLAVOR:U} == motif
COMMENT+= (motif flavor)
.endif
.if ${FLAVOR:U} == tiny
COMMENT+= (tiny flavor)
.endif
.if ${FLAVOR:U} == x11
COMMENT+= (x11 flavor)
.endif
WWW= https://github.com/rkitover/vimpager
LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
FLAVORS= console gtk2 gtk3 motif tiny x11
FLAVOR?= ${FLAVORS:[1]}
.for f in ${FLAVORS:Nconsole}
${f}_PKGNAMESUFFIX= -${f}
.endfor
#.for d in ${FLAVORS:Nconsole}
#${d}_RUN_DEPENDS= vim-${d}:editors/vim@${FLAVOR}
#.endfor
#console_RUN_DEPENDS= vim:editors/vim@${FLAVOR}
#gtk2_RUN_DEPENDS= vim:editors/vim@${FLAVOR}
#gtk3_RUN_DEPENDS= vim:editors/vim@${FLAVOR}
#motif_RUN_DEPENDS= vim:editors/vim@${FLAVOR}
#tiny_RUN_DEPENDS= vim:editors/vim@${FLAVOR}
#x11_RUN_DEPENDS= vim:editors/vim@${FLAVOR}
USES= gmake
USE_GITHUB= yes
GH_ACCOUNT= rkitover
GH_TAGNAME= 85004fd
# Register conflicts with all other flavors
CONFLICTS_INSTALL= ${FLAVORS:N${FLAVOR}:S/^/vimpager-/}
NO_ARCH= yes
OPTIONS_DEFINE= DOCS
OPTIONS_DEFAULT= VIM
OPTIONS_SINGLE= BACKEND
OPTIONS_SINGLE_BACKEND= NEOVIM VIM
BACKEND_DESC= Choose your Vim backend
NEOVIM_DESC= NeoVim
VIM_DESC= Vim
NEOVIM_RUN_DEPENDS= nvim:editors/neovim
VIM_RUN_DEPENDS= vim:editors/vim@${FLAVOR}
.include <bsd.port.mk>