From c31ccabca505627deb880bb6ff604d6f21fe0d83 Mon Sep 17 00:00:00 2001 From: Paul Barker Date: Sun, 1 May 2016 13:24:55 +0100 Subject: vim: Upgrade to v7.4.1689 v7.4.1689 is currently used in Debian Testing and Arch Linux. The tags file used as an index to vim's documentation is not correctly created when cross compiling in v7.4.1689. Patch 7.4.1733 is backported to fix this issue. Signed-off-by: Paul Barker Signed-off-by: Martin Jansa --- .../vim/files/0001-patch-7.4.1733.patch | 169 +++++++++++++++++++++ meta-oe/recipes-support/vim/vim-tiny_7.4.1689.bb | 13 ++ meta-oe/recipes-support/vim/vim-tiny_7.4.769.bb | 13 -- meta-oe/recipes-support/vim/vim_7.4.1689.bb | 111 ++++++++++++++ meta-oe/recipes-support/vim/vim_7.4.769.bb | 109 ------------- 5 files changed, 293 insertions(+), 122 deletions(-) create mode 100644 meta-oe/recipes-support/vim/files/0001-patch-7.4.1733.patch create mode 100644 meta-oe/recipes-support/vim/vim-tiny_7.4.1689.bb delete mode 100644 meta-oe/recipes-support/vim/vim-tiny_7.4.769.bb create mode 100644 meta-oe/recipes-support/vim/vim_7.4.1689.bb delete mode 100644 meta-oe/recipes-support/vim/vim_7.4.769.bb diff --git a/meta-oe/recipes-support/vim/files/0001-patch-7.4.1733.patch b/meta-oe/recipes-support/vim/files/0001-patch-7.4.1733.patch new file mode 100644 index 0000000000..98cf629065 --- /dev/null +++ b/meta-oe/recipes-support/vim/files/0001-patch-7.4.1733.patch @@ -0,0 +1,169 @@ +From ff1f017e5ab049557896655535e7d79663f89262 Mon Sep 17 00:00:00 2001 +From: Bram Moolenaar +Date: Thu, 14 Apr 2016 16:46:02 +0200 +Subject: [PATCH] patch 7.4.1733 + +Problem: "make install" doesn't know about cross-compiling. (Christian + Neukirchen) +Solution: Add CROSS_COMPILING. (closes #740) + +Signed-off-by: Paul Barker +Upstream-status: Backport +--- + src/Makefile | 19 +++++++++++++++---- + src/auto/configure | 4 ++++ + src/config.mk.in | 1 + + src/configure.in | 3 +++ + src/version.c | 2 ++ + 5 files changed, 25 insertions(+), 4 deletions(-) + +diff --git a/src/Makefile b/src/Makefile +index cf9636d..195cbd5 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -1998,23 +1998,25 @@ test1 \ + test70 test71 test72 test73 test74 test75 test76 test77 test78 test79 \ + test80 test81 test82 test83 test84 test85 test86 test87 test88 test89 \ + test90 test91 test92 test93 test94 test95 test97 test98 test99 \ +- test100 test101 test102 test103 test104 test105 test107 test108: ++ test100 test101 test102 test103 test104 test107 test108: + cd testdir; rm -f $@.out; $(MAKE) -f Makefile $@.out VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE) + + # Run individual NEW style test, assuming that Vim was already compiled. + test_arglist \ + test_assert \ + test_assign \ ++ test_autocmd \ + test_backspace_opt \ + test_cdo \ + test_channel \ + test_cursor_func \ + test_delete \ + test_ex_undo \ +- test_expr \ + test_expand \ ++ test_expr \ + test_feedkeys \ + test_file_perm \ ++ test_fnamemodify \ + test_glob2regpat \ + test_hardcopy \ + test_help_tagjump \ +@@ -2024,17 +2026,22 @@ test_arglist \ + test_json \ + test_langmap \ + test_lispwords \ ++ test_matchstrpos \ + test_menu \ + test_packadd \ + test_partial \ + test_perl \ + test_quickfix \ ++ test_regexp_latin \ ++ test_regexp_utf8 \ + test_reltime \ + test_searchpos \ + test_set \ + test_sort \ ++ test_statusline \ + test_syn_attr \ + test_syntax \ ++ test_tabline \ + test_timers \ + test_undolevels \ + test_unlet \ +@@ -2042,6 +2049,8 @@ test_arglist \ + test_viml \ + test_visual \ + test_window_id \ ++ test_alot_latin \ ++ test_alot_utf8 \ + test_alot: + cd testdir; rm -f $@.res test.log messages; $(MAKE) -f Makefile $@.res VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE) + @if test -f testdir/test.log; then \ +@@ -2126,9 +2135,11 @@ installrtbase: $(HELPSOURCE)/vim.1 $(DEST_VIM) $(DEST_RT) \ + # Generate the help tags with ":helptags" to handle all languages. + # Move the distributed tags file aside and restore it, to avoid it being + # different from the repository. +- cd $(HELPSOURCE); if test -f tags; then mv -f tags tags.dist; fi ++ cd $(HELPSOURCE); if test -z "$(CROSS_COMPILING)" -a -f tags; then \ ++ mv -f tags tags.dist; fi + @echo generating help tags +- -@cd $(HELPSOURCE); $(MAKE) VIMEXE=$(DEST_BIN)/$(VIMTARGET) vimtags ++ -@cd $(HELPSOURCE); if test -z "$(CROSS_COMPILING)"; then \ ++ $(MAKE) VIMEXE=$(DEST_BIN)/$(VIMTARGET) vimtags; fi + cd $(HELPSOURCE); \ + files=`ls *.txt tags`; \ + files="$$files `ls *.??x tags-?? 2>/dev/null || true`"; \ +diff --git a/src/auto/configure b/src/auto/configure +index a708230..91b075d 100755 +--- a/src/auto/configure ++++ b/src/auto/configure +@@ -721,6 +721,7 @@ OS_EXTRA_OBJ + OS_EXTRA_SRC + XCODE_SELECT + CPP_MM ++CROSS_COMPILING + STRIP + AWK + FGREP +@@ -4113,11 +4114,14 @@ else + $as_echo "no" >&6; } + fi + ++CROSS_COMPILING= + if test "$cross_compiling" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&5 + $as_echo "cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&6; } ++ CROSS_COMPILING=1 + fi + ++ + test "$GCC" = yes && CPP_MM=M; + + if test -f ./toolcheck; then +diff --git a/src/config.mk.in b/src/config.mk.in +index 7c0726c..1002d7c 100644 +--- a/src/config.mk.in ++++ b/src/config.mk.in +@@ -104,6 +104,7 @@ AWK = @AWK@ + STRIP = @STRIP@ + + EXEEXT = @EXEEXT@ ++CROSS_COMPILING = @CROSS_COMPILING@ + + COMPILEDBY = @compiledby@ + +diff --git a/src/configure.in b/src/configure.in +index f29b62c..0a8c95b 100644 +--- a/src/configure.in ++++ b/src/configure.in +@@ -88,9 +88,12 @@ fi + + dnl If configure thinks we are cross compiling, there might be something + dnl wrong with the CC or CFLAGS settings, give a useful warning message ++CROSS_COMPILING= + if test "$cross_compiling" = yes; then + AC_MSG_RESULT([cannot compile a simple program; if not cross compiling check CC and CFLAGS]) ++ CROSS_COMPILING=1 + fi ++AC_SUBST(CROSS_COMPILING) + + dnl gcc-cpp has the wonderful -MM option to produce nicer dependencies. + dnl But gcc 3.1 changed the meaning! See near the end. +diff --git a/src/version.c b/src/version.c +index 8d32e2a..f0630ea 100644 +--- a/src/version.c ++++ b/src/version.c +@@ -749,6 +749,8 @@ static char *(features[]) = + static int included_patches[] = + { /* Add new patch number below this line */ + /**/ ++ 1733, ++/**/ + 1689, + /**/ + 1688, +-- +2.1.4 + diff --git a/meta-oe/recipes-support/vim/vim-tiny_7.4.1689.bb b/meta-oe/recipes-support/vim/vim-tiny_7.4.1689.bb new file mode 100644 index 0000000000..bb8f2b7eae --- /dev/null +++ b/meta-oe/recipes-support/vim/vim-tiny_7.4.1689.bb @@ -0,0 +1,13 @@ +require vim_${PV}.bb + +SUMMARY += " (with tiny features)" + +PACKAGECONFIG += "tiny" + +do_install() { + install -d ${D}/${bindir} + install -m 0755 ${S}/vim ${D}/${bindir}/vim.tiny +} + +ALTERNATIVE_PRIORITY = "90" +ALTERNATIVE_TARGET = "${bindir}/vim.tiny" diff --git a/meta-oe/recipes-support/vim/vim-tiny_7.4.769.bb b/meta-oe/recipes-support/vim/vim-tiny_7.4.769.bb deleted file mode 100644 index bb8f2b7eae..0000000000 --- a/meta-oe/recipes-support/vim/vim-tiny_7.4.769.bb +++ /dev/null @@ -1,13 +0,0 @@ -require vim_${PV}.bb - -SUMMARY += " (with tiny features)" - -PACKAGECONFIG += "tiny" - -do_install() { - install -d ${D}/${bindir} - install -m 0755 ${S}/vim ${D}/${bindir}/vim.tiny -} - -ALTERNATIVE_PRIORITY = "90" -ALTERNATIVE_TARGET = "${bindir}/vim.tiny" diff --git a/meta-oe/recipes-support/vim/vim_7.4.1689.bb b/meta-oe/recipes-support/vim/vim_7.4.1689.bb new file mode 100644 index 0000000000..5e6282bbdc --- /dev/null +++ b/meta-oe/recipes-support/vim/vim_7.4.1689.bb @@ -0,0 +1,111 @@ +SUMMARY = "Vi IMproved - enhanced vi editor" +SECTION = "console/utils" +DEPENDS = "ncurses gettext-native" +# vimdiff doesn't like busybox diff +RSUGGESTS_${PN} = "diffutils" +LICENSE = "vim" +LIC_FILES_CHKSUM = "file://../runtime/doc/uganda.txt;md5=c74ec0ada9a68354f9461e81d3596f61" + +SRC_URI = "git://github.com/vim/vim.git \ + file://disable_acl_header_check.patch;patchdir=.. \ + file://vim-add-knob-whether-elf.h-are-checked.patch;patchdir=.. \ + file://0001-patch-7.4.1733.patch;patchdir=.. \ +" +SRCREV = "758535a1df4c5e86b45dddf12db2a54dea28ca40" + +S = "${WORKDIR}/git/src" + +VIMDIR = "vim${@d.getVar('PV',1).split('.')[0]}${@d.getVar('PV',1).split('.')[1]}" + +inherit autotools update-alternatives +inherit autotools-brokensep + +# vim configure.in contains functions which got 'dropped' by autotools.bbclass +do_configure () { + rm -f auto/* + touch auto/config.mk + aclocal + autoconf + oe_runconf + touch auto/configure + touch auto/config.mk auto/config.h +} + +#Available PACKAGECONFIG options are gtkgui, acl, x11, tiny +PACKAGECONFIG ??= "" +PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}" +PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}" + +PACKAGECONFIG[gtkgui] = "--enable-gtk2-test --enable-gui=gtk2,--enable-gui=no,gtk+," +PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl," +PACKAGECONFIG[x11] = "--with-x,--without-x,xt," +PACKAGECONFIG[tiny] = "--with-features=tiny,--with-features=big,," +PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux," +PACKAGECONFIG[elfutils] = "--enable-elf-check,,elfutils," + +EXTRA_OECONF = " \ + --disable-gpm \ + --disable-gtktest \ + --disable-xim \ + --disable-netbeans \ + --with-tlib=ncurses \ + ac_cv_small_wchar_t=no \ + vim_cv_getcwd_broken=no \ + vim_cv_memmove_handles_overlap=yes \ + vim_cv_stat_ignores_slash=no \ + vim_cv_terminfo=yes \ + vim_cv_tgent=non-zero \ + vim_cv_toupper_broken=no \ + vim_cv_tty_group=world \ + STRIP=/bin/true \ +" + +do_install() { + autotools_do_install + + # Work around file-rdeps picking up csh, awk, perl or python as a dep + chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/vim132 + chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/mve.awk + chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/*.pl + chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/*.py + + # Install example vimrc from runtime files + install -m 0644 ../runtime/vimrc_example.vim ${D}/${datadir}/${BPN}/vimrc + + # we use --with-features=big as default + mv ${D}${bindir}/${BPN} ${D}${bindir}/${BPN}.${BPN} +} + +PARALLEL_MAKEINST = "" + +PACKAGES =+ "${PN}-common ${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc" +FILES_${PN}-syntax = "${datadir}/${BPN}/${VIMDIR}/syntax" +FILES_${PN}-help = "${datadir}/${BPN}/${VIMDIR}/doc" +FILES_${PN}-tutor = "${datadir}/${BPN}/${VIMDIR}/tutor ${bindir}/${BPN}tutor" +FILES_${PN}-vimrc = "${datadir}/${BPN}/vimrc" +FILES_${PN}-data = "${datadir}/${BPN}" +FILES_${PN}-common = " \ + ${datadir}/${BPN}/${VIMDIR}/*.vim \ + ${datadir}/${BPN}/${VIMDIR}/autoload \ + ${datadir}/${BPN}/${VIMDIR}/colors \ + ${datadir}/${BPN}/${VIMDIR}/compiler \ + ${datadir}/${BPN}/${VIMDIR}/ftplugin \ + ${datadir}/${BPN}/${VIMDIR}/indent \ + ${datadir}/${BPN}/${VIMDIR}/keymap \ + ${datadir}/${BPN}/${VIMDIR}/lang \ + ${datadir}/${BPN}/${VIMDIR}/macros \ + ${datadir}/${BPN}/${VIMDIR}/plugin \ + ${datadir}/${BPN}/${VIMDIR}/print \ + ${datadir}/${BPN}/${VIMDIR}/spell \ + ${datadir}/${BPN}/${VIMDIR}/tools \ +" + +RDEPENDS_${PN} = "ncurses-terminfo-base" +# Recommend that runtime data is installed along with vim +RRECOMMENDS_${PN} = "${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc ${PN}-common" + +ALTERNATIVE_${PN} = "vi vim" +ALTERNATIVE_TARGET = "${bindir}/${BPN}.${BPN}" +ALTERNATIVE_LINK_NAME[vi] = "${base_bindir}/vi" +ALTERNATIVE_LINK_NAME[vim] = "${bindir}/vim" +ALTERNATIVE_PRIORITY = "100" diff --git a/meta-oe/recipes-support/vim/vim_7.4.769.bb b/meta-oe/recipes-support/vim/vim_7.4.769.bb deleted file mode 100644 index 08e5027a8a..0000000000 --- a/meta-oe/recipes-support/vim/vim_7.4.769.bb +++ /dev/null @@ -1,109 +0,0 @@ -SUMMARY = "Vi IMproved - enhanced vi editor" -SECTION = "console/utils" -DEPENDS = "ncurses gettext-native" -# vimdiff doesn't like busybox diff -RSUGGESTS_${PN} = "diffutils" -LICENSE = "vim" -LIC_FILES_CHKSUM = "file://../runtime/doc/uganda.txt;md5=c74ec0ada9a68354f9461e81d3596f61" - -SRC_URI = "git://github.com/vim/vim.git \ - file://disable_acl_header_check.patch;patchdir=.. \ - file://vim-add-knob-whether-elf.h-are-checked.patch;patchdir=.. \ -" -SRCREV = "2693ca21cee8a729d74682fd86a4818f2b050228" - -S = "${WORKDIR}/git/src" - -VIMDIR = "vim${@d.getVar('PV',1).split('.')[0]}${@d.getVar('PV',1).split('.')[1]}" - -inherit autotools update-alternatives -inherit autotools-brokensep - -# vim configure.in contains functions which got 'dropped' by autotools.bbclass -do_configure () { - rm -f auto/* - touch auto/config.mk - aclocal - autoconf - oe_runconf - touch auto/configure - touch auto/config.mk auto/config.h -} - -#Available PACKAGECONFIG options are gtkgui, acl, x11, tiny -PACKAGECONFIG ??= "" -PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}" -PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}" - -PACKAGECONFIG[gtkgui] = "--enable-gtk2-test --enable-gui=gtk2,--enable-gui=no,gtk+," -PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl," -PACKAGECONFIG[x11] = "--with-x,--without-x,xt," -PACKAGECONFIG[tiny] = "--with-features=tiny,--with-features=big,," -PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux," -PACKAGECONFIG[elfutils] = "--enable-elf-check,,elfutils," - -EXTRA_OECONF = " \ - --disable-gpm \ - --disable-gtktest \ - --disable-xim \ - --disable-netbeans \ - --with-tlib=ncurses \ - ac_cv_small_wchar_t=no \ - vim_cv_getcwd_broken=no \ - vim_cv_memmove_handles_overlap=yes \ - vim_cv_stat_ignores_slash=no \ - vim_cv_terminfo=yes \ - vim_cv_tgent=non-zero \ - vim_cv_toupper_broken=no \ - vim_cv_tty_group=world \ - STRIP=/bin/true \ -" - -do_install() { - autotools_do_install - - # Work around rpm picking up csh or awk or perl as a dep - chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/vim132 - chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/mve.awk - chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/*.pl - - # Install example vimrc from runtime files - install -m 0644 ../runtime/vimrc_example.vim ${D}/${datadir}/${BPN}/vimrc - - # we use --with-features=big as default - mv ${D}${bindir}/${BPN} ${D}${bindir}/${BPN}.${BPN} -} - -PARALLEL_MAKEINST = "" - -PACKAGES =+ "${PN}-common ${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc" -FILES_${PN}-syntax = "${datadir}/${BPN}/${VIMDIR}/syntax" -FILES_${PN}-help = "${datadir}/${BPN}/${VIMDIR}/doc" -FILES_${PN}-tutor = "${datadir}/${BPN}/${VIMDIR}/tutor ${bindir}/${BPN}tutor" -FILES_${PN}-vimrc = "${datadir}/${BPN}/vimrc" -FILES_${PN}-data = "${datadir}/${BPN}" -FILES_${PN}-common = " \ - ${datadir}/${BPN}/${VIMDIR}/*.vim \ - ${datadir}/${BPN}/${VIMDIR}/autoload \ - ${datadir}/${BPN}/${VIMDIR}/colors \ - ${datadir}/${BPN}/${VIMDIR}/compiler \ - ${datadir}/${BPN}/${VIMDIR}/ftplugin \ - ${datadir}/${BPN}/${VIMDIR}/indent \ - ${datadir}/${BPN}/${VIMDIR}/keymap \ - ${datadir}/${BPN}/${VIMDIR}/lang \ - ${datadir}/${BPN}/${VIMDIR}/macros \ - ${datadir}/${BPN}/${VIMDIR}/plugin \ - ${datadir}/${BPN}/${VIMDIR}/print \ - ${datadir}/${BPN}/${VIMDIR}/spell \ - ${datadir}/${BPN}/${VIMDIR}/tools \ -" - -RDEPENDS_${PN} = "ncurses-terminfo-base" -# Recommend that runtime data is installed along with vim -RRECOMMENDS_${PN} = "${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc ${PN}-common" - -ALTERNATIVE_${PN} = "vi vim" -ALTERNATIVE_TARGET = "${bindir}/${BPN}.${BPN}" -ALTERNATIVE_LINK_NAME[vi] = "${base_bindir}/vi" -ALTERNATIVE_LINK_NAME[vim] = "${bindir}/vim" -ALTERNATIVE_PRIORITY = "100" -- cgit 1.2.3-korg