source: x/lib/qt.xml@ 3f5f915

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 3f5f915 was 3f5f915, checked in by Manuel Canales Esparcia <manuel@…>, 18 years ago

Typo fix. X.

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

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