ncftp: bump version to 3.2.6
[buildroot-gz.git] / package / vim / vim.mk
blobd4a1f820280ae54c64915d2a8c218fa36ec1e667
1 ################################################################################
3 # vim
5 ################################################################################
7 VIM_VERSION = v8.0.0001
8 VIM_SITE = $(call github,vim,vim,$(VIM_VERSION))
9 # Win over busybox vi since vim is more feature-rich
10 VIM_DEPENDENCIES = \
11 ncurses $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \
12 $(if $(BR2_PACKAGE_BUSYBOX),busybox)
13 VIM_SUBDIR = src
14 VIM_CONF_ENV = \
15 vim_cv_toupper_broken=no \
16 vim_cv_terminfo=yes \
17 vim_cv_tty_group=world \
18 vim_cv_tty_mode=0620 \
19 vim_cv_getcwd_broken=no \
20 vim_cv_stat_ignores_slash=yes \
21 vim_cv_memmove_handles_overlap=yes \
22 ac_cv_sizeof_int=4 \
23 ac_cv_small_wchar_t=no
24 # GUI/X11 headers leak from the host so forcibly disable them
25 VIM_CONF_OPTS = --with-tlib=ncurses --enable-gui=no --without-x
26 VIM_LICENSE = Charityware
27 VIM_LICENSE_FILES = README.txt
29 ifeq ($(BR2_PACKAGE_ACL),y)
30 VIM_CONF_OPTS += --enable-acl
31 VIM_DEPENDENCIES += acl
32 else
33 VIM_CONF_OPTS += --disable-acl
34 endif
36 ifeq ($(BR2_PACKAGE_GPM),y)
37 VIM_CONF_OPTS += --enable-gpm
38 VIM_DEPENDENCIES += gpm
39 else
40 VIM_CONF_OPTS += --disable-gpm
41 endif
43 ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
44 VIM_CONF_OPTS += --enable-selinux
45 VIM_DEPENDENCIES += libselinux
46 else
47 VIM_CONF_OPTS += --disable-selinux
48 endif
50 define VIM_INSTALL_TARGET_CMDS
51 cd $(@D)/src; \
52 $(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) installvimbin; \
53 $(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) installtools; \
54 $(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) installlinks
55 endef
57 define VIM_INSTALL_RUNTIME_CMDS
58 cd $(@D)/src; \
59 $(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) installrtbase; \
60 $(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) installmacros
61 endef
63 define VIM_REMOVE_DOCS
64 find $(TARGET_DIR)/usr/share/vim -type f -name "*.txt" -delete
65 endef
67 # Avoid oopses with vipw/vigr, lack of $EDITOR and 'vi' command expectation
68 define VIM_INSTALL_VI_SYMLINK
69 ln -sf /usr/bin/vim $(TARGET_DIR)/bin/vi
70 endef
71 VIM_POST_INSTALL_TARGET_HOOKS += VIM_INSTALL_VI_SYMLINK
73 ifeq ($(BR2_PACKAGE_VIM_RUNTIME),y)
74 VIM_POST_INSTALL_TARGET_HOOKS += VIM_INSTALL_RUNTIME_CMDS
75 VIM_POST_INSTALL_TARGET_HOOKS += VIM_REMOVE_DOCS
76 endif
78 $(eval $(autotools-package))