Mercurial > vanilla
changeset 722:1ac4747e74bb
editors/vim: update and optionify
author | David Demelier <markand@malikania.fr> |
---|---|
date | Mon, 05 Aug 2019 21:00:00 +0200 |
parents | 034a2a62a9f8 |
children | 5316149e8c85 |
files | editors/vim/vim.sh editors/vim/vim.sha1 |
diffstat | 2 files changed, 93 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/editors/vim/vim.sh Mon Aug 05 13:19:31 2019 +0200 +++ b/editors/vim/vim.sh Mon Aug 05 21:00:00 2019 +0200 @@ -15,20 +15,39 @@ # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # +# TODO: add LUA, SELINUX options + PKGNAME=vim -PKGVERSION=8.1 +PKGVERSION=8.1.1817 PKGREVISION=1 PKGLICENSE="CUSTOM" PKGSUMMARY="vi improved" -PKGDOWNLOAD="ftp://ftp.vim.org/pub/vim/unix/vim-8.1.tar.bz2" -PKGOPTIONS="GPM NLS" +PKGDOWNLOAD="https://github.com/vim/vim/archive/v$PKGVERSION.tar.gz" +PKGOPTIONS="ACL GPM GTK LIBCANBERRA MULTIBYTE NLS PERL PYTHON RUBY TCL TERMINAL" +PKGDEPENDS="" : ${CC:=clang} : ${CFLAGS:=-O2} : ${LDFLAGS:=} : ${LIBS:=} +: ${ACL:=yes} : ${GPM:=yes} +: ${GTK:=yes} +: ${LIBCANBERRA:=no} +: ${MULTIBYTE:=yes} : ${NLS:=yes} +: ${PERL:=yes} +: ${PYTHON:=yes} +: ${RUBY:=yes} +: ${TCL:=yes} +: ${TERMINAL:=yes} + +if [ "$ACL" = "yes" ]; then + PKGDEPENDS="core/acl $PKGDEPENDS" + with_acl="--enable-acl" +else + with_acl="--disable-acl" +fi if [ "$GPM" = "yes" ]; then PKGDEPENDS="system/gpm $PKGDEPENDS" @@ -37,6 +56,26 @@ with_gpm="--disable-gpm" fi +if [ "$GTK" = "yes" ]; then + PKGDEPENDS="graphics/gtk $PKGDEPENDS" + with_gui="--enable-gui=gtk3" +else + with_gui="--enable-gui=no" +fi + +if [ "$LIBCANBERRA" = "yes" ]; then + PKGDEPENDS="audio/libcanberra $PKGDEPENDS" + with_libcanberra="--enable-canberra" +else + with_libcanberra="--disable-canberra" +fi + +if [ "$MULTIBYTE" = "yes" ]; then + with_multibyte="--enable-multibyte" +else + with_multibyte="--disable-multibyte" +fi + if [ "$NLS" = "yes" ]; then PKGDEPENDS="core/gettext:build $PKGDEPENDS" with_nls="--enable-nls" @@ -44,11 +83,45 @@ with_nls="--disable-nls" fi +if [ "$PERL" = "yes" ]; then + PKGDEPENDS="perl/perl $PKGDEPENDS" + with_perl="--enable-perlinterp=dynamic" +else + with_perl="--disable-perlinterp" +fi + +if [ "$PYTHON" = "yes" ]; then + PKGDEPENDS="python/python $PKGDEPENDS" + with_python="--enable-python3interp=dynamic" +else + with_python="--disable-python3interp" +fi + +if [ "$RUBY" = "yes" ]; then + PKGDEPENDS="ruby/ruby $PKGDEPENDS" + with_ruby="--enable-rubyinterp=dynamic" +else + with_ruby="--disable-rubyinterp" +fi + +if [ "$TCL" = "yes" ]; then + PKGDEPENDS="lang/tcl $PKGDEPENDS" + with_tcl="--enable-tclinterp=dynamic" +else + with_tcl="--disable-tclinterp" +fi + +if [ "$TERMINAL" = "yes" ]; then + with_terminal="--enable-terminal" +else + with_terminal="--disable-terminal" +fi + build() { - rm -rf vim81 - tar xvf $PKGNAME-$PKGVERSION.tar.bz2 - cd vim81 + rm -rf $PKGNAME-$PKGVERSION + tar xvf v$PKGVERSION.tar.gz + cd $PKGNAME-$PKGVERSION CC="$CC" \ CFLAGS="$CFLAGS" \ @@ -57,18 +130,22 @@ ./configure \ --prefix= \ --disable-selinux \ - --enable-multibyte \ - --enable-luainterp=dynamic \ - --enable-perlinterp=dynamic \ - --enable-pythoninterp=dynamic \ - --enable-python3interp=dynamic \ - --enable-tcpinterp=dynamic \ - --enable-rubyinterp=dynamic \ + --disable-luainterp \ + --disable-pythoninterp \ + $with_acl \ $with_gpm \ - $with_nls + $with_gui \ + $with_libcanberra \ + $with_multibyte \ + $with_nls \ + $with_perl \ + $with_python \ + $with_ruby \ + $with_tcl \ + $with_terminal make make install DESTDIR=$DESTDIR cd .. - rm -rf vim81 + rm -rf $PKGNAME-$PKGVERSION }