Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | SUMMARY = "Vi IMproved - enhanced vi editor" |
| 2 | SECTION = "console/utils" |
| 3 | |
| 4 | PROVIDES = "xxd" |
| 5 | DEPENDS = "ncurses gettext-native" |
| 6 | # vimdiff doesn't like busybox diff |
| 7 | RSUGGESTS_${PN} = "diffutils" |
| 8 | LICENSE = "vim" |
| 9 | LIC_FILES_CHKSUM = "file://../runtime/doc/uganda.txt;endline=287;md5=f1f82b42360005c70b8c19b0ef493f72" |
| 10 | |
| 11 | SRC_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 | " |
| 15 | SRCREV = "f1c118be93184e8e57e3e80b1b3383f464ed649e" |
| 16 | |
| 17 | S = "${WORKDIR}/git/src" |
| 18 | |
| 19 | VIMDIR = "vim${@d.getVar('PV').split('.')[0]}${@d.getVar('PV').split('.')[1]}" |
| 20 | |
| 21 | inherit autotools-brokensep update-alternatives |
| 22 | |
| 23 | CLEANBROKEN = "1" |
| 24 | |
| 25 | # vim configure.in contains functions which got 'dropped' by autotools.bbclass |
| 26 | do_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 |
| 37 | PACKAGECONFIG ??= "" |
| 38 | PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'acl selinux', d)}" |
| 39 | |
| 40 | PACKAGECONFIG[gtkgui] = "--enable-gtk2-test --enable-gui=gtk2,--enable-gui=no,gtk+," |
| 41 | PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl," |
| 42 | PACKAGECONFIG[x11] = "--with-x,--without-x,xt," |
| 43 | PACKAGECONFIG[tiny] = "--with-features=tiny,--with-features=big,," |
| 44 | PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux," |
| 45 | PACKAGECONFIG[elfutils] = "--enable-elf-check,,elfutils," |
| 46 | |
| 47 | EXTRA_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 | |
| 64 | do_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 | |
| 80 | PARALLEL_MAKEINST = "" |
| 81 | |
| 82 | PACKAGES =+ "${PN}-common ${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc ${PN}-tools" |
| 83 | FILES_${PN}-syntax = "${datadir}/${BPN}/${VIMDIR}/syntax" |
| 84 | FILES_${PN}-help = "${datadir}/${BPN}/${VIMDIR}/doc" |
| 85 | FILES_${PN}-tutor = "${datadir}/${BPN}/${VIMDIR}/tutor ${bindir}/${BPN}tutor" |
| 86 | FILES_${PN}-vimrc = "${datadir}/${BPN}/vimrc" |
| 87 | FILES_${PN}-data = "${datadir}/${BPN}" |
| 88 | FILES_${PN}-tools = "${datadir}/${BPN}/${VIMDIR}/tools" |
| 89 | FILES_${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 | |
| 105 | RDEPENDS_${BPN} = "ncurses-terminfo-base" |
| 106 | # Recommend that runtime data is installed along with vim |
| 107 | RRECOMMENDS_${BPN} = "${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc ${PN}-common" |
| 108 | |
| 109 | ALTERNATIVE_${PN} = "vi vim xxd" |
| 110 | ALTERNATIVE_PRIORITY = "100" |
| 111 | ALTERNATIVE_TARGET = "${bindir}/${BPN}.${BPN}" |
| 112 | ALTERNATIVE_LINK_NAME[vi] = "${base_bindir}/vi" |
| 113 | ALTERNATIVE_LINK_NAME[vim] = "${bindir}/vim" |
| 114 | ALTERNATIVE_TARGET[xxd] = "${bindir}/xxd" |
| 115 | ALTERNATIVE_LINK_NAME[xxd] = "${bindir}/xxd" |
| 116 | |
| 117 | BBCLASSEXTEND = "native" |