]>
Commit | Line | Data |
---|---|---|
55cc8c6d AK |
1 | SUMMARY = "Vi IMproved - enhanced vi editor" |
2 | SECTION = "console/utils" | |
3 | ||
55cc8c6d AK |
4 | DEPENDS = "ncurses gettext-native" |
5 | # vimdiff doesn't like busybox diff | |
6 | RSUGGESTS_${PN} = "diffutils" | |
7 | LICENSE = "vim" | |
07d23c2d | 8 | LIC_FILES_CHKSUM = "file://runtime/doc/uganda.txt;endline=287;md5=a19edd7ec70d573a005d9e509375a99a" |
55cc8c6d AK |
9 | |
10 | SRC_URI = "git://github.com/vim/vim.git \ | |
11 | file://disable_acl_header_check.patch \ | |
12 | file://vim-add-knob-whether-elf.h-are-checked.patch \ | |
13 | file://0001-src-Makefile-improve-reproducibility.patch \ | |
8972fe55 | 14 | file://no-path-adjust.patch \ |
416bc7b6 | 15 | file://racefix.patch \ |
55cc8c6d | 16 | " |
07d23c2d | 17 | SRCREV = "98056533b96b6b5d8849641de93185dd7bcadc44" |
55cc8c6d | 18 | |
99558e66 AK |
19 | # Do not consider .z in x.y.z, as that is updated with every commit |
20 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+)\.0" | |
21 | ||
55cc8c6d AK |
22 | S = "${WORKDIR}/git" |
23 | ||
24 | VIMDIR = "vim${@d.getVar('PV').split('.')[0]}${@d.getVar('PV').split('.')[1]}" | |
25 | ||
9464b192 | 26 | inherit autotools-brokensep update-alternatives mime-xdg |
55cc8c6d AK |
27 | |
28 | CLEANBROKEN = "1" | |
29 | ||
30 | # vim configure.in contains functions which got 'dropped' by autotools.bbclass | |
31 | do_configure () { | |
32 | cd src | |
33 | rm -f auto/* | |
34 | touch auto/config.mk | |
35 | aclocal | |
36 | autoconf | |
37 | cd .. | |
38 | oe_runconf | |
39 | touch src/auto/configure | |
40 | touch src/auto/config.mk src/auto/config.h | |
41 | } | |
42 | ||
43 | do_compile() { | |
44 | # We do not support fully / correctly the following locales. Attempting | |
45 | # to use these with msgfmt in order to update the ".desktop" files exposes | |
46 | # this problem and leads to the compile failing. | |
47 | for LOCALE in cs fr ko pl sk zh_CN zh_TW;do | |
48 | echo -n > src/po/${LOCALE}.po | |
49 | done | |
50 | autotools_do_compile | |
51 | } | |
52 | ||
53 | #Available PACKAGECONFIG options are gtkgui, acl, x11, tiny | |
54 | PACKAGECONFIG ??= "" | |
55 | PACKAGECONFIG += " \ | |
56 | ${@bb.utils.filter('DISTRO_FEATURES', 'acl selinux', d)} \ | |
57 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 gtkgui', '', d)} \ | |
58 | " | |
55cc8c6d | 59 | |
79582352 | 60 | PACKAGECONFIG[gtkgui] = "--enable-gui=gtk3,--enable-gui=no,gtk+3" |
55cc8c6d AK |
61 | PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl," |
62 | PACKAGECONFIG[x11] = "--with-x,--without-x,xt," | |
63 | PACKAGECONFIG[tiny] = "--with-features=tiny,--with-features=big,," | |
64 | PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux," | |
65 | PACKAGECONFIG[elfutils] = "--enable-elf-check,,elfutils," | |
66 | ||
67 | EXTRA_OECONF = " \ | |
68 | --disable-gpm \ | |
69 | --disable-gtktest \ | |
70 | --disable-xim \ | |
71 | --disable-netbeans \ | |
914f8605 | 72 | --disable-desktop-database-update \ |
55cc8c6d AK |
73 | --with-tlib=ncurses \ |
74 | ac_cv_small_wchar_t=no \ | |
914f8605 | 75 | ac_cv_path_GLIB_COMPILE_RESOURCES=no \ |
55cc8c6d AK |
76 | vim_cv_getcwd_broken=no \ |
77 | vim_cv_memmove_handles_overlap=yes \ | |
78 | vim_cv_stat_ignores_slash=no \ | |
79 | vim_cv_terminfo=yes \ | |
80 | vim_cv_tgetent=non-zero \ | |
81 | vim_cv_toupper_broken=no \ | |
82 | vim_cv_tty_group=world \ | |
83 | STRIP=/bin/true \ | |
84 | " | |
85 | ||
86 | do_install() { | |
87 | autotools_do_install | |
88 | ||
bf3e799e CQ |
89 | # Work around file-rdeps picking up csh, awk, perl or python as a dep |
90 | chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/vim132 | |
91 | chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/mve.awk | |
92 | chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/*.pl | |
93 | chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/*.py | |
94 | ||
55cc8c6d AK |
95 | # Install example vimrc from runtime files |
96 | install -m 0644 runtime/vimrc_example.vim ${D}/${datadir}/${BPN}/vimrc | |
97 | ||
98 | # we use --with-features=big as default | |
99 | mv ${D}${bindir}/${BPN} ${D}${bindir}/${BPN}.${BPN} | |
100 | ||
101 | if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'true', 'false', d)}; then | |
102 | # The mouse being autoenabled is just annoying in xfce4-terminal (mouse | |
103 | # drag make vim go into visual mode and there is no right click menu), | |
104 | # delete the block. | |
105 | sed -i '/the mouse works just fine/,+4d' ${D}/${datadir}/${BPN}/vimrc | |
106 | fi | |
107 | } | |
108 | ||
109 | PARALLEL_MAKEINST = "" | |
110 | ||
111 | PACKAGES =+ "${PN}-common ${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc ${PN}-tools" | |
112 | FILES_${PN}-syntax = "${datadir}/${BPN}/${VIMDIR}/syntax" | |
113 | FILES_${PN}-help = "${datadir}/${BPN}/${VIMDIR}/doc" | |
114 | FILES_${PN}-tutor = "${datadir}/${BPN}/${VIMDIR}/tutor ${bindir}/${BPN}tutor" | |
115 | FILES_${PN}-vimrc = "${datadir}/${BPN}/vimrc" | |
116 | FILES_${PN}-data = "${datadir}/${BPN}" | |
8972fe55 JS |
117 | |
118 | # We do not want to complain if perl or gawk are not on the target. | |
119 | # | |
55cc8c6d | 120 | FILES_${PN}-tools = "${datadir}/${BPN}/${VIMDIR}/tools" |
8972fe55 JS |
121 | INSANE_SKIP_${PN}-tools = "file-rdeps" |
122 | ||
55cc8c6d AK |
123 | FILES_${PN}-common = " \ |
124 | ${datadir}/${BPN}/${VIMDIR}/*.vim \ | |
125 | ${datadir}/${BPN}/${VIMDIR}/autoload \ | |
126 | ${datadir}/${BPN}/${VIMDIR}/colors \ | |
127 | ${datadir}/${BPN}/${VIMDIR}/compiler \ | |
128 | ${datadir}/${BPN}/${VIMDIR}/ftplugin \ | |
129 | ${datadir}/${BPN}/${VIMDIR}/indent \ | |
130 | ${datadir}/${BPN}/${VIMDIR}/keymap \ | |
131 | ${datadir}/${BPN}/${VIMDIR}/lang \ | |
132 | ${datadir}/${BPN}/${VIMDIR}/macros \ | |
133 | ${datadir}/${BPN}/${VIMDIR}/plugin \ | |
134 | ${datadir}/${BPN}/${VIMDIR}/print \ | |
135 | ${datadir}/${BPN}/${VIMDIR}/spell \ | |
136 | ${datadir}/icons \ | |
137 | " | |
138 | ||
139 | RDEPENDS_${BPN} = "ncurses-terminfo-base" | |
140 | # Recommend that runtime data is installed along with vim | |
141 | RRECOMMENDS_${BPN} = "${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc ${PN}-common" | |
142 | ||
a9f62ea2 | 143 | ALTERNATIVE_${PN} = "vi vim" |
55cc8c6d AK |
144 | ALTERNATIVE_PRIORITY = "100" |
145 | ALTERNATIVE_TARGET = "${bindir}/${BPN}.${BPN}" | |
146 | ALTERNATIVE_LINK_NAME[vi] = "${base_bindir}/vi" | |
147 | ALTERNATIVE_LINK_NAME[vim] = "${bindir}/vim" |