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