2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2008-03-06 19:08:14 +01:00
|
|
|
#
|
2010-12-17 15:50:15 +01:00
|
|
|
# vim
|
2008-03-06 19:08:14 +01:00
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2008-03-06 19:08:14 +01:00
|
|
|
|
2016-09-12 16:34:35 +02:00
|
|
|
VIM_VERSION = v8.0.0001
|
2015-10-04 12:23:07 +02:00
|
|
|
VIM_SITE = $(call github,vim,vim,$(VIM_VERSION))
|
2014-11-08 14:54:37 +01:00
|
|
|
# Win over busybox vi since vim is more feature-rich
|
2014-12-30 08:36:23 +01:00
|
|
|
VIM_DEPENDENCIES = \
|
|
|
|
ncurses $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \
|
2014-11-08 14:54:37 +01:00
|
|
|
$(if $(BR2_PACKAGE_BUSYBOX),busybox)
|
2010-12-17 15:50:15 +01:00
|
|
|
VIM_SUBDIR = src
|
2014-12-30 08:36:23 +01:00
|
|
|
VIM_CONF_ENV = \
|
|
|
|
vim_cv_toupper_broken=no \
|
|
|
|
vim_cv_terminfo=yes \
|
|
|
|
vim_cv_tty_group=world \
|
|
|
|
vim_cv_tty_mode=0620 \
|
|
|
|
vim_cv_getcwd_broken=no \
|
|
|
|
vim_cv_stat_ignores_slash=yes \
|
|
|
|
vim_cv_memmove_handles_overlap=yes \
|
|
|
|
ac_cv_sizeof_int=4 \
|
|
|
|
ac_cv_small_wchar_t=no
|
2012-03-29 04:24:59 +02:00
|
|
|
# GUI/X11 headers leak from the host so forcibly disable them
|
2014-09-27 21:32:44 +02:00
|
|
|
VIM_CONF_OPTS = --with-tlib=ncurses --enable-gui=no --without-x
|
2013-01-17 03:25:43 +01:00
|
|
|
VIM_LICENSE = Charityware
|
|
|
|
VIM_LICENSE_FILES = README.txt
|
2010-12-17 15:50:15 +01:00
|
|
|
|
2016-02-20 23:45:41 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_ACL),y)
|
|
|
|
VIM_CONF_OPTS += --enable-acl
|
|
|
|
VIM_DEPENDENCIES += acl
|
|
|
|
else
|
|
|
|
VIM_CONF_OPTS += --disable-acl
|
|
|
|
endif
|
|
|
|
|
2016-02-21 07:32:59 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_GPM),y)
|
|
|
|
VIM_CONF_OPTS += --enable-gpm
|
|
|
|
VIM_DEPENDENCIES += gpm
|
|
|
|
else
|
|
|
|
VIM_CONF_OPTS += --disable-gpm
|
|
|
|
endif
|
|
|
|
|
2015-06-02 15:28:31 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
|
|
|
|
VIM_CONF_OPTS += --enable-selinux
|
|
|
|
VIM_DEPENDENCIES += libselinux
|
|
|
|
else
|
|
|
|
VIM_CONF_OPTS += --disable-selinux
|
|
|
|
endif
|
|
|
|
|
2010-12-17 15:50:15 +01:00
|
|
|
define VIM_INSTALL_TARGET_CMDS
|
|
|
|
cd $(@D)/src; \
|
2016-10-17 18:06:10 +02:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) installvimbin; \
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) installtools; \
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) installlinks
|
2010-12-17 15:50:15 +01:00
|
|
|
endef
|
2008-03-06 19:08:14 +01:00
|
|
|
|
2010-12-17 15:50:15 +01:00
|
|
|
define VIM_INSTALL_RUNTIME_CMDS
|
|
|
|
cd $(@D)/src; \
|
2016-10-17 18:06:10 +02:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) installrtbase; \
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) installmacros
|
2010-12-17 15:50:15 +01:00
|
|
|
endef
|
2008-03-06 19:08:14 +01:00
|
|
|
|
2013-02-12 01:51:39 +01:00
|
|
|
define VIM_REMOVE_DOCS
|
|
|
|
find $(TARGET_DIR)/usr/share/vim -type f -name "*.txt" -delete
|
|
|
|
endef
|
|
|
|
|
2014-11-08 14:54:37 +01:00
|
|
|
# Avoid oopses with vipw/vigr, lack of $EDITOR and 'vi' command expectation
|
|
|
|
define VIM_INSTALL_VI_SYMLINK
|
|
|
|
ln -sf /usr/bin/vim $(TARGET_DIR)/bin/vi
|
|
|
|
endef
|
|
|
|
VIM_POST_INSTALL_TARGET_HOOKS += VIM_INSTALL_VI_SYMLINK
|
|
|
|
|
2008-10-06 21:18:11 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_VIM_RUNTIME),y)
|
2010-12-17 15:50:15 +01:00
|
|
|
VIM_POST_INSTALL_TARGET_HOOKS += VIM_INSTALL_RUNTIME_CMDS
|
2013-02-12 01:51:39 +01:00
|
|
|
VIM_POST_INSTALL_TARGET_HOOKS += VIM_REMOVE_DOCS
|
|
|
|
endif
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|