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 | |
---|
18 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" |
---|
19 | href="../../final-system/common/vim.xml" |
---|
20 | xpointer="xpointer(//*[@role='package'])"/> |
---|
21 | |
---|
22 | <sect2 role="installation"> |
---|
23 | <title>Installation of VIM</title> |
---|
24 | |
---|
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 | |
---|
34 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" |
---|
35 | href="../../final-system/common/vim.xml" |
---|
36 | xpointer="xpointer(//*[@os='p1'])"/> |
---|
37 | |
---|
38 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" |
---|
39 | href="../../final-system/common/vim.xml" |
---|
40 | xpointer="xpointer(//*[@os='p2'])"/> |
---|
41 | |
---|
42 | <para os="c1">The <command>configure</command> script is full of logic |
---|
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> |
---|
46 | |
---|
47 | <screen os="c2"><userinput>cat > src/auto/config.cache << "EOF" |
---|
48 | vim_cv_getcwd_broken=no |
---|
49 | vim_cv_memmove_handles_overlap=yes |
---|
50 | vim_cv_stat_ignores_slash=no |
---|
51 | vim_cv_terminfo=yes |
---|
52 | vim_cv_toupper_broken=no |
---|
53 | vim_cv_tty_group=world |
---|
54 | vim_cv_tgent=zero |
---|
55 | EOF</userinput></screen> |
---|
56 | |
---|
57 | <para os="b">Change the default location of |
---|
58 | the <filename>vimrc</filename> configuration file to <filename |
---|
59 | class="directory">/tools/etc</filename>:</para> |
---|
60 | |
---|
61 | <screen os="c"><userinput>echo '#define SYS_VIMRC_FILE "/tools/etc/vimrc"' >> src/feature.h</userinput></screen> |
---|
62 | |
---|
63 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" |
---|
64 | href="../../final-system/common/vim.xml" |
---|
65 | xpointer="xpointer(//*[@os='d'])"/> |
---|
66 | |
---|
67 | <screen os="e"><userinput>./configure \ |
---|
68 | --build=${CLFS_HOST} \ |
---|
69 | --host=${CLFS_TARGET} \ |
---|
70 | --prefix=/tools \ |
---|
71 | --enable-gui=no \ |
---|
72 | --disable-gtktest \ |
---|
73 | --disable-xim \ |
---|
74 | --disable-gpm \ |
---|
75 | --without-x \ |
---|
76 | --disable-netbeans \ |
---|
77 | --with-tlib=ncurses</userinput></screen> |
---|
78 | |
---|
79 | <variablelist os="f"> |
---|
80 | <title>The meaning of the new configure options:</title> |
---|
81 | |
---|
82 | <varlistentry> |
---|
83 | <term><parameter>--enable-gui=no --disable-gtktest --disable-xim --disable-gpm --without-x --disable-netbeans</parameter></term> |
---|
84 | <listitem> |
---|
85 | <para>These options prevent Vim from trying to link to libraries |
---|
86 | that might be on the host but won't exist inside the temporary |
---|
87 | build environment.</para> |
---|
88 | </listitem> |
---|
89 | </varlistentry> |
---|
90 | |
---|
91 | <varlistentry> |
---|
92 | <term><parameter>--with-tlib=ncurses</parameter></term> |
---|
93 | <listitem> |
---|
94 | <para>Tells Vim to use Ncurses as its terminal library.</para> |
---|
95 | </listitem> |
---|
96 | </varlistentry> |
---|
97 | |
---|
98 | </variablelist> |
---|
99 | |
---|
100 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" |
---|
101 | href="../../final-system/common/vim.xml" |
---|
102 | xpointer="xpointer(//*[@os='g'])"/> |
---|
103 | |
---|
104 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" |
---|
105 | href="../../final-system/common/vim.xml" |
---|
106 | xpointer="xpointer(//*[@os='h'])"/> |
---|
107 | |
---|
108 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" |
---|
109 | href="../../final-system/common/vim.xml" |
---|
110 | xpointer="xpointer(//*[@os='j'])"/> |
---|
111 | |
---|
112 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" |
---|
113 | href="../../final-system/common/vim.xml" |
---|
114 | xpointer="xpointer(//*[@os='k'])"/> |
---|
115 | |
---|
116 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" |
---|
117 | href="../../final-system/common/vim.xml" |
---|
118 | xpointer="xpointer(//*[@os='l'])"/> |
---|
119 | |
---|
120 | <screen os="m"><userinput>ln -sv vim /tools/bin/vi</userinput></screen> |
---|
121 | |
---|
122 | <para os="tv1">Create a temporary vimrc to make it function more the way you may |
---|
123 | expect it to. This is explained more in the final system:</para> |
---|
124 | |
---|
125 | <screen os="tv2"><userinput>cat > /tools/etc/vimrc << "EOF" |
---|
126 | <literal>" Begin /tools/etc/vimrc |
---|
127 | |
---|
128 | set nocompatible |
---|
129 | set backspace=2 |
---|
130 | set ruler |
---|
131 | syntax on |
---|
132 | |
---|
133 | " End /tools/etc/vimrc</literal> |
---|
134 | EOF</userinput></screen> |
---|
135 | |
---|
136 | </sect2> |
---|
137 | |
---|
138 | <sect2 role="content"> |
---|
139 | <title/> |
---|
140 | |
---|
141 | <para>Details on this package are located in <xref |
---|
142 | linkend="contents-vim" role="."/></para> |
---|
143 | |
---|
144 | </sect2> |
---|
145 | |
---|
146 | </sect1> |
---|