diff --git a/packages/addons/addon-depends/system-tools-depends/vim/package.mk b/packages/addons/addon-depends/system-tools-depends/vim/package.mk new file mode 100644 index 0000000000..508df3fbe9 --- /dev/null +++ b/packages/addons/addon-depends/system-tools-depends/vim/package.mk @@ -0,0 +1,56 @@ +################################################################################ +# This file is part of LibreELEC - http://www.libreelec.tv +# Copyright (C) 2016-present Team LibreELEC +# +# LibreELEC is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# LibreELEC is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with LibreELEC. If not, see . +################################################################################ + +PKG_NAME="vim" +PKG_VERSION="8.0.0684" +PKG_ARCH="any" +PKG_LICENSE="VIM" +PKG_SITE="http://www.vim.org/" +PKG_URL="https://github.com/vim/vim/archive/v$PKG_VERSION.tar.gz" +PKG_DEPENDS_TARGET="toolchain netbsd-curses" +PKG_SECTION="tools" +PKG_SHORTDESC="vim: VI IMproved" +PKG_LONGDESC="Vim is a highly configurable text editor built to enable efficient text editing." +PKG_AUTORECONF="no" + +PKG_CONFIGURE_OPTS_TARGET="vim_cv_getcwd_broken=no \ + vim_cv_memmove_handles_overlap=yes \ + vim_cv_stat_ignores_slash=yes \ + vim_cv_terminfo=yes \ + vim_cv_tgent=zero \ + vim_cv_toupper_broken=no \ + vim_cv_tty_group=world \ + vim_cv_tty_mode=0620 \ + ac_cv_sizeof_int=4 \ + ac_cv_small_wchar_t=no \ + --enable-selinux=no \ + --enable-gui=no \ + --with-compiledby=LibreELEC \ + --with-features=huge \ + --with-tlib=ncurses \ + --without-x" + +pre_configure_target() { + cd .. + rm -rf .$TARGET_NAME + export LIBS="-lcurses -lterminfo" +} + +make_target() { + : +} diff --git a/packages/addons/addon-depends/system-tools-depends/vim/patches/vim-01-disable-mouse-in-default-config.patch b/packages/addons/addon-depends/system-tools-depends/vim/patches/vim-01-disable-mouse-in-default-config.patch new file mode 100644 index 0000000000..937de0b901 --- /dev/null +++ b/packages/addons/addon-depends/system-tools-depends/vim/patches/vim-01-disable-mouse-in-default-config.patch @@ -0,0 +1,15 @@ +--- a/runtime/defaults.vim ++++ b/runtime/defaults.vim +@@ -66,9 +66,9 @@ + + " In many terminal emulators the mouse works just fine. By enabling it you + " can position the cursor, Visually select and scroll with the mouse. +-if has('mouse') +- set mouse=a +-endif ++"if has('mouse') ++" set mouse=a ++"endif + + " Switch syntax highlighting on when the terminal has colors or when using the + " GUI (which always has colors). diff --git a/packages/addons/tools/system-tools/package.mk b/packages/addons/tools/system-tools/package.mk index 8e6d9b4cbf..411b31e06b 100644 --- a/packages/addons/tools/system-tools/package.mk +++ b/packages/addons/tools/system-tools/package.mk @@ -62,7 +62,8 @@ PKG_DEPENDS_TARGET="toolchain \ screen \ strace \ unrar \ - usb-modeswitch" + usb-modeswitch \ + vim" addon() { mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/lib/ @@ -163,5 +164,8 @@ addon() { # usb-modeswitch cp -P $(get_build_dir usb-modeswitch)/usb_modeswitch $ADDON_BUILD/$PKG_ADDON_ID/bin + # vim + cp -P $(get_build_dir vim)/.install_pkg/usr/bin/vim $ADDON_BUILD/$PKG_ADDON_ID/bin + debug_strip $ADDON_BUILD/$PKG_ADDON_ID/bin }