1 # Maintainer: Bartek Piotrowski <barthalion@gmail.com>
6 _patchlevel=$(wget ftp://ftp.vim.org/pub/vim/patches/${_srcver}/ -q -O - | sed -n '/7.3./ s/.*7.3.\([0-9]\+\).*/\1/p' | tail -1)
7 pkgver=${_srcver}.${_patchlevel}
9 pkgdesc="Modified from extra/gvim, compiled with gtk2 ui, without deps on vi/vim, ruby and desktop utils."
11 license=('custom:vim')
12 url="http://www.vim.org"
13 depends=('libxt' 'gtk2')
14 provides=(${_realname})
16 source=(ftp://ftp.vim.org/pub/vim/unix/vim-${_srcver}.tar.bz2)
17 md5sums=('5b9510a17074e2b37d8bb38ae09edbf2')
19 _vimfolder=${_realname}$(echo ${_srcver} | sed "s/\.//")
21 if [ ${_python2} = "y" ]; then
22 makedepends=('wget' 'sed' 'grep' 'python2' 'perl' 'gzip')
24 makedepends=('wget' 'sed' 'grep' 'python' 'perl' 'gzip')
28 cd ${srcdir}/${_vimfolder}
30 wget ftp://ftp.vim.org/pub/vim/patches/${_srcver}/${_srcver}.*
31 wget ftp://ftp.vim.org/pub/vim/patches/${_srcver}/MD5SUMS
32 md5sum -c MD5SUMS || return 1
33 for x in `ls ${_srcver}.*`; do patch -p0 -i $x; done
35 if [ ${_python2} = "y" ]; then
36 sed -i -e 's|vi_cv_path_python, python|vi_cv_path_python, python2|' \
37 ${srcdir}/${_vimfolder}/src/configure.in
38 (cd ${srcdir}/${_vimfolder}/src && autoconf)
41 ./configure --prefix=/usr --localstatedir=/var/lib/vim --mandir=/usr/share/man \
43 --with-x=yes --disable-gpm --with-x=yes --enable-gui=gtk2 \
44 --with-global-runtime=/usr/share/vim\
45 --enable-multibyte --enable-cscope \
46 --enable-perlinterp --enable-pythoninterp
48 make VIMRCLOC=/etc DESTDIR=${pkgdir} install
50 # Clean unneeded binary files and man pages
52 rm -f ex view rview xxd vimtutor
54 find ${pkgdir}/usr/share/man -type d -name 'man1' 2>/dev/null | \
55 while read _mandir; do
57 rm -f ex.1 view.1 vimtutor.1 xxd.1
61 sed -i 's|messages,/var|messages,/var/log/messages.log,/var|' \
62 ${pkgdir}/usr/share/vim/${_vimfolder}/filetype.vim
64 # Patch filetype.vim for better handling of pacman related files
65 sed -i "s/rpmsave/pacsave/;s/rpmnew/pacnew/;s/,\*\.ebuild/\0,PKGBUILD*,*.install/" \
66 ${pkgdir}/usr/share/vim/${_vimfolder}/filetype.vim
67 sed -i "/find the end/,+3{s/changelog_date_entry_search/changelog_date_end_entry_search/}" \
68 ${pkgdir}/usr/share/vim/${_vimfolder}/ftplugin/changelog.vim
71 install -Dm644 ${srcdir}/${_vimfolder}/runtime/doc/uganda.txt\
72 ${pkgdir}/usr/share/licenses/${_realname}/license.txt