vim: Update from 8.0.1650 to 8.0.1700
[termux-packages] / packages / vim-python / build.sh
CommitLineData
56cc5820 1TERMUX_PKG_HOMEPAGE=http://www.vim.org/
de357946 2TERMUX_PKG_DESCRIPTION="Vi IMproved - enhanced vi editor"
4e19e448 3TERMUX_PKG_DEPENDS="ncurses, vim-runtime, python"
36f928ac
FF
4# vim should only be updated every 50 releases on multiples of 50.
5# Update both vim and vim-python to the same version in one PR.
21027e59
FF
6TERMUX_PKG_VERSION=8.0.1700
7TERMUX_PKG_SHA256=a7e0f747bcf117ed8c5bccf6058f5033e2956993710cd1a5fce23c1aa19d9715
56cc5820 8TERMUX_PKG_SRCURL="https://github.com/vim/vim/archive/v${TERMUX_PKG_VERSION}.tar.gz"
b712b92a
FF
9TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
10vim_cv_getcwd_broken=no
11vim_cv_memmove_handles_overlap=yes
12vim_cv_stat_ignores_slash=no
13vim_cv_terminfo=yes
36f928ac 14vim_cv_tgetent=zero
b712b92a
FF
15vim_cv_toupper_broken=no
16vim_cv_tty_group=world
17--enable-gui=no
18--enable-multibyte
19--with-features=huge
20--without-x
21--with-tlib=ncursesw
22"
56cc5820 23TERMUX_PKG_BUILD_IN_SRC="yes"
b712b92a
FF
24TERMUX_PKG_RM_AFTER_INSTALL="
25bin/rview
26bin/rvim
27bin/ex
28share/man/man1/evim.1
29share/icons
30share/vim/vim80/spell/en.ascii*
31share/vim/vim80/print
32share/vim/vim80/tools
33"
85afba20 34TERMUX_PKG_CONFFILES="share/vim/vimrc"
56cc5820
FF
35
36# vim-python:
56cc5820 37TERMUX_PKG_CONFLICTS="vim"
b712b92a
FF
38TERMUX_PKG_EXTRA_CONFIGURE_ARGS+="
39vi_cv_path_python3_pfx=$TERMUX_PREFIX
40vi_cv_var_python3_version=3.6
41--enable-python3interp
42--with-python3-config-dir=$TERMUX_PREFIX/lib/python3.6/config-3.6m/
43"
56cc5820 44TERMUX_PKG_DESCRIPTION+=" - with python support"
4e070076
FF
45# Remove share/vim/vim80 which is in vim-runtime built as a subpackage of vim:
46TERMUX_PKG_RM_AFTER_INSTALL+=" share/vim/vim80"
7ce56385 47termux_step_pre_configure() {
449d39d0 48 CPPFLAGS+=" -I${TERMUX_PREFIX}/include/python3.6m"
7ce56385 49}
56cc5820
FF
50
51termux_step_pre_configure () {
52 make distclean
53
54 # Remove eventually existing symlinks from previous builds so that they get re-created
55 for b in rview rvim ex view vimdiff; do rm -f $TERMUX_PREFIX/bin/$b; done
56 rm -f $TERMUX_PREFIX/share/man/man1/view.1
57}
58
59termux_step_post_make_install () {
60 cp $TERMUX_PKG_BUILDER_DIR/vimrc $TERMUX_PREFIX/share/vim/vimrc
61
d59c53cf 62 # Remove most tutor files:
3abd6cf4
FF
63 cp $TERMUX_PREFIX/share/vim/vim80/tutor/{tutor,tutor.vim,tutor.utf-8} $TERMUX_PKG_TMPDIR/
64 rm -f $TERMUX_PREFIX/share/vim/vim80/tutor/*
65 cp $TERMUX_PKG_TMPDIR/{tutor,tutor.vim,tutor.utf-8} $TERMUX_PREFIX/share/vim/vim80/tutor/
216acc06
FF
66
67 cd $TERMUX_PREFIX/bin
68 ln -f -s vim vi
56cc5820 69}