2008-10-04 04:29:49 +00:00
|
|
|
# Template file for 'vim'
|
|
|
|
pkgname=vim
|
2013-09-04 08:07:47 +00:00
|
|
|
_distver=7.4
|
2014-10-11 09:09:56 +00:00
|
|
|
_patchver=473
|
2010-05-17 18:38:53 +00:00
|
|
|
version=${_distver}.${_patchver}
|
2014-10-11 09:09:56 +00:00
|
|
|
revision=1
|
2013-03-24 09:21:58 +00:00
|
|
|
hostmakedepends="mercurial pkg-config"
|
2014-10-11 09:09:56 +00:00
|
|
|
makedepends="ncurses-devel acl-devel libXt-devel gtk+-devel perl>=5.20
|
|
|
|
desktop-file-utils hicolor-icon-theme ruby-devel python-devel lua-devel"
|
2014-01-01 15:10:11 +00:00
|
|
|
depends="vim-common>=$version"
|
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
|
|
|
|
2014-08-16 06:37:30 +00:00
|
|
|
subpackages="vim-common vim-x11 gvim"
|
2014-03-11 16:03:36 +00:00
|
|
|
# XXX vim-huge cannot be cross compiled for now.
|
|
|
|
if [ -z "$CROSS_BUILD" ]; then
|
2014-08-16 06:37:30 +00:00
|
|
|
subpackages+=" vim-huge"
|
2014-03-11 16:03:36 +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/"
|
2013-09-04 08:07:47 +00:00
|
|
|
hg clone -u v${_distver/./-}-${_patchver} ${url} ${pkgname}-${version}
|
2010-11-09 02:46:37 +00:00
|
|
|
}
|
2012-07-13 09:06:22 +00:00
|
|
|
|
|
|
|
pre_configure() {
|
2014-08-16 15:35:48 +00:00
|
|
|
for f in ${subpackages/vim-common/}; do
|
2014-03-11 16:03:36 +00:00
|
|
|
mkdir -p /tmp/${f}
|
|
|
|
cp -a $wrksrc/* /tmp/${f}
|
|
|
|
mv /tmp/${f} $wrksrc/${f}
|
|
|
|
done
|
2012-07-13 09:06:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_configure() {
|
2014-03-11 16:03:36 +00:00
|
|
|
args="--enable-cscope --enable-multibyte --with-tlib=ncursesw
|
|
|
|
--with-ex-name=vim-ex --with-view-name=vim-view"
|
|
|
|
|
|
|
|
nohuge_args="--disable-perlinterp --disable-pythoninterp
|
|
|
|
--disable-rubyinterp --disable-workshop
|
2013-03-19 03:53:15 +00:00
|
|
|
--disable-netbeans --disable-sniff --disable-gpm
|
2014-03-11 16:03:36 +00:00
|
|
|
--disable-hangulinput --disable-xim"
|
2012-07-13 09:06:22 +00:00
|
|
|
|
2013-04-08 23:49:27 +00:00
|
|
|
if [ "$CROSS_BUILD" ]; then
|
2014-03-11 16:03:36 +00:00
|
|
|
configure_args+="
|
|
|
|
--host=${XBPS_CROSS_TRIPLET}
|
|
|
|
vim_cv_toupper_broken=no vim_cv_terminfo=yes
|
2013-03-19 03:53:15 +00:00
|
|
|
vim_cv_tty_group=world vim_cv_getcwd_broken=no
|
|
|
|
vim_cv_stat_ignores_slash=yes
|
2013-06-16 06:59:35 +00:00
|
|
|
vim_cv_memmove_handles_overlap=yes
|
|
|
|
ac_cv_small_wchar_t=no"
|
2013-03-19 03:53:15 +00:00
|
|
|
fi
|
|
|
|
|
2012-07-13 09:06:22 +00:00
|
|
|
# Normal version.
|
|
|
|
cd $wrksrc
|
2014-03-11 16:03:36 +00:00
|
|
|
./configure ${configure_args} ${args} ${nohuge_args} --enable-gui=no --with-x=no
|
2013-03-19 03:53:15 +00:00
|
|
|
|
2012-07-13 09:06:22 +00:00
|
|
|
# X11 version.
|
|
|
|
cd $wrksrc/vim-x11
|
2014-03-11 16:03:36 +00:00
|
|
|
./configure ${configure_args} ${args} ${nohuge_args} --enable-gui=no --with-x
|
2012-07-13 09:06:22 +00:00
|
|
|
|
|
|
|
# GTK+ version.
|
|
|
|
cd $wrksrc/gvim
|
2014-03-11 16:03:36 +00:00
|
|
|
./configure ${configure_args} ${args} ${nohuge_args} --enable-gui=gtk2 --with-x --with-vim-name=gvim
|
2014-03-11 14:53:24 +00:00
|
|
|
|
|
|
|
# Huge version.
|
2014-03-11 16:07:30 +00:00
|
|
|
if [ -z "$CROSS_BUILD" ]; then
|
|
|
|
cd $wrksrc/vim-huge
|
|
|
|
./configure ${configure_args} ${args} --with-x=no --enable-gui=no \
|
|
|
|
--with-features=huge --enable-perlinterp --enable-pythoninterp \
|
|
|
|
--enable-rubyinterp --enable-luainterp
|
|
|
|
fi
|
2012-07-13 09:06:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_build() {
|
2013-05-26 08:41:55 +00:00
|
|
|
cd $wrksrc
|
|
|
|
make ${makejobs}
|
2013-03-19 03:53:15 +00:00
|
|
|
|
2014-08-16 15:35:48 +00:00
|
|
|
for f in ${subpackages/vim-common/}; do
|
2013-05-26 08:41:55 +00:00
|
|
|
cd $wrksrc/$f
|
|
|
|
make ${makejobs}
|
2012-07-13 09:06:22 +00:00
|
|
|
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.
|
2013-05-26 08:41:55 +00:00
|
|
|
cd ${DESTDIR}/usr/bin
|
|
|
|
ln -sf vim vim-ex
|
2012-07-14 23:08:37 +00:00
|
|
|
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
|
|
|
}
|
2013-04-14 14:51:01 +00:00
|
|
|
|
|
|
|
vim-common_package() {
|
2013-06-16 06:43:07 +00:00
|
|
|
short_desc+=" - common files"
|
2013-04-14 14:51:01 +00:00
|
|
|
noarch=yes
|
|
|
|
replaces="vim<=7.2_2"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/share/vim
|
2014-07-08 14:49:17 +00:00
|
|
|
vinstall ${FILESDIR}/vimrc 644 usr/share/vim
|
2013-04-14 14:51:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
vim-x11_package() {
|
2013-07-23 06:06:28 +00:00
|
|
|
depends="vim-common-${version}_${revision}"
|
2014-01-09 07:37:39 +00:00
|
|
|
provides="vim-${version}_${revision}"
|
2013-04-14 14:51:01 +00:00
|
|
|
replaces="vim>=0"
|
2013-06-16 06:43:07 +00:00
|
|
|
short_desc+=" - X11 version"
|
2013-04-14 14:51:01 +00:00
|
|
|
pkg_install() {
|
|
|
|
cd $wrksrc/vim-x11
|
|
|
|
make DESTDIR=$PKGDESTDIR install
|
2013-06-16 06:43:07 +00:00
|
|
|
rm -f $PKGDESTDIR/usr/bin/{ex,view}
|
2013-04-14 14:51:01 +00:00
|
|
|
rm -rf $PKGDESTDIR/usr/share
|
|
|
|
}
|
|
|
|
}
|
|
|
|
gvim_package() {
|
2013-07-23 06:06:28 +00:00
|
|
|
depends="vim-common-${version}_${revision} desktop-file-utils hicolor-icon-theme"
|
2013-06-16 06:43:07 +00:00
|
|
|
short_desc+=" - GTK+ GUI"
|
2013-04-14 14:51:01 +00:00
|
|
|
pkg_install() {
|
|
|
|
cd $wrksrc/gvim
|
|
|
|
sed -i "s|/locolor|/hicolor|g" src/Makefile
|
|
|
|
for d in 16 32 48; do
|
|
|
|
install -d ${PKGDESTDIR}/usr/share/icons/hicolor/${d}x${d}/apps
|
|
|
|
done
|
|
|
|
make -C src DESTDIR=${PKGDESTDIR} installvimbin install-icons
|
|
|
|
vinstall ${FILESDIR}/gvim.desktop 644 usr/share/applications
|
|
|
|
}
|
|
|
|
}
|
2014-03-11 14:53:24 +00:00
|
|
|
vim-huge_package() {
|
2014-03-11 16:03:36 +00:00
|
|
|
depends="python vim-common-${version}_${revision}"
|
2014-03-11 14:53:24 +00:00
|
|
|
short_desc+=" - Huge (all features enabled)"
|
|
|
|
provides="vim-${version}_${revision}"
|
|
|
|
replaces="vim>=0"
|
|
|
|
pkg_install() {
|
|
|
|
cd $wrksrc/vim-huge
|
|
|
|
make DESTDIR=$PKGDESTDIR install
|
|
|
|
rm -f $PKGDESTDIR/usr/bin/{ex,view}
|
|
|
|
rm -rf $PKGDESTDIR/usr/share
|
|
|
|
}
|
|
|
|
}
|