mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] vim: allow vim to be installed alongside busybox vi and xxd
@ 2024-05-02 14:53 Ian Abbott
  2024-05-03  6:59 ` Alexander Dahl
  2024-05-03  9:14 ` [ptxdist] [PATCH v2] " Ian Abbott
  0 siblings, 2 replies; 11+ messages in thread
From: Ian Abbott @ 2024-05-02 14:53 UTC (permalink / raw)
  To: ptxdist; +Cc: Ian Abbott

Commit ad2eb34a07ed ("vim: prevent file name conflicts with busybox")
prevented vim being selected if busybox vi is selected. However, the vim
package does not currently install /usr/bin/vi, so the only conflict is
between vim's xxd and busybox's xxd.

Allow vim to be installed alongside busybox vi. Also add a configuration
option to allow installation of a /usr/bin/vi symbolic link to
/usr/bin/vim, but only allow it to be selected if busybox vi is not
selected.

Move the auto-selections of LIBC_DL, LIBC_M, GCCLIBS_GCC_S, and NCURSES
from VIM to VIM_VIM because VIM_XXD does not appear to require them.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
---
 rules/vim.in   | 24 ++++++++++++------------
 rules/vim.make |  4 ++++
 2 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/rules/vim.in b/rules/vim.in
index c4c9d14e6..2f7eba993 100644
--- a/rules/vim.in
+++ b/rules/vim.in
@@ -1,15 +1,7 @@
 ## SECTION=editors
 
-comment "BusyBox' vi and xxd is selected!"
-	depends on BUSYBOX_VI && BUSYBOX_XXD
-
 menuconfig VIM
 	tristate
-	depends on !(BUSYBOX_VI && BUSYBOX_XXD)
-	select LIBC_DL
-	select LIBC_M
-	select GCCLIBS_GCC_S
-	select NCURSES
 	prompt "vim                           "
 	help
 	  Vim is an advanced text editor that seeks to provide the
@@ -18,12 +10,20 @@ menuconfig VIM
 
 if VIM
 
-comment "BusyBox' vi is selected!"
-	depends on BUSYBOX_VI
-
 config VIM_VIM
-	depends on !BUSYBOX_VI
 	bool "Vim Editor"
+	select LIBC_DL
+	select LIBC_M
+	select GCCLIBS_GCC_S
+	select NCURSES
+
+comment "BusyBox' vi is selected!"
+	depends on VIM_VIM && BUSYBOX_VI
+
+config VIM_VI_SYMLINK
+	depends on VIM_VIM && !BUSYBOX_VI
+	bool "install symbolic link /usr/bin/vi"
+	default y
 
 comment "BusyBox' xxd is selected!"
 	depends on BUSYBOX_XXD
diff --git a/rules/vim.make b/rules/vim.make
index b03778e53..8700b70bd 100644
--- a/rules/vim.make
+++ b/rules/vim.make
@@ -103,6 +103,10 @@ VIM_INSTALL_OPT := \
 
 VIM_LINKS := ex rview rvim view vimdiff
 
+ifdef PTXCONF_VIM_VI_SYMLINK
+VIM_LINKS += vi
+endif
+
 $(STATEDIR)/vim.targetinstall:
 	@$(call targetinfo)
 
-- 
2.43.0




^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-05-12 13:17 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-02 14:53 [ptxdist] [PATCH] vim: allow vim to be installed alongside busybox vi and xxd Ian Abbott
2024-05-03  6:59 ` Alexander Dahl
2024-05-03  9:12   ` Ian Abbott
2024-05-03  9:40     ` Alexander Dahl
2024-05-03 12:24       ` Ian Abbott
2024-05-03 12:29         ` Alexander Dahl
2024-05-03  9:14 ` [ptxdist] [PATCH v2] " Ian Abbott
2024-05-03 14:56   ` Michael Olbrich
2024-05-03 18:01   ` [ptxdist] [PATCH v3] " Ian Abbott
2024-05-03 18:08     ` [ptxdist] [PATCH v4] " Ian Abbott
2024-05-12 13:16       ` [ptxdist] [APPLIED] " Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox