vim: add recipe for vim-tiny

Changes:
- Add bb for vim-tiny based on vim.bb
- Change PACKAGECONFIG and do_install for vim-tiny
- Change BPN to vim in vim.bb so it works fine when required by vim-tiny
- Add proper alternative links for vim and vim-tiny to avoid conflicts
- Don't use do_install_append in vim.bb so it works fine when required by vim-tiny

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
Jackie Huang 2014-11-06 03:22:27 -05:00 committed by Martin Jansa
parent dadf585428
commit 95dc2ddce7
2 changed files with 26 additions and 7 deletions

View File

@ -0,0 +1,13 @@
require vim_${PV}.bb
SUMMARY += " (with tiny features)"
PACKAGECONFIG += "tiny"
do_install() {
install -d ${D}/${bindir}
install -m 0755 ${S}/vim ${D}/${bindir}/vim.tiny
}
ALTERNATIVE_PRIORITY = "90"
ALTERNATIVE_TARGET = "${bindir}/vim.tiny"

View File

@ -12,9 +12,9 @@ SRC_URI = "hg://vim.googlecode.com/hg/;protocol=https;module=vim \
"
SRCREV = "v7-4-481"
S = "${WORKDIR}/${BPN}/src"
S = "${WORKDIR}/vim/src"
VIMDIR = "${BPN}${@d.getVar('PV',1).split('.')[0]}${@d.getVar('PV',1).split('.')[1]}"
VIMDIR = "vim${@d.getVar('PV',1).split('.')[0]}${@d.getVar('PV',1).split('.')[1]}"
inherit autotools update-alternatives
inherit autotools-brokensep
@ -59,7 +59,9 @@ EXTRA_OECONF = " \
STRIP=/bin/true \
"
do_install_append() {
do_install() {
autotools_do_install
# Work around rpm picking up csh or awk or perl as a dep
chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/vim132
chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/mve.awk
@ -67,6 +69,9 @@ do_install_append() {
# Install example vimrc from runtime files
install -m 0644 ../runtime/vimrc_example.vim ${D}/${datadir}/${BPN}/vimrc
# we use --with-features=big as default
mv ${D}${bindir}/${BPN} ${D}${bindir}/${BPN}.${BPN}
}
PARALLEL_MAKEINST = ""
@ -97,7 +102,8 @@ RDEPENDS_${PN} = "ncurses-terminfo-base"
# Recommend that runtime data is installed along with vim
RRECOMMENDS_${PN} = "${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc ${PN}-common"
ALTERNATIVE_${PN} = "vi"
ALTERNATIVE_TARGET[vi] = "${bindir}/${BPN}"
ALTERNATIVE_LINK_NAME[vi] = "${base_bindir}/vi"
ALTERNATIVE_PRIORITY[vi] = "100"
ALTERNATIVE_${PN} = "vi vim"
ALTERNATIVE_TARGET = "${bindir}/${BPN}.${BPN}"
ALTERNATIVE_LINK_NAME[vi] = "${bindir}/vi"
ALTERNATIVE_LINK_NAME[vim] = "${bindir}/vim"
ALTERNATIVE_PRIORITY = "100"