source: BOOK/temp-system/common/vim.xml@ 8eb62b2

clfs-3.0.0-systemd systemd
Last change on this file since 8eb62b2 was 67e6980, checked in by Chris Staub <chris@…>, 10 years ago

features=normal is the default, no need to specify

  • Property mode set to 100644
File size: 5.3 KB
RevLine 
[ffbc9152]1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-temp-system-vim" role="wrap">
9 <?dbhtml filename="vim.html"?>
10
11 <title>Vim-&vim-version;</title>
12
13 <indexterm zone="ch-temp-system-vim">
14 <primary sortas="a-Vim">Vim</primary>
15 <secondary>temporary system</secondary>
16 </indexterm>
17
[dabbced]18 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
[ffbc9152]19 href="../../final-system/common/vim.xml"
20 xpointer="xpointer(//*[@role='package'])"/>
21
22 <sect2 role="installation">
23 <title>Installation of VIM</title>
24
[21f0998]25 <para os="a">We will cross-compile Vim so that we can have a text editor in
26 <filename class="directory">/tools</filename>. Vim is not technically
27 necessary in the temporary system, in that it is not there to satisfy any
28 package dependencies in the final system, but we believe that a text editor
29 is an extremely useful tool to have there.<!-- If you prefer a different
30 editor, you may check the hints project at <ulink url="&hints-root;" />
31 for information on cross-compiling other text editors. (placeholder -
32 uncomment this sentence if/when such information actually exists)--></para>
33
[dabbced]34 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
[ffbc9152]35 href="../../final-system/common/vim.xml"
36 xpointer="xpointer(//*[@os='p1'])"/>
37
[dabbced]38 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
[ffbc9152]39 href="../../final-system/common/vim.xml"
40 xpointer="xpointer(//*[@os='p2'])"/>
41
[878afd8]42 <para os="c1">The <command>configure</command> script is full of logic
[58598c1]43 that aborts at the first sign of cross compiling. Work around this by
44 setting the cached values of several tests with the following
45 command:</para>
[ffbc9152]46
47<screen os="c2"><userinput>cat &gt; src/auto/config.cache &lt;&lt; "EOF"
48vim_cv_getcwd_broken=no
49vim_cv_memmove_handles_overlap=yes
50vim_cv_stat_ignores_slash=no
51vim_cv_terminfo=yes
52vim_cv_toupper_broken=no
53vim_cv_tty_group=world
54EOF</userinput></screen>
55
[878afd8]56 <para os="b">Change the default location of
57 the <filename>vimrc</filename> configuration file to <filename
58 class="directory">/tools/etc</filename>:</para>
[ffbc9152]59
60<screen os="c"><userinput>echo '#define SYS_VIMRC_FILE "/tools/etc/vimrc"' &gt;&gt; src/feature.h</userinput></screen>
61
[dabbced]62 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
[ffbc9152]63 href="../../final-system/common/vim.xml"
64 xpointer="xpointer(//*[@os='d'])"/>
65
[6c5a343]66<screen os="e"><userinput>./configure \
[c3cd569a]67 --build=${CLFS_HOST} --host=${CLFS_TARGET} \
68 --prefix=/tools --enable-multibyte --enable-gui=no \
[67e6980]69 --disable-gtktest --disable-xim --disable-gpm \
70 --without-x --disable-netbeans --with-tlib=ncurses</userinput></screen>
[ffbc9152]71
[05efce1]72 <variablelist os="f">
73 <title>The meaning of the new configure options:</title>
74
75 <varlistentry>
76 <term><parameter>--enable-multibyte</parameter></term>
77 <listitem>
78 <para>This optional but highly recommended switch enables support
79 for editing files in multibyte character encodings. This is needed
80 if using a locale with a multibyte character set. This switch is
81 also helpful to be able to edit text files initially created in
82 Linux distributions like Fedora that use UTF-8 as a default
83 character set.</para>
84 </listitem>
85 </varlistentry>
86
[d0ebf86]87 <varlistentry>
[67e6980]88 <term><parameter>--enable-gui=no --disable-gtktest --disable-xim --disable-gpm --without-x --disable-netbeans</parameter></term>
[d0ebf86]89 <listitem>
90 <para>These options prevent Vim from trying to link to libraries
91 that might be on the host but won't exist inside the temporary
92 build environment.</para>
93 </listitem>
94 </varlistentry>
95
[852824db]96 <varlistentry>
97 <term><parameter>--with-tlib=ncurses</parameter></term>
98 <listitem>
99 <para>Tells Vim to use Ncurses as its terminal library.</para>
100 </listitem>
101 </varlistentry>
102
[05efce1]103 </variablelist>
104
[dabbced]105 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
[ffbc9152]106 href="../../final-system/common/vim.xml"
107 xpointer="xpointer(//*[@os='g'])"/>
108
[dabbced]109 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
[ffbc9152]110 href="../../final-system/common/vim.xml"
111 xpointer="xpointer(//*[@os='h'])"/>
112
[dabbced]113 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
[ffbc9152]114 href="../../final-system/common/vim.xml"
115 xpointer="xpointer(//*[@os='j'])"/>
116
[563e1e2]117 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
118 href="../../final-system/common/vim.xml"
119 xpointer="xpointer(//*[@os='k'])"/>
[ffbc9152]120
[dabbced]121 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
[ffbc9152]122 href="../../final-system/common/vim.xml"
[a63f1057]123 xpointer="xpointer(//*[@os='l'])"/>
[ffbc9152]124
[a63f1057]125<screen os="m"><userinput>ln -sv vim /tools/bin/vi</userinput></screen>
[ffbc9152]126
[e5ca899d]127 <para os="tv1">Create a temporary vimrc to make it function more the way you may
[0f90f2f]128 expect it to. This is explained more in the final system:</para>
129
130<screen os="tv2"><userinput>cat &gt; /tools/etc/vimrc &lt;&lt; "EOF"
[320c461]131<literal>" Begin /tools/etc/vimrc
[0f90f2f]132
133set nocompatible
134set backspace=2
135set ruler
136syntax on
137
[320c461]138" End /tools/etc/vimrc</literal>
[0f90f2f]139EOF</userinput></screen>
140
[ffbc9152]141 </sect2>
142
143 <sect2 role="content">
144 <title/>
145
146 <para>Details on this package are located in <xref
147 linkend="contents-vim" role="."/></para>
148
149 </sect2>
150
151</sect1>
Note: See TracBrowser for help on using the repository browser.