#!/bin/bash # vim # # Douglas Thrift # # $Id$ name=vim version=7.0.201 revision=0 categories=(editors) description='Vi IMproved editor' url='http://www.vim.org/' depends=('base/acl' 'base/ncurses') sources=(`site_vim unix/$name-${version%.*}.tar.bz2 extra/$name-${version%.*}-{extra,lang}.tar.gz $(for ((index = 1; index + 99 <= ${version##*.}; index += 100)); do printf "patches/${version%.*}/${version%.*}.%0.3u-%0.3u.gz " $index $((index + 99)); done; for ((; index <= ${version##*.}; ++index)); do printf "patches/${version%.*}/${version%.*}.%0.3u " $index; done)` vim.patch) subdir=vim sourcedir=$name${version//@(.|${version##*.})} with=(cscope gtk perl python ruby tcl) [[ -n $with_cscope ]] && depends=(${depends[*]} 'devel/cscope') [[ -n $with_gtk ]] && depends=(${depends[*]} 'x11-toolkits/gtk') [[ -n $with_perl ]] && depends=(${depends[*]} 'base/perl') [[ -n $with_python ]] && depends=(${depends[*]} 'lang/python') [[ -n $with_ruby ]] && depends=(${depends[*]} 'lang/ruby') [[ -n $with_tcl ]] && depends=(${depends[*]} 'lang/tcl') function build() { gnu_patch ${source_files[*]%%@(.gz|*.tar.@(bz2|gz))} || return $? gnu_configure --prefix=/usr --mandir=/usr/share/man ${with_cscope:+--enable-cscope} --enable-fontset `[[ -n $with_gtk ]] && echo --enable-gui=gtk2 || echo --enable-gui=no --without-x` --enable-multibyte ${with_perl:+--enable-perlinterp} ${with_python:+--enable-pythoninterp} ${with_ruby:+--enable-rubyinterp} ${with_tcl:+--enable-tclinterp} --enable-xim --with-features=big }