Details on this package are located in Section 10.56.3, “Contents of Vim.”
The Vim package contains a powerful text editor.
First, unpack both vim-7.2.tar.bz2
and (optionally) vim-7.2-lang.tar.gz
archives into the same directory.
The following patch merges all updates from the 7.2 Branch from the Vim developers:
patch -Np1 -i ../vim-7.2-branch_update-21.patch
The configure script is full of logic that aborts at the first sign of cross compiling. Work around this by setting the cached values of several tests with the following command:
cat > src/auto/config.cache << "EOF" vim_cv_getcwd_broken=no vim_cv_memmove_handles_overlap=yes vim_cv_stat_ignores_slash=no vim_cv_terminfo=yes vim_cv_tgent=zero vim_cv_toupper_broken=no vim_cv_tty_group=world ac_cv_sizeof_int=4 EOF
Change the default location of the vimrc configuration file to /tools/etc:
echo '#define SYS_VIMRC_FILE "/tools/etc/vimrc"' >> src/feature.h
Prepare Vim for compilation:
CC="${CC} ${BUILD64}" CXX="${CXX} ${BUILD64}" CPPFLAGS="-DUNUSED=" \
./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
--prefix=/tools --enable-multibyte --enable-gui=no \
--disable-gtktest --disable-xim --with-features=normal \
--disable-gpm --without-x --disable-netbeans \
--with-tlib=ncurses
Compile the package:
make
Install the package:
make install
Many users are accustomed to using vi instead of vim. Some programs, such as vigr and vipw, also use vi. Create a symlink to permit execution of vim when users habitually enter vi and allow programs that use vi to work:
ln -sv vim /tools/bin/vi
Details on this package are located in Section 10.56.3, “Contents of Vim.”