void-packages/srcpkgs/vim/template

135 lines
3.3 KiB
Text
Raw Normal View History

# Template file for 'vim'
pkgname=vim
2013-09-04 08:07:47 +00:00
_distver=7.4
2014-02-08 09:39:49 +00:00
_patchver=169
version=${_distver}.${_patchver}
revision=3
hostmakedepends="mercurial pkg-config"
makedepends="ncurses-devel acl-devel libXt-devel gtk+-devel
desktop-file-utils hicolor-icon-theme ruby-devel python-devel lua-devel perl"
depends="vim-common>=$version"
short_desc="Vim editor (vi clone)"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://www.vim.org"
2013-02-07 20:50:38 +00:00
license="GPL-2"
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
}
pre_configure() {
2013-06-16 06:43:07 +00:00
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
2014-03-11 14:53:24 +00:00
mkdir -p /tmp/vim-huge
cp -a $wrksrc/* /tmp/vim-huge
mv /tmp/vim-huge $wrksrc/vim-huge
}
do_configure() {
args+=" --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 [ "$CROSS_BUILD" ]; then
configure_args+=" 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
2013-06-16 06:59:35 +00:00
vim_cv_memmove_handles_overlap=yes
ac_cv_small_wchar_t=no"
fi
# Normal version.
cd $wrksrc
./configure ${configure_args} ${args} --enable-gui=no --with-x=no
# X11 version.
cd $wrksrc/vim-x11
./configure ${configure_args} ${args} --enable-gui=no --with-x
# GTK+ version.
cd $wrksrc/gvim
./configure ${configure_args} ${args} --enable-gui=gtk2 --with-x --with-vim-name=gvim
2014-03-11 14:53:24 +00:00
# Huge version.
cd $wrksrc/vim-huge
./configure ${configure_args} --with-features=huge --with-x=no --enable-gui=no
}
do_build() {
cd $wrksrc
make ${makejobs}
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
}
vim-common_package() {
2013-06-16 06:43:07 +00:00
short_desc+=" - common files"
noarch=yes
replaces="vim<=7.2_2"
pkg_install() {
vmove usr/share/vim
}
}
vim-x11_package() {
depends="vim-common-${version}_${revision}"
2014-01-09 07:37:39 +00:00
provides="vim-${version}_${revision}"
replaces="vim>=0"
2013-06-16 06:43:07 +00:00
short_desc+=" - X11 version"
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}
rm -rf $PKGDESTDIR/usr/share
}
}
gvim_package() {
depends="vim-common-${version}_${revision} desktop-file-utils hicolor-icon-theme"
2013-06-16 06:43:07 +00:00
short_desc+=" - GTK+ GUI"
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() {
depends="vim-common-${version}_${revision}"
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
}
}