void-packages/srcpkgs/vim/template

93 lines
2.2 KiB
Plaintext
Raw Normal View History

# Template file for 'vim'
pkgname=vim
2010-11-09 03:46:37 +01:00
_distver=7.3
2013-02-07 21:50:38 +01:00
_patchver=798
version=${_distver}.${_patchver}
2012-09-07 13:06:22 +02:00
revision=1
subpackages="vim-common vim-x11 gvim"
depends="vim-common>=$version"
hostmakedepends="mercurial pkg-config"
makedepends="ncurses-devel acl-devel libXt-devel gtk+-devel"
short_desc="Vim editor (vi clone)"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://www.vim.org"
2013-02-07 21:50:38 +01:00
license="GPL-2"
2012-10-22 14:04:30 +02:00
nofetch=yes
noextract=yes
if [ "$XBPS_CROSS_BUILD" ]; then
# XXX x11 and gvim subpkgs.
subpackages="vim-common"
makedepends="ncurses-devel acl-devel"
fi
do_fetch() {
2012-01-07 16:18:11 +01:00
local url="http://code.google.com/p/vim/"
hg clone -u v7-3-${_patchver} ${url} ${pkgname}-${version}
2010-11-09 03:46:37 +01:00
}
pre_configure() {
if [ -z "$XBPS_CROSS_BUILD" ]; then
mkdir -p /tmp/vim-x11
cp -a $wrksrc/* /tmp/vim-x11
mv /tmp/vim-x11 $wrksrc/
mkdir -p /tmp/gvim
cp -a $wrksrc/* /tmp/gvim
mv /tmp/gvim $wrksrc/gvim
fi
}
do_configure() {
local sharedargs="--disable-perlinterp --disable-pythoninterp
--disable-rubyinterp --disable-cscope --disable-workshop
--disable-netbeans --disable-sniff --disable-gpm
--disable-hangulinput --disable-xim --enable-multibyte
--with-tlib=ncursesw --with-ex-name=vim-ex
--with-view-name=vim-view"
if [ "$XBPS_CROSS_BUILD" ]; then
crossargs="vim_cv_toupper_broken=no vim_cv_terminfo=yes
vim_cv_tty_group=world vim_cv_getcwd_broken=no
vim_cv_stat_ignores_slash=yes
vim_cv_memmove_handles_overlap=yes"
sharedargs="${sharedargs} ${crossargs}"
fi
# Normal version.
cd $wrksrc
./configure ${CONFIGURE_SHARED_ARGS} ${sharedargs} \
--enable-gui=no --with-x=no
[ "$XBPS_CROSS_BUILD" ] && return 0
# X11 version.
cd $wrksrc/vim-x11
./configure ${CONFIGURE_SHARED_ARGS} ${sharedargs} \
--enable-gui=no --with-x
# GTK+ version.
cd $wrksrc/gvim
./configure ${CONFIGURE_SHARED_ARGS} ${sharedargs} \
--enable-gui=gtk2 --with-x --with-vim-name=gvim
}
do_build() {
cd $wrksrc && make ${makejobs}
[ "$XBPS_CROSS_BUILD" ] && return 0
for f in vim-x11 gvim; do
cd $wrksrc/$f && make ${makejobs}
done
}
do_install() {
make DESTDIR=$DESTDIR install
# Create vim-ex symlink.
cd ${DESTDIR}/usr/bin && ln -sf vim vim-ex
rm -f ${DESTDIR}/usr/bin/{ex,view}
find ${DESTDIR}/usr/share/man -type f -name evim.1 -delete
}