Skip to contentSkip to conversation

vim: Rework to not rely on relative directories

PATCH New Tom Rini 1 participant 2 messages May 1, 2019

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH v2 1/2 vim: Rework to not rely on relative directories

The vim recipe has all of the code inside the "src" subdirectory but other things we rely on, such as the license file in a subdirectory relative to the src. However, as there is a top-level "configure" script that moves us down to the src directory, we can rework the recipe to be overall more simple and regularly laid out if we use that.

---
 meta/recipes-support/vim/vim-tiny_8.1.1017.bb |  2 +-
 meta/recipes-support/vim/vim_8.1.1017.bb      | 18 ++++++++++--------
 2 files changed, 11 insertions(+), 9 deletions(-)
meta/recipes-support/vim/vim-tiny_8.1.1017.bb +1 -1
index 8b1fb7b1158d..74464833adb5 100644
@@ -8,7 +8,7 @@ ALTERNATIVE_${PN}_remove = "xxd"
 PACKAGECONFIG += "tiny"
 
 do_install() {
-    install -D -m 0755 ${S}/vim ${D}/${bindir}/vim.tiny
+    install -D -m 0755 ${S}/src/vim ${D}/${bindir}/vim.tiny
 }
 
 ALTERNATIVE_PRIORITY = "90"
meta/recipes-support/vim/vim_8.1.1017.bb +10 -8
index 7627d2844b79..4e3e663c5429 100644
@@ -6,16 +6,16 @@ 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=f1f82b42360005c70b8c19b0ef493f72"
+LIC_FILES_CHKSUM = "file://runtime/doc/uganda.txt;endline=287;md5=f1f82b42360005c70b8c19b0ef493f72"
 
 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-src-Makefile-improve-reproducibility.patch;patchdir=.. \
+           file://disable_acl_header_check.patch \
+           file://vim-add-knob-whether-elf.h-are-checked.patch \
+           file://0001-src-Makefile-improve-reproducibility.patch \
 "
 SRCREV = "493fbe4abee660d30b4f2aef87b754b0a720213c"
 
-S = "${WORKDIR}/git/src"
+S = "${WORKDIR}/git"
 
 VIMDIR = "vim${@d.getVar('PV').split('.')[0]}${@d.getVar('PV').split('.')[1]}"
 
@@ -25,13 +25,15 @@ 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 auto/configure
-    touch auto/config.mk auto/config.h
+    touch src/auto/configure
+    touch src/auto/config.mk src/auto/config.h
 }
 
 #Available PACKAGECONFIG options are gtkgui, acl, x11, tiny
@@ -76,7 +78,7 @@ do_install() {
     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
+    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}
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH v2 2/2 vim: Update to 8.1.1240

This brings us to the current version of vim. As part of this we need to work-around a locale issue that upstream has exposed. We do not support fully / correctly the certain locales. Attempting to use these with msgfmt in order to update the ".desktop" files exposes this problem and leads to the compile failing.

---
 meta/recipes-support/vim/vim-tiny_8.1.1017.bb |  15 ---
 meta/recipes-support/vim/vim-tiny_8.1.1240.bb |  15 +++
 meta/recipes-support/vim/vim_8.1.1017.bb      | 131 ------------------------
 meta/recipes-support/vim/vim_8.1.1240.bb      | 141 ++++++++++++++++++++++++++
 4 files changed, 156 insertions(+), 146 deletions(-)
 delete mode 100644 meta/recipes-support/vim/vim-tiny_8.1.1017.bb
 create mode 100644 meta/recipes-support/vim/vim-tiny_8.1.1240.bb
 delete mode 100644 meta/recipes-support/vim/vim_8.1.1017.bb
 create mode 100644 meta/recipes-support/vim/vim_8.1.1240.bb
meta/recipes-support/vim/vim-tiny_8.1.1017.bb deleted +0 -15
deleted file mode 100644
index 74464833adb5..000000000000
@@ -1,15 +0,0 @@
-require vim_${PV}.bb
-
-SUMMARY += " (with tiny features)"
-
-PROVIDES_remove = "xxd"
-ALTERNATIVE_${PN}_remove = "xxd"
-
-PACKAGECONFIG += "tiny"
-
-do_install() {
-    install -D -m 0755 ${S}/src/vim ${D}/${bindir}/vim.tiny
-}
-
-ALTERNATIVE_PRIORITY = "90"
-ALTERNATIVE_TARGET = "${bindir}/vim.tiny"
meta/recipes-support/vim/vim-tiny_8.1.1240.bb new file +15 -0
new file mode 100644
index 000000000000..74464833adb5
@@ -0,0 +1,15 @@
+require vim_${PV}.bb
+
+SUMMARY += " (with tiny features)"
+
+PROVIDES_remove = "xxd"
+ALTERNATIVE_${PN}_remove = "xxd"
+
+PACKAGECONFIG += "tiny"
+
+do_install() {
+    install -D -m 0755 ${S}/src/vim ${D}/${bindir}/vim.tiny
+}
+
+ALTERNATIVE_PRIORITY = "90"
+ALTERNATIVE_TARGET = "${bindir}/vim.tiny"
meta/recipes-support/vim/vim_8.1.1017.bb deleted +0 -131

131 lines not on this page · raw message

meta/recipes-support/vim/vim_8.1.1240.bb new file +141 -0

141 lines not on this page · raw message

Signature · 1 line
2.7.4