]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/blame - meta/recipes-support/vim/vim.inc
scripts/convert-srcuri: Update SRC_URI conversion script to handle github url changes
[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"
55cc8c6d 11LICENSE = "vim"
07d23c2d 12LIC_FILES_CHKSUM = "file://runtime/doc/uganda.txt;endline=287;md5=a19edd7ec70d573a005d9e509375a99a"
55cc8c6d 13
b51c405f 14SRC_URI = "git://github.com/vim/vim.git;branch=master \
55cc8c6d
AK
15 file://disable_acl_header_check.patch \
16 file://vim-add-knob-whether-elf.h-are-checked.patch \
17 file://0001-src-Makefile-improve-reproducibility.patch \
8972fe55 18 file://no-path-adjust.patch \
416bc7b6 19 file://racefix.patch \
54d3d023 20 file://b7081e135a16091c93f6f5f7525a5c58fb7ca9f9.patch \
d7fac573 21 file://CVE-2021-3778.patch \
55cc8c6d 22"
54d3d023 23
07d23c2d 24SRCREV = "98056533b96b6b5d8849641de93185dd7bcadc44"
55cc8c6d 25
99558e66
AK
26# Do not consider .z in x.y.z, as that is updated with every commit
27UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+)\.0"
28
55cc8c6d
AK
29S = "${WORKDIR}/git"
30
31VIMDIR = "vim${@d.getVar('PV').split('.')[0]}${@d.getVar('PV').split('.')[1]}"
32
9464b192 33inherit autotools-brokensep update-alternatives mime-xdg
55cc8c6d
AK
34
35CLEANBROKEN = "1"
36
37# vim configure.in contains functions which got 'dropped' by autotools.bbclass
38do_configure () {
39 cd src
40 rm -f auto/*
41 touch auto/config.mk
42 aclocal
43 autoconf
44 cd ..
45 oe_runconf
46 touch src/auto/configure
47 touch src/auto/config.mk src/auto/config.h
48}
49
50do_compile() {
51 # We do not support fully / correctly the following locales. Attempting
52 # to use these with msgfmt in order to update the ".desktop" files exposes
53 # this problem and leads to the compile failing.
54 for LOCALE in cs fr ko pl sk zh_CN zh_TW;do
55 echo -n > src/po/${LOCALE}.po
56 done
57 autotools_do_compile
58}
59
da630d6d 60#Available PACKAGECONFIG options are gtkgui, acl, x11, tiny selinux, elfutils, nls
55cc8c6d
AK
61PACKAGECONFIG ??= ""
62PACKAGECONFIG += " \
63 ${@bb.utils.filter('DISTRO_FEATURES', 'acl selinux', d)} \
64 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 gtkgui', '', d)} \
da630d6d 65 nls \
55cc8c6d 66"
55cc8c6d 67
79582352 68PACKAGECONFIG[gtkgui] = "--enable-gui=gtk3,--enable-gui=no,gtk+3"
55cc8c6d
AK
69PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
70PACKAGECONFIG[x11] = "--with-x,--without-x,xt,"
71PACKAGECONFIG[tiny] = "--with-features=tiny,--with-features=big,,"
72PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,"
73PACKAGECONFIG[elfutils] = "--enable-elf-check,,elfutils,"
da630d6d 74PACKAGECONFIG[nls] = "--enable-nls,--disable-nls,,"
70de1dbb 75PACKAGECONFIG[sound] = "--enable-canberra,--disable-canberra,canberra,"
55cc8c6d
AK
76
77EXTRA_OECONF = " \
78 --disable-gpm \
79 --disable-gtktest \
80 --disable-xim \
81 --disable-netbeans \
914f8605 82 --disable-desktop-database-update \
55cc8c6d
AK
83 --with-tlib=ncurses \
84 ac_cv_small_wchar_t=no \
914f8605 85 ac_cv_path_GLIB_COMPILE_RESOURCES=no \
55cc8c6d
AK
86 vim_cv_getcwd_broken=no \
87 vim_cv_memmove_handles_overlap=yes \
88 vim_cv_stat_ignores_slash=no \
89 vim_cv_terminfo=yes \
90 vim_cv_tgetent=non-zero \
91 vim_cv_toupper_broken=no \
92 vim_cv_tty_group=world \
93 STRIP=/bin/true \
94"
95
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"