mirror of
https://github.com/openwrt/packages.git
synced 2025-12-21 19:14:30 +04:00
vim: fix config and runtime
- Install shared runtime for both full and fuller. - Switch big to huge as big is just an alias to normal. - Fix default config path for tiny variant. - Use upstream default config for both full and fuller. - Don't mark default config files for backup. - Don't mix variant files. - Mark fuller variant config files for backup. - Update configure arguments and remove deprecated ones. - Remove deprecated configuration variables. - Improve descriptions. - Fix the following error by installing the missing runtime files for full and correctly installing the default config for tiny: E1187: Failed to source defaults.vim - Fix the following fuller error by installing the missing directory in runtime: Error detected while processing /usr/share/vim/vim91/plugin/netrwPlugin.vim: line 7: E919: Directory not found in 'packpath': "pack/*/opt/netrw" Fixes: https://github.com/openwrt/packages/issues/20203 Fixes: https://github.com/openwrt/packages/issues/28104 Signed-off-by: George Sapkin <george@sapk.in>
This commit is contained in:
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
PKG_NAME:=vim
|
PKG_NAME:=vim
|
||||||
PKG_VERSION:=9.1.1918
|
PKG_VERSION:=9.1.1918
|
||||||
PKG_XXD_VERSION:=2025.08.24
|
PKG_XXD_VERSION:=2025.08.24
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
VIMVER:=91
|
VIMVER:=91
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
@@ -47,13 +47,17 @@ define Package/vim-full
|
|||||||
TITLE+= (Normal)
|
TITLE+= (Normal)
|
||||||
PROVIDES:=vim
|
PROVIDES:=vim
|
||||||
CONFLICTS:=vim
|
CONFLICTS:=vim
|
||||||
|
DEPENDS:=vim-runtime
|
||||||
|
EXTRA_DEPENDS:=vim-runtime (=$(PKG_VERSION)-r$(PKG_RELEASE))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/vim-fuller
|
define Package/vim-fuller
|
||||||
$(call Package/vim/Default)
|
$(call Package/vim/Default)
|
||||||
TITLE+= (Big)
|
TITLE+= (Huge)
|
||||||
PROVIDES:=vim vim-full
|
PROVIDES:=vim vim-full
|
||||||
CONFLICTS:=vim vim-full
|
CONFLICTS:=vim vim-full
|
||||||
|
DEPENDS:=vim-runtime
|
||||||
|
EXTRA_DEPENDS:=vim-runtime (=$(PKG_VERSION)-r$(PKG_RELEASE))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/vim-runtime
|
define Package/vim-runtime
|
||||||
@@ -74,71 +78,67 @@ define Package/xxd
|
|||||||
VERSION:=$(PKG_XXD_VERSION)
|
VERSION:=$(PKG_XXD_VERSION)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/vim-full/conffiles
|
define Package/vim/conffiles
|
||||||
/usr/share/vim/vimrc
|
|
||||||
/root/.vimrc
|
/root/.vimrc
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/vim/conffiles
|
Package/vim-full/conffiles = $(Package/vim/conffiles)
|
||||||
/usr/share/vim/vimrc
|
Package/vim-fuller/conffiles = $(Package/vim/conffiles)
|
||||||
/root/.vimrc
|
|
||||||
|
define Package/vim/description/default
|
||||||
|
Vim is an almost compatible version of the UNIX editor Vi.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/vim/description
|
define Package/vim/description
|
||||||
Vim is an almost compatible version of the UNIX editor Vi.
|
$(call Package/vim/description/default)
|
||||||
(Tiny build)
|
Tiny build with minimal feature set.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/vim-full/description
|
define Package/vim-full/description
|
||||||
Vim is an almost compatible version of the UNIX editor Vi.
|
$(call Package/vim/description/default)
|
||||||
(Normal build)
|
Normal build with standard set of features like syntax highlighting, menus,
|
||||||
|
mouse support, translations, spell checking, etc.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/vim-fuller/description
|
define Package/vim-fuller/description
|
||||||
Vim is an almost compatible version of the UNIX editor Vi.
|
$(call Package/vim/description/default)
|
||||||
(Big build)
|
Huge build enables right-to-left language support, cscope, etc.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/vim-runtime/description
|
define Package/vim-runtime/description
|
||||||
Vim is an almost compatible version of the UNIX editor Vi.
|
$(call Package/vim/description/default)
|
||||||
(Runtime files)
|
(Runtime files)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/vim-help/description
|
define Package/vim-help/description
|
||||||
Vim is an almost compatible version of the UNIX editor Vi.
|
$(call Package/vim/description/default)
|
||||||
(Help files)
|
(Help files)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/xxd/description
|
define Package/xxd/description
|
||||||
xxd creates a hex dump of a given file or standard input, it can also convert
|
xxd creates a hex dump of a given file or standard input, it can also convert
|
||||||
a hex dump back to its original binary form.
|
a hex dump back to its original binary form.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
CONFIGURE_ARGS += \
|
CONFIGURE_ARGS += \
|
||||||
--disable-gui \
|
|
||||||
--disable-gtktest \
|
|
||||||
--disable-xim \
|
|
||||||
--without-x \
|
|
||||||
--disable-netbeans \
|
|
||||||
--disable-cscope \
|
|
||||||
--disable-gpm \
|
|
||||||
--disable-acl \
|
--disable-acl \
|
||||||
|
--disable-gtktest \
|
||||||
--disable-libsodium \
|
--disable-libsodium \
|
||||||
|
--disable-netbeans \
|
||||||
--disable-selinux \
|
--disable-selinux \
|
||||||
--with-tlib=ncurses \
|
--enable-gpm=no \
|
||||||
|
--enable-gui=no \
|
||||||
--with-compiledby="non-existent-hostname-compiled" \
|
--with-compiledby="non-existent-hostname-compiled" \
|
||||||
|
--with-tlib=ncurses \
|
||||||
--with-wayland=no
|
--with-wayland=no
|
||||||
|
|
||||||
CONFIGURE_VARS += \
|
CONFIGURE_VARS += \
|
||||||
ac_cv_header_elf_h=no \
|
|
||||||
vim_cv_getcwd_broken=no \
|
vim_cv_getcwd_broken=no \
|
||||||
vim_cv_memmove_handles_overlap=yes \
|
vim_cv_memmove_handles_overlap=yes \
|
||||||
vim_cv_stat_ignores_slash=yes \
|
vim_cv_stat_ignores_slash=yes \
|
||||||
vim_cv_tgetent=zero \
|
|
||||||
vim_cv_terminfo=yes \
|
vim_cv_terminfo=yes \
|
||||||
vim_cv_toupper_broken=no \
|
vim_cv_tgetent=zero \
|
||||||
vim_cv_tty_group=root \
|
vim_cv_toupper_broken=no
|
||||||
vim_cv_tty_mode=0620
|
|
||||||
|
|
||||||
ifneq ($(HOST_OS),Linux)
|
ifneq ($(HOST_OS),Linux)
|
||||||
TARGET_PATH_PKG:=$(CURDIR)/scripts:$(TARGET_PATH_PKG)
|
TARGET_PATH_PKG:=$(CURDIR)/scripts:$(TARGET_PATH_PKG)
|
||||||
@@ -155,7 +155,7 @@ define Build/Compile/vim
|
|||||||
--with-features=tiny \
|
--with-features=tiny \
|
||||||
)
|
)
|
||||||
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
||||||
DESTDIR="$(PKG_INSTALL_DIR)" all
|
DESTDIR="$(PKG_INSTALL_DIR)/vim_tiny" all
|
||||||
$(CP) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(PKG_BUILD_DIR)/vim_tiny
|
$(CP) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(PKG_BUILD_DIR)/vim_tiny
|
||||||
endef
|
endef
|
||||||
endif
|
endif
|
||||||
@@ -166,7 +166,7 @@ define Build/Compile/vim-full
|
|||||||
--with-features=normal \
|
--with-features=normal \
|
||||||
)
|
)
|
||||||
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
||||||
DESTDIR="$(PKG_INSTALL_DIR)" all
|
DESTDIR="$(PKG_INSTALL_DIR)/vim_normal" all
|
||||||
$(CP) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(PKG_BUILD_DIR)/vim_normal
|
$(CP) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(PKG_BUILD_DIR)/vim_normal
|
||||||
endef
|
endef
|
||||||
endif
|
endif
|
||||||
@@ -174,11 +174,11 @@ endif
|
|||||||
ifneq ($(CONFIG_PACKAGE_vim-fuller),)
|
ifneq ($(CONFIG_PACKAGE_vim-fuller),)
|
||||||
define Build/Compile/vim-fuller
|
define Build/Compile/vim-fuller
|
||||||
$(call Build/Configure/Default, \
|
$(call Build/Configure/Default, \
|
||||||
--with-features=big \
|
--with-features=huge \
|
||||||
)
|
)
|
||||||
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
||||||
DESTDIR="$(PKG_INSTALL_DIR)" all
|
DESTDIR="$(PKG_INSTALL_DIR)/vim_huge" all
|
||||||
$(CP) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(PKG_BUILD_DIR)/vim_big
|
$(CP) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(PKG_BUILD_DIR)/vim_huge
|
||||||
endef
|
endef
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -190,10 +190,10 @@ endef
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
define Build/Compile/vim-runtime
|
define Build/Compile/vim-runtime
|
||||||
$(MAKE) -C $(PKG_BUILD_DIR)/src DESTDIR="$(PKG_INSTALL_DIR)" installrtbase
|
$(MAKE) -C $(PKG_BUILD_DIR)/src DESTDIR="$(PKG_INSTALL_DIR)/vim_runtime" installrtbase
|
||||||
(cd $(PKG_INSTALL_DIR) && tar -cf $(PKG_BUILD_DIR)/docs.tar ./usr/share/vim/vim$(VIMVER)/doc)
|
(cd $(PKG_INSTALL_DIR)/vim_runtime && tar -cf $(PKG_BUILD_DIR)/docs.tar ./usr/share/vim/vim$(VIMVER)/doc)
|
||||||
rm -rf $(PKG_INSTALL_DIR)/usr/share/vim/vim$(VIMVER)/doc
|
$(RM) -r $(PKG_INSTALL_DIR)/vim_runtime/usr/share/vim/vim$(VIMVER)/doc
|
||||||
rm -rf $(PKG_INSTALL_DIR)/usr/man
|
$(RM) -r $(PKG_INSTALL_DIR)/vim_runtime/usr/man
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
@@ -208,7 +208,7 @@ define Package/vim/install
|
|||||||
$(INSTALL_DIR) $(1)/usr/bin
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/vim_tiny $(1)/usr/bin/vim
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/vim_tiny $(1)/usr/bin/vim
|
||||||
$(INSTALL_DIR) $(1)/usr/share/vim
|
$(INSTALL_DIR) $(1)/usr/share/vim
|
||||||
$(INSTALL_CONF) ./files/vimrc $(1)/usr/share/vim/
|
$(INSTALL_CONF) ./files/defaults.vim $(1)/usr/share/vim
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/vim-full/install
|
define Package/vim-full/install
|
||||||
@@ -216,25 +216,23 @@ define Package/vim-full/install
|
|||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/vim_normal $(1)/usr/bin/vim
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/vim_normal $(1)/usr/bin/vim
|
||||||
$(INSTALL_DIR) $(1)/usr/share/vim
|
$(INSTALL_DIR) $(1)/usr/share/vim
|
||||||
$(LN) vim $(1)/usr/bin/vimdiff
|
$(LN) vim $(1)/usr/bin/vimdiff
|
||||||
$(INSTALL_CONF) ./files/vimrc.full $(1)/usr/share/vim/vimrc
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/vim-fuller/install
|
define Package/vim-fuller/install
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/vim_big $(1)/usr/bin/vim
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/vim_huge $(1)/usr/bin/vim
|
||||||
$(INSTALL_DIR) $(1)/usr/share/vim
|
$(INSTALL_DIR) $(1)/usr/share/vim
|
||||||
$(LN) vim $(1)/usr/bin/vimdiff
|
$(LN) vim $(1)/usr/bin/vimdiff
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/share/vim/vim$(VIMVER) $(1)/usr/share/vim
|
|
||||||
$(INSTALL_CONF) ./files/vimrc.full $(1)/usr/share/vim/vimrc
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/vim-runtime/install
|
define Package/vim-runtime/install
|
||||||
$(CP) $(PKG_INSTALL_DIR)/* $(1)
|
$(CP) $(PKG_INSTALL_DIR)/vim_runtime/* $(1)
|
||||||
rm -rf $(1)/usr/share/vim/vim$(VIMVER)/doc
|
$(INSTALL_DIR) $(1)/usr/share/vim/vim$(VIMVER)/pack/dist/opt/netrw
|
||||||
|
$(RM) -r $(1)/usr/share/vim/vim$(VIMVER)/doc
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/vim-help/install
|
define Package/vim-help/install
|
||||||
tar -C $(1) -xf $(PKG_BUILD_DIR)/docs.tar
|
$(TAR) -C $(1) -xf $(PKG_BUILD_DIR)/docs.tar
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/xxd/install
|
define Package/xxd/install
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
set showcmd " show (partial) command in status line
|
|
||||||
set showmatch " show matching brackets
|
|
||||||
set incsearch " incremental search
|
|
||||||
"set autowrite " automatically save before commands like :next and :make
|
|
||||||
set nocompatible " use Vim defaults instead of 100% vi compatibility
|
|
||||||
set backspace=indent,eol,start " more powerful backspacing
|
|
||||||
set autoindent " always set autoindenting on
|
|
||||||
set linebreak " don't wrap words by default
|
|
||||||
set textwidth=0 " don't wrap lines by default
|
|
||||||
set ruler " show the cursor position all the time
|
|
||||||
|
|
||||||
set backupskip+=/etc/crontabs.* " fix crontab -e
|
|
||||||
|
|
||||||
if filereadable(expand("$VIMRUNTIME/syntax/synload.vim"))
|
|
||||||
syntax on
|
|
||||||
endif
|
|
||||||
if has("syntax") && &term =~ "xterm"
|
|
||||||
set t_Co=8
|
|
||||||
if has("terminfo")
|
|
||||||
set t_Sf=<Esc>[3%p1%dm
|
|
||||||
set t_Sb=<Esc>[4%p1%dm
|
|
||||||
else
|
|
||||||
set t_Sf=<Esc>[3%dm
|
|
||||||
set t_Sb=<Esc>[4%dm
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Uncomment out for line and/or relative numberig
|
|
||||||
" set number
|
|
||||||
" set rnu
|
|
||||||
Reference in New Issue
Block a user