- Timestamp:
- 07/24/2014 01:27:37 PM (10 years ago)
- Branches:
- 7.6-blfs, 7.6-systemd, kde5-14269, kde5-14686, systemd-13485
- Children:
- 11d8b85
- Parents:
- 359dc25
- Location:
- x/lib
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
x/lib/lib.xml
r359dc25 r5c7d5b25 56 56 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pangomm.xml"/> 57 57 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="qt4.xml"/> 58 <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="qt5-systemd.xml"/> 59 59 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="startup-notification.xml"/> 60 60 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="webkitgtk.xml"/> -
x/lib/qt5-systemd.xml
r359dc25 r5c7d5b25 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. -->98 <xref linkend="gst-plugins-base"/>, 99 <xref linkend="harfbuzz"/>, 100 100 <xref linkend="icu"/> (required for QtWebKit), 101 101 <xref linkend="libjpeg"/>, … … 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="qtprefix"> 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>Qt</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 </sect2> 186 187 <sect2 role="multi-install"> 188 <title>Dealing with multiple Qt versions</title> 189 190 <para> 191 Both <application>Qt4</application> and 192 <application>Qt5</application> executables have 193 the same names and will override each other if 194 they are installed in the same prefix. To overcome 195 such problem, BLFS offers <xref linkend="qtchooser"/>, 196 an utility used to switch between different 197 <application>Qt</application> versions. 198 </para> 199 200 <para> 201 If <xref linkend="qtchooser"/> is to be used or 202 if installing both <application>Qt4</application> 203 and <application>Qt5</application> in 204 <filename class="directory">/usr</filename>, the 205 executables need to be installed to a non-standard 206 location in order to avoid the conflict with 207 <application>Qt4</application> ones. To accomplish 208 that, set the following environment variable: 209 </para> 210 211 <screen><userinput>export QT5BINDIR=$QT5PREFIX/lib/qt5/bin</userinput></screen> 212 213 <para> 214 If you choose not to install <xref linkend="qtchooser"/> 215 or if you are not going to install 216 <application>Qt4</application>, simply set the bindir to 217 a <filename class="directory">bin</filename> subdir of the 218 default prefix by setting the following environment variable: 219 </para> 220 221 <screen><userinput>export QT5BINDIR=$QT5PREFIX/bin</userinput></screen> 222 223 </sect2> 132 224 133 225 <sect2 role="installation"> … … 153 245 </warning> 154 246 155 <!-- ==== Method 1 ====== -->156 <bridgehead renderas="sect3">Method 1: Installing in /usr</bridgehead>157 158 247 <para> 159 248 Install <application>Qt5</application> by running the … … 161 250 </para> 162 251 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 && 252 <screen><userinput>./configure -prefix $QT5PREFIX \ 253 -sysconfdir /etc/xdg \ 254 -bindir $QT5BINDIR \ 255 -headerdir $QT5PREFIX/include/qt5 \ 256 -archdatadir $QT5PREFIX/lib/qt5 \ 257 -datadir $QT5PREFIX/share/qt5 \ 258 -docdir $QT5PREFIX/share/doc/qt5 \ 259 -translationdir $QT5PREFIX/share/qt5/translations \ 260 -examplesdir $QT5PREFIX/share/doc/qt5/examples \ 261 -confirm-license \ 262 -opensource \ 263 -dbus-linked \ 264 -openssl-linked \ 265 -system-harfbuzz \ 266 -system-sqlite \ 267 -nomake examples \ 268 -optimized-qmake && 194 269 make</userinput></screen> 195 270 … … 206 281 <screen><userinput>find . -name "*.pc" -exec perl -pi -e "s, -L$PWD/?\S+,,g" {} \;</userinput></screen> 207 282 283 <warning> 284 <para> 285 Make sure that <envar>QT5PREFIX</envar> and <envar>QT5BINDIR</envar> 286 environment variables are set for the 287 <systemitem class="username">root</systemitem> user too. 288 </para> 289 </warning> 290 208 291 <para> 209 292 Now, as the <systemitem class="username">root</systemitem> user: … … 218 301 </para> 219 302 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 \303 <screen role="root"><userinput>sed -e "s:$PWD/qtbase:$QT5PREFIX/lib/qt5:g" \ 304 -i $QT5PREFIX/lib/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri && 305 306 find $QT5PREFIX/lib/lib{qgsttools_p,Qt5*}.prl -exec sed -i -r \ 224 307 '/^QMAKE_PRL_BUILD_DIR/d;s/(QMAKE_PRL_LIBS =).*/\1/' {} \;</userinput></screen> 225 308 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 309 <para> 310 Install images and create the menu entries for installed 311 applications by running the following commands 292 312 as the <systemitem class="username">root</systemitem> user: 293 313 </para> 294 314 295 <screen role="root"><userinput>install -v -dm755 /usr/share/pixmaps /&&315 <screen role="root"><userinput>install -v -dm755 /usr/share/pixmaps && 296 316 297 317 install -v -Dm644 qttools/src/assistant/assistant/images/assistant-128.png \ … … 299 319 300 320 install -v -Dm644 qttools/src/designer/src/designer/images/designer.png \ 301 /usr/share/pixmaps/designer-qt5.png 321 /usr/share/pixmaps/designer-qt5.png && 302 322 303 323 install -v -Dm644 qttools/src/linguist/linguist/images/icons/linguist-128-32.png \ 304 /usr/share/pixmaps/linguist-qt5.png 324 /usr/share/pixmaps/linguist-qt5.png && 305 325 306 326 install -v -Dm644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer-128.png \ 307 327 /usr/share/pixmaps/qdbusviewer-qt5.png && 308 328 309 install - dm755 /usr/share/applications &&329 install -v -dm755 /usr/share/applications && 310 330 311 331 cat > /usr/share/applications/assistant-qt5.desktop << EOF … … 313 333 Name=Qt5 Assistant 314 334 Comment=Shows Qt5 documentation and examples 315 Exec=$QT5 LINK/bin/assistant335 Exec=$QT5BINDIR/assistant 316 336 Icon=assistant-qt5.png 317 337 Terminal=false … … 326 346 GenericName=Interface Designer 327 347 Comment=Design GUIs for Qt5 applications 328 Exec=$QT5 LINK/bin/designer348 Exec=$QT5BINDIR/designer 329 349 Icon=designer-qt5.png 330 350 MimeType=application/x-designer; … … 339 359 Name=Qt5 Linguist 340 360 Comment=Add translations to Qt5 applications 341 Exec=$QT5 LINK/bin/linguist361 Exec=$QT5BINDIR/linguist 342 362 Icon=linguist-qt5.png 343 363 MimeType=text/vnd.trolltech.linguist;application/x-linguist; … … 353 373 GenericName=D-Bus Debugger 354 374 Comment=Debug D-Bus applications 355 Exec=$QT5 LINK/bin/qdbusviewer375 Exec=$QT5BINDIR/qdbusviewer 356 376 Icon=qdbusviewer-qt5.png 357 377 Terminal=false … … 361 381 EOF</userinput></screen> 362 382 383 <para> 384 Some packages look for <application>Qt5</application> executables 385 with <filename>-qt5</filename> suffix. 386 If <application>Qt5</application> executables weren't installed in 387 <filename class="directory">/usr/bin</filename>, run the following 388 commands as the <systemitem class="username">root</systemitem> user: 389 </para> 390 391 <screen role="root"><userinput>for file in $QT5BINDIR/*; do 392 ln -sfv $file /usr/bin/$(basename $file)-qt5 393 done</userinput></screen> 394 363 395 </sect2> 364 396 365 397 <sect2 role="commands"> 366 398 <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 399 374 400 <para> … … 404 430 <parameter>-system-sqlite</parameter>: This switch enables use 405 431 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 432 </para> 413 433 … … 434 454 <title>Configuration Information</title> 435 455 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> 456 <note> 457 <para> 458 If you have installed <application>Qt5</application> 459 in <filename class="directory">/usr</filename> you 460 can skip this section. 461 </para> 462 </note> 457 463 458 464 <para> … … 470 476 471 477 <screen role="root"><userinput>cat >> /etc/ld.so.conf << EOF 472 <literal># Begin Qt addition473 474 /opt/qt5/lib475 476 # End Qt addition</literal>478 <literal># Begin Qt5 addition 479 480 $QT5PREFIX/lib 481 482 # End Qt5 addition</literal> 477 483 EOF 478 484 … … 484 490 485 491 <para> 486 As the <systemitem class="username">root</systemitem> user, create 487 the <filename>/etc/profile.d/qt5.sh</filename> file: 492 If you have installed <xref linkend="qtchooser"/>, create 493 the <filename>/etc/profile.d/qt5.sh</filename> file by 494 running the following command as the 495 <systemitem class="username">root</systemitem> user: 488 496 </para> 489 497 … … 491 499 <literal># Begin /etc/profile.d/qt5.sh 492 500 493 QT5DIR=/opt/qt5 494 495 pathappend /opt/qt5/bin PATH 496 pathappend /opt/qt5/lib/pkgconfig PKG_CONFIG_PATH 497 498 export QT5DIR 501 pathappend $QT5PREFIX/lib/pkgconfig PKG_CONFIG_PATH 499 502 500 503 # End /etc/profile.d/qt5.sh</literal> 501 504 EOF</userinput></screen> 502 505 506 <para> 507 If you have not installed <xref linkend="qtchooser"/>, 508 create the <filename>/etc/profile.d/qt5.sh</filename> 509 file by running the following command as the 510 <systemitem class="username">root</systemitem> user: 511 </para> 512 513 <screen role="root"><userinput>cat > /etc/profile.d/qt5.sh << EOF 514 <literal># Begin /etc/profile.d/qt5.sh 515 516 pathappend $QT5BINDIR PATH 517 pathappend $QT5PREFIX/lib/pkgconfig PKG_CONFIG_PATH 518 519 # End /etc/profile.d/qt5.sh</literal> 520 EOF</userinput></screen> 521 522 <note> 523 <para> 524 If you also have <application>Qt4</application> installed, 525 you will need to manually adjust the <envar>PATH</envar> 526 variable depending on which <application>Qt</application> 527 version is needed. 528 </para> 529 </note> 530 503 531 </sect3> 504 532 505 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"506 href="../../xincludes/setqt.xml"/>507 533 </sect2> 508 534 … … 543 569 </seg> 544 570 <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; 571 $QT5PREFIX/include/qt5, 572 $QT5PREFIX/lib/qt5, 573 $QT5PREFIX/share/doc/qt5, and 574 $QT5PREFIX/share/qt5 552 575 </seg> 553 576 </seglistitem>
Note:
See TracChangeset
for help on using the changeset viewer.