- Timestamp:
- 10/27/2014 07:14:26 PM (10 years ago)
- Branches:
- krejzi/svn
- Children:
- fe7679cd
- Parents:
- d72fae5a
- Location:
- x/lib
- Files:
-
- 1 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
x/lib/lib.xml
rd72fae5a r7aff5814 56 56 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pango.xml"/> 57 57 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pangomm.xml"/> 58 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="qt4 .xml"/>59 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="qt5 .xml"/>58 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="qt4-systemd.xml"/> 59 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="qt5-systemd.xml"/> 60 60 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="startup-notification.xml"/> 61 61 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="webkitgtk2.xml"/> -
x/lib/qt4-systemd.xml
rd72fae5a r7aff5814 29 29 30 30 <sect2 role="package"> 31 <title>Introduction to Qt </title>32 33 <para> 34 <application>Qt </application> is a cross-platform application31 <title>Introduction to Qt4</title> 32 33 <para> 34 <application>Qt4</application> is a cross-platform application 35 35 framework that is widely used for developing application software 36 with a graphical user interface (GUI) (in which cases Qt is classified 37 as a widget toolkit), and also used for developing non-GUI programs such 38 as command-line tools and consoles for servers. One of the major users 39 of <application>Qt</application> is <application>KDE</application>. 36 with a graphical user interface (GUI) (in which cases 37 <application>Qt4</application> is classifiedas a widget toolkit), and 38 also used for developing non-GUI programs such as command-line tools 39 and consoles for servers. One of the major users 40 of <application>Qt4</application> is <application>KDE</application>. 40 41 </para> 41 42 … … 76 77 </itemizedlist> 77 78 78 <bridgehead renderas="sect3">Qt Dependencies</bridgehead>79 <bridgehead renderas="sect3">Qt4 Dependencies</bridgehead> 79 80 80 81 <bridgehead renderas="sect4">Required</bridgehead> … … 110 111 </para> 111 112 113 <bridgehead renderas="sect4">Runtime Dependency</bridgehead> 114 <para role="optional"> 115 <xref linkend="qtchooser"/> (required if installing both 116 Qt4 and Qt5) 117 </para> 118 112 119 <para condition="html" role="usernotes">User Notes: 113 120 <ulink url="&blfs-wiki;/qt4"/> … … 115 122 </sect2> 116 123 117 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../../xincludes/qt-alternatives.xml"/> 124 125 <sect2 role="qt4-prefix"> 126 <title>Setting the installation prefix</title> 127 128 <bridgehead renderas="sect3">Installing in /usr</bridgehead> 129 130 <para> 131 If you want to install <application>Qt4</application> 132 in <filename class="directory">/usr</filename>, set the 133 following environment variable: 134 </para> 135 136 <screen><userinput>export QT4PREFIX=/usr</userinput></screen> 137 138 <para> 139 The advantage of installing in 140 <filename class="directory">/usr</filename> is that no additional 141 configuration is required. The package files are distributed 142 within several subdirectories of the 143 <filename class="directory">/usr</filename> hierarchy. This is 144 the method that most distributions use. The disadvantage for BLFS 145 users is that this <application>Qt4</application> instance cannot 146 be upgraded while it is in use. It also does not allow reverting 147 to an existing, known working instance of 148 <application>Qt4</application>. 149 </para> 150 151 <bridgehead renderas="sect3">Installing in /opt/qt4</bridgehead> 152 153 <para> 154 If you want to install <application>Qt4</application> 155 in a directory other than <filename 156 class="directory">/usr</filename>, ie 157 <filename class="directory">/opt/qt4</filename>, set 158 the following environment variable: 159 </para> 160 161 <screen><userinput>export QT4PREFIX=/opt/qt4</userinput></screen> 162 163 <para> 164 The advantage of installing <application>Qt4</application> in a 165 custom directory such as <filename 166 class="directory">/opt/qt4</filename> is that it keeps all the 167 package files consolidated in a dedicated directory hierarchy. By 168 using this method, an update can be made without overwriting a 169 previous installation and users can easily revert to a previous 170 version by changing one symbolic link or merely changing the 171 PATH variable. 172 </para> 173 174 <tip> 175 <para> 176 Sometimes, the installation paths are hardcoded into installed files. 177 This is the reason why <filename class="directory">/opt/qt4</filename> 178 is used as installation prefix instead of <filename 179 class="directory">/opt/qt-&qt4-version;</filename>. After installing 180 <application>Qt4</application>, you may rename the directory and 181 create a symlink: 182 </para> 183 184 <screen role="root"><userinput>mv /opt/qt{4,-&qt4-version;} 185 ln -sfv qt-&qt4-version; /opt/qt4</userinput></screen> 186 187 <para> 188 Later on, you may want to install other versions of 189 <application>Qt4</application>. To do that, just remove the symlink 190 and use <filename class="directory">/opt/qt4</filename> as the 191 prefix again. Which version of <application>Qt4</application> you 192 use depends only on where the symlink points to. 193 </para> 194 </tip> 195 196 <bridgehead renderas="sect3">Setting the install location for executables</bridgehead> 197 198 <para> 199 Both <application>Qt4</application> and 200 <application>Qt5</application> executables have 201 the same names and will overwrite each other if 202 they are installed in the same prefix. To overcome 203 such problem, BLFS offers <xref linkend="qtchooser"/>, 204 an utility used to switch between different 205 <application>Qt</application> versions. 206 </para> 207 208 <para> 209 If <xref linkend="qtchooser"/> is to be used or 210 if installing both <application>Qt4</application> 211 and <application>Qt5</application> in 212 <filename class="directory">/usr</filename>, the 213 executables need to be installed to a non-standard 214 location in order to avoid the conflict with 215 <application>Qt5</application> ones. To accomplish 216 that, set the following environment variable: 217 </para> 218 219 <screen><userinput>export QT4BINDIR=$QT4PREFIX/lib/qt4/bin</userinput></screen> 220 221 <para> 222 If you choose not to install <xref linkend="qtchooser"/> 223 or if you are not going to install 224 <application>Qt5</application>, simply set the bindir to 225 a <filename class="directory">bin</filename> subdir of the 226 default prefix by setting the following environment variable: 227 </para> 228 229 <screen><userinput>export QT4BINDIR=$QT4PREFIX/bin</userinput></screen> 230 231 </sect2> 118 232 119 233 <sect2 role="installation"> 120 <title>Installation of Qt </title>234 <title>Installation of Qt4</title> 121 235 122 236 <caution> … … 155 269 src/gui/image/qgifhandler.cpp</userinput></screen> 156 270 157 <!-- ==== Method 1 ====== --> 158 <bridgehead renderas="sect3">Method 1: Installing in /usr</bridgehead> 159 160 <para> 161 Install <application>Qt4</application> into the <filename 162 class='directory'>/usr</filename> hierarchy by running the following 163 commands: 164 </para> 165 166 <screen><userinput>export QT4LINK=/usr 167 168 sed -i -e "/#if/d" -e "/#error/d" -e "/#endif/d" \ 271 <para> 272 Install <application>Qt4</application> by running the 273 following commands: 274 </para> 275 276 <screen><userinput>sed -i -e "/#if/d" -e "/#error/d" -e "/#endif/d" \ 169 277 config.tests/unix/libmng/libmng.cpp && 170 278 … … 172 280 src/3rdparty/webkit/Source/WebKit2/DerivedSources.pro && 173 281 174 ./configure -prefix /usr\175 - bindir /usr/bin\176 - plugindir /usr/lib/qt4/plugins\177 - importdir /usr/lib/qt4/imports\178 - headerdir /usr/include/qt4\179 - datadir /usr/share/qt4\180 - sysconfdir /etc/xdg\181 -docdir /usr/share/doc/qt4\182 - demosdir /usr/share/doc/qt4/demos\183 - examplesdir /usr/share/doc/qt4/examples\184 - translationdir /usr/share/qt4/translations \282 ./configure -prefix $QT4PREFIX \ 283 -sysconfdir /etc/xdg \ 284 -bindir $QT4BINDIR \ 285 -plugindir $QT4PREFIX/lib/qt4/plugins \ 286 -importdir $QT4PREFIX/lib/qt4/imports \ 287 -headerdir $QT4PREFIX/include/qt4 \ 288 -datadir $QT4PREFIX/share/qt4 \ 289 -docdir $QT4PREFIX/share/doc/qt4 \ 290 -translationdir $QT4PREFIX/share/qt4/translations \ 291 -demosdir $QT4PREFIX/share/doc/qt4/demos \ 292 -examplesdir $QT4PREFIX/share/doc/qt4/examples \ 185 293 -confirm-license \ 186 294 -opensource \ … … 191 299 -no-phonon \ 192 300 -no-phonon-backend \ 193 -no-nis \194 301 -no-openvg \ 195 302 -nomake demos \ … … 211 318 <screen><userinput>find . -name "*.pc" -exec perl -pi -e "s, -L$PWD/?\S+,,g" {} \;</userinput></screen> 212 319 213 <para>Now as the <systemitem class="username">root</systemitem> user:</para> 320 <warning> 321 <para> 322 Make sure that <envar>QT4PREFIX</envar> and <envar>QT4BINDIR</envar> 323 environment variables are set for the 324 <systemitem class="username">root</systemitem> user too. 325 </para> 326 </warning> 327 328 <para> 329 Now, as the <systemitem class="username">root</systemitem> user: 330 </para> 214 331 215 332 <screen role="root"><userinput>make install && 216 rm -rf /usr/tests</userinput></screen>333 rm -rf $QT4PREFIX/tests</userinput></screen> 217 334 218 335 <para> … … 226 343 ScriptTools Sql Svg Test UiTools WebKit XmlPatterns Xml phonon; do 227 344 228 [ -e /usr/lib/libQt${file}.prl ] &&345 [ -e $QT4PREFIX/lib/libQt${file}.prl ] && 229 346 sed -r '/^QMAKE_PRL_BUILD_DIR/d;s/(QMAKE_PRL_LIBS =).*/\1/' \ 230 -i /usr/lib/libQt${file}.prl347 -i $QT4PREFIX/lib/libQt${file}.prl 231 348 done 232 349 unset file</userinput></screen> 233 350 234 <!-- ==== Method 2 ====== --> 235 <bridgehead renderas="sect3">Method 2: Installing in /opt/qt-&qt4-version;</bridgehead> 236 237 <para> 238 This section provides for installing Qt4 almost all of the files in the 239 <filename class="directory">/opt</filename> directory. 240 </para> 241 242 <screen><userinput>export QT4DIR=/opt/qt-&qt4-version; && 243 export QT4LINK=/opt/qt4 && 244 245 sed -i -e "/#if/d" -e "/#error/d" -e "/#endif/d" \ 246 config.tests/unix/libmng/libmng.cpp && 247 248 sed -i '/CONFIG -/ a\isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../..' \ 249 src/3rdparty/webkit/Source/WebKit2/DerivedSources.pro && 250 251 ./configure -prefix $QT4DIR \ 252 -sysconfdir /etc/xdg \ 253 -confirm-license \ 254 -opensource \ 255 -release \ 256 -dbus-linked \ 257 -openssl-linked \ 258 -system-sqlite \ 259 -plugin-sql-sqlite \ 260 -no-phonon \ 261 -no-phonon-backend \ 262 -no-nis \ 263 -no-openvg \ 264 -nomake demos \ 265 -nomake examples \ 266 -optimized-qmake && 267 268 make</userinput></screen> 269 270 <para> 271 Now, as the <systemitem class="username">root</systemitem> user: 272 </para> 273 274 <screen role="root"><userinput>make install 275 ln -svfn $QT4DIR /opt/qt4</userinput></screen> 276 277 <para> 278 Remove references to the build directory from installed files by 279 running the following command as the 280 <systemitem class="username">root</systemitem> user: 281 </para> 282 283 <screen role="root"><userinput>for file in `basename -a -s .prl $QT4DIR/lib/lib*.prl`; do 284 sed -r -e '/^QMAKE_PRL_BUILD_DIR/d' \ 285 -e 's/(QMAKE_PRL_LIBS =).*/\1/' \ 286 -i $QT4DIR/lib/${file}.prl 287 288 perl -pi -e "s, -L$PWD/?\S+,,g" $QT4DIR/lib/pkgconfig/${file##lib}.pc 289 done 290 291 unset file</userinput></screen> 292 293 <!-- ==== Common ====== --> 294 <bridgehead renderas="sect3">Continuing for Both Methods</bridgehead> 295 296 <para> 297 For all methods, install images and create the menu entries 298 for installed applications. Be sure that the <envar>QT4LINK</envar> 299 variable is defined in root's environment and 300 as the <systemitem class="username">root</systemitem> user: 301 </para> 351 <para> 352 Install images and create the menu entries for installed 353 applications by running the following commands 354 as the <systemitem class="username">root</systemitem> user: 355 </para> 302 356 303 357 <screen role="root"><userinput>install -v -Dm644 src/gui/dialogs/images/qtlogo-64.png \ 304 /usr/share/pixmaps/qt4logo.png 358 /usr/share/pixmaps/qt4logo.png && 305 359 306 360 install -v -Dm644 tools/assistant/tools/assistant/images/assistant-128.png \ … … 308 362 309 363 install -v -Dm644 tools/designer/src/designer/images/designer.png \ 310 /usr/share/pixmaps/designer-qt4.png 364 /usr/share/pixmaps/designer-qt4.png && 311 365 312 366 install -v -Dm644 tools/linguist/linguist/images/icons/linguist-128-32.png \ 313 /usr/share/pixmaps/linguist-qt4.png 367 /usr/share/pixmaps/linguist-qt4.png && 314 368 315 369 install -v -Dm644 tools/qdbus/qdbusviewer/images/qdbusviewer-128.png \ 316 370 /usr/share/pixmaps/qdbusviewer-qt4.png && 317 371 318 install - dm755 /usr/share/applications &&372 install -v -dm755 /usr/share/applications && 319 373 320 374 cat > /usr/share/applications/assistant-qt4.desktop << EOF … … 322 376 Name=Qt4 Assistant 323 377 Comment=Shows Qt4 documentation and examples 324 Exec=$QT4 LINK/bin/assistant378 Exec=$QT4BINDIR/assistant 325 379 Icon=assistant-qt4.png 326 380 Terminal=false … … 334 388 Name=Qt4 Designer 335 389 Comment=Design GUIs for Qt4 applications 336 Exec=$QT4 LINK/bin/designer390 Exec=$QT4BINDIR/designer 337 391 Icon=designer-qt4.png 338 392 MimeType=application/x-designer; … … 347 401 Name=Qt4 Linguist 348 402 Comment=Add translations to Qt4 applications 349 Exec=$QT4 LINK/bin/linguist403 Exec=$QT4BINDIR/linguist 350 404 Icon=linguist-qt4.png 351 405 MimeType=text/vnd.trolltech.linguist;application/x-linguist; … … 361 415 GenericName=D-Bus Debugger 362 416 Comment=Debug D-Bus applications 363 Exec=$QT4 LINK/bin/qdbusviewer417 Exec=$QT4BINDIR/qdbusviewer 364 418 Icon=qdbusviewer-qt4.png 365 419 Terminal=false … … 373 427 Name=Qt4 Config 374 428 Comment=Configure Qt4 behavior, styles, fonts 375 Exec=$QT4 LINK/bin/qtconfig429 Exec=$QT4BINDIR/qtconfig 376 430 Icon=qt4logo.png 377 431 Terminal=false … … 381 435 EOF</userinput></screen> 382 436 437 <para> 438 Some packages look for <application>Qt4</application> executables 439 with <filename>-qt4</filename> suffix. Run the following command 440 as the <systemitem class="username">root</systemitem> user to 441 create the necessary symlinks: 442 </para> 443 444 <screen role="root"><userinput>for file in assistant designer lconvert linguist lrelease lupdate \ 445 moc pixeltool qcollectiongenerator qdbus qdbuscpp2xml \ 446 qdbusviewer qdbusxml2cpp qdoc3 qhelpconverter \ 447 qhelpgenerator qmake qmlplugindump qmlviewer qt3to4 \ 448 qtconfig qttracereplay rcc uic uic3 xmlpatterns \ 449 xmlpatternsvalidator 450 do 451 ln -sfrv $QT4BINDIR/$file /usr/bin/$file-qt4 452 done 453 unset file</userinput></screen> 454 383 455 </sect2> 384 456 … … 416 488 <parameter>-system-sqlite</parameter>: This switch enables use 417 489 the system version of <application>SQLite</application>. 418 </para>419 420 <para>421 <parameter>-no-nis</parameter>: This switch disables support422 for Network Information Service (NIS) which has been423 deprecated in recent versions of <application>Glibc</application>.424 490 </para> 425 491 … … 451 517 </para> 452 518 453 <para>454 <option>-no-dbus</option>: Use this switch if you don't have455 <application>D-Bus</application> installed.456 </para>457 458 519 </sect2> 459 520 460 521 <sect2 role="configuration"> 461 <title>Configuring Qt </title>522 <title>Configuring Qt4</title> 462 523 463 524 <sect3 id="qt4-config"> 464 525 <title>Configuration Information</title> 465 526 466 <para> 467 If you installed <application>Qt</application> in /usr, 468 create an environment variable needed by certain packages. 469 As the <systemitem class="username">root</systemitem> user: 527 <note> 528 <para> 529 If you have installed <application>Qt4</application> 530 in <filename class="directory">/usr</filename> you 531 can skip this section. 532 </para> 533 </note> 534 535 <para> 536 If you installed <application>Qt4</application> in a location other 537 than <filename class="directory">/usr</filename>, you need to update the 538 following configuration files so that <application>Qt4</application> is 539 correctly found by other packages and system processes. 540 </para> 541 542 <para> 543 As the <systemitem class="username">root</systemitem> user, update 544 the <filename>/etc/ld.so.conf</filename> file and the dynamic linker's 545 run-time cache file: 546 </para> 547 548 <screen role="root"><userinput>cat >> /etc/ld.so.conf << EOF 549 <literal># Begin Qt4 addition 550 551 $QT4PREFIX/lib 552 553 # End Qt4 addition</literal> 554 EOF 555 556 ldconfig</userinput></screen> 557 558 <indexterm zone="qt4 qt4-config"> 559 <primary sortas="e-etc-ld.so.conf">/etc/ld.so.conf</primary> 560 </indexterm> 561 562 <para> 563 If you have installed <xref linkend="qtchooser"/>, create 564 the <filename>/etc/profile.d/qt4.sh</filename> file by 565 running the following command as the 566 <systemitem class="username">root</systemitem> user: 470 567 </para> 471 568 … … 473 570 <literal># Begin /etc/profile.d/qt4.sh 474 571 475 QT4DIR=/usr 476 export QT4DIR 572 pathappend $QT4PREFIX/lib/pkgconfig PKG_CONFIG_PATH 477 573 478 574 # End /etc/profile.d/qt4.sh</literal> 479 575 EOF</userinput></screen> 480 576 481 <para> 482 If you installed <application>Qt</application> in a location other 483 than /usr, you need to update the following configuration files so 484 that <application>Qt</application> is correctly found by other packages 485 and system processes.</para> 486 487 <para>As the <systemitem class="username">root</systemitem> user, update 488 the <filename>/etc/ld.so.conf</filename> file and the dynamic linker's 489 run-time cache file: 490 </para> 491 492 <screen role="root"><userinput>cat >> /etc/ld.so.conf << EOF 493 <literal># Begin Qt addition 494 495 /opt/qt4/lib 496 497 # End Qt addition</literal> 498 EOF 499 500 ldconfig</userinput></screen> 501 502 <indexterm zone="qt4 qt4-config"> 503 <primary sortas="e-etc-ld.so.conf">/etc/ld.so.conf</primary> 504 </indexterm> 505 506 <para> 507 As the <systemitem class="username">root</systemitem> user, create 508 the <filename>/etc/profile.d/qt4.sh</filename> file: 509 </para> 510 577 <para> 578 If you have not installed <xref linkend="qtchooser"/>, 579 create the <filename>/etc/profile.d/qt4.sh</filename> 580 file by running the following command as the 581 <systemitem class="username">root</systemitem> user: 582 </para> 583 511 584 <screen role="root"><userinput>cat > /etc/profile.d/qt4.sh << EOF 512 585 <literal># Begin /etc/profile.d/qt4.sh 513 514 QT4DIR=/opt/qt4 515 516 pathappend /opt/qt4/bin PATH 517 pathappend /opt/qt4/lib/pkgconfig PKG_CONFIG_PATH 518 519 export QT4DIR 520 586 587 pathappend $QT4BINDIR PATH 588 pathappend $QT4PREFIX/lib/pkgconfig PKG_CONFIG_PATH 589 521 590 # End /etc/profile.d/qt4.sh</literal> 522 591 EOF</userinput></screen> 523 592 593 <note> 594 <para> 595 If <xref linkend="qtchooser"/> is not installed and you 596 also have <application>Qt5</application> installed, 597 you will need to manually adjust the <envar>PATH</envar> 598 variable depending on which <application>Qt</application> 599 version is needed. 600 </para> 601 </note> 524 602 525 603 </sect3> 526 527 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 528 href="../../xincludes/setqt.xml"/> 604 529 605 </sect2> 530 606 … … 557 633 </seg> 558 634 <seg> 559 /usr/include/qt4, 560 /usr/lib/qt4, 561 /usr/share/doc/qt4, and 562 /usr/share/qt4 563 OR 564 /opt/qt4 and 565 /opt/qt-&qt4-version; 635 $QT4PREFIX/include/qt4, 636 $QT4PREFIX/lib/qt4, 637 $QT4PREFIX/share/doc/qt4, and 638 $QT4PREFIX/share/qt4 566 639 </seg> 567 640 </seglistitem> -
x/lib/qt5-systemd.xml
rd72fae5a r7aff5814 96 96 <xref linkend="dbus"/>, 97 97 <xref linkend="glib2"/>, 98 <xref linkend="gst-plugins-base"/>, <!--99 <xref linkend="harfbuzz"/>, Doesn't have all the features that the included one has. -->100 <xref linkend="icu"/> ( required for QtWebKit),98 <xref linkend="gst-plugins-base"/>, 99 <xref linkend="harfbuzz"/>, 100 <xref linkend="icu"/> (unicode support, also required for QtWebKit), 101 101 <xref linkend="libjpeg"/>, 102 102 <xref linkend="libmng"/>, 103 103 <xref linkend="libpng"/>, 104 104 <xref linkend="libtiff"/>, 105 <xref linkend="libxkbcommon"/>, 105 106 <xref linkend="mtdev"/>, 106 107 <xref linkend="openssl"/>, 107 108 <xref linkend="pcre"/>, 108 <xref linkend=" sqlite"/>and109 <xref linkend=" ruby"/> (required for QtWebKit)109 <xref linkend="ruby"/> (required for QtWebKit), and 110 <xref linkend="sqlite"/> 110 111 </para> 111 112 … … 115 116 <xref linkend="gst10-plugins-base"/> (QtWebKit HTML5 Video Support), 116 117 <xref linkend="gtk2"/> (GTK+ Theme Support), 117 <ulink url="https://code.google.com/p/ibus/">IBus</ulink>, 118 <ulink url="http://xkbcommon.org/">libxkbcommon</ulink>, 119 <xref linkend="mariadb"/> or <ulink url="http://www.mysql.com/">MySQL</ulink>, 118 <xref linkend="ibus"/>, 119 <xref linkend="mariadb"/>, 120 120 <xref linkend="postgresql"/>, 121 121 <xref linkend="pulseaudio"/>, and … … 123 123 </para> 124 124 125 <bridgehead renderas="sect4">Runtime Dependency</bridgehead> 126 <para role="optional"> 127 <xref linkend="qtchooser"/> (required if installing both 128 Qt4 and Qt5) 129 </para> 130 125 131 <para condition="html" role="usernotes">User Notes: 126 132 <ulink url="&blfs-wiki;/qt5"/> … … 128 134 </sect2> 129 135 130 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 131 href="../../xincludes/qt-alternatives.xml"/> 136 <sect2 role="qt5-prefix"> 137 <title>Setting the installation prefix</title> 138 139 <bridgehead renderas="sect3">Installing in /usr</bridgehead> 140 141 <para> 142 If you want to install <application>Qt5</application> 143 in <filename class="directory">/usr</filename>, set the 144 following environment variable: 145 </para> 146 147 <screen><userinput>export QT5PREFIX=/usr</userinput></screen> 148 149 <para> 150 The advantage of installing in 151 <filename class="directory">/usr</filename> is that no additional 152 configuration is required. The package files are distributed 153 within several subdirectories of the 154 <filename class="directory">/usr</filename> hierarchy. This is 155 the method that most distributions use. The disadvantage for BLFS 156 users is that this <application>Qt5</application> instance cannot 157 be upgraded while it is in use. It also does not allow reverting 158 to an existing, known working instance of 159 <application>Qt5</application>. 160 </para> 161 162 <bridgehead renderas="sect3">Installing in /opt/qt5</bridgehead> 163 164 <para> 165 If you want to install <application>Qt5</application> 166 in a directory other than <filename 167 class="directory">/usr</filename>, ie 168 <filename class="directory">/opt/qt5</filename>, set 169 the following environment variable: 170 </para> 171 172 <screen><userinput>export QT5PREFIX=/opt/qt5</userinput></screen> 173 174 <para> 175 The advantage of installing <application>Qt5</application> in a 176 custom directory such as <filename 177 class="directory">/opt/qt5</filename> is that it keeps all the 178 package files consolidated in a dedicated directory hierarchy. By 179 using this method, an update can be made without overwriting a 180 previous installation and users can easily revert to a previous 181 version by changing one symbolic link or merely changing the 182 PATH variable. 183 </para> 184 185 <tip> 186 <para> 187 Sometimes, the installation paths are hardcoded into installed files. 188 This is the reason why <filename class="directory">/opt/qt5</filename> 189 is used as installation prefix instead of <filename 190 class="directory">/opt/qt-&qt5-version;</filename>. After installing 191 <application>Qt5</application>, you may rename the directory and 192 create a symlink: 193 </para> 194 195 <screen role="root"><userinput>mv /opt/qt{5,-&qt5-version;} 196 ln -sfv qt-&qt5-version; /opt/qt5</userinput></screen> 197 198 <para> 199 Later on, you may want to install other versions of 200 <application>Qt5</application>. To do that, just remove the symlink 201 and use <filename class="directory">/opt/qt5</filename> as the 202 prefix again. Which version of <application>Qt5</application> you 203 use depends only on where the symlink points to. 204 </para> 205 </tip> 206 207 <bridgehead renderas="sect3">Setting the install location for executables</bridgehead> 208 209 <para> 210 Both <application>Qt4</application> and 211 <application>Qt5</application> executables have 212 the same names and will overwrite each other if 213 they are installed in the same prefix. To overcome 214 such problem, BLFS offers <xref linkend="qtchooser"/>, 215 an utility used to switch between different 216 <application>Qt</application> versions. 217 </para> 218 219 <para> 220 If <xref linkend="qtchooser"/> is to be used or 221 if installing both <application>Qt4</application> 222 and <application>Qt5</application> in 223 <filename class="directory">/usr</filename>, the 224 executables need to be installed to a non-standard 225 location in order to avoid the conflict with 226 <application>Qt4</application> ones. To accomplish 227 that, set the following environment variable: 228 </para> 229 230 <screen><userinput>export QT5BINDIR=$QT5PREFIX/lib/qt5/bin</userinput></screen> 231 232 <para> 233 If you choose not to install <xref linkend="qtchooser"/> 234 or if you are not going to install 235 <application>Qt4</application>, simply set the bindir to 236 a <filename class="directory">bin</filename> subdir of the 237 default prefix by setting the following environment variable: 238 </para> 239 240 <screen><userinput>export QT5BINDIR=$QT5PREFIX/bin</userinput></screen> 241 242 </sect2> 132 243 133 244 <sect2 role="installation"> … … 153 264 </warning> 154 265 155 <!-- ==== Method 1 ====== -->156 <bridgehead renderas="sect3">Method 1: Installing in /usr</bridgehead>157 158 266 <para> 159 267 Install <application>Qt5</application> by running the … … 161 269 </para> 162 270 163 <!-- This is rather a bad idea. Most apps that I've seen using Qt5 look for -qt5 164 suffixed programs. On the other hand, the developer is used to running 165 qmake, linguist, etc from the command line. 166 167 <note> 168 <para> 169 If <emphasis>not</emphasis> also installing <application>Qt4</application> 170 into the /usr directory, change the entry for -bindir below to /usr/bin. 171 </para> 172 </note> --> 173 174 <screen><userinput>export QT5LINK=/usr 175 176 ./configure -prefix /usr \ 177 -sysconfdir /etc/xdg \ 178 -bindir /usr/bin \ 179 -headerdir /usr/include/qt5 \ 180 -archdatadir /usr/lib/qt5 \ 181 -datadir /usr/share/qt5 \ 182 -docdir /usr/share/doc/qt5 \ 183 -translationdir /usr/share/qt5/translations \ 184 -examplesdir /usr/share/doc/qt5/examples \ 185 -confirm-license \ 186 -opensource \ 187 -dbus-linked \ 188 -openssl-linked \<!-- 189 -system-harfbuzz \--> 190 -system-sqlite \ 191 -no-nis \ 192 -nomake examples \ 193 -optimized-qmake && 271 <screen><userinput>./configure -prefix $QT5PREFIX \ 272 -sysconfdir /etc/xdg \ 273 -bindir $QT5BINDIR \ 274 -headerdir $QT5PREFIX/include/qt5 \ 275 -archdatadir $QT5PREFIX/lib/qt5 \ 276 -datadir $QT5PREFIX/share/qt5 \ 277 -docdir $QT5PREFIX/share/doc/qt5 \ 278 -translationdir $QT5PREFIX/share/qt5/translations \ 279 -examplesdir $QT5PREFIX/share/doc/qt5/examples \ 280 -confirm-license \ 281 -opensource \ 282 -dbus-linked \ 283 -openssl-linked \ 284 -system-harfbuzz \ 285 -system-sqlite \ 286 -nomake examples \ 287 -optimized-qmake && 194 288 make</userinput></screen> 195 289 … … 206 300 <screen><userinput>find . -name "*.pc" -exec perl -pi -e "s, -L$PWD/?\S+,,g" {} \;</userinput></screen> 207 301 302 <warning> 303 <para> 304 Make sure that <envar>QT5PREFIX</envar> and <envar>QT5BINDIR</envar> 305 environment variables are set for the 306 <systemitem class="username">root</systemitem> user too. 307 </para> 308 </warning> 309 208 310 <para> 209 311 Now, as the <systemitem class="username">root</systemitem> user: … … 218 320 </para> 219 321 220 <screen role="root"><userinput>sed -e "s:$PWD/qtbase: /usr/lib/qt5:g" \221 -i /usr/lib/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri &&222 223 find /usr/lib/lib{qgsttools_p,Qt5*}.prl -exec sed -i -r \322 <screen role="root"><userinput>sed -e "s:$PWD/qtbase:$QT5PREFIX/lib/qt5:g" \ 323 -i $QT5PREFIX/lib/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri && 324 325 find $QT5PREFIX/lib/lib{Enginio,qgsttools_p,Qt5*}.prl -exec sed -i -r \ 224 326 '/^QMAKE_PRL_BUILD_DIR/d;s/(QMAKE_PRL_LIBS =).*/\1/' {} \;</userinput></screen> 225 327 226 <!-- ==== Method 2 ====== --> 227 228 <bridgehead renderas="sect3">Method 2: Installing in /opt/qt-&qt5-version;</bridgehead> 229 230 <para> 231 This section provides instructions for installing Qt5 in the 232 <filename class="directory">/opt</filename> directory. 233 </para> 234 235 <screen><userinput>export QT5DIR=/opt/qt-&qt5-version; && 236 export QT5LINK=/opt/qt5 && 237 238 ./configure -prefix $QT5DIR \ 239 -sysconfdir /etc/xdg \ 240 -confirm-license \ 241 -opensource \ 242 -dbus-linked \ 243 -openssl-linked \<!-- 244 -system-harfbuzz \--> 245 -system-sqlite \ 246 -no-nis \ 247 -nomake examples \ 248 -optimized-qmake && 249 make</userinput></screen> 250 251 <para> 252 Now, as the <systemitem class="username">root</systemitem> user: 253 </para> 254 255 <screen role="root"><userinput>make install && 256 ln -svfn $QT5DIR /opt/qt5</userinput></screen> 257 258 <para> 259 Remove references to the build directory from installed files by 260 running the following commands as the 261 <systemitem class="username">root</systemitem> user: 262 </para> 263 264 <screen role="root"><userinput>find $QT5DIR -name qt_lib_bootstrap_private.pri \ 265 -exec sed -i -e "s:$PWD/qtbase:/$QT5DIR/lib/:g" {} \; && 266 267 find $QT5DIR -name \*.prl \ 268 -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;</userinput></screen> 269 270 <!-- This is useful for packages looking explicitly for Qt apps with -qt5 suffix. 271 272 <para> 273 Symlink the <application>Qt5</application> executables into 274 <filename class="directory">/usr/bin</filename> by running the 275 following commands as the 276 <systemitem class="username">root</systemitem> user: 277 </para> 278 279 <screen role="root"><userinput>ln -svf $QT5DIR /opt/qt5 && 280 281 for file in /opt/qt5/bin/*; do 282 ln -sfv $file /usr/bin/$(basename $file)-qt5 283 done</userinput></screen> --> 284 285 <!-- ==== Common ====== --> 286 <bridgehead renderas="sect3">Continuing for Both Methods</bridgehead> 287 288 <para> 289 For all methods, install images and create the menu entries 290 for installed applications. Be sure that the <envar>QT5LINK</envar> 291 variable is defined in root's environment and 328 <para> 329 Install images and create the menu entries for installed 330 applications by running the following commands 292 331 as the <systemitem class="username">root</systemitem> user: 293 332 </para> 294 333 295 <screen role="root"><userinput>install -v -dm755 /usr/share/pixmaps/ && 296 297 install -v -Dm644 qttools/src/assistant/assistant/images/assistant-128.png \ 334 <screen role="root"><userinput>install -v -Dm644 qttools/src/assistant/assistant/images/assistant-128.png \ 298 335 /usr/share/pixmaps/assistant-qt5.png && 299 336 300 337 install -v -Dm644 qttools/src/designer/src/designer/images/designer.png \ 301 /usr/share/pixmaps/designer-qt5.png 338 /usr/share/pixmaps/designer-qt5.png && 302 339 303 340 install -v -Dm644 qttools/src/linguist/linguist/images/icons/linguist-128-32.png \ 304 /usr/share/pixmaps/linguist-qt5.png 341 /usr/share/pixmaps/linguist-qt5.png && 305 342 306 343 install -v -Dm644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer-128.png \ 307 344 /usr/share/pixmaps/qdbusviewer-qt5.png && 308 345 309 install - dm755 /usr/share/applications &&346 install -v -dm755 /usr/share/applications && 310 347 311 348 cat > /usr/share/applications/assistant-qt5.desktop << EOF … … 313 350 Name=Qt5 Assistant 314 351 Comment=Shows Qt5 documentation and examples 315 Exec=$QT5 LINK/bin/assistant352 Exec=$QT5BINDIR/assistant 316 353 Icon=assistant-qt5.png 317 354 Terminal=false … … 326 363 GenericName=Interface Designer 327 364 Comment=Design GUIs for Qt5 applications 328 Exec=$QT5 LINK/bin/designer365 Exec=$QT5BINDIR/designer 329 366 Icon=designer-qt5.png 330 367 MimeType=application/x-designer; … … 339 376 Name=Qt5 Linguist 340 377 Comment=Add translations to Qt5 applications 341 Exec=$QT5 LINK/bin/linguist378 Exec=$QT5BINDIR/linguist 342 379 Icon=linguist-qt5.png 343 380 MimeType=text/vnd.trolltech.linguist;application/x-linguist; … … 353 390 GenericName=D-Bus Debugger 354 391 Comment=Debug D-Bus applications 355 Exec=$QT5 LINK/bin/qdbusviewer392 Exec=$QT5BINDIR/qdbusviewer 356 393 Icon=qdbusviewer-qt5.png 357 394 Terminal=false … … 361 398 EOF</userinput></screen> 362 399 400 <para> 401 Some packages look for <application>Qt5</application> executables 402 with <filename>-qt5</filename> suffix. Run the following command 403 as the <systemitem class="username">root</systemitem> user to 404 create the necessary symlinks: 405 </para> 406 407 <screen role="root"><userinput>for file in assistant designer lconvert linguist lrelease lupdate \ 408 moc pixeltool qcollectiongenerator qdbus qdbuscpp2xml \ 409 qdbusviewer qdbusxml2cpp qdoc qhelpconverter \ 410 qhelpgenerator qlalr qmake qml qml1plugindump qmlbundle \ 411 qmlimportscanner qmlmin qmlplugindump qmlprofiler \ 412 qmlscene qmltestrunner qmlviewer qtdiag qtpaths \ 413 rcc syncqt.pl uic xmlpatterns xmlpatternsvalidator 414 do 415 ln -sfrv $QT5BINDIR/$file /usr/bin/$file-qt5 416 done 417 unset file</userinput></screen> 418 363 419 </sect2> 364 420 365 421 <sect2 role="commands"> 366 422 <title>Command Explanations</title> 367 368 <para>369 <command>sed -e "..." -e "..." -i ...</command>: This370 command fixes detection of371 <application>libmng</application> 2.0.372 </para>373 423 374 424 <para> … … 404 454 <parameter>-system-sqlite</parameter>: This switch enables use 405 455 of the system version of <application>SQLite</application>. 406 </para>407 408 <para>409 <parameter>-no-nis</parameter>: This switch disables support410 for Network Information Service (NIS) which has been411 removed from recent versions of <application>Glibc</application>.412 456 </para> 413 457 … … 434 478 <title>Configuration Information</title> 435 479 436 <para> 437 Create the menu entries for installed applications by running the 438 following commands <systemitem class="username">root</systemitem> 439 user: 440 </para> 441 442 <para> 443 If you installed <application>Qt5</application> in 444 <filename class="directory">/usr</filename>, create an 445 environment variable needed by certain packages. 446 As the <systemitem class="username">root</systemitem> user: 447 </para> 448 449 <screen role="root"><userinput>cat > /etc/profile.d/qt5.sh << EOF 450 <literal># Begin /etc/profile.d/qt5.sh 451 452 QT5DIR=/usr 453 export QT5DIR 454 455 # End /etc/profile.d/qt5.sh</literal> 456 EOF</userinput></screen> 480 <note> 481 <para> 482 If you have installed <application>Qt5</application> 483 in <filename class="directory">/usr</filename> you 484 can skip this section. 485 </para> 486 </note> 457 487 458 488 <para> … … 470 500 471 501 <screen role="root"><userinput>cat >> /etc/ld.so.conf << EOF 472 <literal># Begin Qt addition473 474 /opt/qt5/lib475 476 # End Qt addition</literal>502 <literal># Begin Qt5 addition 503 504 $QT5PREFIX/lib 505 506 # End Qt5 addition</literal> 477 507 EOF 478 508 … … 484 514 485 515 <para> 486 As the <systemitem class="username">root</systemitem> user, create 487 the <filename>/etc/profile.d/qt5.sh</filename> file: 516 If you have installed <xref linkend="qtchooser"/>, create 517 the <filename>/etc/profile.d/qt5.sh</filename> file by 518 running the following command as the 519 <systemitem class="username">root</systemitem> user: 488 520 </para> 489 521 … … 491 523 <literal># Begin /etc/profile.d/qt5.sh 492 524 493 QT5DIR=/opt/qt5 494 495 pathappend /opt/qt5/bin PATH 496 pathappend /opt/qt5/lib/pkgconfig PKG_CONFIG_PATH 497 498 export QT5DIR 525 pathappend $QT5PREFIX/lib/pkgconfig PKG_CONFIG_PATH 499 526 500 527 # End /etc/profile.d/qt5.sh</literal> 501 528 EOF</userinput></screen> 502 529 530 <para> 531 If you have not installed <xref linkend="qtchooser"/>, 532 create the <filename>/etc/profile.d/qt5.sh</filename> 533 file by running the following command as the 534 <systemitem class="username">root</systemitem> user: 535 </para> 536 537 <screen role="root"><userinput>cat > /etc/profile.d/qt5.sh << EOF 538 <literal># Begin /etc/profile.d/qt5.sh 539 540 pathappend $QT5BINDIR PATH 541 pathappend $QT5PREFIX/lib/pkgconfig PKG_CONFIG_PATH 542 543 # End /etc/profile.d/qt5.sh</literal> 544 EOF</userinput></screen> 545 546 <note> 547 <para> 548 If <xref linkend="qtchooser"/> is not installed and you 549 also have <application>Qt4</application> installed, 550 you will need to manually adjust the <envar>PATH</envar> 551 variable depending on which <application>Qt</application> 552 version is needed. 553 </para> 554 </note> 555 503 556 </sect3> 504 557 505 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"506 href="../../xincludes/setqt.xml"/>507 558 </sect2> 508 559 … … 543 594 </seg> 544 595 <seg> 545 /usr/include/qt5, 546 /usr/lib/qt5, 547 /usr/share/doc/qt5, and 548 /usr/share/qt5 549 OR 550 /opt/qt5 and 551 /opt/qt-&qt5-version; 596 $QT5PREFIX/include/qt5, 597 $QT5PREFIX/lib/qt5, 598 $QT5PREFIX/share/doc/qt5, and 599 $QT5PREFIX/share/qt5 552 600 </seg> 553 601 </seglistitem>
Note:
See TracChangeset
for help on using the changeset viewer.