blob: 46d229e03b9246940023093f7e3257445ae7a1de [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001SUMMARY = "Vi IMproved - enhanced vi editor"
2SECTION = "console/utils"
3
4PROVIDES = "xxd"
5DEPENDS = "ncurses gettext-native"
6# vimdiff doesn't like busybox diff
7RSUGGESTS_${PN} = "diffutils"
8LICENSE = "vim"
9LIC_FILES_CHKSUM = "file://../runtime/doc/uganda.txt;endline=287;md5=f1f82b42360005c70b8c19b0ef493f72"
10
11SRC_URI = "git://github.com/vim/vim.git \
12 file://disable_acl_header_check.patch;patchdir=.. \
13 file://vim-add-knob-whether-elf.h-are-checked.patch;patchdir=.. \
14"
15SRCREV = "f1c118be93184e8e57e3e80b1b3383f464ed649e"
16
17S = "${WORKDIR}/git/src"
18
19VIMDIR = "vim${@d.getVar('PV').split('.')[0]}${@d.getVar('PV').split('.')[1]}"
20
21inherit autotools-brokensep update-alternatives
22
23CLEANBROKEN = "1"
24
25# vim configure.in contains functions which got 'dropped' by autotools.bbclass
26do_configure () {
27 rm -f auto/*
28 touch auto/config.mk
29 aclocal
30 autoconf
31 oe_runconf
32 touch auto/configure
33 touch auto/config.mk auto/config.h
34}
35
36#Available PACKAGECONFIG options are gtkgui, acl, x11, tiny
37PACKAGECONFIG ??= ""
38PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'acl selinux', d)}"
39
40PACKAGECONFIG[gtkgui] = "--enable-gtk2-test --enable-gui=gtk2,--enable-gui=no,gtk+,"
41PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
42PACKAGECONFIG[x11] = "--with-x,--without-x,xt,"
43PACKAGECONFIG[tiny] = "--with-features=tiny,--with-features=big,,"
44PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,"
45PACKAGECONFIG[elfutils] = "--enable-elf-check,,elfutils,"
46
47EXTRA_OECONF = " \
48 --disable-gpm \
49 --disable-gtktest \
50 --disable-xim \
51 --disable-netbeans \
52 --with-tlib=ncurses \
53 ac_cv_small_wchar_t=no \
54 vim_cv_getcwd_broken=no \
55 vim_cv_memmove_handles_overlap=yes \
56 vim_cv_stat_ignores_slash=no \
57 vim_cv_terminfo=yes \
58 vim_cv_tgetent=non-zero \
59 vim_cv_toupper_broken=no \
60 vim_cv_tty_group=world \
61 STRIP=/bin/true \
62"
63
64do_install() {
65 autotools_do_install
66
67 # Work around file-rdeps picking up csh, awk, perl or python as a dep
68 chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/vim132
69 chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/mve.awk
70 chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/*.pl
71 chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/*.py
72
73 # Install example vimrc from runtime files
74 install -m 0644 ../runtime/vimrc_example.vim ${D}/${datadir}/${BPN}/vimrc
75
76 # we use --with-features=big as default
77 mv ${D}${bindir}/${BPN} ${D}${bindir}/${BPN}.${BPN}
78}
79
80PARALLEL_MAKEINST = ""
81
82PACKAGES =+ "${PN}-common ${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc ${PN}-tools"
83FILES_${PN}-syntax = "${datadir}/${BPN}/${VIMDIR}/syntax"
84FILES_${PN}-help = "${datadir}/${BPN}/${VIMDIR}/doc"
85FILES_${PN}-tutor = "${datadir}/${BPN}/${VIMDIR}/tutor ${bindir}/${BPN}tutor"
86FILES_${PN}-vimrc = "${datadir}/${BPN}/vimrc"
87FILES_${PN}-data = "${datadir}/${BPN}"
88FILES_${PN}-tools = "${datadir}/${BPN}/${VIMDIR}/tools"
89FILES_${PN}-common = " \
90 ${datadir}/${BPN}/${VIMDIR}/*.vim \
91 ${datadir}/${BPN}/${VIMDIR}/autoload \
92 ${datadir}/${BPN}/${VIMDIR}/colors \
93 ${datadir}/${BPN}/${VIMDIR}/compiler \
94 ${datadir}/${BPN}/${VIMDIR}/ftplugin \
95 ${datadir}/${BPN}/${VIMDIR}/indent \
96 ${datadir}/${BPN}/${VIMDIR}/keymap \
97 ${datadir}/${BPN}/${VIMDIR}/lang \
98 ${datadir}/${BPN}/${VIMDIR}/macros \
99 ${datadir}/${BPN}/${VIMDIR}/plugin \
100 ${datadir}/${BPN}/${VIMDIR}/print \
101 ${datadir}/${BPN}/${VIMDIR}/spell \
102 ${datadir}/icons \
103"
104
105RDEPENDS_${BPN} = "ncurses-terminfo-base"
106# Recommend that runtime data is installed along with vim
107RRECOMMENDS_${BPN} = "${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc ${PN}-common"
108
109ALTERNATIVE_${PN} = "vi vim xxd"
110ALTERNATIVE_PRIORITY = "100"
111ALTERNATIVE_TARGET = "${bindir}/${BPN}.${BPN}"
112ALTERNATIVE_LINK_NAME[vi] = "${base_bindir}/vi"
113ALTERNATIVE_LINK_NAME[vim] = "${bindir}/vim"
114ALTERNATIVE_TARGET[xxd] = "${bindir}/xxd"
115ALTERNATIVE_LINK_NAME[xxd] = "${bindir}/xxd"
116
117BBCLASSEXTEND = "native"