2008-03-06 19:08:14 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Vim Text Editor
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
VIM_VERSION:=7.1
|
|
|
|
VIM_SOURCE:=vim-$(VIM_VERSION).tar.bz2
|
2008-10-06 21:18:11 +02:00
|
|
|
VIM_SITE:=http://ftp.vim.org/pub/vim
|
2008-03-06 19:08:14 +01:00
|
|
|
VIM_SOURCE_SITE:=$(VIM_SITE)/unix
|
|
|
|
VIM_PATCH_SITE:=$(VIM_SITE)/patches/7.1
|
|
|
|
VIM_DIR:=$(BUILD_DIR)/vim71
|
2009-03-09 20:47:55 +01:00
|
|
|
VIM_PATCHES:=$(shell sed -e 's:^:$(DL_DIR)/$(VIM_VERSION).:' package/editors/vim/patches)
|
2008-03-06 19:08:14 +01:00
|
|
|
VIM_CONFIG_H:=$(VIM_DIR)/src/auto/config.h
|
|
|
|
VIM_CONFIG_MK:=$(VIM_DIR)/src/auto/config.mk
|
|
|
|
|
|
|
|
$(DL_DIR)/$(VIM_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(VIM_SOURCE_SITE),$(VIM_SOURCE))
|
2008-03-06 19:08:14 +01:00
|
|
|
|
2009-03-15 14:51:30 +01:00
|
|
|
$(DL_DIR)/$(VIM_VERSION).%:
|
|
|
|
$(call DOWNLOAD,$(VIM_PATCH_SITE),$(notdir $@))
|
2008-03-06 19:08:14 +01:00
|
|
|
|
2008-10-06 21:18:11 +02:00
|
|
|
vim-source: $(DL_DIR)/$(VIM_SOURCE) $(VIM_PATCHES)
|
2008-03-06 19:08:14 +01:00
|
|
|
|
|
|
|
$(VIM_DIR)/.unpacked: $(DL_DIR)/$(VIM_SOURCE)
|
|
|
|
$(BZCAT) $(DL_DIR)/$(VIM_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(VIM_DIR)/.patched: $(VIM_DIR)/.unpacked
|
|
|
|
@for i in $(VIM_PATCHES); do ( \
|
|
|
|
echo "Patching with $$i"; \
|
|
|
|
cd $(VIM_DIR); \
|
|
|
|
patch -p0 < $$i) \
|
2008-10-06 21:18:11 +02:00
|
|
|
done
|
2008-03-06 19:08:14 +01:00
|
|
|
toolchain/patch-kernel.sh $(VIM_DIR) package/editors/vim/ \*.patch
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(VIM_DIR)/.configured: $(VIM_DIR)/.patched
|
|
|
|
(cd $(VIM_DIR)/src; \
|
2008-10-26 13:13:28 +01:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2008-03-06 19:08:14 +01:00
|
|
|
CFLAGS="$(TARGET_CFLAGS)" \
|
|
|
|
STRIP="$(TARGET_STRIP)" \
|
|
|
|
PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 \
|
|
|
|
PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
|
2009-10-01 21:24:42 +02:00
|
|
|
./configure $(QUIET) --prefix=/usr \
|
2008-03-06 19:08:14 +01:00
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
|
|
|
--prefix=/usr \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
$(DISABLE_NLS) \
|
|
|
|
--disable-netbeans \
|
|
|
|
--disable-gpm \
|
|
|
|
--disable-gui \
|
|
|
|
--without-x \
|
|
|
|
--with-tlib=ncurses \
|
|
|
|
)
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(VIM_DIR)/.build: $(VIM_DIR)/.configured
|
|
|
|
(cd $(VIM_DIR)/src; \
|
|
|
|
$(MAKE) \
|
|
|
|
)
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(TARGET_DIR)/usr/bin/vim: $(VIM_DIR)/.build
|
|
|
|
(cd $(VIM_DIR)/src; \
|
2008-10-19 09:59:19 +02:00
|
|
|
$(MAKE) DESTDIR=$(TARGET_DIR) installvimbin; \
|
|
|
|
$(MAKE) DESTDIR=$(TARGET_DIR) installlinks; \
|
2008-03-06 19:08:14 +01:00
|
|
|
)
|
2008-10-06 21:18:11 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_VIM_RUNTIME),y)
|
2008-03-06 19:08:14 +01:00
|
|
|
(cd $(VIM_DIR)/src; \
|
2008-10-19 09:59:19 +02:00
|
|
|
$(MAKE) DESTDIR=$(TARGET_DIR) installrtbase; \
|
|
|
|
$(MAKE) DESTDIR=$(TARGET_DIR) installmacros; \
|
2008-03-06 19:08:14 +01:00
|
|
|
)
|
|
|
|
endif
|
|
|
|
|
2009-10-27 23:16:44 +01:00
|
|
|
vim: host-pkg-config ncurses vim-source $(TARGET_DIR)/usr/bin/vim
|
2008-03-06 19:08:14 +01:00
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_VIM),y)
|
2008-03-06 19:08:14 +01:00
|
|
|
TARGETS+=vim
|
|
|
|
endif
|