diff options
Diffstat (limited to 'external/poky/meta/recipes-support/vim')
7 files changed, 325 insertions, 0 deletions
diff --git a/external/poky/meta/recipes-support/vim/files/0001-src-Makefile-improve-reproducibility.patch b/external/poky/meta/recipes-support/vim/files/0001-src-Makefile-improve-reproducibility.patch new file mode 100644 index 00000000..63a7b78f --- /dev/null +++ b/external/poky/meta/recipes-support/vim/files/0001-src-Makefile-improve-reproducibility.patch @@ -0,0 +1,46 @@ +From 133ab27cdb17ca20ef6b0304cf30621d2bcbe757 Mon Sep 17 00:00:00 2001 +From: Mingli Yu <mingli.yu@windriver.com> +Date: Thu, 31 Jan 2019 21:32:26 -0800 +Subject: [PATCH] src/Makefile: improve reproducibility + +Clear all_cflags, all_lflags, compiled_user +and compiled_sys to avoid introducing build +info to improve reproducibility as below: + +WARNING: vim-8.1.0347-r0 do_package_qa: QA Issue: File /work/core2-64-wrs-linux/vim/8.1.0347-r0/packages-split/vim/usr/bin/vim.vim in package contained reference to tmpdir [buildpaths] + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +--- + src/Makefile | 14 ++++---------- + 1 file changed, 4 insertions(+), 10 deletions(-) + +diff --git a/src/Makefile b/src/Makefile +index f2fafa4dc..7148d4bd9 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -2845,16 +2845,10 @@ auto/pathdef.c: Makefile auto/config.mk + -@echo '#include "vim.h"' >> $@ + -@echo 'char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)";' | $(QUOTESED) >> $@ + -@echo 'char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR)";' | $(QUOTESED) >> $@ +- -@echo 'char_u *all_cflags = (char_u *)"$(CC) -c -I$(srcdir) $(ALL_CFLAGS)";' | $(QUOTESED) >> $@ +- -@echo 'char_u *all_lflags = (char_u *)"$(CC) $(ALL_LIB_DIRS) $(LDFLAGS) -o $(VIMTARGET) $(ALL_LIBS) ";' | $(QUOTESED) >> $@ +- -@echo 'char_u *compiled_user = (char_u *)"' | tr -d $(NL) >> $@ +- -@if test -n "$(COMPILEDBY)"; then \ +- echo "$(COMPILEDBY)" | tr -d $(NL) >> $@; \ +- else ((logname) 2>/dev/null || whoami) | tr -d $(NL) >> $@; fi +- -@echo '";' >> $@ +- -@echo 'char_u *compiled_sys = (char_u *)"' | tr -d $(NL) >> $@ +- -@if test -z "$(COMPILEDBY)"; then hostname | tr -d $(NL) >> $@; fi +- -@echo '";' >> $@ ++ -@echo 'char_u *all_cflags = (char_u *)"";' | $(QUOTESED) >> $@ ++ -@echo 'char_u *all_lflags = (char_u *)"";' | $(QUOTESED) >> $@ ++ -@echo 'char_u *compiled_user = (char_u *)"";' >> $@ ++ -@echo 'char_u *compiled_sys = (char_u *)"";' >> $@ + -@sh $(srcdir)/pathdef.sh + + GUI_GTK_RES_INPUTS = \ +-- +2.17.1 + diff --git a/external/poky/meta/recipes-support/vim/files/disable_acl_header_check.patch b/external/poky/meta/recipes-support/vim/files/disable_acl_header_check.patch new file mode 100644 index 00000000..33089162 --- /dev/null +++ b/external/poky/meta/recipes-support/vim/files/disable_acl_header_check.patch @@ -0,0 +1,39 @@ +From 5ed25c076a1fb1889a3c50dddf29f21850b59a13 Mon Sep 17 00:00:00 2001 +From: Wenzong Fan <wenzong.fan@windriver.com> +Date: Tue, 26 Jun 2018 17:29:09 +0800 +Subject: [PATCH] disable acl header check + +Don't check 'sys/acl.h' if acl support disabled for vim/vim-tiny. + +Upstream-Status: pending + +Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> +Signed-off-by: Changqing Li <changqing.li@windriver.com> +--- + src/configure.ac | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/configure.ac b/src/configure.ac +index 2d409b3ca06a..dbcaf6140263 100644 +--- a/src/configure.ac ++++ b/src/configure.ac +@@ -3257,7 +3257,7 @@ AC_CHECK_HEADERS(stdint.h stdlib.h string.h \ + sys/systeminfo.h locale.h sys/stream.h termios.h \ + libc.h sys/statfs.h poll.h sys/poll.h pwd.h \ + utime.h sys/param.h sys/ptms.h libintl.h libgen.h \ +- util/debug.h util/msg18n.h frame.h sys/acl.h \ ++ util/debug.h util/msg18n.h frame.h \ + sys/access.h sys/sysinfo.h wchar.h wctype.h) + + dnl sys/ptem.h depends on sys/stream.h on Solaris +@@ -3886,6 +3886,7 @@ AC_ARG_ENABLE(acl, + , [enable_acl="yes"]) + if test "$enable_acl" = "yes"; then + AC_MSG_RESULT(no) ++ AC_CHECK_HEADERS(sys/acl.h) + AC_CHECK_LIB(posix1e, acl_get_file, [LIBS="$LIBS -lposix1e"], + AC_CHECK_LIB(acl, acl_get_file, [LIBS="$LIBS -lacl" + AC_CHECK_LIB(attr, fgetxattr, LIBS="$LIBS -lattr",,)],,),) +-- +2.7.4 + diff --git a/external/poky/meta/recipes-support/vim/files/no-path-adjust.patch b/external/poky/meta/recipes-support/vim/files/no-path-adjust.patch new file mode 100644 index 00000000..05c2d803 --- /dev/null +++ b/external/poky/meta/recipes-support/vim/files/no-path-adjust.patch @@ -0,0 +1,27 @@ +vim: do not adjust script pathnames + +When cross-compiling, we do not want to reference the host versions of +things like perl and awk. + +Upstream-Status: Pending + +Signed-off-by: Joe Slater <joe.slater@windriver.com> + +--- a/src/Makefile ++++ b/src/Makefile +@@ -2507,11 +2507,14 @@ installtools: $(TOOLS) $(DESTDIR)$(exec_ + rm -rf $$cvs; \ + fi + -chmod $(FILEMOD) $(DEST_TOOLS)/* +-# replace the path in some tools ++ ++# replace the path in some tools, but not when cross-compiling ++ifneq ($(CROSS_COMPILING),1) + perlpath=`./which.sh perl` && sed -e "s+/usr/bin/perl+$$perlpath+" $(TOOLSSOURCE)/efm_perl.pl >$(DEST_TOOLS)/efm_perl.pl + awkpath=`./which.sh nawk` && sed -e "s+/usr/bin/nawk+$$awkpath+" $(TOOLSSOURCE)/mve.awk >$(DEST_TOOLS)/mve.awk; if test -z "$$awkpath"; then \ + awkpath=`./which.sh gawk` && sed -e "s+/usr/bin/nawk+$$awkpath+" $(TOOLSSOURCE)/mve.awk >$(DEST_TOOLS)/mve.awk; if test -z "$$awkpath"; then \ + awkpath=`./which.sh awk` && sed -e "s+/usr/bin/nawk+$$awkpath+" $(TOOLSSOURCE)/mve.awk >$(DEST_TOOLS)/mve.awk; fi; fi ++endif + -chmod $(SCRIPTMOD) `grep -l "^#!" $(DEST_TOOLS)/*` + + # install the language specific files for tools, if they were unpacked diff --git a/external/poky/meta/recipes-support/vim/files/vim-add-knob-whether-elf.h-are-checked.patch b/external/poky/meta/recipes-support/vim/files/vim-add-knob-whether-elf.h-are-checked.patch new file mode 100644 index 00000000..37914d4c --- /dev/null +++ b/external/poky/meta/recipes-support/vim/files/vim-add-knob-whether-elf.h-are-checked.patch @@ -0,0 +1,42 @@ +From 38de4bccdb8a861ffdd447f12fdab19d6d852c02 Mon Sep 17 00:00:00 2001 +From: Chong Lu <Chong.Lu@windriver.com> +Date: Tue, 26 Jun 2018 17:34:15 +0800 +Subject: [PATCH] vim: add knob whether elf.h are checked + +Previously, it still was checked when there was no elf library in sysroots directory. +Add knob to decide whether elf.h are checked or not. + +Upstream-Status: Pending + +Signed-off-by: Chong Lu <Chong.Lu@windriver.com> +Signed-off-by: Changqing Li <changqing.li@windriver.com> +--- + src/configure.ac | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/configure.ac b/src/configure.ac +index 0ee86ad..64736f0 100644 +--- a/src/configure.ac ++++ b/src/configure.ac +@@ -3192,11 +3192,18 @@ AC_TRY_COMPILE([#include <stdio.h>], [int x __attribute__((unused));], + AC_MSG_RESULT(no)) + + dnl Checks for header files. ++AC_MSG_CHECKING(whether or not to look for elf.h) ++AC_ARG_ENABLE(elf-check, ++ [ --enable-elf-check If elfutils, check for elf.h [default=no]], ++ , enable_elf_check="no") ++AC_MSG_RESULT($enable_elf_check) ++if test "x$enable_elf_check" != "xno"; then + AC_CHECK_HEADER(elf.h, HAS_ELF=1) + dnl AC_CHECK_HEADER(dwarf.h, SVR4=1) + if test "$HAS_ELF" = 1; then + AC_CHECK_LIB(elf, main) + fi ++fi + + AC_HEADER_DIRENT + +-- +2.7.4 + diff --git a/external/poky/meta/recipes-support/vim/vim-tiny_8.2.bb b/external/poky/meta/recipes-support/vim/vim-tiny_8.2.bb new file mode 100644 index 00000000..e4c26d23 --- /dev/null +++ b/external/poky/meta/recipes-support/vim/vim-tiny_8.2.bb @@ -0,0 +1,12 @@ +require vim.inc + +SUMMARY += " (with tiny features)" + +PACKAGECONFIG += "tiny" + +do_install() { + install -D -m 0755 ${S}/src/vim ${D}/${bindir}/vim.tiny +} + +ALTERNATIVE_PRIORITY = "90" +ALTERNATIVE_TARGET = "${bindir}/vim.tiny" diff --git a/external/poky/meta/recipes-support/vim/vim.inc b/external/poky/meta/recipes-support/vim/vim.inc new file mode 100644 index 00000000..4d2886c1 --- /dev/null +++ b/external/poky/meta/recipes-support/vim/vim.inc @@ -0,0 +1,144 @@ +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;endline=287;md5=a19edd7ec70d573a005d9e509375a99a" + +SRC_URI = "git://github.com/vim/vim.git \ + file://disable_acl_header_check.patch \ + file://vim-add-knob-whether-elf.h-are-checked.patch \ + file://0001-src-Makefile-improve-reproducibility.patch \ + file://no-path-adjust.patch \ +" +SRCREV = "98056533b96b6b5d8849641de93185dd7bcadc44" + +# Do not consider .z in x.y.z, as that is updated with every commit +UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+)\.0" + +S = "${WORKDIR}/git" + +VIMDIR = "vim${@d.getVar('PV').split('.')[0]}${@d.getVar('PV').split('.')[1]}" + +inherit autotools-brokensep update-alternatives mime-xdg + +CLEANBROKEN = "1" + +# vim configure.in contains functions which got 'dropped' by autotools.bbclass +do_configure () { + cd src + rm -f auto/* + touch auto/config.mk + aclocal + autoconf + cd .. + oe_runconf + touch src/auto/configure + touch src/auto/config.mk src/auto/config.h +} + +do_compile() { + # We do not support fully / correctly the following locales. Attempting + # to use these with msgfmt in order to update the ".desktop" files exposes + # this problem and leads to the compile failing. + for LOCALE in cs fr ko pl sk zh_CN zh_TW;do + echo -n > src/po/${LOCALE}.po + done + autotools_do_compile +} + +#Available PACKAGECONFIG options are gtkgui, acl, x11, tiny +PACKAGECONFIG ??= "" +PACKAGECONFIG += " \ + ${@bb.utils.filter('DISTRO_FEATURES', 'acl selinux', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 gtkgui', '', d)} \ +" + +PACKAGECONFIG[gtkgui] = "--enable-gui=gtk3,--enable-gui=no,gtk+3" +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_tgetent=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} + + if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'true', 'false', d)}; then + # The mouse being autoenabled is just annoying in xfce4-terminal (mouse + # drag make vim go into visual mode and there is no right click menu), + # delete the block. + sed -i '/the mouse works just fine/,+4d' ${D}/${datadir}/${BPN}/vimrc + fi +} + +PARALLEL_MAKEINST = "" + +PACKAGES =+ "${PN}-common ${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc ${PN}-tools" +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}" + +# We do not want to complain if perl or gawk are not on the target. +# +FILES_${PN}-tools = "${datadir}/${BPN}/${VIMDIR}/tools" +INSANE_SKIP_${PN}-tools = "file-rdeps" + +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}/icons \ +" + +RDEPENDS_${BPN} = "ncurses-terminfo-base" +# Recommend that runtime data is installed along with vim +RRECOMMENDS_${BPN} = "${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc ${PN}-common" + +ALTERNATIVE_${PN} = "vi vim" +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_TARGET = "${bindir}/${BPN}.${BPN}" +ALTERNATIVE_LINK_NAME[vi] = "${base_bindir}/vi" +ALTERNATIVE_LINK_NAME[vim] = "${bindir}/vim" diff --git a/external/poky/meta/recipes-support/vim/vim_8.2.bb b/external/poky/meta/recipes-support/vim/vim_8.2.bb new file mode 100644 index 00000000..709b6ddb --- /dev/null +++ b/external/poky/meta/recipes-support/vim/vim_8.2.bb @@ -0,0 +1,15 @@ +require vim.inc + +PROVIDES = "xxd" + +PACKAGECONFIG_class-native = "" +BBCLASSEXTEND = "native" + +ALTERNATIVE_${PN}_append = " xxd" +ALTERNATIVE_TARGET[xxd] = "${bindir}/xxd" +ALTERNATIVE_LINK_NAME[xxd] = "${bindir}/xxd" + +# We override the default in security_flags.inc because vim (not vim-tiny!) will abort +# in many places for _FORTIFY_SOURCE=2. Security flags become part of CC. +# +lcl_maybe_fortify = "${@oe.utils.conditional('DEBUG_BUILD','1','','-D_FORTIFY_SOURCE=1',d)}" |