source: x/lib/qt.xml@ 4b48ee50

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.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 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 4b48ee50 was 4b48ee50, checked in by Bruce Dubbs <bdubbs@…>, 18 years ago

Update to qt-3.3.5

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

  • Property mode set to 100644
File size: 18.7 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY qt-download-http "http://ftp.uoi.gr/mirror/X11/Qt/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 "05d04688c0c0230ed54e89102d689ca4">
10 <!ENTITY qt-size "16.7 MB">
11 <!ENTITY qt-buildsize "167 MB">
12 <!ENTITY qt-time "9.7 SBU (full), 6.8 SBU (sub-tools)">
13]>
14
15<sect1 id="qt" xreflabel="Qt-&qt-version;">
16 <?dbhtml filename="qt.html" ?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>Qt-&qt-version;</title>
24
25 <indexterm zone="qt">
26 <primary sortas="a-qt">Qt</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to Qt</title>
31
32 <para>The <application>Qt</application> package contains a
33 <application>C++</application> GUI library. This is useful for creating
34 graphical applications or executing graphical applications that are
35 dynamically linked to the <application>Qt</application> library. One of
36 the major users of <application>Qt</application> is
37 <application>KDE</application>.</para>
38
39 <bridgehead renderas="sect3">Package Information</bridgehead>
40 <itemizedlist spacing="compact">
41 <listitem>
42 <para>Download (HTTP): <ulink url="&qt-download-http;"/></para>
43 </listitem>
44 <listitem>
45 <para>Download (FTP): <ulink url="&qt-download-ftp;"/></para>
46 </listitem>
47 <listitem>
48 <para>Download MD5 sum: &qt-md5sum;</para>
49 </listitem>
50 <listitem>
51 <para>Download size: &qt-size;</para>
52 </listitem>
53 <listitem>
54 <para>Estimated disk space required: &qt-buildsize;</para>
55 </listitem>
56 <listitem>
57 <para>Estimated build time: &qt-time;</para>
58 </listitem>
59 </itemizedlist>
60
61 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
62<!--
63 <itemizedlist spacing="compact">
64 <listitem>
65 <para>Required patch: <ulink
66 url="&patch-root;/qt-x11-free-&qt-version;-gcc4-1.patch"/></para>
67 </listitem>
68 </itemizedlist>
69-->
70 <bridgehead renderas="sect3">Qt Dependencies</bridgehead>
71
72 <bridgehead renderas="sect4">Required</bridgehead>
73 <para>X (<xref linkend="xfree86"/> or <xref linkend="xorg"/>)</para>
74
75 <bridgehead renderas="sect4">Recommended</bridgehead>
76 <para><xref linkend="libjpeg"/> and <xref linkend="libmng"/></para>
77
78 <bridgehead renderas="sect4">Optional</bridgehead>
79 <para><xref linkend="nas"/>,
80 <xref linkend="cups"/>,
81 <xref linkend="mysql"/>,
82 <xref linkend="postgresql"/>,
83 <xref linkend="unixodbc"/>,
84 <ulink url="http://sqlite.org/">SQLite</ulink> and
85 <ulink url="http://firebird.sourceforge.net/">Firebird</ulink></para>
86
87 </sect2>
88
89 <sect2 role="installation">
90 <title>Installation of Qt</title>
91
92 <para>There are several ways to install a complicated package such as
93 <application>Qt</application>. The files are not completely position
94 independent. Installation procedures execute the program
95 <command>pkg-config</command> to determine the location of package
96 executables, libraries, headers, and other files. For
97 <application>Qt</application>, <command>pkg-config</command> will look
98 for the file <filename>lib/pkgconfig/qt-mt.pc</filename> which must be
99 modified if relocating the package. This file is set up correctly by
100 the build process.</para>
101
102 <para>The default installation places the files in
103 <filename class='directory'>/usr/local/qt/</filename>. Many commercial
104 distributions place the files in the system's
105 <filename class='directory'>/usr</filename> hierarchy. The package can
106 also be installed in an arbitrary directory.</para>
107
108 <para>This section will demonstrate two different methods.</para>
109
110 <warning>
111 <para>Building <application>Qt</application> in a
112 <command>chroot</command> environment may fail.</para>
113 </warning>
114
115 <note>
116 <para>The build time for <application>Qt</application> is quite long. If
117 you want to save some time and don't want the tutorials and examples,
118 change the first make line to:</para>
119
120<screen><userinput>make sub-tools</userinput></screen>
121
122 </note>
123
124 <sect3>
125 <title>Method 1 - Installing in the '/usr' Hierarchy</title>
126
127 <para>The advantage of this method is that no updates to the
128 <filename>/etc/ld.so.conf</filename> or
129 <filename>/etc/man.conf</filename> files are required. The package
130 files are distributed within several subdirectories of the
131 <filename class='directory'>/usr</filename> hierarchy.
132 This is the method that most commercial distributions use.</para>
133
134<!--
135 <note>
136 <para>The installation incorrectly uses <command>cp</command> to
137 install the files. This causes problems if the
138 <application>Qt</application> libraries are already in use (e.g.,
139 you are logged into your <application>KDE</application> desktop
140 environment). To avoid problems, <command>cp -f</command> is
141 replaced by <command>install</command> in
142 <filename>qmake.conf</filename>.</para>
143 </note>
144-->
145 <note>
146 <para>If <application>Qt</application> is being reinstalled, run the
147 following commands from a console or non-Qt based window manager.
148 It overwrites <application>Qt</application> libraries that should not
149 be in use during the install process.</para>
150 </note>
151
152<screen><userinput>sed -i -e 's:$(QTDIR)/include:&amp;/qt:' \
153 -e 's:$(QTDIR)/lib:&amp;/qt:' \
154 mkspecs/linux*/qmake.conf &amp;&amp;
155bash
156export PATH=$PWD/bin:$PATH &amp;&amp;
157export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH &amp;&amp;
158./configure -prefix /usr -docdir /usr/share/doc/qt \
159 -headerdir /usr/include/qt -plugindir /usr/lib/qt/plugins \
160 -datadir /usr/share/qt -translationdir /usr/share/qt/translations \
161 -sysconfdir /etc/qt -qt-gif -system-zlib -system-libmng \
162 -no-exceptions -thread -plugin-imgfmt-png \
163 -system-libjpeg -system-libpng &amp;&amp;
164find -type f -name Makefile | xargs sed -i "s@-Wl,-rpath,/usr/lib@@g" &amp;&amp;
165make &amp;&amp;
166exit</userinput></screen>
167
168 <para>Now, as the <systemitem class="username">root</systemitem>
169 user:</para>
170
171<screen role="root"><userinput>make install &amp;&amp;
172ln -v -sf libqt-mt.so /usr/lib/libqt.so &amp;&amp;
173cp -v -r doc/man /usr/share &amp;&amp;
174cp -v -r examples /usr/share/doc/qt</userinput></screen>
175
176 </sect3>
177
178 <sect3>
179 <title>Method 2 - Installing in '/opt'</title>
180
181 <para>This is the method recommended by the <application>Qt</application>
182 developers. It has the advantage of keeping all the package files
183 consolidated in a dedicated directory hierarchy. By using this method,
184 an update can be made without overwriting a previous installation and
185 users can easily revert to a previous version by changing one symbolic
186 link.</para>
187
188 <para>The <application>Qt</application> developers use a default location
189 of <filename class='directory'>/usr/local/qt/</filename>, however this
190 procedure puts the files in <filename
191 class='directory'>/opt/qt-&qt-version;/</filename>
192 and then creates a symbolic link to <filename>/opt/qt/</filename>.</para>
193
194<screen><userinput>bash
195export QTDIR=$PWD &amp;&amp;
196export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH &amp;&amp;
197export PATH=$PWD/bin:$PATH &amp;&amp;
198./configure -prefix /opt/qt-&qt-version; -qt-gif -system-libpng \
199 -system-libmng -system-zlib -system-libjpeg -no-exceptions \
200 -thread -plugin-imgfmt-png &amp;&amp;
201make &amp;&amp;
202exit</userinput></screen>
203
204 <para>Now, as the <systemitem class="username">root</systemitem>
205 user:</para>
206
207<screen role="root"><userinput>make install &amp;&amp;
208ln -v -sfn qt-&qt-version; /opt/qt &amp;&amp;
209ln -v -s libqt-mt.so /opt/qt/lib/libqt.so &amp;&amp;
210cp -v -r doc/man /opt/qt/doc &amp;&amp;
211cp -v -r examples /opt/qt/doc</userinput></screen>
212
213 <note>
214 <para>If you pass the
215 <option>-plugin-sql-<replaceable>[driver]</replaceable></option>
216 switch to the <command>configure</command> command, you must also pass
217 <option>-I<replaceable>[/path/to/sql/headers]</replaceable></option>
218 so <command>make</command> can find the appropriate header files.</para>
219 </note>
220
221 </sect3>
222
223 </sect2>
224
225 <sect2 role="commands">
226 <title>Command Explanations</title>
227
228 <para><command>sed -i -e ... mkspecs/linux*/qmake.conf</command>:
229 Directories in <filename>qmake.conf</filename> need to be adjusted
230 to match the BLFS Method 1 installation directories.</para>
231
232 <para><command>bash</command>: This command enters a sub-shell to isolate
233 environment changes.</para>
234
235 <para><command>export QTDIR=$PWD</command>: This command defines where
236 the root of the <application>Qt</application> directory is located.</para>
237
238 <para><command>export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH</command>:
239 This command allows the not yet installed <application>Qt</application>
240 libraries to be used by the not yet installed <application>Qt</application>
241 programs.</para>
242
243 <para><command>export PATH=$PWD/bin:$PATH</command>: This command
244 allows the build process to find supporting executables.</para>
245
246 <para><parameter>-qt-gif</parameter>: This switch adds support for
247 <filename>gif</filename> files to the libraries.</para>
248
249 <para><parameter>-system-zlib -system-libpng</parameter>: This switch
250 forces the build instructions to use the shared libraries that are on
251 your system instead of creating a custom set of support libraries for
252 these functions.</para>
253
254 <para><parameter>-plugin-imgfmt-png</parameter>: This switch enables
255 <application>libpng</application> to be linked to at runtime.</para>
256
257 <para><parameter>-no-exceptions</parameter>: This switch disables
258 the exceptions coding generated by the <application>C++</application>
259 compiler.</para>
260
261 <para><parameter>-thread</parameter>: This switch adds
262 support for multi-threading.</para>
263
264 <para><command>find -type f -name Makefile | xargs sed -i
265 "s@-Wl,-rpath,/usr/lib@@g"</command>: This command removes hardcoded
266 run-time paths. Otherwise, <command>uic</command> always tries to run
267 with <application>Qt</application> libraries in
268 <filename>/usr/lib</filename>.</para>
269
270 <para><command>ln -v -s libqt-mt.so /usr/lib/libqt.so</command>: This
271 command allows <command>configure</command> scripts to find a working
272 <application>Qt</application> installation.</para>
273
274 <para><command>cp -v -r doc/man /usr/share (or /opt/qt/doc)</command>:
275 This command installs the man pages which are missed by
276 <command>make install</command>.</para>
277
278 <para><command>cp -v -r examples /usr/share/doc/qt (or
279 /opt/qt/doc)</command>: This command installs the examples which are
280 missed by <command>make install</command>.</para>
281
282 <para><command>exit</command>: This command returns to the parent shell
283 and eliminates environment variables set earlier.</para>
284
285 </sect2>
286
287 <sect2 role="configuration">
288 <title>Configuring Qt</title>
289
290 <sect3 id='qt-config'>
291 <title>Configuration Information</title>
292
293 <para>The <envar>QTDIR</envar> environment variable needs to be set when
294 building packages that depend on <application>Qt</application>. Add the
295 following to the <filename>.bash_profile</filename> initialization script
296 for each user that builds packages using the <application>Qt</application>
297 libraries. Alternatively, the variable can be set in the system wide
298 <filename>/etc/profile</filename> file.</para>
299
300 <para>For Method 1 (This is optional, only set this if an application is
301 unable to find the installed libraries):</para>
302
303<screen><literal>export QTDIR=/usr</literal></screen>
304
305 <para>or for Method 2:</para>
306
307<screen><literal>export QTDIR=/opt/qt</literal></screen>
308
309 <para>If you installed <application>Qt</application> using Method 2,
310 you also need to update the following configuration files so that
311 <application>Qt</application> is correctly found by other packages
312 and system processes.</para>
313
314 <para>Update the <filename>/etc/ld.so.conf</filename> and
315 <filename>/etc/man.conf</filename> files:</para>
316
317<screen role="root"><userinput>cat &gt;&gt; /etc/ld.so.conf &lt;&lt; "EOF" &amp;&amp;
318<literal># Begin qt addition to /etc/ld.so.conf
319
320/opt/qt/lib
321
322# End qt addition</literal>
323EOF
324ldconfig &amp;&amp;
325cat &gt;&gt; /etc/man.conf &lt;&lt; "EOF"
326<literal># Begin qt addition to man.conf
327
328MANPATH /opt/qt/doc/man
329
330# End qt addition to man.conf</literal>
331EOF</userinput></screen>
332
333 <indexterm zone="qt qt-config">
334 <primary sortas="e-etc-ld.so.conf">/etc/ld.so.conf</primary>
335 </indexterm>
336
337 <indexterm zone="qt qt-config">
338 <primary sortas="e-etc-man.conf">/etc/man.conf</primary>
339 </indexterm>
340
341 <indexterm zone="qt qt-config">
342 <primary sortas="e-etc-profile">/etc/profile</primary>
343 </indexterm>
344
345 <indexterm zone="qt qt-config">
346 <primary sortas="e-AA.bash_profile">~/.bash_profile</primary>
347 </indexterm>
348
349 <para>Update the <envar>PKG_CONFIG_PATH</envar> environment variable
350 in your <filename>~/.bash_profile</filename> or
351 <filename>/etc/profile</filename> with the following:</para>
352
353<screen><literal>PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/qt/lib/pkgconfig</literal></screen>
354
355 <para>If you want the <application>Qt</application> executables in your
356 shell search path, update the <envar>PATH</envar> environment variable
357 in your <filename>~/.bash_profile</filename> or
358 <filename>/etc/profile</filename> to include
359 <filename class='directory'>/opt/qt/bin</filename>.</para>
360
361 <para>As with most libraries, there is no explicit configuration to do.
362 After updating <filename>/etc/ld.so.conf</filename> as explained above,
363 run <command>/sbin/ldconfig</command> so that <command>ldd</command>
364 can find the shared libraries.</para>
365
366 </sect3>
367
368 </sect2>
369
370 <sect2 role="content">
371 <title>Contents</title>
372
373 <segmentedlist>
374 <segtitle>Installed Programs</segtitle>
375 <segtitle>Installed Libraries</segtitle>
376 <segtitle>Installed Directories</segtitle>
377
378 <seglistitem>
379 <seg>assistant, designer, linguist, lrelease, lupdate, moc,
380 qm2ts, qmake, qtconfig, and uic</seg>
381 <seg>libqt-mt.so, libqt.so libqui.so, libdesignercore.a,
382 libeditor.a, and libqassistantclient.a</seg>
383 <seg>/opt/qt-&qt-version; or /usr/lib/qt, /usr/share/qt,
384 /usr/share/doc/qt, /usr/include/qt, and /etc/qt</seg>
385 </seglistitem>
386 </segmentedlist>
387
388 <variablelist>
389 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
390 <?dbfo list-presentation="list"?>
391 <?dbhtml list-presentation="table"?>
392
393 <varlistentry id="assistant">
394 <term><command>assistant</command></term>
395 <listitem>
396 <para>is a tool for presenting on-line documentation.</para>
397 <indexterm zone="qt assistant">
398 <primary sortas="b-assistant">assistant</primary>
399 </indexterm>
400 </listitem>
401 </varlistentry>
402
403 <varlistentry id="designer">
404 <term><command>designer</command></term>
405 <listitem>
406 <para>is a full-fledged GUI builder. It includes
407 powerful features such as preview mode, automatic widget
408 layout, support for custom widgets, and an advanced
409 property editor.</para>
410 <indexterm zone="qt designer">
411 <primary sortas="b-designer">designer</primary>
412 </indexterm>
413 </listitem>
414 </varlistentry>
415
416 <varlistentry id="linguist">
417 <term><command>linguist</command></term>
418 <listitem>
419 <para>provides support for translating applications into
420 local languages. </para>
421 <indexterm zone="qt linguist">
422 <primary sortas="b-linguist">linguist</primary>
423 </indexterm>
424 </listitem>
425 </varlistentry>
426
427 <varlistentry id="lrelease">
428 <term><command>lrelease</command></term>
429 <listitem>
430 <para>is a simple command line tool. It reads a Qt project
431 file and produces message files used by the application.</para>
432 <indexterm zone="qt lrelease">
433 <primary sortas="b-lrelease">lrelease</primary>
434 </indexterm>
435 </listitem>
436 </varlistentry>
437
438 <varlistentry id="lupdate">
439 <term><command>lupdate</command></term>
440 <listitem>
441 <para>reads a Qt project file, finds the translatable
442 strings in the specified source, header and Qt Designer
443 interface files, and produces or updates the translation
444 files listed in the project file.</para>
445 <indexterm zone="qt lupdate">
446 <primary sortas="b-lupdate">lupdate</primary>
447 </indexterm>
448 </listitem>
449 </varlistentry>
450
451 <varlistentry id="moc">
452 <term><command>moc</command></term>
453 <listitem>
454 <para>generates Qt meta object support code.</para>
455 <indexterm zone="qt moc">
456 <primary sortas="b-moc">moc</primary>
457 </indexterm>
458 </listitem>
459 </varlistentry>
460
461 <varlistentry id="qm2ts">
462 <term><command>qm2ts</command></term>
463 <listitem>
464 <para>is a tool for converting Qt message file formats.</para>
465 <indexterm zone="qt qm2ts">
466 <primary sortas="b-qm2ts">qm2ts</primary>
467 </indexterm>
468 </listitem>
469 </varlistentry>
470
471 <varlistentry id="qmake">
472 <term><command>qmake</command></term>
473 <listitem>
474 <para>qmake uses information stored in project files to
475 determine what should go in the makefiles it generates.</para>
476 <indexterm zone="qt qmake">
477 <primary sortas="b-qmake">qmake</primary>
478 </indexterm>
479 </listitem>
480 </varlistentry>
481
482 <varlistentry id="qtconfig">
483 <term><command>qtconfig</command></term>
484 <listitem>
485 <para>is used to customize the appearance of Qt applications.</para>
486 <indexterm zone="qt qtconfig">
487 <primary sortas="b-qtconfig">qtconfig</primary>
488 </indexterm>
489 </listitem>
490 </varlistentry>
491
492 <varlistentry id="uic">
493 <term><command>uic</command></term>
494 <listitem>
495 <para>is a Qt user interface compiler.</para>
496 <indexterm zone="qt uic">
497 <primary sortas="b-uic">uic</primary>
498 </indexterm>
499 </listitem>
500 </varlistentry>
501
502 </variablelist>
503
504 </sect2>
505
506</sect1>
Note: See TracBrowser for help on using the repository browser.