]> code.ossystems Code Review - openembedded-core.git/commitdiff
vim: do not adjust script paths building for target
authorJoe Slater <joe.slater@windriver.com>
Wed, 15 Apr 2020 21:28:38 +0000 (14:28 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 24 Apr 2020 13:07:54 +0000 (14:07 +0100)
When cross-compiling, do not change scripts to use host
versions of perl and gawk.

Also, use INSANE_SKIP to suppress QA complaints if perl
or gawk are not on the target.

Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-support/vim/files/no-path-adjust.patch [new file with mode: 0644]
meta/recipes-support/vim/vim.inc

diff --git a/meta/recipes-support/vim/files/no-path-adjust.patch b/meta/recipes-support/vim/files/no-path-adjust.patch
new file mode 100644 (file)
index 0000000..05c2d80
--- /dev/null
@@ -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
index 78e3f9528d2737898cd98182a163df99725d6f6b..9f3dc080276bfb2cf9a865179c119c89a76b423b 100644 (file)
@@ -11,6 +11,7 @@ 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"
 
@@ -82,12 +83,6 @@ EXTRA_OECONF = " \
 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
 
@@ -110,7 +105,12 @@ 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 \