123 lines
2.8 KiB
Text
123 lines
2.8 KiB
Text
# Template file for 'vim'
|
|
pkgname=vim
|
|
_distver=7.3
|
|
_patchver=798
|
|
version=${_distver}.${_patchver}
|
|
revision=1
|
|
hostmakedepends="mercurial pkg-config"
|
|
makedepends="ncurses-devel acl-devel libXt-devel gtk+-devel
|
|
desktop-file-utils hicolor-icon-theme"
|
|
short_desc="Vim editor (vi clone)"
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
|
homepage="http://www.vim.org"
|
|
license="GPL-2"
|
|
|
|
nofetch=yes
|
|
noextract=yes
|
|
|
|
do_fetch() {
|
|
local url="http://code.google.com/p/vim/"
|
|
hg clone -u v7-3-${_patchver} ${url} ${pkgname}-${version}
|
|
}
|
|
|
|
pre_configure() {
|
|
if [ -z "$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() {
|
|
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
|
|
vim_cv_memmove_handles_overlap=yes"
|
|
fi
|
|
|
|
# Normal version.
|
|
cd $wrksrc
|
|
./configure ${configure_args} --enable-gui=no --with-x=no
|
|
|
|
# X11 version.
|
|
cd $wrksrc/vim-x11
|
|
./configure ${configure_args} --enable-gui=no --with-x
|
|
|
|
# GTK+ version.
|
|
cd $wrksrc/gvim
|
|
./configure ${configure_args} --enable-gui=gtk2 --with-x --with-vim-name=gvim
|
|
}
|
|
|
|
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() {
|
|
short_desc="VI iMproved - common files"
|
|
noarch=yes
|
|
replaces="vim<=7.2_2"
|
|
pkg_install() {
|
|
vmove usr/share/vim
|
|
}
|
|
}
|
|
|
|
vim-x11_package() {
|
|
provides="vim-${version}"
|
|
replaces="vim>=0"
|
|
short_desc="VI iMproved - X11 version"
|
|
pkg_install() {
|
|
cd $wrksrc/vim-x11
|
|
make DESTDIR=$PKGDESTDIR install
|
|
rm -f ${PKGDESTDIR}/usr/bin/{ex,view}
|
|
rm -rf $PKGDESTDIR/usr/share
|
|
}
|
|
}
|
|
|
|
gvim_package() {
|
|
depends="desktop-file-utils hicolor-icon-theme"
|
|
short_desc="VI iMproved - 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
|
|
}
|
|
}
|
|
|
|
vim_package() {
|
|
depends="vim-common>=$version"
|
|
pkg_install() {
|
|
vmove usr
|
|
}
|
|
}
|