vim: Update 8.0.0887->8.0.0979 & enable terminal
[termux-packages] / packages / vim / build.sh
1 TERMUX_PKG_DESCRIPTION="Vi IMproved - enhanced vi editor"
2 TERMUX_PKG_HOMEPAGE=http://www.vim.org/
3 TERMUX_PKG_DEPENDS="ncurses, vim-runtime"
4
5 # Vim 8.0 patches described at ftp://ftp.vim.org/pub/vim/patches/8.0/README
6 TERMUX_PKG_VERSION=8.0.0979
7 TERMUX_PKG_SHA256=fd9bb5a1b6b653ab4950b41cb19b2ea46dbed5d4bb8367f9b5a484bf83fc2a2c
8 TERMUX_PKG_SRCURL="https://github.com/vim/vim/archive/v${TERMUX_PKG_VERSION}.tar.gz"
9 TERMUX_PKG_FOLDERNAME=vim-${TERMUX_PKG_VERSION}
10 TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
11 vim_cv_getcwd_broken=no
12 vim_cv_memmove_handles_overlap=yes
13 vim_cv_stat_ignores_slash=no
14 vim_cv_terminfo=yes
15 vim_cv_tgent=zero
16 vim_cv_toupper_broken=no
17 vim_cv_tty_group=world
18 --enable-gui=no
19 --enable-multibyte
20 --with-features=huge
21 --without-x
22 --with-tlib=ncursesw
23 --enable-terminal
24 "
25 TERMUX_PKG_BUILD_IN_SRC="yes"
26 TERMUX_PKG_RM_AFTER_INSTALL="
27 bin/rview
28 bin/rvim
29 bin/ex
30 share/man/man1/evim.1
31 share/icons
32 share/vim/vim80/spell/en.ascii*
33 share/vim/vim80/print
34 share/vim/vim80/tools
35 "
36 TERMUX_PKG_CONFFILES="share/vim/vimrc"
37
38 TERMUX_PKG_CONFLICTS="vim-python"
39
40 termux_step_pre_configure () {
41 make distclean
42
43 # Remove eventually existing symlinks from previous builds so that they get re-created
44 for b in rview rvim ex view vimdiff; do rm -f $TERMUX_PREFIX/bin/$b; done
45 rm -f $TERMUX_PREFIX/share/man/man1/view.1
46 }
47
48 termux_step_post_make_install () {
49 cp $TERMUX_PKG_BUILDER_DIR/vimrc $TERMUX_PREFIX/share/vim/vimrc
50
51 # Remove most tutor files:
52 cp $TERMUX_PREFIX/share/vim/vim80/tutor/{tutor,tutor.vim,tutor.utf-8} $TERMUX_PKG_TMPDIR/
53 rm -f $TERMUX_PREFIX/share/vim/vim80/tutor/*
54 cp $TERMUX_PKG_TMPDIR/{tutor,tutor.vim,tutor.utf-8} $TERMUX_PREFIX/share/vim/vim80/tutor/
55
56 cd $TERMUX_PREFIX/bin
57 ln -f -s vim vi
58 }