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