1*4882a593SmuzhiyunSUMMARY = "Vi IMproved - enhanced vi editor" 2*4882a593SmuzhiyunDESCRIPTION = "Vim is a greatly improved version of the good old UNIX editor Vi. Many new features have been added: multi-level undo, syntax highlighting, command line history, on-line help, spell checking, filename completion, block operations, script language, etc. There is also a Graphical User Interface (GUI) available." 3*4882a593SmuzhiyunSECTION = "console/utils" 4*4882a593Smuzhiyun 5*4882a593SmuzhiyunHOMEPAGE = "https://www.vim.org/" 6*4882a593SmuzhiyunBUGTRACKER = "https://github.com/vim/vim/issues" 7*4882a593Smuzhiyun 8*4882a593SmuzhiyunDEPENDS = "ncurses gettext-native" 9*4882a593Smuzhiyun# vimdiff doesn't like busybox diff 10*4882a593SmuzhiyunRSUGGESTS:${PN} = "diffutils" 11*4882a593Smuzhiyun 12*4882a593SmuzhiyunLICENSE = "Vim" 13*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://LICENSE;md5=6b30ea4fa660c483b619924bc709ef99" 14*4882a593Smuzhiyun 15*4882a593SmuzhiyunSRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \ 16*4882a593Smuzhiyun file://disable_acl_header_check.patch \ 17*4882a593Smuzhiyun file://vim-add-knob-whether-elf.h-are-checked.patch \ 18*4882a593Smuzhiyun file://0001-src-Makefile-improve-reproducibility.patch \ 19*4882a593Smuzhiyun file://no-path-adjust.patch \ 20*4882a593Smuzhiyun " 21*4882a593Smuzhiyun 22*4882a593SmuzhiyunPV .= ".1429" 23*4882a593SmuzhiyunSRCREV = "1a08a3e2a584889f19b84a27672134649b73da58" 24*4882a593Smuzhiyun 25*4882a593Smuzhiyun# Remove when 8.3 is out 26*4882a593SmuzhiyunUPSTREAM_VERSION_UNKNOWN = "1" 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun# Do not consider .z in x.y.z, as that is updated with every commit 29*4882a593SmuzhiyunUPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+)\.0" 30*4882a593Smuzhiyun 31*4882a593SmuzhiyunS = "${WORKDIR}/git" 32*4882a593Smuzhiyun 33*4882a593SmuzhiyunVIMDIR = "vim${@d.getVar('PV').split('.')[0]}${@d.getVar('PV').split('.')[1]}" 34*4882a593Smuzhiyun 35*4882a593Smuzhiyuninherit autotools-brokensep update-alternatives mime-xdg pkgconfig 36*4882a593Smuzhiyun 37*4882a593SmuzhiyunCLEANBROKEN = "1" 38*4882a593Smuzhiyun 39*4882a593Smuzhiyun# vim configure.in contains functions which got 'dropped' by autotools.bbclass 40*4882a593Smuzhiyundo_configure () { 41*4882a593Smuzhiyun cd src 42*4882a593Smuzhiyun rm -f auto/* 43*4882a593Smuzhiyun touch auto/config.mk 44*4882a593Smuzhiyun aclocal 45*4882a593Smuzhiyun autoconf 46*4882a593Smuzhiyun cd .. 47*4882a593Smuzhiyun oe_runconf 48*4882a593Smuzhiyun touch src/auto/configure 49*4882a593Smuzhiyun touch src/auto/config.mk src/auto/config.h 50*4882a593Smuzhiyun} 51*4882a593Smuzhiyun 52*4882a593Smuzhiyundo_compile() { 53*4882a593Smuzhiyun # We do not support fully / correctly the following locales. Attempting 54*4882a593Smuzhiyun # to use these with msgfmt in order to update the ".desktop" files exposes 55*4882a593Smuzhiyun # this problem and leads to the compile failing. 56*4882a593Smuzhiyun for LOCALE in cs fr ko pl sk zh_CN zh_TW;do 57*4882a593Smuzhiyun echo -n > src/po/${LOCALE}.po 58*4882a593Smuzhiyun done 59*4882a593Smuzhiyun autotools_do_compile 60*4882a593Smuzhiyun} 61*4882a593Smuzhiyun 62*4882a593SmuzhiyunPACKAGECONFIG ??= "\ 63*4882a593Smuzhiyun ${@bb.utils.filter('DISTRO_FEATURES', 'acl selinux', d)} \ 64*4882a593Smuzhiyun ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 gtkgui', '', d)} \ 65*4882a593Smuzhiyun nls \ 66*4882a593Smuzhiyun" 67*4882a593Smuzhiyun 68*4882a593SmuzhiyunPACKAGECONFIG[gtkgui] = "--enable-gui=gtk3,--enable-gui=no,gtk+3" 69*4882a593SmuzhiyunPACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl," 70*4882a593SmuzhiyunPACKAGECONFIG[x11] = "--with-x,--without-x,xt," 71*4882a593SmuzhiyunPACKAGECONFIG[tiny] = "--with-features=tiny,--with-features=big,," 72*4882a593SmuzhiyunPACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux," 73*4882a593SmuzhiyunPACKAGECONFIG[elfutils] = "--enable-elf-check,,elfutils," 74*4882a593SmuzhiyunPACKAGECONFIG[nls] = "--enable-nls,--disable-nls,," 75*4882a593SmuzhiyunPACKAGECONFIG[sound] = "--enable-canberra,--disable-canberra,canberra," 76*4882a593Smuzhiyun 77*4882a593SmuzhiyunEXTRA_OECONF = " \ 78*4882a593Smuzhiyun --disable-gpm \ 79*4882a593Smuzhiyun --disable-gtktest \ 80*4882a593Smuzhiyun --disable-xim \ 81*4882a593Smuzhiyun --disable-netbeans \ 82*4882a593Smuzhiyun --disable-desktop-database-update \ 83*4882a593Smuzhiyun --with-tlib=ncurses \ 84*4882a593Smuzhiyun --with-modified-by='${MAINTAINER}' \ 85*4882a593Smuzhiyun ac_cv_small_wchar_t=no \ 86*4882a593Smuzhiyun ac_cv_path_GLIB_COMPILE_RESOURCES=no \ 87*4882a593Smuzhiyun vim_cv_getcwd_broken=no \ 88*4882a593Smuzhiyun vim_cv_memmove_handles_overlap=yes \ 89*4882a593Smuzhiyun vim_cv_stat_ignores_slash=no \ 90*4882a593Smuzhiyun vim_cv_terminfo=yes \ 91*4882a593Smuzhiyun vim_cv_tgetent=non-zero \ 92*4882a593Smuzhiyun vim_cv_toupper_broken=no \ 93*4882a593Smuzhiyun vim_cv_tty_group=world \ 94*4882a593Smuzhiyun STRIP=/bin/true \ 95*4882a593Smuzhiyun" 96*4882a593Smuzhiyun 97*4882a593Smuzhiyun# Some host distros don't have it, disable consistently 98*4882a593SmuzhiyunEXTRA_OECONF:append:class-native = " vim_cv_timer_create=no" 99*4882a593SmuzhiyunEXTRA_OECONF:append:class-target = " vim_cv_timer_create=yes" 100*4882a593Smuzhiyun 101*4882a593Smuzhiyundo_install() { 102*4882a593Smuzhiyun autotools_do_install 103*4882a593Smuzhiyun 104*4882a593Smuzhiyun # Work around file-rdeps picking up csh, awk, perl or python as a dep 105*4882a593Smuzhiyun chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/vim132 106*4882a593Smuzhiyun chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/mve.awk 107*4882a593Smuzhiyun chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/*.pl 108*4882a593Smuzhiyun chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/*.py 109*4882a593Smuzhiyun 110*4882a593Smuzhiyun # Install example vimrc from runtime files 111*4882a593Smuzhiyun install -m 0644 runtime/vimrc_example.vim ${D}/${datadir}/${BPN}/vimrc 112*4882a593Smuzhiyun 113*4882a593Smuzhiyun # we use --with-features=big as default 114*4882a593Smuzhiyun mv ${D}${bindir}/${BPN} ${D}${bindir}/${BPN}.${BPN} 115*4882a593Smuzhiyun 116*4882a593Smuzhiyun if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'true', 'false', d)}; then 117*4882a593Smuzhiyun # The mouse being autoenabled is just annoying in xfce4-terminal (mouse 118*4882a593Smuzhiyun # drag make vim go into visual mode and there is no right click menu), 119*4882a593Smuzhiyun # delete the block. 120*4882a593Smuzhiyun sed -i '/the mouse works just fine/,+4d' ${D}/${datadir}/${BPN}/vimrc 121*4882a593Smuzhiyun fi 122*4882a593Smuzhiyun} 123*4882a593Smuzhiyun 124*4882a593SmuzhiyunPARALLEL_MAKEINST = "" 125*4882a593Smuzhiyun 126*4882a593SmuzhiyunPACKAGES =+ "${PN}-common ${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc ${PN}-tools" 127*4882a593SmuzhiyunFILES:${PN}-syntax = "${datadir}/${BPN}/${VIMDIR}/syntax" 128*4882a593SmuzhiyunFILES:${PN}-help = "${datadir}/${BPN}/${VIMDIR}/doc" 129*4882a593SmuzhiyunFILES:${PN}-tutor = "${datadir}/${BPN}/${VIMDIR}/tutor ${bindir}/${BPN}tutor" 130*4882a593SmuzhiyunFILES:${PN}-vimrc = "${datadir}/${BPN}/vimrc" 131*4882a593SmuzhiyunFILES:${PN}-data = "${datadir}/${BPN}" 132*4882a593Smuzhiyun 133*4882a593Smuzhiyun# We do not want to complain if perl or gawk are not on the target. 134*4882a593Smuzhiyun# 135*4882a593SmuzhiyunFILES:${PN}-tools = "${datadir}/${BPN}/${VIMDIR}/tools" 136*4882a593SmuzhiyunINSANE_SKIP:${PN}-tools = "file-rdeps" 137*4882a593Smuzhiyun 138*4882a593SmuzhiyunFILES:${PN}-common = " \ 139*4882a593Smuzhiyun ${datadir}/${BPN}/${VIMDIR}/*.vim \ 140*4882a593Smuzhiyun ${datadir}/${BPN}/${VIMDIR}/autoload \ 141*4882a593Smuzhiyun ${datadir}/${BPN}/${VIMDIR}/colors \ 142*4882a593Smuzhiyun ${datadir}/${BPN}/${VIMDIR}/compiler \ 143*4882a593Smuzhiyun ${datadir}/${BPN}/${VIMDIR}/ftplugin \ 144*4882a593Smuzhiyun ${datadir}/${BPN}/${VIMDIR}/indent \ 145*4882a593Smuzhiyun ${datadir}/${BPN}/${VIMDIR}/keymap \ 146*4882a593Smuzhiyun ${datadir}/${BPN}/${VIMDIR}/lang \ 147*4882a593Smuzhiyun ${datadir}/${BPN}/${VIMDIR}/macros \ 148*4882a593Smuzhiyun ${datadir}/${BPN}/${VIMDIR}/plugin \ 149*4882a593Smuzhiyun ${datadir}/${BPN}/${VIMDIR}/print \ 150*4882a593Smuzhiyun ${datadir}/${BPN}/${VIMDIR}/spell \ 151*4882a593Smuzhiyun ${datadir}/icons \ 152*4882a593Smuzhiyun" 153*4882a593Smuzhiyun 154*4882a593SmuzhiyunALTERNATIVE:${PN} = "vi vim" 155*4882a593SmuzhiyunALTERNATIVE_PRIORITY = "100" 156*4882a593SmuzhiyunALTERNATIVE_TARGET = "${bindir}/${BPN}.${BPN}" 157*4882a593SmuzhiyunALTERNATIVE_LINK_NAME[vi] = "${base_bindir}/vi" 158*4882a593SmuzhiyunALTERNATIVE_LINK_NAME[vim] = "${bindir}/vim" 159