1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Contributor: Anatol Pomozov <anatol.pomozov@gmail.com>
3 # Contributor: Thomas Dziedzic <gostrc@gmail.com>
4 # Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
5 # Contributor: tobias [ tobias at archlinux org ]
6 # Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
7 # Contributor: Christian Hesse <mail@eworm.de>
8 # Contributor: Eli Schwartz <eschwartz@archlinux.org>
11 pkgname=('vim' 'gvim' 'vim-runtime')
15 pkgdesc='Vi Improved, a highly configurable, improved version of the vi text editor'
16 url='https://www.vim.org'
18 license=('custom:vim')
19 makedepends=('glibc' 'libgcrypt' 'gpm' 'python2' 'python' 'ruby' 'libxt' 'gtk3' 'lua'
20 'gawk' 'tcl' 'pcre' 'zlib' 'libcanberra')
21 source=(https://github.com/vim/vim/archive/v${pkgver}/${pkgbase}-${pkgver}.tar.gz
25 1be7e215830d6ec9aa6200aac4ef34ac0ae85af5.patch::https://github.com/vim/vim/commit/1be7e215830d6ec9aa6200aac4ef34ac0ae85af5.patch)
26 sha256sums=('363a90e45eb93c73340a711223c7ce5e564432f9eb34624e1a545f4fd57dd49d'
27 'b16e85e457397ab2043a7ee0a3c84307c6b4eac157fd0b721694761f25b3ed5b'
28 'cc3d931129854c298eb22e993ec14c2ad86cc1e70a08a64496f5e06559289972'
29 '8e9656934d9d7793063230d15a689e10455e6db9b9fe73afa0f294792795d8ae'
30 '624ef2413afc26dda845879bc12dfe7b03c30f81b798d7a93988294c21cd2d21')
31 sha512sums=('f476f24390807b71a0e02729f1815b3743b6b42cdd28a414e9ceaf0aa3fd4cab91e3550a669b1c64b4cd83207515cfe2b4acf2358a6def60e216e101c979037e'
32 '4b5bed0813f22af9e158ea9aa56a4a9862dd786ba2d201f20159ccf652da6190164aaed0b6b7217d578f7b25c33a8adcc307bfcf3caa8d173a7ff29e2a00fee7'
33 'fe091d289d876f45319c898f6021ef86d6a238b540c225a279c46efc5c36fa7d868cd0cee73a111811c4be90df160f85340bb251be3a437727dbe5c699950363'
34 'a02ad0d66f300160911aeb81d8886c6c558436ac4ee3fcd161dd65c6b1e5d1f41b9005a7f5bb5ba68d57027fc1c8e43daabf055bd6207fb5a216a67f758df8d1'
35 '1448a6b62acb8273f6c4f4f154cb2dc48654addd68094cbb803ee0fbaacbb0d5f2e8951aa4c7d7a95d4b9ecfa8a8da30a5e8a69effd45f702f4609fa46f3654a')
39 # define the place for the global (g)vimrc file (set to /etc/vimrc)
40 sed -E 's|^.*(#define SYS_.*VIMRC_FILE.*").*$|\1|g' -i feature.h
41 sed -E 's|^.*(#define VIMRC_FILE.*").*$|\1|g' -i feature.h
45 patch -p1 <"$srcdir"/1be7e215830d6ec9aa6200aac4ef34ac0ae85af5.patch)
46 cp -a vim-${pkgver} gvim-${pkgver}
50 echo "Building vim..."
54 --localstatedir=/var/lib/vim \
55 --with-features=huge \
56 --with-compiledby='Arch Linux' \
64 --enable-perlinterp=dynamic \
65 --enable-pythoninterp=dynamic \
66 --enable-python3interp=dynamic \
67 --enable-rubyinterp=dynamic \
68 --enable-luainterp=dynamic \
69 --enable-tclinterp=dynamic \
74 echo "Building gvim..."
78 --localstatedir=/var/lib/vim \
79 --with-features=huge \
80 --with-compiledby='Arch Linux' \
88 --enable-perlinterp=dynamic \
89 --enable-pythoninterp=dynamic \
90 --enable-python3interp=dynamic \
91 --enable-rubyinterp=dynamic \
92 --enable-luainterp=dynamic \
93 --enable-tclinterp=dynamic \
101 TERM=xterm make -j1 test
104 package_vim-runtime() {
105 pkgdesc+=' (shared runtime)'
106 optdepends=('sh: support for some tools and macros'
107 'python: demoserver example tool'
108 'gawk: mve tools upport')
113 make -j1 VIMRCLOC=/etc DESTDIR="${pkgdir}" install
114 # man and bin files belong to 'vim'
115 rm -r "${pkgdir}"/usr/share/man/ "${pkgdir}"/usr/bin/
117 # Don't forget logtalk.dict
118 install -Dm 644 runtime/ftplugin/logtalk.dict \
119 "${pkgdir}"/usr/share/vim/vim${_versiondir}/ftplugin/logtalk.dict
122 install -Dm 644 "${srcdir}"/vimrc "${pkgdir}"/etc/vimrc
123 install -Dm 644 "${srcdir}"/archlinux.vim \
124 "${pkgdir}"/usr/share/vim/vimfiles/archlinux.vim
127 install -Dm 644 runtime/rgb.txt \
128 "${pkgdir}"/usr/share/vim/vim${_versiondir}/rgb.txt
130 # no desktop files and icons
131 rm -r "${pkgdir}"/usr/share/{applications,icons}
134 install -dm 755 "${pkgdir}"/usr/share/licenses/vim-runtime
135 ln -s /usr/share/vim/vim${_versiondir}/doc/uganda.txt \
136 "${pkgdir}"/usr/share/licenses/vim-runtime/license.txt
138 # pacman hook for documentation helptags
139 install -Dm 644 "${srcdir}"/vimdoc.hook "${pkgdir}"/usr/share/libalpm/hooks/vimdoc.hook
143 depends=("vim-runtime=${pkgver}-${pkgrel}" 'gpm' 'acl' 'glibc' 'libgcrypt' 'pcre'
145 optdepends=('python2: Python 2 language support'
146 'python: Python 3 language support'
147 'ruby: Ruby language support'
148 'lua: Lua language support'
149 'perl: Perl language support'
150 'tcl: Tcl language support')
151 conflicts=('gvim' 'vim-minimal' 'vim-python3')
152 provides=('xxd' 'vim-minimal' 'vim-python3' 'vim-plugin-runtime')
153 replaces=('vim-python3' 'vim-minimal')
156 make -j1 VIMRCLOC=/etc DESTDIR="${pkgdir}" install
158 # provided by (n)vi in core
159 rm "${pkgdir}"/usr/bin/{ex,view}
161 # delete some manpages
162 find "${pkgdir}"/usr/share/man -type d -name 'man1' 2>/dev/null | \
163 while read _mandir; do
165 rm -f ex.1 view.1 # provided by (n)vi
166 rm -f evim.1 # this does not make sense if we have no GUI
169 # Runtime provided by runtime package
170 rm -r "${pkgdir}"/usr/share/vim
172 # remove gvim.desktop as not included
173 rm "${pkgdir}"/usr/share/applications/gvim.desktop
176 install -Dm 644 runtime/doc/uganda.txt \
177 "${pkgdir}"/usr/share/licenses/${pkgname}/license.txt
181 pkgdesc+=' (with advanced features, such as a GUI)'
182 depends=("vim-runtime=${pkgver}-${pkgrel}" 'gpm' 'libxt' 'gtk3' 'glibc' 'libgcrypt' 'pcre'
183 'zlib' 'libcanberra')
184 optdepends=('python2: Python 2 language support'
185 'python: Python 3 language support'
186 'ruby: Ruby language support'
187 'lua: Lua language support'
188 'perl: Perl language support'
189 'tcl: Tcl language support')
190 provides=("vim=${pkgver}-${pkgrel}" "xxd" 'vim-plugin-runtime')
191 conflicts=('vim-minimal' 'vim')
192 replaces=('gvim-python3')
195 make -j1 VIMRCLOC=/etc DESTDIR="${pkgdir}" install
197 # provided by (n)vi in core
198 rm "${pkgdir}"/usr/bin/{ex,view}
200 # delete some manpages
201 find "${pkgdir}"/usr/share/man -type d -name 'man1' 2>/dev/null | \
202 while read _mandir; do
204 rm -f ex.1 view.1 # provided by (n)vi
207 # need to remove since this is provided by vim-runtime
208 rm -r "${pkgdir}"/usr/share/vim
211 install -Dm 644 runtime/doc/uganda.txt \
212 "${pkgdir}"/usr/share/licenses/${pkgname}/license.txt