source: x/lib/qt5-alternate.xml@ 07067aa

12.0 12.1 ken/TL2024 ken/tuningfonts lazarus plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18
Last change on this file since 07067aa was 07067aa, checked in by Xi Ruoyao <xry111@…>, 11 months ago

qt5-alternate: sed -ir should be sed -i -r

In the regex we use | which is extended regex. So the -r (or -E,
or --regexp-exteneded) option is needed. We cannot squash them into
-ir because -i[PREFIX] has a special meaning: make a backup named
tempconf[PREIX].

  • Property mode set to 100644
File size: 20.6 KB
Line 
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 <!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 "fb41d86bea6bc4886030a5092c910b09">
13 <!ENTITY qt5-size "629 MB">
14 <!ENTITY qt5-buildsize "8.7 GB (153 MB installed)">
15 <!ENTITY qt5-time "5.7 SBU (using parallelism=8)">
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">
24 <primary sortas="a-Qt">Qt</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> packeage 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 &lfs113_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="cups"/>,
123 <xref linkend="double-conversion"/>,
124 <xref linkend="hicolor-icon-theme"/>,
125 <xref linkend="libxkbcommon"/>,
126 <xref linkend="sqlite"/>, and
127 <xref linkend="xdg-utils"/>
128 </para>
129
130 <bridgehead renderas="sect4">Optional</bridgehead>
131 <para role="optional">
132 <xref linkend="mariadb"/>
133 or <ulink url="https://www.mysql.com/">MySQL</ulink>,
134 <xref linkend="postgresql"/>, and
135 <xref linkend="unixodbc"/>,
136 </para>
137 <!--
138 <para condition="html" role="usernotes">
139 Editor Notes: <ulink url="&blfs-wiki;/qt5"/>
140 </para>
141 -->
142 </sect2>
143
144 <sect2 role="qt5-prefix">
145 <title>Setting the installation prefix</title>
146
147 <bridgehead renderas="sect3">Installing in /opt/qt5</bridgehead>
148
149 <para>
150 The BLFS editors recommend installing <application>qt5</application> in a
151 directory other than <filename class="directory">/usr</filename>, i.e.
152 <filename class="directory">/opt/qt5</filename>. To do this, set the
153 following environment variable:
154 </para>
155
156<screen><userinput>export QT5PREFIX=/opt/qt5</userinput></screen>
157
158 <tip>
159 <para>
160 Sometimes, the installation paths are hardcoded into installed files.
161 This is the reason why <filename class="directory">/opt/qt5</filename>
162 is used as installation prefix instead of <filename
163 class="directory">/opt/qt-&qt5-version;</filename>. To create a
164 versioned <application>qt5</application> directory after the
165 installation is complete, you may rename the directory and create a symlink:
166 </para>
167
168<screen role="root"><userinput>mkdir -pv /opt/qt-&qt5-version;
169ln -sfnv qt-&qt5-version; /opt/qt5</userinput></screen>
170
171 <para>
172 Later on, you may want to install other versions of
173 <application>qt5</application>. To do that, just remove the symlink
174 and use <filename class="directory">/opt/qt5</filename> as the
175 prefix again. Which version of <application>qt5</application> you
176 use depends only on where the symlink points.
177 </para>
178 </tip>
179
180 </sect2>
181
182 <sect2 role="installation">
183 <title>Installation of qt5</title>
184
185 <warning>
186 <para>
187 If <application>qt5</application> is being reinstalled into the
188 same directory as an existing instance, run the commands done by
189 <systemitem class="username">root</systemitem>, such as
190 <command>make install</command>, from a console or non-qt5 based
191 window manager. It overwrites <application>qt5</application>
192 libraries that should not be in use during the install process.
193 </para>
194 </warning>
195
196 <caution>
197 <para>
198 If you did not install some of the recommended dependencies, examine
199 <command>./configure --help</command> output to check how to disable
200 them or use internal versions bundled in the source tarball.
201 </para>
202 </caution>
203
204 <note>
205 <para>
206 The BLFS editors do not recommend installing <application>qt5</application>
207 into the /usr hierarchy because it becomes difficult to find
208 components and to update to a new version. If you do want to install
209 <application>qt5</application> in /usr, the directories need to
210 be specified explicitly. In this case, set QT5PREFIX=/usr and add
211 the following to the configure arguments below:
212 </para>
213
214<screen role="nodump"><userinput> -archdatadir /usr/lib/qt5 \
215 -bindir /usr/bin \
216 -plugindir /usr/lib/qt5/plugins \
217 -importdir /usr/lib/qt5/imports \
218 -headerdir /usr/include/qt5 \
219 -datadir /usr/share/qt5 \
220 -docdir /usr/share/doc/qt5 \
221 -translationdir /usr/share/qt5/translations \
222 -examplesdir /usr/share/doc/qt5/examples</userinput></screen>
223 </note>
224
225 <para>
226 First, apply a patch to pull in the fixes curated by kde for those
227 modules which are required by packages mentioned in this book:
228 </para>
229
230<screen><userinput remap="pre">patch -Np1 -i ../qt-everywhere-opensource-src-&qt5-version;-kf5-1.patch</userinput></screen>
231
232 <para>
233 The patch is supposed to be used in a git repository, because the
234 behavior of the <command>configure</command> command below is changed
235 in this case. It is enough to create a
236 <filename class="directory">.git</filename> directory in the
237 <filename class="directory">qmake</filename> directory, where the
238 <command>configure</command> script is run:
239 </para>
240
241 <screen><userinput remap="pre">mkdir -pv qtbase/.git</userinput></screen>
242
243 <para>
244 At this point we want to set up skipping most components. Do that with:
245 </para>
246
247<screen><userinput>ls -Fd qt* | grep / | sed 's/^/-skip /;s@/@@' > tempconf &amp;&amp;
248sed -i -r '/base|tools|x11extras|svg|declarative|wayland/d' tempconf</userinput></screen>
249
250 <para>
251 Now, install <application>qt5</application> by running the following commands:
252 </para>
253
254<screen revision="sysv"><userinput>./configure -prefix $QT5PREFIX \
255 -sysconfdir /etc/xdg \
256 -confirm-license \
257 -opensource \
258 -dbus-linked \
259 -openssl-linked \
260 -system-harfbuzz \
261 -system-sqlite \
262 -nomake examples \
263 -no-rpath \
264 -syslog \
265 $(cat tempconf) \
266 &amp;&amp;
267make</userinput></screen>
268
269<screen revision="systemd"><userinput>./configure -prefix $QT5PREFIX \
270 -sysconfdir /etc/xdg \
271 -confirm-license \
272 -opensource \
273 -dbus-linked \
274 -openssl-linked \
275 -system-harfbuzz \
276 -system-sqlite \
277 -nomake examples \
278 -no-rpath \
279 -journald \
280 $(cat tempconf) \
281 &amp;&amp;
282make</userinput></screen>
283
284 <para>
285 This package does not come with a test suite.
286 </para>
287
288 <para>
289 Now, as the <systemitem class="username">root</systemitem> user:
290 </para>
291
292<screen role="root"><userinput>make install</userinput></screen>
293
294 <!-- EDITORS NOTE: This package uses INSTALL_ROOT= instead of DESTDIR= for
295 installing in a temporary directory. -->
296
297 <para>
298 Remove references to the build directory from installed library
299 dependency (prl) <!--and profile include (pri)--> files by running the following
300 command as the <systemitem class="username">root</systemitem> user:
301 </para>
302
303<screen role="root"><userinput>find $QT5PREFIX/ -name \*.prl \
304 -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;</userinput></screen>
305
306 <para>
307 Install images and create the menu entries for installed applications.
308 The <envar>QT5BINDIR</envar> variable is used here to point to the
309 directory for the executable programs. If you have changed the bindir
310 above, <envar>QT5BINDIR</envar> will need to be adjusted below. Be sure
311 that the <envar>QT5BINDIR</envar> variable is defined in root's
312 environment and as the <systemitem class="username">root</systemitem>
313 user:
314 </para>
315
316<screen role="root"><userinput>QT5BINDIR=$QT5PREFIX/bin
317
318install -v -dm755 /usr/share/pixmaps/ &amp;&amp;
319
320install -v -Dm644 qttools/src/assistant/assistant/images/assistant-128.png \
321 /usr/share/pixmaps/assistant-qt5.png &amp;&amp;
322
323install -v -Dm644 qttools/src/designer/src/designer/images/designer.png \
324 /usr/share/pixmaps/designer-qt5.png &amp;&amp;
325
326install -v -Dm644 qttools/src/linguist/linguist/images/icons/linguist-128-32.png \
327 /usr/share/pixmaps/linguist-qt5.png &amp;&amp;
328
329install -v -Dm644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer-128.png \
330 /usr/share/pixmaps/qdbusviewer-qt5.png &amp;&amp;
331
332install -dm755 /usr/share/applications &amp;&amp;
333
334cat &gt; /usr/share/applications/assistant-qt5.desktop &lt;&lt; EOF
335<literal>[Desktop Entry]
336Name=Qt5 Assistant
337Comment=Shows Qt5 documentation and examples
338Exec=$QT5BINDIR/assistant
339Icon=assistant-qt5.png
340Terminal=false
341Encoding=UTF-8
342Type=Application
343Categories=Qt;Development;Documentation;</literal>
344EOF
345
346cat &gt; /usr/share/applications/designer-qt5.desktop &lt;&lt; EOF
347<literal>[Desktop Entry]
348Name=Qt5 Designer
349GenericName=Interface Designer
350Comment=Design GUIs for Qt5 applications
351Exec=$QT5BINDIR/designer
352Icon=designer-qt5.png
353MimeType=application/x-designer;
354Terminal=false
355Encoding=UTF-8
356Type=Application
357Categories=Qt;Development;</literal>
358EOF
359
360cat &gt; /usr/share/applications/linguist-qt5.desktop &lt;&lt; EOF
361<literal>[Desktop Entry]
362Name=Qt5 Linguist
363Comment=Add translations to Qt5 applications
364Exec=$QT5BINDIR/linguist
365Icon=linguist-qt5.png
366MimeType=text/vnd.trolltech.linguist;application/x-linguist;
367Terminal=false
368Encoding=UTF-8
369Type=Application
370Categories=Qt;Development;</literal>
371EOF
372
373cat &gt; /usr/share/applications/qdbusviewer-qt5.desktop &lt;&lt; EOF
374<literal>[Desktop Entry]
375Name=Qt5 QDbusViewer
376GenericName=D-Bus Debugger
377Comment=Debug D-Bus applications
378Exec=$QT5BINDIR/qdbusviewer
379Icon=qdbusviewer-qt5.png
380Terminal=false
381Encoding=UTF-8
382Type=Application
383Categories=Qt;Development;Debugger;</literal>
384EOF</userinput></screen>
385
386 <para>
387 Some packages such as <xref linkend='vlc'/> look for certain
388 executables with a -qt5 suffix. Run the following command as the
389 <systemitem class="username">root</systemitem> user
390 to create the necessary symlinks:
391 </para>
392
393<screen role="root"><userinput>for file in moc uic rcc qmake lconvert lrelease lupdate; do
394 ln -sfrvn $QT5BINDIR/$file /usr/bin/$file-qt5
395done</userinput></screen>
396
397 </sect2>
398
399 <sect2 role="commands">
400 <title>Command Explanations</title>
401
402 <para>
403 <parameter>-confirm-license</parameter>: Accept license
404 without prompting user during configuration.
405 </para>
406
407 <para>
408 <parameter>-opensource</parameter>: Install the opensource
409 version of <application>qt</application>.
410 </para>
411
412 <para>
413 <parameter>-nomake examples</parameter>: This switch
414 disables building of the example programs included
415 in the source tarball. Remove it if you want to build
416 them.
417 </para>
418
419 <para>
420 <parameter>-system-sqlite</parameter>: This switch enables use
421 of the system version of <application>SQLite</application>.
422 </para>
423
424 <para>
425 <parameter>-system-harfbuzz</parameter>: This switch enables use
426 of the system version of <application>Harfbuzz</application>.
427 </para>
428
429 <para>
430 <parameter>-dbus-linked -openssl-linked</parameter>: These
431 switches enable explicit linking of the
432 <application>D-Bus</application> and
433 <application>OpenSSL</application> libraries into
434 <application>qt5</application> libraries instead of
435 <command>dlopen()</command>-ing them.
436 </para>
437
438 <para revision="sysv">
439 <parameter>-syslog</parameter>: This switch allows to send qt messages
440 to the <command>syslog</command> logging system.
441 </para>
442
443 <para revision="systemd">
444 <parameter>-journald</parameter>: This switch allows to send qt messages
445 to the <command>journald</command> logging system.
446 </para>
447
448 <para>
449 <parameter>-skip qtwebengine</parameter>: This switch disables building
450 the QtWebEngine. The BLFS editors have chosen to build <xref
451 linkend="qtwebengine"/> separately.
452 </para>
453 <para>
454 <command>$(cat tempconf)</command>: This command provides a list of
455 components that should not be built. These entries are in the form of
456 "-skip &lt;component&gt;".
457 </para>
458
459 </sect2>
460
461 <sect2 role="configuration">
462 <title>Configuring qt5</title>
463
464 <sect3 id="qt5-alt-config">
465 <title>Configuration Information</title>
466
467 <para>
468 If <xref linkend="sudo"/> is installed, QT5DIR should be available to
469 the super user as well. Execute the following commands as the
470 <systemitem class="username">root</systemitem> user:
471 </para>
472
473<screen role="root"><userinput>cat &gt; /etc/sudoers.d/qt &lt;&lt; "EOF"
474<literal>Defaults env_keep += QT5DIR</literal>
475EOF</userinput></screen>
476
477 <bridgehead renderas="sect4">If you installed qt5 in /usr</bridgehead>
478
479 <para>
480 If you installed <application>qt5</application> in
481 <filename class="directory">/usr</filename>, create an
482 environment variable needed by certain packages.
483 As the <systemitem class="username">root</systemitem> user:
484 </para>
485
486<screen role="nodump"><userinput>cat &gt; /etc/profile.d/qt5.sh &lt;&lt; "EOF"
487<literal># Begin /etc/profile.d/qt5.sh
488
489QT5DIR=/usr
490export QT5DIR
491
492# End /etc/profile.d/qt5.sh</literal>
493EOF</userinput></screen>
494
495 <bridgehead renderas="sect4">If you did not install qt5 in /usr</bridgehead>
496
497 <para>
498 If you installed <application>qt5</application> in a location other
499 than <filename class="directory">/usr</filename>, you need to update the
500 following configuration files so that <application>qt5</application> is
501 correctly found by other packages and system processes.
502 </para>
503
504 <para>
505 As the <systemitem class="username">root</systemitem> user, update
506 the <filename>/etc/ld.so.conf</filename> file and the dynamic linker's
507 run-time cache file:
508 </para>
509
510<screen role="root"><userinput>cat &gt;&gt; /etc/ld.so.conf &lt;&lt; EOF
511<literal># Begin Qt addition
512
513/opt/qt5/lib
514
515# End Qt addition</literal>
516EOF
517
518ldconfig</userinput></screen>
519
520 <indexterm zone="qt5 qt5-config">
521 <primary sortas="e-etc-ld.so.conf">/etc/ld.so.conf</primary>
522 </indexterm>
523
524 <para>
525 As the <systemitem class="username">root</systemitem> user, create
526 the <filename>/etc/profile.d/qt5.sh</filename> file:
527 </para>
528
529<screen role="root"><userinput>cat &gt; /etc/profile.d/qt5.sh &lt;&lt; "EOF"
530<literal># Begin /etc/profile.d/qt5.sh
531
532QT5DIR=/opt/qt5
533
534pathappend $QT5DIR/bin PATH
535pathappend $QT5DIR/lib/pkgconfig PKG_CONFIG_PATH
536
537export QT5DIR
538
539# End /etc/profile.d/qt5.sh</literal>
540EOF</userinput></screen>
541
542 </sect3>
543
544 </sect2>
545
546 <sect2 role="content">
547 <title>Contents</title>
548
549 <segmentedlist>
550 <segtitle>Installed Programs</segtitle>
551 <segtitle>Installed Libraries</segtitle>
552 <segtitle>Installed Directories</segtitle>
553
554 <seglistitem>
555 <seg>
556 assistant, designer, fixqt4headers.pl, lconvert,
557 linguist, lprodump, lrelease, lrelease-pro, lupdate, lupdate-pro,
558 moc, pixeltool, qcollectiongenerator, qdbus, qdbuscpp2xml,
559 qdbusviewer, qdbusxml2cpp, qdistancefieldgenerator, qdoc,
560 qhelpgenerator, qlalr, qmake, qml, qmlcachegen, qmleasing,
561 qmlformat, qmlimportscanner, qmllint, qmlmin, qmlplugindump,
562 qmlpreview, qmlprofiler, qmlscene, qmltestrunner, qmltime,
563 qmltyperegistrar,
564 qtattributionscanner, qtdiag, qtpaths, qtplugininfo,
565 qtwaylandscanner, qvkgen, rcc, syncqt.pl, tracegen, and
566 uic
567 </seg>
568 <seg>
569 libQt5Concurrent.so,
570 libQt5Core.so,
571 libQt5DBus.so,
572 libQt5Designer.so,
573 libQt5DesignerComponents.so,
574 libQt5EglFSDeviceIntegration.so,
575 libQt5EglFsKmsSupport.so,
576 libQt5Gui.so,
577 libQt5Help.so,
578 libQt5Network.so,
579 libQt5OpenGL.so,
580 libQt5PrintSupport.so,
581 libQt5Qml.so,
582 libQt5QmlModels.so,
583 libQt5QmlWorkerScript.so,
584 libQt5Quick.so,
585 libQt5QuickParticles.so,
586 libQt5QuickShapes.so,
587 libQt5QuickTest.so,
588 libQt5WaylandClient.so,
589 libQt5WaylandCompositor.so,
590 libQt5Widgets.so,
591 libQt5X11Extras.so,
592 libQt5XcbQpa.so,
593 libQt5Xml.so,
594 several static libraries,
595 and several plugins under /opt/qt5/{plugins,qml}
596 </seg>
597 <seg>
598 /usr/include/qt5,
599 /usr/lib/qt5,
600 /usr/share/doc/qt5, and
601 /usr/share/qt5
602 OR
603 /opt/qt5 and
604 /opt/qt-&qt5-version;
605 </seg>
606 </seglistitem>
607 </segmentedlist>
608
609 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
610 <para>See <xref linkend="qt5-descriptions"/></para>
611
612
613 </sect2>
614
615</sect1>
Note: See TracBrowser for help on using the repository browser.