2008-10-04 04:29:49 +00:00
|
|
|
# Template file for 'vim'
|
|
|
|
pkgname=vim
|
2010-11-09 02:46:37 +00:00
|
|
|
_distver=7.3
|
2013-02-07 20:50:38 +00:00
|
|
|
_patchver=798
|
2010-05-17 18:38:53 +00:00
|
|
|
version=${_distver}.${_patchver}
|
2012-09-07 11:06:22 +00:00
|
|
|
revision=1
|
2012-07-13 09:06:22 +00:00
|
|
|
subpackages="vim-common vim-x11 gvim"
|
|
|
|
depends="vim-common>=$version"
|
2013-03-24 09:21:58 +00:00
|
|
|
hostmakedepends="mercurial pkg-config"
|
|
|
|
makedepends="ncurses-devel acl-devel libXt-devel gtk+-devel"
|
2008-09-30 23:01:18 +00:00
|
|
|
short_desc="Vim editor (vi clone)"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
2012-07-13 09:06:22 +00:00
|
|
|
homepage="http://www.vim.org"
|
2013-02-07 20:50:38 +00:00
|
|
|
license="GPL-2"
|
2008-10-24 03:32:40 +00:00
|
|
|
|
2012-10-22 12:04:30 +00:00
|
|
|
nofetch=yes
|
|
|
|
noextract=yes
|
|
|
|
|
2013-03-24 09:21:58 +00:00
|
|
|
if [ "$XBPS_CROSS_BUILD" ]; then
|
2013-03-19 03:53:15 +00:00
|
|
|
# XXX x11 and gvim subpkgs.
|
|
|
|
subpackages="vim-common"
|
2013-03-24 09:21:58 +00:00
|
|
|
makedepends="ncurses-devel acl-devel"
|
2013-03-19 03:53:15 +00:00
|
|
|
fi
|
|
|
|
|
2011-10-14 17:24:20 +00:00
|
|
|
do_fetch() {
|
2012-01-07 15:18:11 +00:00
|
|
|
local url="http://code.google.com/p/vim/"
|
2011-10-14 17:24:20 +00:00
|
|
|
hg clone -u v7-3-${_patchver} ${url} ${pkgname}-${version}
|
2010-11-09 02:46:37 +00:00
|
|
|
}
|
2012-07-13 09:06:22 +00:00
|
|
|
|
|
|
|
pre_configure() {
|
2013-03-19 03:53:15 +00:00
|
|
|
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
|
2012-07-13 09:06:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_configure() {
|
2013-03-19 03:53:15 +00:00
|
|
|
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
|
2012-07-14 23:08:37 +00:00
|
|
|
--with-view-name=vim-view"
|
2012-07-13 09:06:22 +00:00
|
|
|
|
2013-03-24 09:21:58 +00:00
|
|
|
if [ "$XBPS_CROSS_BUILD" ]; then
|
2013-03-19 03:53:15 +00:00
|
|
|
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
|
|
|
|
|
2012-07-13 09:06:22 +00:00
|
|
|
# Normal version.
|
|
|
|
cd $wrksrc
|
|
|
|
./configure ${CONFIGURE_SHARED_ARGS} ${sharedargs} \
|
|
|
|
--enable-gui=no --with-x=no
|
|
|
|
|
2013-03-24 09:21:58 +00:00
|
|
|
[ "$XBPS_CROSS_BUILD" ] && return 0
|
2013-03-19 03:53:15 +00:00
|
|
|
|
2012-07-13 09:06:22 +00:00
|
|
|
# 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() {
|
2013-03-19 03:53:15 +00:00
|
|
|
cd $wrksrc && make ${makejobs}
|
2013-03-24 09:21:58 +00:00
|
|
|
[ "$XBPS_CROSS_BUILD" ] && return 0
|
2013-03-19 03:53:15 +00:00
|
|
|
|
|
|
|
for f in vim-x11 gvim; do
|
2012-07-13 09:06:22 +00:00
|
|
|
cd $wrksrc/$f && make ${makejobs}
|
|
|
|
done
|
2013-03-19 03:53:15 +00:00
|
|
|
|
2012-07-13 09:06:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
|
|
|
make DESTDIR=$DESTDIR install
|
2012-07-14 23:08:37 +00:00
|
|
|
# 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
|
2012-07-13 09:06:22 +00:00
|
|
|
}
|