Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 1 | SUMMARY = "Vi IMproved - enhanced vi editor" |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 2 | DESCRIPTION = "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." |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 3 | SECTION = "console/utils" |
| 4 | |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 5 | HOMEPAGE = "https://www.vim.org/" |
| 6 | BUGTRACKER = "https://github.com/vim/vim/issues" |
| 7 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 8 | DEPENDS = "ncurses gettext-native" |
| 9 | # vimdiff doesn't like busybox diff |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 10 | RSUGGESTS:${PN} = "diffutils" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 11 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 12 | LICENSE = "Vim" |
| 13 | LIC_FILES_CHKSUM = "file://LICENSE;md5=6b30ea4fa660c483b619924bc709ef99 \ |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 14 | file://runtime/doc/uganda.txt;md5=001ef779f422a0e9106d428c84495b4d" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 15 | |
| 16 | SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 17 | file://disable_acl_header_check.patch \ |
| 18 | file://vim-add-knob-whether-elf.h-are-checked.patch \ |
| 19 | file://0001-src-Makefile-improve-reproducibility.patch \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 20 | file://no-path-adjust.patch \ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 21 | " |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 22 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 23 | PV .= ".0947" |
| 24 | SRCREV = "cc762a48d42b579fb7bdec2c614636b830342dd5" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 25 | |
| 26 | # Remove when 8.3 is out |
| 27 | UPSTREAM_VERSION_UNKNOWN = "1" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 28 | |
| 29 | # Do not consider .z in x.y.z, as that is updated with every commit |
| 30 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+)\.0" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 31 | |
| 32 | S = "${WORKDIR}/git" |
| 33 | |
| 34 | VIMDIR = "vim${@d.getVar('PV').split('.')[0]}${@d.getVar('PV').split('.')[1]}" |
| 35 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 36 | inherit autotools-brokensep update-alternatives mime-xdg |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 37 | |
| 38 | CLEANBROKEN = "1" |
| 39 | |
| 40 | # vim configure.in contains functions which got 'dropped' by autotools.bbclass |
| 41 | do_configure () { |
| 42 | cd src |
| 43 | rm -f auto/* |
| 44 | touch auto/config.mk |
| 45 | aclocal |
| 46 | autoconf |
| 47 | cd .. |
| 48 | oe_runconf |
| 49 | touch src/auto/configure |
| 50 | touch src/auto/config.mk src/auto/config.h |
| 51 | } |
| 52 | |
| 53 | do_compile() { |
| 54 | # We do not support fully / correctly the following locales. Attempting |
| 55 | # to use these with msgfmt in order to update the ".desktop" files exposes |
| 56 | # this problem and leads to the compile failing. |
| 57 | for LOCALE in cs fr ko pl sk zh_CN zh_TW;do |
| 58 | echo -n > src/po/${LOCALE}.po |
| 59 | done |
| 60 | autotools_do_compile |
| 61 | } |
| 62 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 63 | PACKAGECONFIG ??= "\ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 64 | ${@bb.utils.filter('DISTRO_FEATURES', 'acl selinux', d)} \ |
| 65 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 gtkgui', '', d)} \ |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 66 | nls \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 67 | " |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 68 | |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 69 | PACKAGECONFIG[gtkgui] = "--enable-gui=gtk3,--enable-gui=no,gtk+3" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 70 | PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl," |
| 71 | PACKAGECONFIG[x11] = "--with-x,--without-x,xt," |
| 72 | PACKAGECONFIG[tiny] = "--with-features=tiny,--with-features=big,," |
| 73 | PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux," |
| 74 | PACKAGECONFIG[elfutils] = "--enable-elf-check,,elfutils," |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 75 | PACKAGECONFIG[nls] = "--enable-nls,--disable-nls,," |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 76 | PACKAGECONFIG[sound] = "--enable-canberra,--disable-canberra,canberra," |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 77 | |
| 78 | EXTRA_OECONF = " \ |
| 79 | --disable-gpm \ |
| 80 | --disable-gtktest \ |
| 81 | --disable-xim \ |
| 82 | --disable-netbeans \ |
Andrew Geissler | 9b4d8b0 | 2021-02-19 12:26:16 -0600 | [diff] [blame] | 83 | --disable-desktop-database-update \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 84 | --with-tlib=ncurses \ |
| 85 | ac_cv_small_wchar_t=no \ |
Andrew Geissler | 9b4d8b0 | 2021-02-19 12:26:16 -0600 | [diff] [blame] | 86 | ac_cv_path_GLIB_COMPILE_RESOURCES=no \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 87 | vim_cv_getcwd_broken=no \ |
| 88 | vim_cv_memmove_handles_overlap=yes \ |
| 89 | vim_cv_stat_ignores_slash=no \ |
| 90 | vim_cv_terminfo=yes \ |
| 91 | vim_cv_tgetent=non-zero \ |
| 92 | vim_cv_toupper_broken=no \ |
| 93 | vim_cv_tty_group=world \ |
| 94 | STRIP=/bin/true \ |
| 95 | " |
| 96 | |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 97 | # Some host distros don't have it, disable consistently |
| 98 | EXTRA_OECONF:append:class-native = " vim_cv_timer_create=no" |
| 99 | EXTRA_OECONF:append:class-target = " vim_cv_timer_create=yes" |
| 100 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 101 | do_install() { |
| 102 | autotools_do_install |
| 103 | |
Andrew Geissler | 5a43b43 | 2020-06-13 10:46:56 -0500 | [diff] [blame] | 104 | # Work around file-rdeps picking up csh, awk, perl or python as a dep |
| 105 | chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/vim132 |
| 106 | chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/mve.awk |
| 107 | chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/*.pl |
| 108 | chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/*.py |
| 109 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 110 | # Install example vimrc from runtime files |
| 111 | install -m 0644 runtime/vimrc_example.vim ${D}/${datadir}/${BPN}/vimrc |
| 112 | |
| 113 | # we use --with-features=big as default |
| 114 | mv ${D}${bindir}/${BPN} ${D}${bindir}/${BPN}.${BPN} |
| 115 | |
| 116 | if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'true', 'false', d)}; then |
| 117 | # The mouse being autoenabled is just annoying in xfce4-terminal (mouse |
| 118 | # drag make vim go into visual mode and there is no right click menu), |
| 119 | # delete the block. |
| 120 | sed -i '/the mouse works just fine/,+4d' ${D}/${datadir}/${BPN}/vimrc |
| 121 | fi |
| 122 | } |
| 123 | |
| 124 | PARALLEL_MAKEINST = "" |
| 125 | |
| 126 | PACKAGES =+ "${PN}-common ${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc ${PN}-tools" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 127 | FILES:${PN}-syntax = "${datadir}/${BPN}/${VIMDIR}/syntax" |
| 128 | FILES:${PN}-help = "${datadir}/${BPN}/${VIMDIR}/doc" |
| 129 | FILES:${PN}-tutor = "${datadir}/${BPN}/${VIMDIR}/tutor ${bindir}/${BPN}tutor" |
| 130 | FILES:${PN}-vimrc = "${datadir}/${BPN}/vimrc" |
| 131 | FILES:${PN}-data = "${datadir}/${BPN}" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 132 | |
| 133 | # We do not want to complain if perl or gawk are not on the target. |
| 134 | # |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 135 | FILES:${PN}-tools = "${datadir}/${BPN}/${VIMDIR}/tools" |
| 136 | INSANE_SKIP:${PN}-tools = "file-rdeps" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 137 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 138 | FILES:${PN}-common = " \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 139 | ${datadir}/${BPN}/${VIMDIR}/*.vim \ |
| 140 | ${datadir}/${BPN}/${VIMDIR}/autoload \ |
| 141 | ${datadir}/${BPN}/${VIMDIR}/colors \ |
| 142 | ${datadir}/${BPN}/${VIMDIR}/compiler \ |
| 143 | ${datadir}/${BPN}/${VIMDIR}/ftplugin \ |
| 144 | ${datadir}/${BPN}/${VIMDIR}/indent \ |
| 145 | ${datadir}/${BPN}/${VIMDIR}/keymap \ |
| 146 | ${datadir}/${BPN}/${VIMDIR}/lang \ |
| 147 | ${datadir}/${BPN}/${VIMDIR}/macros \ |
| 148 | ${datadir}/${BPN}/${VIMDIR}/plugin \ |
| 149 | ${datadir}/${BPN}/${VIMDIR}/print \ |
| 150 | ${datadir}/${BPN}/${VIMDIR}/spell \ |
| 151 | ${datadir}/icons \ |
| 152 | " |
| 153 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 154 | ALTERNATIVE:${PN} = "vi vim" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 155 | ALTERNATIVE_PRIORITY = "100" |
| 156 | ALTERNATIVE_TARGET = "${bindir}/${BPN}.${BPN}" |
| 157 | ALTERNATIVE_LINK_NAME[vi] = "${base_bindir}/vi" |
| 158 | ALTERNATIVE_LINK_NAME[vim] = "${bindir}/vim" |