diff options
Diffstat (limited to 'meta/recipes-support/vim/vim.inc')
-rw-r--r-- | meta/recipes-support/vim/vim.inc | 74 |
1 files changed, 40 insertions, 34 deletions
diff --git a/meta/recipes-support/vim/vim.inc b/meta/recipes-support/vim/vim.inc index d57f784da5..071deed338 100644 --- a/meta/recipes-support/vim/vim.inc +++ b/meta/recipes-support/vim/vim.inc | |||
@@ -1,29 +1,37 @@ | |||
1 | SUMMARY = "Vi IMproved - enhanced vi editor" | 1 | SUMMARY = "Vi IMproved - enhanced vi editor" |
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." | ||
2 | SECTION = "console/utils" | 3 | SECTION = "console/utils" |
3 | 4 | ||
5 | HOMEPAGE = "https://www.vim.org/" | ||
6 | BUGTRACKER = "https://github.com/vim/vim/issues" | ||
7 | |||
4 | DEPENDS = "ncurses gettext-native" | 8 | DEPENDS = "ncurses gettext-native" |
5 | # vimdiff doesn't like busybox diff | 9 | # vimdiff doesn't like busybox diff |
6 | RSUGGESTS_${PN} = "diffutils" | 10 | RSUGGESTS:${PN} = "diffutils" |
7 | LICENSE = "vim" | 11 | |
8 | LIC_FILES_CHKSUM = "file://runtime/doc/uganda.txt;endline=287;md5=a19edd7ec70d573a005d9e509375a99a" | 12 | LICENSE = "Vim" |
13 | LIC_FILES_CHKSUM = "file://LICENSE;md5=d1a651ab770b45d41c0f8cb5a8ca930e" | ||
9 | 14 | ||
10 | SRC_URI = "git://github.com/vim/vim.git \ | 15 | SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \ |
11 | file://disable_acl_header_check.patch \ | 16 | file://disable_acl_header_check.patch \ |
12 | file://vim-add-knob-whether-elf.h-are-checked.patch \ | 17 | file://vim-add-knob-whether-elf.h-are-checked.patch \ |
13 | file://0001-src-Makefile-improve-reproducibility.patch \ | 18 | file://0001-src-Makefile-improve-reproducibility.patch \ |
14 | file://no-path-adjust.patch \ | 19 | file://no-path-adjust.patch \ |
15 | file://racefix.patch \ | 20 | " |
16 | " | 21 | |
17 | SRCREV = "98056533b96b6b5d8849641de93185dd7bcadc44" | 22 | PV .= ".0114" |
23 | SRCREV = "fcaed6a70faf73bff3e5405ada556d726024f866" | ||
18 | 24 | ||
19 | # Do not consider .z in x.y.z, as that is updated with every commit | 25 | # Do not consider .z in x.y.z, as that is updated with every commit |
20 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+)\.0" | 26 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+)\.0" |
27 | # Ignore that the upstream version .z in x.y.z is always newer | ||
28 | UPSTREAM_VERSION_UNKNOWN = "1" | ||
21 | 29 | ||
22 | S = "${WORKDIR}/git" | 30 | S = "${WORKDIR}/git" |
23 | 31 | ||
24 | VIMDIR = "vim${@d.getVar('PV').split('.')[0]}${@d.getVar('PV').split('.')[1]}" | 32 | VIMDIR = "vim${@d.getVar('PV').split('.')[0]}${@d.getVar('PV').split('.')[1]}" |
25 | 33 | ||
26 | inherit autotools-brokensep update-alternatives mime-xdg | 34 | inherit autotools-brokensep update-alternatives mime-xdg pkgconfig |
27 | 35 | ||
28 | CLEANBROKEN = "1" | 36 | CLEANBROKEN = "1" |
29 | 37 | ||
@@ -32,29 +40,24 @@ do_configure () { | |||
32 | cd src | 40 | cd src |
33 | rm -f auto/* | 41 | rm -f auto/* |
34 | touch auto/config.mk | 42 | touch auto/config.mk |
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 | ||
35 | aclocal | 47 | aclocal |
36 | autoconf | 48 | autoconf |
37 | cd .. | 49 | cd .. |
38 | oe_runconf | 50 | oe_runconf |
39 | touch src/auto/configure | 51 | touch src/auto/configure |
40 | touch src/auto/config.mk src/auto/config.h | 52 | touch src/auto/config.mk src/auto/config.h |
53 | # need a native tool, not a target one | ||
54 | ${BUILD_CC} src/po/sjiscorr.c -o src/po/sjiscorr | ||
41 | } | 55 | } |
42 | 56 | ||
43 | do_compile() { | 57 | PACKAGECONFIG ??= "\ |
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)} \ | 58 | ${@bb.utils.filter('DISTRO_FEATURES', 'acl selinux', d)} \ |
57 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 gtkgui', '', d)} \ | 59 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 gtkgui', '', d)} \ |
60 | nls \ | ||
58 | " | 61 | " |
59 | 62 | ||
60 | PACKAGECONFIG[gtkgui] = "--enable-gui=gtk3,--enable-gui=no,gtk+3" | 63 | PACKAGECONFIG[gtkgui] = "--enable-gui=gtk3,--enable-gui=no,gtk+3" |
@@ -63,6 +66,8 @@ PACKAGECONFIG[x11] = "--with-x,--without-x,xt," | |||
63 | PACKAGECONFIG[tiny] = "--with-features=tiny,--with-features=big,," | 66 | PACKAGECONFIG[tiny] = "--with-features=tiny,--with-features=big,," |
64 | PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux," | 67 | PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux," |
65 | PACKAGECONFIG[elfutils] = "--enable-elf-check,,elfutils," | 68 | PACKAGECONFIG[elfutils] = "--enable-elf-check,,elfutils," |
69 | PACKAGECONFIG[nls] = "--enable-nls,--disable-nls,," | ||
70 | PACKAGECONFIG[sound] = "--enable-canberra,--disable-canberra,canberra," | ||
66 | 71 | ||
67 | EXTRA_OECONF = " \ | 72 | EXTRA_OECONF = " \ |
68 | --disable-gpm \ | 73 | --disable-gpm \ |
@@ -71,6 +76,7 @@ EXTRA_OECONF = " \ | |||
71 | --disable-netbeans \ | 76 | --disable-netbeans \ |
72 | --disable-desktop-database-update \ | 77 | --disable-desktop-database-update \ |
73 | --with-tlib=ncurses \ | 78 | --with-tlib=ncurses \ |
79 | --with-modified-by='${MAINTAINER}' \ | ||
74 | ac_cv_small_wchar_t=no \ | 80 | ac_cv_small_wchar_t=no \ |
75 | ac_cv_path_GLIB_COMPILE_RESOURCES=no \ | 81 | ac_cv_path_GLIB_COMPILE_RESOURCES=no \ |
76 | vim_cv_getcwd_broken=no \ | 82 | vim_cv_getcwd_broken=no \ |
@@ -83,6 +89,10 @@ EXTRA_OECONF = " \ | |||
83 | STRIP=/bin/true \ | 89 | STRIP=/bin/true \ |
84 | " | 90 | " |
85 | 91 | ||
92 | # Some host distros don't have it, disable consistently | ||
93 | EXTRA_OECONF:append:class-native = " vim_cv_timer_create=no" | ||
94 | EXTRA_OECONF:append:class-target = " vim_cv_timer_create=yes" | ||
95 | |||
86 | do_install() { | 96 | do_install() { |
87 | autotools_do_install | 97 | autotools_do_install |
88 | 98 | ||
@@ -109,18 +119,18 @@ do_install() { | |||
109 | PARALLEL_MAKEINST = "" | 119 | PARALLEL_MAKEINST = "" |
110 | 120 | ||
111 | PACKAGES =+ "${PN}-common ${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc ${PN}-tools" | 121 | PACKAGES =+ "${PN}-common ${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc ${PN}-tools" |
112 | FILES_${PN}-syntax = "${datadir}/${BPN}/${VIMDIR}/syntax" | 122 | FILES:${PN}-syntax = "${datadir}/${BPN}/${VIMDIR}/syntax" |
113 | FILES_${PN}-help = "${datadir}/${BPN}/${VIMDIR}/doc" | 123 | FILES:${PN}-help = "${datadir}/${BPN}/${VIMDIR}/doc" |
114 | FILES_${PN}-tutor = "${datadir}/${BPN}/${VIMDIR}/tutor ${bindir}/${BPN}tutor" | 124 | FILES:${PN}-tutor = "${datadir}/${BPN}/${VIMDIR}/tutor ${bindir}/${BPN}tutor" |
115 | FILES_${PN}-vimrc = "${datadir}/${BPN}/vimrc" | 125 | FILES:${PN}-vimrc = "${datadir}/${BPN}/vimrc" |
116 | FILES_${PN}-data = "${datadir}/${BPN}" | 126 | FILES:${PN}-data = "${datadir}/${BPN}" |
117 | 127 | ||
118 | # We do not want to complain if perl or gawk are not on the target. | 128 | # We do not want to complain if perl or gawk are not on the target. |
119 | # | 129 | # |
120 | FILES_${PN}-tools = "${datadir}/${BPN}/${VIMDIR}/tools" | 130 | FILES:${PN}-tools = "${datadir}/${BPN}/${VIMDIR}/tools" |
121 | INSANE_SKIP_${PN}-tools = "file-rdeps" | 131 | INSANE_SKIP:${PN}-tools = "file-rdeps" |
122 | 132 | ||
123 | FILES_${PN}-common = " \ | 133 | FILES:${PN}-common = " \ |
124 | ${datadir}/${BPN}/${VIMDIR}/*.vim \ | 134 | ${datadir}/${BPN}/${VIMDIR}/*.vim \ |
125 | ${datadir}/${BPN}/${VIMDIR}/autoload \ | 135 | ${datadir}/${BPN}/${VIMDIR}/autoload \ |
126 | ${datadir}/${BPN}/${VIMDIR}/colors \ | 136 | ${datadir}/${BPN}/${VIMDIR}/colors \ |
@@ -136,11 +146,7 @@ FILES_${PN}-common = " \ | |||
136 | ${datadir}/icons \ | 146 | ${datadir}/icons \ |
137 | " | 147 | " |
138 | 148 | ||
139 | RDEPENDS_${BPN} = "ncurses-terminfo-base" | 149 | ALTERNATIVE:${PN} = "vi vim" |
140 | # Recommend that runtime data is installed along with vim | ||
141 | RRECOMMENDS_${BPN} = "${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc ${PN}-common" | ||
142 | |||
143 | ALTERNATIVE_${PN} = "vi vim" | ||
144 | ALTERNATIVE_PRIORITY = "100" | 150 | ALTERNATIVE_PRIORITY = "100" |
145 | ALTERNATIVE_TARGET = "${bindir}/${BPN}.${BPN}" | 151 | ALTERNATIVE_TARGET = "${bindir}/${BPN}.${BPN}" |
146 | ALTERNATIVE_LINK_NAME[vi] = "${base_bindir}/vi" | 152 | ALTERNATIVE_LINK_NAME[vi] = "${base_bindir}/vi" |