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