vim: add PACKAGECONFIG option for desktop files
PATCH 1/1 vim: add PACKAGECONFIG option for desktop files
The recipe currently always inherits mime-xdg and keeps the installed desktop files. Add a desktop PACKAGECONFIG option so configurations can disable that desktop integration while preserving the current default behavior.
When desktop support is disabled, remove the generated desktop files during do_install and avoid inheriting mime-xdg.
Signed-off-by Shinu Chandran <[email protected]>
--- meta/recipes-support/vim/vim.inc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
meta/recipes-support/vim/vim.inc +10 -1
@@ -28,7 +28,7 @@ UPSTREAM_VERSION_UNKNOWN = "1" VIMDIR = "vim${@d.getVar('PV').split('.')[0]}${@d.getVar('PV').split('.')[1]}" -inherit autotools-brokensep update-alternatives mime-xdg pkgconfig +inherit autotools-brokensep update-alternatives pkgconfig CLEANBROKEN = "1"
@@ -53,9 +53,11 @@ do_configure () { PACKAGECONFIG ??= "\ ${@bb.utils.filter('DISTRO_FEATURES', 'acl selinux x11', d)} \ + desktop \ nls \ " +PACKAGECONFIG[desktop] = "" PACKAGECONFIG[gtkgui] = "--enable-gui=gtk3,--enable-gui=no,gtk+3" PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl," PACKAGECONFIG[x11] = "--with-x,--without-x,xt,"
@@ -65,6 +67,8 @@ PACKAGECONFIG[elfutils] = "--enable-elf-check,,elfutils," PACKAGECONFIG[nls] = "--enable-nls,--disable-nls,," PACKAGECONFIG[sound] = "--enable-canberra,--disable-canberra,canberra," +inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'desktop', 'mime-xdg', '', d)} + EXTRA_OECONF = " \ --disable-gpm \ --disable-gtktest \
@@ -111,6 +115,11 @@ do_install() { # delete the block. sed -i '/the mouse works just fine/,+4d' ${D}/${datadir}/${BPN}/vimrc fi + + if ${@bb.utils.contains('PACKAGECONFIG', 'desktop', 'false', 'true', d)}; then + rm -f ${D}${datadir}/applications/vim.desktop + rm -f ${D}${datadir}/applications/gvim.desktop + fi } PARALLEL_MAKEINST = ""
Signature · 1 line
2.35.6