1 # Maintainer: Laszlo Papp <djszapi at gmail com>
8 pkgver=${_srcver}.${_patchlevel}
10 pkgdesc='Vi Improved, a highly configurable, improved version of the vi text editor, with gdb support'
11 arch=('i686' 'x86_64')
12 license=('custom:vim')
13 url="http://clewn.sourceforge.net/"
14 depends=('gpm' 'python' 'libxt')
15 makedepends=('wget' 'sed' 'grep' 'gettext' 'perl')
16 optdepends=('perl: the runtime provides a few useful perl scripts')
18 install=${pkgname}.install
19 # we need the extra-stuff to get all patches applied smoothly
20 source=(ftp://ftp.vim.org/pub/vim/unix/vim-${_srcver}.tar.bz2 \
21 ftp://ftp.vim.org/pub/vim/extra/vim-${_srcver}-extra.tar.gz \
22 ftp://ftp.vim.org/pub/vim/extra/vim-${_srcver}-lang.tar.gz \
23 fetch_patches.sh fetch_runtime.sh vimrc archlinux.vim \
25 vimgdb72-1.14.tar.gz::http://sourceforge.net/projects/clewn/files/vimGdb/vimgdb72-1.14/vimgdb72-1.14.tar.gz/download)
26 md5sums=('f0901284b338e448bfd79ccca0041254' '35e04482f07c57221c9a751aaa3b8dac' \
27 'd8884786979e0e520c112faf2e176f05' '6d7e8d7868e8bfaa9a5880cd9c439320' \
28 '45c1c3c6aff7de0d8fc2a9d8cd5cec7d' '29125bedc96f2a58c772ee0455a333bc' \
29 '10353a61aadc3f276692d0e17db1478e' \
30 '70afd3f610c26cda2710b1864aff5721' 'e406c64d29a3152a3f5d0fffe3d2bba8')
34 local _versiondir="vim"$(echo ${_srcver} | sed "s/\.//")
35 # pull in patches from vim.org (or the src cache alternatively)
36 . ${srcdir}/fetch_patches.sh
37 . ${srcdir}/fetch_runtime.sh
38 get_patches || return 1
40 # remove files that the gdb patch creates (patch doesn't like overwriting)
42 for i in proto/gdb.pro gdb.c clewn/gdb.h clewn/gdb_lvl2.c clewn/gdb_lvl3.c \
43 clewn/misc.c clewn/misc.h clewn/obstack.c clewn/obstack.h
45 rm -f "${srcdir}/${_versiondir}/src/$i"
48 patch -d ${srcdir}/${_versiondir} -p0 < ${srcdir}/vim72gdb.diff || return 1
50 cd ${srcdir}/${_versiondir}
51 sed -i 's|^.*\(#define SYS_.*VIMRC_FILE.*"\) .*$|\1|' src/feature.h
52 sed -i 's|^.*\(#define VIMRC_FILE.*"\) .*$|\1|' src/feature.h
54 ./configure --prefix=/usr --localstatedir=/var/lib/vim --mandir=/usr/share/man \
55 --with-compiledby=ArchLinux --with-features=big \
56 --enable-gpm --enable-acl --with-x=no --disable-gui \
57 --enable-multibyte --enable-cscope \
58 --enable-perlinterp --enable-gdb --enable-pythoninterp --with-x
59 #--with-global-runtime=/usr/share/vim --with-vim-name=vim \
61 make VIMRCLOC=/etc DESTDIR=${pkgdir} install
63 rm ex view # provided by (n)vi in core
64 mv vim vim-normal # we create a vim-symlink on post_install
66 # ... make g* related symlinks point directly to the actual binary
67 ln -sf vim-normal rview
68 ln -sf vim-normal rvim
69 ln -sf vim-normal vimdiff
71 # delete some manpages
72 find ${pkgdir}/usr/share/man -type d -name 'man1' 2> /dev/null | \
75 rm -f ex.1 view.1 # provided by (n)vi
76 rm -f evim.1 # this does not make sense in the console version
79 _runtimedir="${pkgdir}/usr/share/vim/${_versiondir}/"
82 # extract the vimgdb runtime into the runtime directory
84 bsdtar -xzf vimgdb_runtime.tgz
85 install -m644 doc/gdb.txt "${pkgdir}/usr/share/vim/${_versiondir}/doc/gdb.txt"
86 install -m644 macros/gdb_mappings.vim "${pkgdir}/usr/share/vim/${_versiondir}/macros/gdb_mappings.vim"
87 install -m644 syntax/gdb{,var,vim}.vim "${pkgdir}/usr/share/vim/${_versiondir}/syntax/"
89 cd ${srcdir}/${_versiondir}
90 install -Dm644 ${srcdir}/vimrc ${pkgdir}/etc/vimrc
91 install -Dm644 ${srcdir}/archlinux.vim \
92 ${pkgdir}/usr/share/vim/vimfiles/archlinux.vim
93 install -dm755 ${pkgdir}/usr/share/licenses/vimgdb/vim
94 cd ${pkgdir}/usr/share/licenses/vimgdb/vim
95 ln -s ../../../vim/${_versiondir}/doc/uganda.txt license.txt