OCaml 4.14.0 rebuild
[arch-packages.git] / vim / trunk / PKGBUILD
blob94bcb9d4ccb3ccae126ccaedcb10af3f4d0494d9
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Maintainer: Morten Linderud <foxboron@archlinux.org>
3 # Contributor: Anatol Pomozov <anatol.pomozov@gmail.com>
4 # Contributor: Thomas Dziedzic <gostrc@gmail.com>
5 # Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
6 # Contributor: tobias [ tobias at archlinux org ]
7 # Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
8 # Contributor: Christian Hesse <mail@eworm.de>
9 # Contributor: Eli Schwartz <eschwartz@archlinux.org>
11 pkgbase=vim
12 pkgname=('vim' 'gvim' 'vim-runtime')
13 pkgver=9.0.0135
14 _versiondir=90
15 pkgrel=1
16 pkgdesc='Vi Improved, a highly configurable, improved version of the vi text editor'
17 url='https://www.vim.org'
18 arch=('x86_64')
19 license=('custom:vim')
20 options=(debug)
21 makedepends=('glibc' 'libgcrypt' 'gpm' 'python' 'ruby' 'libxt' 'gtk3' 'lua'
22              'gawk' 'tcl' 'pcre' 'zlib' 'libcanberra')
23 source=(https://github.com/vim/vim/archive/v${pkgver}/${pkgbase}-${pkgver}.tar.gz
24         vimrc
25         archlinux.vim
26         vimdoc.hook)
27 sha256sums=('b47690d77a8262d3115bea608fbf27f6ed122b49fc7765fb2cbf7d122d250d8f'
28             'b16e85e457397ab2043a7ee0a3c84307c6b4eac157fd0b721694761f25b3ed5b'
29             'cc3d931129854c298eb22e993ec14c2ad86cc1e70a08a64496f5e06559289972'
30             '8e9656934d9d7793063230d15a689e10455e6db9b9fe73afa0f294792795d8ae')
31 sha512sums=('8fc9fe6e09604461f079622b5441336d7f5d73b95bf8b508f9aa36d80e284e036265b6359b1402c9a70fa6ffd88f9ffa26afd2afb8134b801d2ca32d4e9bd512'
32             '4b5bed0813f22af9e158ea9aa56a4a9862dd786ba2d201f20159ccf652da6190164aaed0b6b7217d578f7b25c33a8adcc307bfcf3caa8d173a7ff29e2a00fee7'
33             'fe091d289d876f45319c898f6021ef86d6a238b540c225a279c46efc5c36fa7d868cd0cee73a111811c4be90df160f85340bb251be3a437727dbe5c699950363'
34             'a02ad0d66f300160911aeb81d8886c6c558436ac4ee3fcd161dd65c6b1e5d1f41b9005a7f5bb5ba68d57027fc1c8e43daabf055bd6207fb5a216a67f758df8d1')
36 prepare() {
37   (cd vim-${pkgver}/src
38     # define the place for the global (g)vimrc file (set to /etc/vimrc)
39     sed -E 's|^.*(#define SYS_.*VIMRC_FILE.*").*$|\1|g' -i feature.h
40     sed -E 's|^.*(#define VIMRC_FILE.*").*$|\1|g' -i feature.h
41     autoconf
42   )
43   cp -a vim-${pkgver} gvim-${pkgver}
46 build() {
47   echo "Building vim..."
48   (cd vim-${pkgver}
49     ./configure \
50       --prefix=/usr \
51       --localstatedir=/var/lib/vim \
52       --with-features=huge \
53       --with-compiledby='Arch Linux' \
54       --enable-gpm \
55       --enable-acl \
56       --with-x=no \
57       --disable-gui \
58       --enable-multibyte \
59       --enable-cscope \
60       --enable-netbeans \
61       --enable-perlinterp=dynamic \
62       --enable-python3interp=dynamic \
63       --enable-rubyinterp=dynamic \
64       --enable-luainterp=dynamic \
65       --enable-tclinterp=dynamic \
66       --disable-canberra
67     make
68   )
70   echo "Building gvim..."
71   (cd gvim-${pkgver}
72     ./configure \
73       --prefix=/usr \
74       --localstatedir=/var/lib/vim \
75       --with-features=huge \
76       --with-compiledby='Arch Linux' \
77       --enable-gpm \
78       --enable-acl \
79       --with-x=yes \
80       --enable-gui=gtk3 \
81       --enable-multibyte \
82       --enable-cscope \
83       --enable-netbeans \
84       --enable-perlinterp=dynamic \
85       --enable-python3interp=dynamic \
86       --enable-rubyinterp=dynamic \
87       --enable-luainterp=dynamic \
88       --enable-tclinterp=dynamic \
89       --enable-canberra
90     make
91   )
94 check() {
95   cd vim-${pkgver}
96   TERM=xterm make -j1 test
99 package_vim-runtime() {
100   pkgdesc+=' (shared runtime)'
101   optdepends=('sh: support for some tools and macros'
102               'python: demoserver example tool'
103               'gawk: mve tools upport')
104   backup=('etc/vimrc')
106   cd vim-${pkgver}
108   make -j1 VIMRCLOC=/etc DESTDIR="${pkgdir}" install
109   # man and bin files belong to 'vim'
110   rm -r "${pkgdir}"/usr/share/man/ "${pkgdir}"/usr/bin/
112   # Don't forget logtalk.dict
113   install -Dm 644 runtime/ftplugin/logtalk.dict \
114     "${pkgdir}"/usr/share/vim/vim${_versiondir}/ftplugin/logtalk.dict
116   # rc files
117   install -Dm 644 "${srcdir}"/vimrc "${pkgdir}"/etc/vimrc
118   install -Dm 644 "${srcdir}"/archlinux.vim \
119     "${pkgdir}"/usr/share/vim/vimfiles/archlinux.vim
121   # no desktop files and icons
122   rm -r "${pkgdir}"/usr/share/{applications,icons}
124   # license
125   install -dm 755 "${pkgdir}"/usr/share/licenses/vim-runtime
126   ln -s /usr/share/vim/vim${_versiondir}/doc/uganda.txt \
127     "${pkgdir}"/usr/share/licenses/vim-runtime/license.txt
129   # pacman hook for documentation helptags
130   install -Dm 644 "${srcdir}"/vimdoc.hook "${pkgdir}"/usr/share/libalpm/hooks/vimdoc.hook
133 package_vim() {
134   # TODO: move perl back into optdeps after --enable-perlinterp=dynamic
135   #       starts working again (https://github.com/vim/vim/issues/10512)
136   depends=("vim-runtime=${pkgver}-${pkgrel}" 'gpm' 'acl' 'glibc' 'libgcrypt' 'pcre'
137            'zlib' 'perl')
138   optdepends=('python: Python language support'
139               'ruby: Ruby language support'
140               'lua: Lua language support'
141               #'perl: Perl language support'
142               'tcl: Tcl language support')
143   conflicts=('gvim' 'vim-minimal')
144   provides=('xxd' 'vim-minimal' 'vim-plugin-runtime')
145   replaces=('vim-minimal')
147   cd vim-${pkgver}
148   make -j1 VIMRCLOC=/etc DESTDIR="${pkgdir}" install
150   # provided by (n)vi in core
151   rm "${pkgdir}"/usr/bin/{ex,view}
153   # delete some manpages
154   find "${pkgdir}"/usr/share/man -type d -name 'man1' 2>/dev/null | \
155     while read _mandir; do
156     cd "${_mandir}"
157     rm -f ex.1 view.1 # provided by (n)vi
158     rm -f evim.1    # this does not make sense if we have no GUI
159   done
161   # Runtime provided by runtime package
162   rm -r "${pkgdir}"/usr/share/vim
164   # remove gvim.desktop as not included
165   rm "${pkgdir}"/usr/share/applications/gvim.desktop
167   # license
168   install -Dm 644 runtime/doc/uganda.txt \
169     "${pkgdir}"/usr/share/licenses/${pkgname}/license.txt
172 package_gvim() {
173   pkgdesc+=' (with advanced features, such as a GUI)'
174   # TODO: move perl back into optdeps after --enable-perlinterp=dynamic
175   #       starts working again (https://github.com/vim/vim/issues/10512)
176   depends=("vim-runtime=${pkgver}-${pkgrel}" 'gpm' 'libxt' 'gtk3' 'glibc' 'libgcrypt' 'pcre'
177            'zlib' 'libcanberra' 'perl')
178   optdepends=('python: Python language support'
179               'ruby: Ruby language support'
180               'lua: Lua language support'
181               #'perl: Perl language support'
182               'tcl: Tcl language support')
183   provides=("vim=${pkgver}-${pkgrel}" "xxd" 'vim-plugin-runtime')
184   conflicts=('vim-minimal' 'vim')
186   cd gvim-${pkgver}
187   make -j1 VIMRCLOC=/etc DESTDIR="${pkgdir}" install
189   # provided by (n)vi in core
190   rm "${pkgdir}"/usr/bin/{ex,view}
192   # delete some manpages
193   find "${pkgdir}"/usr/share/man -type d -name 'man1' 2>/dev/null | \
194     while read _mandir; do
195     cd "${_mandir}"
196     rm -f ex.1 view.1 # provided by (n)vi
197   done
199   # need to remove since this is provided by vim-runtime
200   rm -r "${pkgdir}"/usr/share/vim
202   # license
203    install -Dm 644 runtime/doc/uganda.txt \
204     "${pkgdir}"/usr/share/licenses/${pkgname}/license.txt
207 # vim: ts=2 sw=2 et: