]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/blame - meta/recipes-support/vim/vim.inc
vim: upgrade v9.0.2130 -> v9.0.2190
[thirdparty/openembedded/openembedded-core.git] / meta / recipes-support / vim / vim.inc
CommitLineData
55cc8c6d 1SUMMARY = "Vi IMproved - enhanced vi editor"
6db24928 2DESCRIPTION = "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."
55cc8c6d
AK
3SECTION = "console/utils"
4
6db24928
MMID
5HOMEPAGE = "https://www.vim.org/"
6BUGTRACKER = "https://github.com/vim/vim/issues"
7
55cc8c6d
AK
8DEPENDS = "ncurses gettext-native"
9# vimdiff doesn't like busybox diff
42344347 10RSUGGESTS:${PN} = "diffutils"
78a4796d 11
ceda3238 12LICENSE = "Vim"
91e66b93 13LIC_FILES_CHKSUM = "file://LICENSE;md5=d1a651ab770b45d41c0f8cb5a8ca930e"
55cc8c6d 14
b37b61e9 15SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \
55cc8c6d
AK
16 file://disable_acl_header_check.patch \
17 file://vim-add-knob-whether-elf.h-are-checked.patch \
18 file://0001-src-Makefile-improve-reproducibility.patch \
8972fe55 19 file://no-path-adjust.patch \
b493eb4f 20 "
54d3d023 21
8155a1f6
TO
22PV .= ".2190"
23SRCREV = "6a950da86d7a6eb09d5ebeab17657986420d07ac"
55cc8c6d 24
99558e66
AK
25# Do not consider .z in x.y.z, as that is updated with every commit
26UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+)\.0"
868a1935
EC
27# Ignore that the upstream version .z in x.y.z is always newer
28UPSTREAM_VERSION_UNKNOWN = "1"
99558e66 29
55cc8c6d
AK
30S = "${WORKDIR}/git"
31
32VIMDIR = "vim${@d.getVar('PV').split('.')[0]}${@d.getVar('PV').split('.')[1]}"
33
70900616 34inherit autotools-brokensep update-alternatives mime-xdg pkgconfig
55cc8c6d
AK
35
36CLEANBROKEN = "1"
37
38# vim configure.in contains functions which got 'dropped' by autotools.bbclass
39do_configure () {
40 cd src
41 rm -f auto/*
42 touch auto/config.mk
14629902
SS
43 # git timestamps aren't reliable, so touch the shipped .po files so they aren't regenerated
44 touch -c po/cs.cp1250.po po/ja.euc-jp.po po/ja.sjis.po po/ko.po po/pl.UTF-8.po po/pl.cp1250.po po/ru.cp1251.po po/sk.cp1250.po po/uk.cp1251.po po/zh_CN.po po/zh_CN.cp936.po po/zh_TW.po
45 # ru.cp1251.po uses CP1251 rather than cp1251, fix that
46 sed -i -e s/CP1251/cp1251/ po/ru.cp1251.po
55cc8c6d
AK
47 aclocal
48 autoconf
49 cd ..
50 oe_runconf
51 touch src/auto/configure
52 touch src/auto/config.mk src/auto/config.h
fdbdfd90
RP
53 # need a native tool, not a target one
54 ${BUILD_CC} src/po/sjiscorr.c -o src/po/sjiscorr
55cc8c6d
AK
55}
56
d7565241 57PACKAGECONFIG ??= "\
55cc8c6d
AK
58 ${@bb.utils.filter('DISTRO_FEATURES', 'acl selinux', d)} \
59 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 gtkgui', '', d)} \
da630d6d 60 nls \
55cc8c6d 61"
55cc8c6d 62
79582352 63PACKAGECONFIG[gtkgui] = "--enable-gui=gtk3,--enable-gui=no,gtk+3"
55cc8c6d
AK
64PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
65PACKAGECONFIG[x11] = "--with-x,--without-x,xt,"
66PACKAGECONFIG[tiny] = "--with-features=tiny,--with-features=big,,"
67PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,"
68PACKAGECONFIG[elfutils] = "--enable-elf-check,,elfutils,"
da630d6d 69PACKAGECONFIG[nls] = "--enable-nls,--disable-nls,,"
70de1dbb 70PACKAGECONFIG[sound] = "--enable-canberra,--disable-canberra,canberra,"
55cc8c6d
AK
71
72EXTRA_OECONF = " \
73 --disable-gpm \
74 --disable-gtktest \
75 --disable-xim \
76 --disable-netbeans \
914f8605 77 --disable-desktop-database-update \
55cc8c6d 78 --with-tlib=ncurses \
acc007e2 79 --with-modified-by='${MAINTAINER}' \
55cc8c6d 80 ac_cv_small_wchar_t=no \
914f8605 81 ac_cv_path_GLIB_COMPILE_RESOURCES=no \
55cc8c6d
AK
82 vim_cv_getcwd_broken=no \
83 vim_cv_memmove_handles_overlap=yes \
84 vim_cv_stat_ignores_slash=no \
85 vim_cv_terminfo=yes \
86 vim_cv_tgetent=non-zero \
87 vim_cv_toupper_broken=no \
88 vim_cv_tty_group=world \
89 STRIP=/bin/true \
90"
91
d0c1de08
RP
92# Some host distros don't have it, disable consistently
93EXTRA_OECONF:append:class-native = " vim_cv_timer_create=no"
94EXTRA_OECONF:append:class-target = " vim_cv_timer_create=yes"
95
55cc8c6d
AK
96do_install() {
97 autotools_do_install
98
bf3e799e
CQ
99 # Work around file-rdeps picking up csh, awk, perl or python as a dep
100 chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/vim132
101 chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/mve.awk
102 chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/*.pl
103 chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/*.py
104
55cc8c6d
AK
105 # Install example vimrc from runtime files
106 install -m 0644 runtime/vimrc_example.vim ${D}/${datadir}/${BPN}/vimrc
107
108 # we use --with-features=big as default
109 mv ${D}${bindir}/${BPN} ${D}${bindir}/${BPN}.${BPN}
110
111 if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'true', 'false', d)}; then
112 # The mouse being autoenabled is just annoying in xfce4-terminal (mouse
113 # drag make vim go into visual mode and there is no right click menu),
114 # delete the block.
115 sed -i '/the mouse works just fine/,+4d' ${D}/${datadir}/${BPN}/vimrc
116 fi
117}
118
119PARALLEL_MAKEINST = ""
120
121PACKAGES =+ "${PN}-common ${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc ${PN}-tools"
42344347
RP
122FILES:${PN}-syntax = "${datadir}/${BPN}/${VIMDIR}/syntax"
123FILES:${PN}-help = "${datadir}/${BPN}/${VIMDIR}/doc"
124FILES:${PN}-tutor = "${datadir}/${BPN}/${VIMDIR}/tutor ${bindir}/${BPN}tutor"
125FILES:${PN}-vimrc = "${datadir}/${BPN}/vimrc"
126FILES:${PN}-data = "${datadir}/${BPN}"
8972fe55
JS
127
128# We do not want to complain if perl or gawk are not on the target.
129#
42344347
RP
130FILES:${PN}-tools = "${datadir}/${BPN}/${VIMDIR}/tools"
131INSANE_SKIP:${PN}-tools = "file-rdeps"
8972fe55 132
42344347 133FILES:${PN}-common = " \
55cc8c6d
AK
134 ${datadir}/${BPN}/${VIMDIR}/*.vim \
135 ${datadir}/${BPN}/${VIMDIR}/autoload \
136 ${datadir}/${BPN}/${VIMDIR}/colors \
137 ${datadir}/${BPN}/${VIMDIR}/compiler \
138 ${datadir}/${BPN}/${VIMDIR}/ftplugin \
139 ${datadir}/${BPN}/${VIMDIR}/indent \
140 ${datadir}/${BPN}/${VIMDIR}/keymap \
141 ${datadir}/${BPN}/${VIMDIR}/lang \
142 ${datadir}/${BPN}/${VIMDIR}/macros \
143 ${datadir}/${BPN}/${VIMDIR}/plugin \
144 ${datadir}/${BPN}/${VIMDIR}/print \
145 ${datadir}/${BPN}/${VIMDIR}/spell \
146 ${datadir}/icons \
147"
148
42344347 149ALTERNATIVE:${PN} = "vi vim"
55cc8c6d
AK
150ALTERNATIVE_PRIORITY = "100"
151ALTERNATIVE_TARGET = "${bindir}/${BPN}.${BPN}"
152ALTERNATIVE_LINK_NAME[vi] = "${base_bindir}/vi"
153ALTERNATIVE_LINK_NAME[vim] = "${bindir}/vim"