]>
Commit | Line | Data |
---|---|---|
55cc8c6d AK |
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 \ | |
13 | file://vim-add-knob-whether-elf.h-are-checked.patch \ | |
14 | file://0001-src-Makefile-improve-reproducibility.patch \ | |
15 | " | |
16 | SRCREV = "d96dbd6f95ea22f609042cc9c6272f14a21ff1a5" | |
17 | ||
18 | S = "${WORKDIR}/git" | |
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 | cd src | |
29 | rm -f auto/* | |
30 | touch auto/config.mk | |
31 | aclocal | |
32 | autoconf | |
33 | cd .. | |
34 | oe_runconf | |
35 | touch src/auto/configure | |
36 | touch src/auto/config.mk src/auto/config.h | |
37 | } | |
38 | ||
39 | do_compile() { | |
40 | # We do not support fully / correctly the following locales. Attempting | |
41 | # to use these with msgfmt in order to update the ".desktop" files exposes | |
42 | # this problem and leads to the compile failing. | |
43 | for LOCALE in cs fr ko pl sk zh_CN zh_TW;do | |
44 | echo -n > src/po/${LOCALE}.po | |
45 | done | |
46 | autotools_do_compile | |
47 | } | |
48 | ||
49 | #Available PACKAGECONFIG options are gtkgui, acl, x11, tiny | |
50 | PACKAGECONFIG ??= "" | |
51 | PACKAGECONFIG += " \ | |
52 | ${@bb.utils.filter('DISTRO_FEATURES', 'acl selinux', d)} \ | |
53 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 gtkgui', '', d)} \ | |
54 | " | |
55 | PACKAGECONFIG_class-native = "" | |
56 | ||
57 | PACKAGECONFIG[gtkgui] = "--enable-gui=gtk2,--enable-gui=no,gtk+," | |
58 | PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl," | |
59 | PACKAGECONFIG[x11] = "--with-x,--without-x,xt," | |
60 | PACKAGECONFIG[tiny] = "--with-features=tiny,--with-features=big,," | |
61 | PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux," | |
62 | PACKAGECONFIG[elfutils] = "--enable-elf-check,,elfutils," | |
63 | ||
64 | EXTRA_OECONF = " \ | |
65 | --disable-gpm \ | |
66 | --disable-gtktest \ | |
67 | --disable-xim \ | |
68 | --disable-netbeans \ | |
69 | --with-tlib=ncurses \ | |
70 | ac_cv_small_wchar_t=no \ | |
71 | vim_cv_getcwd_broken=no \ | |
72 | vim_cv_memmove_handles_overlap=yes \ | |
73 | vim_cv_stat_ignores_slash=no \ | |
74 | vim_cv_terminfo=yes \ | |
75 | vim_cv_tgetent=non-zero \ | |
76 | vim_cv_toupper_broken=no \ | |
77 | vim_cv_tty_group=world \ | |
78 | STRIP=/bin/true \ | |
79 | " | |
80 | ||
81 | do_install() { | |
82 | autotools_do_install | |
83 | ||
84 | # Work around file-rdeps picking up csh, awk, perl or python as a dep | |
85 | chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/vim132 | |
86 | chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/mve.awk | |
87 | chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/*.pl | |
88 | chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/*.py | |
89 | ||
90 | # Install example vimrc from runtime files | |
91 | install -m 0644 runtime/vimrc_example.vim ${D}/${datadir}/${BPN}/vimrc | |
92 | ||
93 | # we use --with-features=big as default | |
94 | mv ${D}${bindir}/${BPN} ${D}${bindir}/${BPN}.${BPN} | |
95 | ||
96 | if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'true', 'false', d)}; then | |
97 | # The mouse being autoenabled is just annoying in xfce4-terminal (mouse | |
98 | # drag make vim go into visual mode and there is no right click menu), | |
99 | # delete the block. | |
100 | sed -i '/the mouse works just fine/,+4d' ${D}/${datadir}/${BPN}/vimrc | |
101 | fi | |
102 | } | |
103 | ||
104 | PARALLEL_MAKEINST = "" | |
105 | ||
106 | PACKAGES =+ "${PN}-common ${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc ${PN}-tools" | |
107 | FILES_${PN}-syntax = "${datadir}/${BPN}/${VIMDIR}/syntax" | |
108 | FILES_${PN}-help = "${datadir}/${BPN}/${VIMDIR}/doc" | |
109 | FILES_${PN}-tutor = "${datadir}/${BPN}/${VIMDIR}/tutor ${bindir}/${BPN}tutor" | |
110 | FILES_${PN}-vimrc = "${datadir}/${BPN}/vimrc" | |
111 | FILES_${PN}-data = "${datadir}/${BPN}" | |
112 | FILES_${PN}-tools = "${datadir}/${BPN}/${VIMDIR}/tools" | |
113 | FILES_${PN}-common = " \ | |
114 | ${datadir}/${BPN}/${VIMDIR}/*.vim \ | |
115 | ${datadir}/${BPN}/${VIMDIR}/autoload \ | |
116 | ${datadir}/${BPN}/${VIMDIR}/colors \ | |
117 | ${datadir}/${BPN}/${VIMDIR}/compiler \ | |
118 | ${datadir}/${BPN}/${VIMDIR}/ftplugin \ | |
119 | ${datadir}/${BPN}/${VIMDIR}/indent \ | |
120 | ${datadir}/${BPN}/${VIMDIR}/keymap \ | |
121 | ${datadir}/${BPN}/${VIMDIR}/lang \ | |
122 | ${datadir}/${BPN}/${VIMDIR}/macros \ | |
123 | ${datadir}/${BPN}/${VIMDIR}/plugin \ | |
124 | ${datadir}/${BPN}/${VIMDIR}/print \ | |
125 | ${datadir}/${BPN}/${VIMDIR}/spell \ | |
126 | ${datadir}/icons \ | |
127 | " | |
128 | ||
129 | RDEPENDS_${BPN} = "ncurses-terminfo-base" | |
130 | # Recommend that runtime data is installed along with vim | |
131 | RRECOMMENDS_${BPN} = "${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc ${PN}-common" | |
132 | ||
133 | ALTERNATIVE_${PN} = "vi vim xxd" | |
134 | ALTERNATIVE_PRIORITY = "100" | |
135 | ALTERNATIVE_TARGET = "${bindir}/${BPN}.${BPN}" | |
136 | ALTERNATIVE_LINK_NAME[vi] = "${base_bindir}/vi" | |
137 | ALTERNATIVE_LINK_NAME[vim] = "${bindir}/vim" | |
138 | ALTERNATIVE_TARGET[xxd] = "${bindir}/xxd" | |
139 | ALTERNATIVE_LINK_NAME[xxd] = "${bindir}/xxd" | |
140 | ||
141 | BBCLASSEXTEND = "native" |