1 # Build recipe for vim (huge).
3 # Copyright (c) 2018-2020 Matias Fonzo, <selk@dragora.org>.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
21 # Define a category for the output of the package name
24 # Set a custom name for this package
27 # The installation of this package replaces to
30 tarname=${program}-${version}.tar.gz
33 fetch=http://github.com/vim/vim/archive/v${version}/$tarname
35 homepage=http://www.vim.org
38 The ubiquitous text editor (huge version, with X11 support).
40 Vim is a highly configurable text editor built to make creating and
41 changing any kind of text very efficient. It is included as \"vi\"
42 with most UNIX systems and with Apple OS X.
44 For more information, visit: $homepage
49 # Source documentation
50 docs="CONTRIBUTING.md README.md"
51 docsdir="${docdir}/${pkgname}-${version}"
57 unpack "${tardir}/$tarname"
61 # Workaround for the special 'srcdir' variable, it is internally
62 # imported and exported from vim's ./configure
66 ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
68 --libdir=/usr/lib${libSuffix} \
74 --enable-pythoninterp \
75 --enable-python3interp \
79 --with-features=huge \
80 --with-compiledby="Dragora GNU/Linux-Libre" \
82 --build="$(gcc -dumpmachine)"
89 make -j${jobs} DESTDIR="$destdir" install
91 # Add wrappers script from Dragora for compatibility mode (vi)
92 cp -f "${worktree}/archive/vim/usr/bin/vi" \
94 chmod 755 "${destdir}/usr/bin/vi"
96 # Compress and link man pages (if needed)
97 if test -d "${destdir}/$mandir"
100 cd "${destdir}/$mandir"
101 find . -type f -exec lzip -9 '{}' +
102 find . -type l | while read -r file
104 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
111 mkdir -p "${destdir}${docsdir}"
112 cp -p $docs "${destdir}${docsdir}"