2008-10-04 06:29:49 +02:00
|
|
|
# Template file for 'vim'
|
|
|
|
pkgname=vim
|
2013-09-04 10:07:47 +02:00
|
|
|
_distver=7.4
|
|
|
|
_patchver=016
|
2010-05-17 20:38:53 +02:00
|
|
|
version=${_distver}.${_patchver}
|
2012-09-07 13:06:22 +02:00
|
|
|
revision=1
|
2013-03-24 10:21:58 +01:00
|
|
|
hostmakedepends="mercurial pkg-config"
|
2013-04-14 16:51:01 +02:00
|
|
|
makedepends="ncurses-devel acl-devel libXt-devel gtk+-devel
|
|
|
|
desktop-file-utils hicolor-icon-theme"
|
2008-10-01 01:01:18 +02:00
|
|
|
short_desc="Vim editor (vi clone)"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
2012-07-13 11:06:22 +02:00
|
|
|
homepage="http://www.vim.org"
|
2013-02-07 21:50:38 +01:00
|
|
|
license="GPL-2"
|
2008-10-24 05:32:40 +02:00
|
|
|
|
2012-10-22 14:04:30 +02:00
|
|
|
|
2011-10-14 19:24:20 +02:00
|
|
|
do_fetch() {
|
2012-01-07 16:18:11 +01:00
|
|
|
local url="http://code.google.com/p/vim/"
|
2013-09-04 10:07:47 +02:00
|
|
|
hg clone -u v${_distver/./-}-${_patchver} ${url} ${pkgname}-${version}
|
2010-11-09 03:46:37 +01:00
|
|
|
}
|
2012-07-13 11:06:22 +02:00
|
|
|
|
|
|
|
pre_configure() {
|
2013-06-16 08:43:07 +02: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
|
2012-07-13 11:06:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
do_configure() {
|
2013-05-26 10:41:55 +02:00
|
|
|
configure_args+=" --disable-perlinterp --disable-pythoninterp
|
2013-03-19 04:53:15 +01:00
|
|
|
--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
|
2013-05-26 10:41:55 +02:00
|
|
|
--with-view-name=vim-view "
|
2012-07-13 11:06:22 +02:00
|
|
|
|
2013-04-09 01:49:27 +02:00
|
|
|
if [ "$CROSS_BUILD" ]; then
|
2013-05-26 10:41:55 +02:00
|
|
|
configure_args+=" vim_cv_toupper_broken=no vim_cv_terminfo=yes
|
2013-03-19 04:53:15 +01:00
|
|
|
vim_cv_tty_group=world vim_cv_getcwd_broken=no
|
|
|
|
vim_cv_stat_ignores_slash=yes
|
2013-06-16 08:59:35 +02:00
|
|
|
vim_cv_memmove_handles_overlap=yes
|
|
|
|
ac_cv_small_wchar_t=no"
|
2013-03-19 04:53:15 +01:00
|
|
|
fi
|
|
|
|
|
2012-07-13 11:06:22 +02:00
|
|
|
# Normal version.
|
|
|
|
cd $wrksrc
|
2013-05-26 10:41:55 +02:00
|
|
|
./configure ${configure_args} --enable-gui=no --with-x=no
|
2013-03-19 04:53:15 +01:00
|
|
|
|
2012-07-13 11:06:22 +02:00
|
|
|
# X11 version.
|
|
|
|
cd $wrksrc/vim-x11
|
2013-05-26 10:41:55 +02:00
|
|
|
./configure ${configure_args} --enable-gui=no --with-x
|
2012-07-13 11:06:22 +02:00
|
|
|
|
|
|
|
# GTK+ version.
|
|
|
|
cd $wrksrc/gvim
|
2013-05-26 10:41:55 +02:00
|
|
|
./configure ${configure_args} --enable-gui=gtk2 --with-x --with-vim-name=gvim
|
2012-07-13 11:06:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
do_build() {
|
2013-05-26 10:41:55 +02:00
|
|
|
cd $wrksrc
|
|
|
|
make ${makejobs}
|
2013-03-19 04:53:15 +01:00
|
|
|
|
|
|
|
for f in vim-x11 gvim; do
|
2013-05-26 10:41:55 +02:00
|
|
|
cd $wrksrc/$f
|
|
|
|
make ${makejobs}
|
2012-07-13 11:06:22 +02:00
|
|
|
done
|
2013-03-19 04:53:15 +01:00
|
|
|
|
2012-07-13 11:06:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
|
|
|
make DESTDIR=$DESTDIR install
|
2012-07-15 01:08:37 +02:00
|
|
|
# Create vim-ex symlink.
|
2013-05-26 10:41:55 +02:00
|
|
|
cd ${DESTDIR}/usr/bin
|
|
|
|
ln -sf vim vim-ex
|
2012-07-15 01:08:37 +02:00
|
|
|
rm -f ${DESTDIR}/usr/bin/{ex,view}
|
|
|
|
|
|
|
|
find ${DESTDIR}/usr/share/man -type f -name evim.1 -delete
|
2012-07-13 11:06:22 +02:00
|
|
|
}
|
2013-04-14 16:51:01 +02:00
|
|
|
|
|
|
|
vim-common_package() {
|
2013-06-16 08:43:07 +02:00
|
|
|
short_desc+=" - common files"
|
2013-04-14 16:51:01 +02:00
|
|
|
noarch=yes
|
|
|
|
replaces="vim<=7.2_2"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/share/vim
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
vim-x11_package() {
|
2013-07-23 08:06:28 +02:00
|
|
|
depends="vim-common-${version}_${revision}"
|
2013-04-14 16:51:01 +02:00
|
|
|
provides="vim-${version}"
|
|
|
|
replaces="vim>=0"
|
2013-06-16 08:43:07 +02:00
|
|
|
short_desc+=" - X11 version"
|
2013-04-14 16:51:01 +02:00
|
|
|
pkg_install() {
|
|
|
|
cd $wrksrc/vim-x11
|
|
|
|
make DESTDIR=$PKGDESTDIR install
|
2013-06-16 08:43:07 +02:00
|
|
|
rm -f $PKGDESTDIR/usr/bin/{ex,view}
|
2013-04-14 16:51:01 +02:00
|
|
|
rm -rf $PKGDESTDIR/usr/share
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
gvim_package() {
|
2013-07-23 08:06:28 +02:00
|
|
|
depends="vim-common-${version}_${revision} desktop-file-utils hicolor-icon-theme"
|
2013-06-16 08:43:07 +02:00
|
|
|
short_desc+=" - GTK+ GUI"
|
2013-04-14 16:51:01 +02: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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
vim_package() {
|
|
|
|
depends="vim-common>=$version"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr
|
|
|
|
}
|
|
|
|
}
|