source: x/lib/qt5-alternate.xml@ b335a90

12.1 ken/TL2024 lazarus trunk xry111/llvm18
Last change on this file since b335a90 was ab4fdfc, checked in by Pierre Labastie <pierre.labastie@…>, 5 months ago

Change all xml decl to encoding=utf-8

  • Property mode set to 100644
File size: 21.8 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
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 <!ENTITY qt5-major "5.15">
8 <!ENTITY qt5-url "https://download.qt.io/archive/qt/&qt5-major;/&qt5-version;/single">
9
10 <!ENTITY qt5-download-http "&qt5-url;/qt-everywhere-opensource-src-&qt5-version;.tar.xz">
11 <!ENTITY qt5-download-ftp " ">
12 <!ENTITY qt5-md5sum "3fb1cd4f763f5d50d491508b7b99fb77">
13 <!ENTITY qt5-size "630 MB">
14 <!ENTITY qt5-buildsize "8.5 GB (154 MB installed)">
15 <!ENTITY qt5-time "7.4 SBU (using parallelism=4)">
16]>
17
18<sect1 id="qt5-alternate" xreflabel="qt-alternate-&qt5-version;">
19 <?dbhtml filename="qt5-alternate.html" ?>
20
21 <title>qt-alternate-&qt5-version;</title>
22
23 <indexterm zone="qt5-alternate">
24 <primary sortas="a-Qt5-alternate">Qt Alternate</primary>
25 </indexterm>
26
27 <sect2 role="package">
28 <title>Introduction to qt5 (alternate)</title>
29
30 <para>
31 <application>Qt5</application> is a cross-platform application framework
32 that is widely used for developing application software with a graphical
33 user interface (GUI) (in which cases <application>qt5</application> is
34 classified as a widget toolkit), and also used for developing non-GUI
35 programs such as command-line tools and consoles for servers. Two of the
36 major users of <application>qt</application> are <application>KDE
37 Frameworks 5 (KF5)</application> and <application>LXQt</application>.
38 </para>
39
40 <important>
41 <para>
42 The full <application>qt5</application> package consists of 43 separate
43 components. These instructions use a small subset of the full
44 <application>qt5</application> installation instructions above.
45 They cover most, but not all, of the components needed to build
46 packages in BLFS. This page, and the next, are provided to
47 reduce the amount of time, space, and dependencies needed
48 to build these packages. They are not recommended if you will build
49 the <xref linkend="kf5-frameworks"/> based <xref linkend="plasma5-build"/> desktop
50 environment.
51 </para>
52 </important>
53
54 &lfs120_checked;
55
56 <bridgehead renderas="sect3">Package Information</bridgehead>
57 <itemizedlist spacing="compact">
58 <listitem>
59 <para>
60 Download (HTTP): <ulink url="&qt5-download-http;"/>
61 </para>
62 </listitem>
63 <listitem>
64 <para>
65 Download (FTP): <ulink url="&qt5-download-ftp;"/>
66 </para>
67 </listitem>
68 <listitem>
69 <para>
70 Download MD5 sum: &qt5-md5sum;
71 </para>
72 </listitem>
73 <listitem>
74 <para>
75 Download size: &qt5-size;
76 </para>
77 </listitem>
78 <listitem>
79 <para>
80 Estimated disk space required: &qt5-buildsize;
81 </para>
82 </listitem>
83 <listitem>
84 <para>
85 Estimated build time: &qt5-time;
86 </para>
87 </listitem>
88 </itemizedlist>
89
90 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
91 <itemizedlist spacing="compact">
92 <listitem>
93 <para>
94 Now that <application>qt5</application> updates are restricted to
95 commercial customers, upstream patches for the various modules are
96 being curated at kde.
97 Patches for the modules required by packages in BLFS have been
98 aggregated for the non-modular qt5 build we use.
99 </para>
100 <para>
101 Required patch:
102 <ulink url="&patch-root;/qt-everywhere-opensource-src-&qt5-version;-kf5-1.patch"/>
103 </para>
104 <para>
105 Details of the kde curation can be found at
106 <ulink url="https://dot.kde.org/2021/04/06/announcing-kdes-qt-5-patch-collection"/>
107 and <ulink url="https://community.kde.org/Qt5PatchCollection"/>.
108 </para>
109 </listitem>
110 </itemizedlist>
111
112 <bridgehead renderas="sect3">qt5 Dependencies</bridgehead>
113
114 <bridgehead renderas="sect4">Required</bridgehead>
115 <para role="required">
116 <xref linkend="xorg7-lib"/>
117 </para>
118
119 <bridgehead renderas="sect4">Recommended</bridgehead>
120 <para role="recommended">
121 <xref linkend="alsa-lib"/>,
122 <xref linkend="at-spi2-core"/>,
123 <xref linkend="cups"/>,
124 <phrase revision='sysv'><xref linkend="dbus"/>,</phrase>
125 <xref linkend="double-conversion"/>,
126 <xref linkend="glib2"/>,
127 <xref linkend="harfbuzz"/>,
128 <xref linkend="icu"/>,
129 <xref linkend="hicolor-icon-theme"/>,
130 <xref linkend="mesa"/>,
131 <xref linkend="libjpeg"/>,
132 <xref linkend="libxkbcommon"/>,
133 <xref linkend="sqlite"/>,
134 <xref linkend="wayland"/> (<application>Mesa</application>
135 must be built with <application>Wayland</application> EGL
136 backend),
137 <xref linkend="xcb-util-image"/>,
138 <xref linkend="xcb-util-keysyms"/>,
139 <xref linkend="xcb-util-renderutil"/>, and
140 <xref linkend="xcb-util-wm"/>
141 </para>
142
143 <bridgehead renderas="sect4">Optional</bridgehead>
144 <para role="optional">
145 <xref linkend="gtk3"/>,
146 <xref linkend="libinput"/>
147 <xref linkend="mariadb"/>
148 or <ulink url="https://www.mysql.com/">MySQL</ulink>,
149 <xref linkend="mitkrb"/>,
150 <xref linkend="mtdev"/>
151 <xref linkend="postgresql"/>, and
152 <xref linkend="unixodbc"/>
153 </para>
154
155 </sect2>
156
157 <sect2 role="qt5-prefix">
158 <title>Setting the installation prefix</title>
159
160 <bridgehead renderas="sect3">Installing in /opt/qt5</bridgehead>
161
162 <para>
163 The BLFS editors recommend installing <application>qt5</application> in a
164 directory other than <filename class="directory">/usr</filename>, i.e.
165 <filename class="directory">/opt/qt5</filename>. To do this, set the
166 following environment variable:
167 </para>
168
169<screen><userinput>export QT5PREFIX=/opt/qt5</userinput></screen>
170
171 <tip>
172 <para>
173 Sometimes, the installation paths are hardcoded into installed files.
174 This is the reason why <filename class="directory">/opt/qt5</filename>
175 is used as installation prefix instead of <filename
176 class="directory">/opt/qt-&qt5-version;</filename>. To create a
177 versioned <application>qt5</application> directory after the
178 installation is complete, you may rename the directory and create a symlink:
179 </para>
180
181<screen role="root"><userinput>mkdir -pv /opt/qt-&qt5-version;
182ln -sfnv qt-&qt5-version; /opt/qt5</userinput></screen>
183
184 <para>
185 Later on, you may want to install other versions of
186 <application>qt5</application>. To do that, just remove the symlink
187 and use <filename class="directory">/opt/qt5</filename> as the
188 prefix again. Which version of <application>qt5</application> you
189 use depends only on where the symlink points.
190 </para>
191 </tip>
192
193 </sect2>
194
195 <sect2 role="installation">
196 <title>Installation of qt5</title>
197
198 <warning>
199 <para>
200 If <application>qt5</application> is being reinstalled into the
201 same directory as an existing instance, run the commands done by
202 <systemitem class="username">root</systemitem>, such as
203 <command>make install</command>, from a console or non-qt5 based
204 window manager. It overwrites <application>qt5</application>
205 libraries that should not be in use during the install process.
206 </para>
207 </warning>
208
209 <caution>
210 <para>
211 If you did not install some of the recommended dependencies, examine
212 <command>./configure --help</command> output to check how to disable
213 them or use internal versions bundled in the source tarball.
214 </para>
215 </caution>
216
217 <note>
218 <para>
219 The BLFS editors do not recommend installing
220 <application>qt5</application> into the
221 <filename class="directory">/usr</filename> hierarchy because it
222 becomes difficult to find components and to update to a new version.
223 If you do want to install <application>qt5</application> in
224 <filename class="directory">/usr</filename>, the directories need to
225 be specified explicitly. In this case, set
226 <envar>QT5PREFIX=/usr</envar> and add the following to the configure
227 arguments below:
228 </para>
229
230<screen role="nodump"><userinput> -archdatadir /usr/lib/qt5 \
231 -bindir /usr/bin \
232 -plugindir /usr/lib/qt5/plugins \
233 -importdir /usr/lib/qt5/imports \
234 -headerdir /usr/include/qt5 \
235 -datadir /usr/share/qt5 \
236 -docdir /usr/share/doc/qt5 \
237 -translationdir /usr/share/qt5/translations \
238 -examplesdir /usr/share/doc/qt5/examples</userinput></screen>
239 </note>
240
241 <para>
242 Now apply a patch to pull in the fixes curated by kde for those
243 modules which are required by packages mentioned in this book:
244 </para>
245
246<screen><userinput remap="pre">patch -Np1 -i ../qt-everywhere-opensource-src-&qt5-version;-kf5-1.patch</userinput></screen>
247
248 <para>
249 The patch is supposed to be used in a git repository. Otherwise some
250 files that should be modified by <command>configure</command> after
251 applying the patch are not touched. Fortunately, it is enough to create a
252 <filename class="directory">.git</filename> directory in the
253 <filename class="directory">qmake</filename> directory where the
254 <command>configure</command> script is run:
255 </para>
256
257 <screen><userinput remap="pre">mkdir -pv qtbase/.git</userinput></screen>
258
259 <para>
260 At this point we want to set up skipping most components. Do that with:
261 </para>
262
263<screen><userinput>ls -Fd qt* | grep / | sed 's/^/-skip /;s@/@@' > tempconf &amp;&amp;
264sed -i -r '/base|tools|x11extras|svg|declarative|wayland/d' tempconf</userinput></screen>
265
266 <para>
267 Now, install <application>qt5</application> by running the following
268 commands:
269 </para>
270
271<screen revision="sysv"><userinput>./configure -prefix $QT5PREFIX \
272 -sysconfdir /etc/xdg \
273 -confirm-license \
274 -opensource \
275 -dbus-linked \
276 -openssl-linked \
277 -system-harfbuzz \
278 -system-sqlite \
279 -nomake examples \
280 -no-rpath \
281 -syslog \
282 $(cat tempconf) \
283 &amp;&amp;
284make</userinput></screen>
285
286<screen revision="systemd"><userinput>./configure -prefix $QT5PREFIX \
287 -sysconfdir /etc/xdg \
288 -confirm-license \
289 -opensource \
290 -dbus-linked \
291 -openssl-linked \
292 -system-harfbuzz \
293 -system-sqlite \
294 -nomake examples \
295 -no-rpath \
296 -journald \
297 $(cat tempconf) \
298 &amp;&amp;
299make</userinput></screen>
300
301 <para>
302 This package does not come with a test suite.
303 </para>
304
305 <para>
306 Now, as the <systemitem class="username">root</systemitem> user:
307 </para>
308
309<screen role="root"><userinput>make install</userinput></screen>
310
311 <!-- EDITORS NOTE: This package uses INSTALL_ROOT= instead of DESTDIR= for
312 installing in a temporary directory. -->
313
314 <para>
315 Remove references to the build directory from installed library
316 dependency (prl) files by running the following
317 command as the <systemitem class="username">root</systemitem> user:
318 </para>
319
320<screen role="root"><userinput>find $QT5PREFIX/ -name \*.prl \
321 -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;</userinput></screen>
322
323 <para>
324 Install images and create the menu entries for installed applications.
325 The <envar>QT5BINDIR</envar> variable is used here to point to the
326 directory for the executable programs. If you have changed the bindir
327 above, <envar>QT5BINDIR</envar> will need to be adjusted below. Be sure
328 that the <envar>QT5BINDIR</envar> variable is defined in root's
329 environment and as the <systemitem class="username">root</systemitem>
330 user:
331 </para>
332
333<screen role="root"><userinput>QT5BINDIR=$QT5PREFIX/bin
334
335install -v -dm755 /usr/share/pixmaps/ &amp;&amp;
336
337install -v -Dm644 qttools/src/assistant/assistant/images/assistant-128.png \
338 /usr/share/pixmaps/assistant-qt5.png &amp;&amp;
339
340install -v -Dm644 qttools/src/designer/src/designer/images/designer.png \
341 /usr/share/pixmaps/designer-qt5.png &amp;&amp;
342
343install -v -Dm644 qttools/src/linguist/linguist/images/icons/linguist-128-32.png \
344 /usr/share/pixmaps/linguist-qt5.png &amp;&amp;
345
346install -v -Dm644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer-128.png \
347 /usr/share/pixmaps/qdbusviewer-qt5.png &amp;&amp;
348
349install -dm755 /usr/share/applications &amp;&amp;
350
351cat &gt; /usr/share/applications/assistant-qt5.desktop &lt;&lt; EOF
352<literal>[Desktop Entry]
353Name=Qt5 Assistant
354Comment=Shows Qt5 documentation and examples
355Exec=$QT5BINDIR/assistant
356Icon=assistant-qt5.png
357Terminal=false
358Encoding=UTF-8
359Type=Application
360Categories=Qt;Development;Documentation;</literal>
361EOF
362
363cat &gt; /usr/share/applications/designer-qt5.desktop &lt;&lt; EOF
364<literal>[Desktop Entry]
365Name=Qt5 Designer
366GenericName=Interface Designer
367Comment=Design GUIs for Qt5 applications
368Exec=$QT5BINDIR/designer
369Icon=designer-qt5.png
370MimeType=application/x-designer;
371Terminal=false
372Encoding=UTF-8
373Type=Application
374Categories=Qt;Development;</literal>
375EOF
376
377cat &gt; /usr/share/applications/linguist-qt5.desktop &lt;&lt; EOF
378<literal>[Desktop Entry]
379Name=Qt5 Linguist
380Comment=Add translations to Qt5 applications
381Exec=$QT5BINDIR/linguist
382Icon=linguist-qt5.png
383MimeType=text/vnd.trolltech.linguist;application/x-linguist;
384Terminal=false
385Encoding=UTF-8
386Type=Application
387Categories=Qt;Development;</literal>
388EOF
389
390cat &gt; /usr/share/applications/qdbusviewer-qt5.desktop &lt;&lt; EOF
391<literal>[Desktop Entry]
392Name=Qt5 QDbusViewer
393GenericName=D-Bus Debugger
394Comment=Debug D-Bus applications
395Exec=$QT5BINDIR/qdbusviewer
396Icon=qdbusviewer-qt5.png
397Terminal=false
398Encoding=UTF-8
399Type=Application
400Categories=Qt;Development;Debugger;</literal>
401EOF</userinput></screen>
402
403 <para>
404 Some packages such as <xref linkend='vlc'/> look for certain
405 executables with a -qt5 suffix. Run the following command as the
406 <systemitem class="username">root</systemitem> user
407 to create the necessary symlinks:
408 </para>
409
410<screen role="root"><userinput>for file in moc uic rcc qmake lconvert lrelease lupdate; do
411 ln -sfvn $QT5BINDIR/$file /usr/bin/$file-qt5
412done</userinput></screen>
413
414 </sect2>
415
416 <sect2 role="commands">
417 <title>Command Explanations</title>
418
419 <para>
420 <parameter>-confirm-license</parameter>: Accept license
421 without prompting user during configuration.
422 </para>
423
424 <para>
425 <parameter>-opensource</parameter>: Install the opensource
426 version of <application>qt</application>.
427 </para>
428
429 <para>
430 <parameter>-nomake examples</parameter>: This switch
431 disables building of the example programs included
432 in the source tarball. Remove it if you want to build
433 them.
434 </para>
435
436 <para>
437 <parameter>-system-sqlite</parameter>: This switch enables use
438 of the system version of <application>SQLite</application>.
439 </para>
440
441 <para>
442 <parameter>-system-harfbuzz</parameter>: This switch enables use
443 of the system version of <application>Harfbuzz</application>.
444 </para>
445
446 <para>
447 <parameter>-dbus-linked</parameter>
448 <parameter>-openssl-linked</parameter>: These
449 switches enable explicit linking of the
450 <application>D-Bus</application> and
451 <application>OpenSSL</application> libraries into
452 <application>qt5</application> libraries instead of
453 <command>dlopen()</command>-ing them.
454 </para>
455
456 <para revision="sysv">
457 <parameter>-syslog</parameter>: This switch allows to send qt messages
458 to the <command>syslog</command> logging system.
459 </para>
460
461 <para revision="systemd">
462 <parameter>-journald</parameter>: This switch allows to send qt messages
463 to the <command>journald</command> logging system.
464 </para>
465
466 <para>
467 <command>$(cat tempconf)</command>: This command provides a list of
468 components that should not be built. These entries are in the form of
469 "-skip &lt;component&gt;".
470 </para>
471
472 </sect2>
473
474 <sect2 role="configuration">
475 <title>Configuring qt5</title>
476
477 <sect3 id="qt5-alt-config">
478 <title>Configuration Information</title>
479
480 <para>
481 If <xref linkend="sudo"/> is installed, QT5DIR should be available to
482 the super user as well. Execute the following commands as the
483 <systemitem class="username">root</systemitem> user:
484 </para>
485
486<screen role="root"><userinput>cat &gt; /etc/sudoers.d/qt &lt;&lt; "EOF"
487<literal>Defaults env_keep += QT5DIR</literal>
488EOF</userinput></screen>
489
490 <bridgehead renderas="sect4">If you installed qt5 in /usr</bridgehead>
491
492 <para>
493 If you installed <application>qt5</application> in
494 <filename class="directory">/usr</filename>, create an
495 environment variable needed by certain packages.
496 As the <systemitem class="username">root</systemitem> user:
497 </para>
498
499<screen role="nodump"><userinput>cat &gt; /etc/profile.d/qt5.sh &lt;&lt; "EOF"
500<literal># Begin /etc/profile.d/qt5.sh
501
502QT5DIR=/usr
503export QT5DIR
504
505# End /etc/profile.d/qt5.sh</literal>
506EOF</userinput></screen>
507
508 <bridgehead renderas="sect4">If you did not install qt5 in /usr</bridgehead>
509
510 <para>
511 If you installed <application>qt5</application> in a location other
512 than <filename class="directory">/usr</filename>, you need to update the
513 following configuration files so that <application>qt5</application> is
514 correctly found by other packages and system processes.
515 </para>
516
517 <para>
518 As the <systemitem class="username">root</systemitem> user, update
519 the <filename>/etc/ld.so.conf</filename> file and the dynamic linker's
520 run-time cache file:
521 </para>
522
523<screen role="root"><userinput>cat &gt;&gt; /etc/ld.so.conf &lt;&lt; EOF
524<literal># Begin Qt addition
525
526/opt/qt5/lib
527
528# End Qt addition</literal>
529EOF
530
531ldconfig</userinput></screen>
532
533 <indexterm zone="qt5 qt5-config">
534 <primary sortas="e-etc-ld.so.conf">/etc/ld.so.conf</primary>
535 </indexterm>
536
537 <para>
538 As the <systemitem class="username">root</systemitem> user, create
539 the <filename>/etc/profile.d/qt5.sh</filename> file:
540 </para>
541
542<screen role="root"><userinput>cat &gt; /etc/profile.d/qt5.sh &lt;&lt; "EOF"
543<literal># Begin /etc/profile.d/qt5.sh
544
545QT5DIR=/opt/qt5
546
547pathappend $QT5DIR/bin PATH
548pathappend $QT5DIR/lib/pkgconfig PKG_CONFIG_PATH
549
550export QT5DIR
551
552# End /etc/profile.d/qt5.sh</literal>
553EOF</userinput></screen>
554
555 </sect3>
556
557 </sect2>
558
559 <sect2 role="content">
560 <title>Contents</title>
561
562 <segmentedlist>
563 <segtitle>Installed Programs</segtitle>
564 <segtitle>Installed Libraries</segtitle>
565 <segtitle>Installed Directories</segtitle>
566
567 <seglistitem>
568 <seg>
569 assistant, designer, fixqt4headers.pl, lconvert,
570 linguist, lprodump, lrelease, lrelease-pro, lupdate, lupdate-pro,
571 moc, pixeltool, qcollectiongenerator, qdbus, qdbuscpp2xml,
572 qdbusviewer, qdbusxml2cpp, qdistancefieldgenerator, qdoc,
573 qhelpgenerator, qlalr, qmake, qml, qmlcachegen, qmleasing,
574 qmlformat, qmlimportscanner, qmllint, qmlmin, qmlplugindump,
575 qmlpreview, qmlprofiler, qmlscene, qmltestrunner, qmltime,
576 qmltyperegistrar,
577 qtattributionscanner, qtdiag, qtpaths, qtplugininfo,
578 qtwaylandscanner, qvkgen, rcc, syncqt.pl, tracegen, and
579 uic
580 </seg>
581 <seg>
582 libQt5AccessibilitySupport.a,
583 libQt5Bootstrap.a,
584 libQt5Concurrent.so,
585 libQt5Core.so,
586 libQt5DBus.so,
587 libQt5Designer.so,
588 libQt5DesignerComponents.so,
589 libQt5DeviceDiscoverySupport.a,
590 libQt5EdidSupport.a,
591 libQt5EglFSDeviceIntegration.so,
592 libQt5EglFsKmsSupport.so,
593 libQt5EglSupport.a,
594 libQt5EventDispatcherSupport.a,
595 libQt5FbSupport.a,
596 libQt5FontDatabaseSupport.a,
597 libQt5GlxSupport.a,
598 libQt5Gui.so,
599 libQt5Help.so,
600 libQt5InputSupport.a,
601 libQt5KmsSupport.a,
602 libQt5LinuxAccessibilitySupport.a,
603 libQt5Network.so,
604 libQt5OpenGL.so,
605 libQt5OpenGLExtensions.a,
606 libQt5PacketProtocol.a,
607 libQt5PlatformCompositorSupport.a,
608 libQt5PrintSupport.so,
609 libQt5Qml.so,
610 libQt5QmlDebug.a,
611 libQt5QmlDevTools.a,
612 libQt5QmlModels.so,
613 libQt5QmlWorkerScript.so,
614 libQt5Quick.so,
615 libQt5QuickParticles.so,
616 libQt5QuickShapes.so,
617 libQt5QuickTest.so,
618 libQt5QuickWidgets.so,
619 libQt5ServiceSupport.a,
620 libQt5Sql.so,
621 libQt5Svg.so,
622 libQt5Test.so,
623 libQt5ThemeSupport.a,
624 libQt5UiTools.a,
625 libQt5WaylandClient.so,
626 libQt5WaylandCompositor.so,
627 libQt5Widgets.so,
628 libQt5X11Extras.so,
629 libQt5XcbQpa.so,
630 libQt5XkbCommonSupport.a,
631 libQt5Xml.so,
632 and several plugins under /opt/qt5/{plugins,qml}
633 </seg>
634 <seg>
635 /usr/include/qt5,
636 /usr/lib/qt5,
637 /usr/share/doc/qt5, and
638 /usr/share/qt5
639 OR
640 /opt/qt5 and
641 /opt/qt-&qt5-version;
642 </seg>
643 </seglistitem>
644 </segmentedlist>
645
646 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
647 <para>See <xref linkend="qt5-descriptions"/></para>
648
649 </sect2>
650
651</sect1>
Note: See TracBrowser for help on using the repository browser.