source: x/lib/qt.xml@ b8e6a3be

10.0 10.1 11.0 6.0 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 ken/refactor-virt krejzi/svn lazarus nosym perl-modules qt5new systemd-11177 systemd-13485 trunk xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since b8e6a3be was b8e6a3be, checked in by Randy McMurchy <randy@…>, 17 years ago

Updated to Qt-3.3.3

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@2640 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 12.0 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY qt-download-http "http://sunsite.rediris.es/mirror/Qt/source/qt-x11-free-&qt-version;.tar.bz2">
8 <!ENTITY qt-download-ftp "ftp://ftp.trolltech.com/qt/source/qt-x11-free-&qt-version;.tar.bz2">
9 <!ENTITY qt-md5sum "3e0a0c8429b0a974b39b5f535ddff01c">
10 <!ENTITY qt-size "14.4 MB">
11 <!ENTITY qt-buildsize "250 MB">
12 <!ENTITY qt-time "19.3 SBU (full), 13.4 SBU (sub-tools)">
13]>
14
15<sect1 id="qt" xreflabel="Qt-&qt-version;">
16<sect1info>
17<othername>$LastChangedBy$</othername>
18<date>$Date$</date>
19</sect1info>
20<?dbhtml filename="qt.html" ?>
21<title>Qt-&qt-version;</title>
22
23<sect2>
24<title>Introduction to <application>Qt</application></title>
25
26<para>The <application>Qt</application> package contains a
27<application>C++</application> <acronym>GUI</acronym> library. This is useful
28for creating graphical applications or executing graphical applications that
29are dynamically linked to the <application>Qt</application> library. One of the
30major users of <application>Qt</application> is <application>KDE</application>.
31</para>
32
33<sect3><title>Package information</title>
34<itemizedlist spacing='compact'>
35<listitem><para>Download (HTTP): <ulink url="&qt-download-http;"/></para></listitem>
36<listitem><para>Download (FTP): <ulink url="&qt-download-ftp;"/></para></listitem>
37<listitem><para>MD5 Sum: &qt-md5sum;</para></listitem>
38<listitem><para>Download size: &qt-size;</para></listitem>
39<listitem><para>Estimated Disk space required: &qt-buildsize;</para></listitem>
40<listitem><para>Estimated build time: &qt-time;</para></listitem></itemizedlist>
41</sect3>
42
43<sect3><title><application>Qt</application> dependencies</title>
44<sect4><title>Required</title>
45<para><xref linkend="x-installing"/></para>
46</sect4>
47
48<sect4><title>Recommended</title>
49<para><xref linkend="libjpeg"/> and <xref linkend="libmng"/></para>
50</sect4>
51
52<sect4><title>Optional</title>
53<para><xref linkend="nas"/>, <xref linkend="cups"/>, <xref linkend="mysql"/>,
54<xref linkend="postgresql"/>, <ulink url="http://sqlite.org/">SQLite</ulink>,
55<ulink url="http://firebird.sourceforge.net/">Firebird</ulink>
56and <ulink url="http://www.unixodbc.org/">unixODBC</ulink></para>
57</sect4>
58</sect3>
59</sect2>
60
61<sect2>
62<title>Installation of <application>Qt</application></title>
63
64<para>There are several ways to install a complicated package such as
65<application>Qt</application>. The files are not completely position
66independent. Installation procedures execute the program
67<command>pkg-config</command> to determine the location of package executables,
68libraries, headers, and other files. For <application>Qt</application>,
69<command>pkg-config</command> will look for the file
70<filename>lib/pkgconfig/qt-mt.pc</filename> which must be modified if
71relocating the package. This file is set up correctly by the build process.
72</para>
73
74<para>The default installation places the files in
75<filename class='directory'>/usr/local/qt/</filename>. Many commercial
76distributions place the files in the system's
77<filename class='directory'>/usr</filename> hierarchy. The package can also be
78installed in an arbitrary directory.</para>
79
80<para>This section will demonstrate two different methods.</para>
81
82<note><para>The build time for <application>Qt</application> is quite long. If
83you want to save some time and don't want the tutorials and examples, change
84the first make line to:</para>
85
86<para><userinput><command>make sub-tools</command></userinput></para>
87</note>
88
89<sect3>
90<title>Method 1 - Installing in the
91<filename class='directory'>/usr</filename> hierarchy</title>
92
93<para>The advantage of this method is that no updates to the
94<filename>/etc/ld.so.conf</filename> or <filename>/etc/man.conf</filename>
95files are required. The package files are distributed within several
96subdirectories of the <filename class='directory'>/usr</filename> hierarchy.
97This is the method that most commercial distributions use.</para>
98
99<screen><userinput><command>sed -i "s:cp -f:install:" mkspecs/linux-g++/qmake.conf &amp;&amp;
100bash
101export PATH=$PWD/bin:$PATH &amp;&amp;
102export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH &amp;&amp;
103./configure -prefix /usr -docdir /usr/share/doc/qt \
104 -headerdir /usr/include/qt -plugindir /usr/lib/qt/plugins \
105 -datadir /usr/share/qt -translationdir /usr/share/qt/translations \
106 -sysconfdir /etc/qt -qt-gif -system-zlib \
107 -no-exceptions -thread -plugin-imgfmt-png -system-libpng &amp;&amp;
108find -type f -name Makefile | xargs sed -i "s@-Wl,-rpath,/usr/lib@@g" &amp;&amp;
109make &amp;&amp;
110make install &amp;&amp;
111ln -sf libqt-mt.so /usr/lib/libqt.so &amp;&amp;
112rm /usr/bin/qmake &amp;&amp;
113install -m755 -oroot -groot qmake/qmake /usr/bin &amp;&amp;
114cp -r doc/man /usr/share &amp;&amp;
115cp -r examples /usr/share/doc/qt &amp;&amp;
116exit</command></userinput></screen>
117
118</sect3>
119
120<sect3>
121<title>Method 2 - Installing in <filename class='directory'>/opt</filename></title>
122
123<para>This is the method recommended by the <application>Qt</application>
124developers. It has the advantage of keeping all the package files consolidated
125in a dedicated directory hierarchy. By using this method, an update can be made
126without overwriting a previous installation and users can easily revert to a
127previous version by changing one symbolic link.</para>
128
129<para>The <application>Qt</application> developers use a default location of
130<filename class='directory'>/usr/local/qt/</filename>, however this procedure
131puts the files in <filename class='directory'>/opt/qt-&qt-version;/</filename>
132and then creates a symbolic link to <filename>/opt/qt/</filename>.</para>
133
134<screen><userinput><command>bash
135export QTDIR=$PWD &amp;&amp;
136export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH &amp;&amp;
137export PATH=$PWD/bin:$PATH &amp;&amp;
138./configure -prefix /opt/qt-&qt-version; -qt-gif -system-libpng \
139 -system-libmng -system-zlib -system-libjpeg -no-exceptions \
140 -thread -plugin-imgfmt-png &amp;&amp;
141make &amp;&amp;
142make install &amp;&amp;
143ln -sfn qt-&qt-version; /opt/qt &amp;&amp;
144ln -s libqt-mt.so /opt/qt/lib/libqt.so &amp;&amp;
145rm /opt/qt-&qt-version;/bin/qmake &amp;&amp;
146install -m755 -oroot -groot qmake/qmake /opt/qt-&qt-version;/bin &amp;&amp;
147cp -r doc/man /opt/qt/doc &amp;&amp;
148cp -r examples /opt/qt/doc
149exit</command></userinput></screen>
150
151<note><para>If you pass the
152<option>-plugin-sql-<replaceable>[driver]</replaceable></option> switch to the
153<command>configure</command> command, you must also pass
154<option>-I<replaceable>[/path/to/sql/headers]</replaceable></option> so
155<command>make</command> can find the appropriate header files.</para></note>
156</sect3>
157
158</sect2>
159
160<sect2>
161<title>Command explanations</title>
162
163<para><command>sed -i "s:cp -f:install:" mkspecs/linux-g++/qmake.conf</command>:
164<command>install</command> is safer than <command>cp</command> when
165libraries are in use.</para>
166
167<para><command>bash</command>: This command enters a sub-shell to isolate
168environment changes.</para>
169
170<para><command>export QTDIR=$PWD</command>: This command defines where the root
171of the <application>Qt</application> directory is located.</para>
172
173<para><command>export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH</command>: This
174command allows the not yet installed <application>Qt</application> libraries to
175be used by the not yet installed <application>Qt</application> programs.</para>
176
177<para><command>export PATH=$PWD/bin:$PATH</command>: This command
178allows the build process to find supporting executables.</para>
179
180<para><parameter>-qt-gif</parameter>: This switch adds support for
181<filename>gif</filename> files to the libraries.</para>
182
183<para><parameter>-system-zlib -system-libpng</parameter>: This switch
184forces the build instructions to use the shared libraries that are on your
185system instead of creating a custom set of support libraries for these
186functions.</para>
187
188<para><parameter>-no-exceptions</parameter>: This switch disables
189the exceptions coding generated by the <application>C++</application> compiler.
190</para>
191
192<para><parameter>-thread</parameter>: This switch adds
193support for multi-threading.</para>
194
195<para><command>find -type f -name Makefile | xargs sed -i
196"s@-Wl,-rpath,/usr/lib@@g"</command>: This command removes hardcoded run-time
197paths. Otherwise, <command>uic</command> always tries to run with
198<application>Qt</application> libraries in <filename>/usr/lib</filename>.</para>
199
200<para><command>ln -s libqt-mt.so /usr/lib/libqt.so</command>: This command
201allows <command>configure</command> scripts to find a working
202<application>Qt</application> installation.</para>
203
204<para><command>rm .../qmake; install -m755 -oroot -groot qmake/qmake .../bin</command>:
205The <command>qmake</command> program is installed incorrectly by
206<command>make install</command>. These two commands install the program
207correctly.</para>
208
209<para><command>cp -r doc/man /usr/share (or /opt/qt/doc)</command>: This command
210installs the man pages which are missed by <command>make install</command>.
211</para>
212
213<para><command>cp -r examples /usr/share/doc/qt (or /opt/qt/doc)</command>:
214This command installs the examples which are missed by
215<command>make install</command>.</para>
216
217<para><command>exit</command>: This command returns to the parent shell
218and eliminates environment variables set earlier.</para>
219
220</sect2>
221
222<sect2>
223<title>Configuring <application>Qt</application></title>
224
225<sect3><title>Configuration Information</title>
226<para>If you installed <application>Qt</application> using Method 2, you need
227to update some configuration files so that <application>Qt</application> is
228correctly found by other packages and system processes.</para>
229
230<para>Update the <filename>/etc/ld.so.conf</filename> and
231<filename>/etc/man.conf</filename> files:</para>
232
233<screen><userinput><command>cat &gt;&gt; /etc/ld.so.conf &lt;&lt; "EOF"
234# Begin qt addition to /etc/ld.so.conf
235
236/opt/qt/lib
237
238# End qt addition
239EOF
240ldconfig
241
242cat &gt;&gt; /etc/man.conf &lt;&lt; "EOF"
243# Begin qt addition to man.conf
244
245MANPATH /opt/qt/doc/man
246
247# End qt addition to man.conf
248EOF</command></userinput></screen>
249
250<para>Update the <envar>PKG_CONFIG_PATH</envar> environment variable in your
251<filename>~/.bash_profile</filename> or <filename>/etc/profile</filename> with
252the following:</para>
253
254<screen><userinput>PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/qt/lib/pkgconfig</userinput></screen>
255
256<para>The <envar>QTDIR</envar> environment variable needs to be set when
257building packages that depend on <application>Qt</application>. Add the
258following to the <filename>.bash_profile</filename> initialization script for
259each user that builds packages using the <application>Qt</application>
260libraries. Alternatively, the variable can be set in the system wide
261<filename>/etc/profile</filename> file.</para>
262
263<screen><userinput>export QTDIR=/opt/qt</userinput></screen>
264
265<para>If you want the <application>Qt</application> executables in your shell
266search path, update the <envar>PATH</envar> environment variable in your
267<filename>~/.bash_profile</filename> or <filename>/etc/profile</filename> to
268include <filename class='directory'>/opt/qt/bin</filename>.</para>
269
270<para>As with most libraries, there is no explicit configuration to do. After
271updating <filename>/etc/ld.so.conf</filename> as explained above, run
272<command>/sbin/ldconfig</command> so that <command>ldd</command> can find the
273shared libraries.</para>
274
275</sect3>
276
277</sect2>
278
279<sect2>
280<title>Contents</title>
281
282<para>The <application>Qt</application>/<application>X11</application>
283library contains <acronym>API</acronym>s necessary to use
284programs based on the <application>Qt</application> <acronym>GUI</acronym>
285toolkit.</para>
286
287<para>The <application>Qt</application> package contains
288<command>assistant</command>,
289<command>designer</command>,
290<command>linguist</command>,
291<command>lrelease</command>,
292<command>lupdate</command>,
293<command>moc</command>,
294<command>qm2ts</command>,
295<command>qmake</command>,
296<command>qtconfig</command>,
297<command>uic</command>, and the
298<filename class="libraryfile">libqt-mt</filename> and
299<filename class="libraryfile">libqui</filename> libraries.</para>
300
301</sect2>
302</sect1>
Note: See TracBrowser for help on using the repository browser.