mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-01-10 12:53:27 +00:00
bump(main/vim): 9.1.0950 (#22645)
and reduce the diff between the vim/vim-gtk builds to a minimum
This commit is contained in:
@@ -9,10 +9,9 @@ TERMUX_PKG_RECOMMENDS="diffutils, xxd"
|
||||
TERMUX_PKG_CONFLICTS="vim-gtk"
|
||||
TERMUX_PKG_BREAKS="vim-python, vim-runtime"
|
||||
TERMUX_PKG_REPLACES="vim-python, vim-runtime"
|
||||
TERMUX_PKG_VERSION=9.1.0900
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_VERSION="9.1.0950"
|
||||
TERMUX_PKG_SRCURL="https://github.com/vim/vim/archive/v${TERMUX_PKG_VERSION}.tar.gz"
|
||||
TERMUX_PKG_SHA256=30efb714ed82c5d7a1491f3e4aac6487d2c493d33c834d7ef043e6f45176772e
|
||||
TERMUX_PKG_SHA256=ff31083fdbdde49a1cd6e95ac751f194d75065d79c8d07d138a9c1afe3494b31
|
||||
TERMUX_PKG_ON_DEVICE_BUILD_NOT_SUPPORTED=true
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
TERMUX_PKG_CONFFILES="share/vim/vimrc"
|
||||
@@ -24,9 +23,10 @@ vim_cv_terminfo=yes
|
||||
vim_cv_tgetent=zero
|
||||
vim_cv_toupper_broken=no
|
||||
vim_cv_tty_group=world
|
||||
ac_cv_small_wchar_t=no
|
||||
--with-features=huge
|
||||
--with-tlib=ncursesw
|
||||
--enable-netbeans=no
|
||||
--with-tlib=ncursesw
|
||||
--enable-multibyte
|
||||
--with-compiledby='Termux'
|
||||
--enable-python3interp=dynamic
|
||||
@@ -80,21 +80,32 @@ termux_pkg_auto_update() {
|
||||
termux_step_pre_configure() {
|
||||
make distclean
|
||||
|
||||
# Remove eventually existing symlinks from previous builds so that they get re-created
|
||||
# Remove eventually existing symlinks from previous builds so that they get re-created.
|
||||
for sym in 'rview' 'rvim' 'ex' 'view' 'vimdiff'; do
|
||||
rm -f "${TERMUX_PREFIX}/bin/${sym}"
|
||||
rm -f "$TERMUX_PREFIX/share/man/man1/${sym}.1"*
|
||||
done
|
||||
rm -f "$TERMUX_PREFIX/share/man/man1/view.1"
|
||||
}
|
||||
|
||||
termux_step_post_make_install() {
|
||||
sed -e "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" "$TERMUX_PKG_BUILDER_DIR/vimrc" \
|
||||
> "$TERMUX_PREFIX/share/vim/vimrc"
|
||||
|
||||
# Remove most tutor files:
|
||||
cp "$TERMUX_PREFIX/share/vim/vim91/tutor"/{tutor,tutor.vim,tutor.utf-8} "$TERMUX_PKG_TMPDIR"/
|
||||
ln -sfr "$TERMUX_PREFIX/bin/vim" "$TERMUX_PREFIX/bin/vi"
|
||||
|
||||
### Remove most tutor files:
|
||||
# Make a directory to temporarily hold the ones we want to keep
|
||||
mkdir -p "$TERMUX_PKG_TMPDIR/vim-tutor"
|
||||
# Copy what we want to keep into $TERMUX_PKG_TMPDIR/vim-tutor
|
||||
cp -r "$TERMUX_PREFIX/share/vim/vim91/tutor/en/" \
|
||||
"$TERMUX_PREFIX/share/vim/vim91/tutor/tutor.vim" \
|
||||
"$TERMUX_PREFIX/share/vim/vim91/tutor/tutor.tutor"{,.json} \
|
||||
"$TERMUX_PREFIX/share/vim/vim91/tutor/tutor"{1,2}{,.utf-8} \
|
||||
"$TERMUX_PKG_TMPDIR/vim-tutor"
|
||||
# Remove all the tutor files
|
||||
rm -rf "$TERMUX_PREFIX/share/vim/vim91/tutor"/*
|
||||
cp "$TERMUX_PKG_TMPDIR"/{tutor,tutor.vim,tutor.utf-8} "$TERMUX_PREFIX/share/vim/vim91/tutor/"
|
||||
# Copy back what we saved earlier
|
||||
cp -r "$TERMUX_PKG_TMPDIR"/vim-tutor/* "$TERMUX_PREFIX/share/vim/vim91/tutor/"
|
||||
}
|
||||
|
||||
termux_step_create_debscripts() {
|
||||
|
||||
@@ -10,10 +10,12 @@ TERMUX_PKG_CONFLICTS="vim"
|
||||
TERMUX_PKG_BREAKS="vim-python"
|
||||
TERMUX_PKG_REPLACES="vim-python"
|
||||
TERMUX_PKG_VERSION="9.1.0950"
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL="https://github.com/vim/vim/archive/v${TERMUX_PKG_VERSION}.tar.gz"
|
||||
TERMUX_PKG_SHA256=ff31083fdbdde49a1cd6e95ac751f194d75065d79c8d07d138a9c1afe3494b31
|
||||
TERMUX_PKG_ON_DEVICE_BUILD_NOT_SUPPORTED=true
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
TERMUX_PKG_CONFFILES="share/vim/vimrc"
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
vim_cv_getcwd_broken=no
|
||||
vim_cv_memmove_handles_overlap=yes
|
||||
@@ -22,15 +24,12 @@ vim_cv_terminfo=yes
|
||||
vim_cv_tgetent=zero
|
||||
vim_cv_toupper_broken=no
|
||||
vim_cv_tty_group=world
|
||||
--with-compiledby='Termux'
|
||||
--enable-gui=gtk3
|
||||
--enable-multibyte
|
||||
--enable-netbeans=no
|
||||
--with-features=huge
|
||||
--with-tlib=ncursesw
|
||||
--with-x
|
||||
ac_cv_small_wchar_t=no
|
||||
--enable-cscope
|
||||
--with-features=huge
|
||||
--enable-netbeans=no
|
||||
--with-tlib=ncursesw
|
||||
--enable-multibyte
|
||||
--with-compiledby='Termux'
|
||||
--enable-python3interp=dynamic
|
||||
--with-python3-config-dir=$TERMUX_PYTHON_HOME/config-${TERMUX_PYTHON_VERSION}/
|
||||
vi_cv_path_python3_pfx=$TERMUX_PREFIX
|
||||
@@ -41,22 +40,19 @@ vi_cv_var_python3_version=${TERMUX_PYTHON_VERSION}
|
||||
--enable-luainterp=dynamic
|
||||
--with-lua-prefix=$TERMUX_PREFIX
|
||||
--with-luajit
|
||||
--enable-gui=gtk3
|
||||
--with-x
|
||||
"
|
||||
|
||||
# Avoid overlap with the `xxd` subpackage of `vim` by removing it from vim-gtk
|
||||
TERMUX_PKG_RM_AFTER_INSTALL="
|
||||
bin/xxd
|
||||
share/man/man1/xxd.1
|
||||
share/vim/vim91/spell/en.ascii*
|
||||
share/vim/vim91/print
|
||||
share/vim/vim91/tools
|
||||
"
|
||||
|
||||
# Avoid overlap with the `xxd` subpackage of `vim`
|
||||
TERMUX_PKG_RM_AFTER_INSTALL+="
|
||||
bin/xxd
|
||||
share/man/man1/xxd.1
|
||||
"
|
||||
|
||||
TERMUX_PKG_CONFFILES="share/vim/vimrc"
|
||||
|
||||
# Vim releases every commit as a new patch release.
|
||||
# To avoid auto update spam, we only update Vim every 50th patch.
|
||||
TERMUX_PKG_AUTO_UPDATE=true
|
||||
@@ -87,13 +83,52 @@ termux_step_pre_configure() {
|
||||
|
||||
# Remove eventually existing symlinks from previous builds so that they get re-created.
|
||||
for sym in 'eview' 'evim' 'ex' 'gview' 'gvim' 'gvimdiff' 'rgview' 'rgvim' 'rview' 'rvim' 'view' 'vimdiff'; do
|
||||
rm -f "$TERMUX_PREFIX/bin/${sym}"
|
||||
rm -f "${TERMUX_PREFIX}/bin/${sym}"
|
||||
rm -f "$TERMUX_PREFIX/share/man/man1/${sym}.1"*
|
||||
done
|
||||
}
|
||||
|
||||
termux_step_post_make_install() {
|
||||
install -Dm600 "$TERMUX_PKG_BUILDER_DIR/vimrc" "$TERMUX_PREFIX/share/vim/vimrc"
|
||||
sed -i "s|@TERMUX_PREFIX@|$TERMUX_PREFIX|g" "$TERMUX_PREFIX/share/vim/vimrc"
|
||||
sed -e "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" "$TERMUX_PKG_BUILDER_DIR/vimrc" \
|
||||
> "$TERMUX_PREFIX/share/vim/vimrc"
|
||||
|
||||
ln -sfr "$TERMUX_PREFIX/bin/vim" "$TERMUX_PREFIX/bin/vi"
|
||||
|
||||
### Remove most tutor files:
|
||||
# Make a directory to temporarily hold the ones we want to keep
|
||||
mkdir -p "$TERMUX_PKG_TMPDIR/vim-tutor"
|
||||
# Copy what we want to keep into $TERMUX_PKG_TMPDIR/vim-tutor
|
||||
cp -r "$TERMUX_PREFIX/share/vim/vim91/tutor/en/" \
|
||||
"$TERMUX_PREFIX/share/vim/vim91/tutor/tutor.vim" \
|
||||
"$TERMUX_PREFIX/share/vim/vim91/tutor/tutor.tutor"{,.json} \
|
||||
"$TERMUX_PREFIX/share/vim/vim91/tutor/tutor"{1,2}{,.utf-8} \
|
||||
"$TERMUX_PKG_TMPDIR/vim-tutor"
|
||||
# Remove all the tutor files
|
||||
rm -rf "$TERMUX_PREFIX/share/vim/vim91/tutor"/*
|
||||
# Copy back what we saved earlier
|
||||
cp -r "$TERMUX_PKG_TMPDIR"/vim-tutor/* "$TERMUX_PREFIX/share/vim/vim91/tutor/"
|
||||
}
|
||||
|
||||
termux_step_create_debscripts() {
|
||||
cat <<- EOF > ./postinst
|
||||
#!$TERMUX_PREFIX/bin/sh
|
||||
if [ "$TERMUX_PACKAGE_FORMAT" = "pacman" ] || [ "\$1" = "configure" ] || [ "\$1" = "abort-upgrade" ]; then
|
||||
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
|
||||
update-alternatives --install \
|
||||
$TERMUX_PREFIX/bin/editor editor $TERMUX_PREFIX/bin/vim 50
|
||||
update-alternatives --install \
|
||||
$TERMUX_PREFIX/bin/vi vi $TERMUX_PREFIX/bin/vim 20
|
||||
fi
|
||||
fi
|
||||
EOF
|
||||
|
||||
cat <<- EOF > ./prerm
|
||||
#!$TERMUX_PREFIX/bin/sh
|
||||
if [ "$TERMUX_PACKAGE_FORMAT" = "pacman" ] || [ "\$1" != "upgrade" ]; then
|
||||
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
|
||||
update-alternatives --remove editor $TERMUX_PREFIX/bin/vim
|
||||
update-alternatives --remove vi $TERMUX_PREFIX/bin/vim
|
||||
fi
|
||||
fi
|
||||
EOF
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user