Changeset 0dd2bc6 for x/lib/qt4.xml


Ignore:
Timestamp:
06/19/2015 07:25:49 PM (9 years ago)
Author:
Bruce Dubbs <bdubbs@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 7.10, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
Children:
06da9a6
Parents:
a5a776af
Message:

Simplify qt4 and qt5 install instructions.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • x/lib/qt4.xml

    ra5a776af r0dd2bc6  
    117117  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../../xincludes/qt-alternatives.xml"/>
    118118
     119  <sect2 role="qt4-prefix">
     120    <title>Setting the installation prefix</title>
     121
     122    <bridgehead renderas="sect3">Installing in /usr</bridgehead>
     123
     124    <para>
     125      If you want to install <application>Qt4</application>
     126      in <filename class="directory">/usr</filename>, set the
     127      following environment variable:
     128    </para>
     129
     130<screen><userinput>export QT4PREFIX=/usr</userinput></screen>
     131
     132    <bridgehead renderas="sect3">Installing in /opt/qt4</bridgehead>
     133
     134    <para>
     135      If you want to install <application>Qt4</application>
     136      in a directory other than <filename
     137      class="directory">/usr</filename>, ie
     138      <filename class="directory">/opt/qt4</filename>, set
     139      the following environment variable:
     140    </para>
     141
     142<screen><userinput>export QT4PREFIX=/opt/qt4</userinput></screen>
     143
     144    <tip>
     145      <para>
     146        Sometimes, the installation paths are hardcoded into installed files.
     147        This is the reason why <filename class="directory">/opt/qt4</filename>
     148        is used as installation prefix instead of <filename
     149        class="directory">/opt/qt-&qt4-version;</filename>. To create a
     150        versioned  <application>Qt4</application> directory, you may rename
     151        the directory and create a symlink:
     152      </para>
     153
     154<screen role="root"><userinput>mkdir /opt/qt-&qt4-version;
     155ln -sfnv qt-&qt4-version; /opt/qt4</userinput></screen>
     156
     157      <para>
     158        Later on, you may want to install other versions of
     159        <application>Qt4</application>. To do that, just remove the symlink
     160        and use <filename class="directory">/opt/qt4</filename> as the
     161        prefix again. Which version of <application>Qt4</application> you
     162        use depends only on where the symlink points.
     163      </para>
     164    </tip>
     165
     166  </sect2>
     167
    119168  <sect2 role="installation">
    120169    <title>Installation of Qt</title>
     
    148197    </note>
    149198
    150 <!-- ==== Method 1 ====== -->
    151     <bridgehead renderas="sect3">Method 1: Installing in /usr</bridgehead>
    152 
    153199    <para>
    154200      Install <application>Qt4</application> into the <filename
     
    157203    </para>
    158204
    159 <screen><userinput>export QT4LINK=/usr
    160 
    161 ./configure -prefix         /usr                 \
    162             -bindir         /usr/bin             \
    163             -plugindir      /usr/lib/qt4/plugins \
    164             -importdir      /usr/lib/qt4/imports \
    165             -headerdir      /usr/include/qt4     \
    166             -datadir        /usr/share/qt4       \
    167             -sysconfdir     /etc/xdg             \
    168             -docdir         /usr/share/doc/qt4   \
    169             -demosdir       /usr/share/doc/qt4/demos    \
    170             -examplesdir    /usr/share/doc/qt4/examples \
    171             -translationdir /usr/share/qt4/translations \
     205<screen><userinput>./configure -prefix         $QT4PREFIX                        \
     206            -sysconfdir     /etc/xdg                          \
     207            -bindir         $QT4BINDIR                        \
     208            -plugindir      $QT4PREFIX/lib/qt4/plugins        \
     209            -importdir      $QT4PREFIX/lib/qt4/imports        \
     210            -headerdir      $QT4PREFIX/include/qt4            \
     211            -datadir        $QT4PREFIX/share/qt4              \
     212            -docdir         $QT4PREFIX/share/doc/qt4          \
     213            -translationdir $QT4PREFIX/share/qt4/translations \
     214            -demosdir       $QT4PREFIX/share/doc/qt4/demos    \
     215            -examplesdir    $QT4PREFIX/share/doc/qt4/examples \
    172216            -confirm-license   \
    173217            -opensource        \
     
    178222            -no-phonon         \
    179223            -no-phonon-backend \
    180             -no-nis            \
    181224            -no-openvg         \
    182225            -nomake demos      \
     
    219262unset file</userinput></screen>
    220263
    221 <!-- ==== Method 2 ====== -->
    222     <bridgehead renderas="sect3">Method 2: Installing in /opt/qt-&qt4-version;</bridgehead>
    223 
    224     <para>
    225       This section provides for installing Qt4 almost all of the files in the
    226       <filename class="directory">/opt</filename> directory.
    227     </para>
    228 
    229 <screen><userinput>export QT4DIR=/opt/qt-&qt4-version; &amp;&amp;
    230 export QT4LINK=/opt/qt4 &amp;&amp;
    231 
    232 ./configure -prefix     $QT4DIR  \
    233             -sysconfdir /etc/xdg \
    234             -confirm-license     \
    235             -opensource          \
    236             -release             \
    237             -dbus-linked         \
    238             -openssl-linked      \
    239             -system-sqlite       \
    240             -plugin-sql-sqlite   \
    241             -no-phonon           \
    242             -no-phonon-backend   \
    243             -no-nis              \
    244             -no-openvg           \
    245             -nomake demos        \
    246             -nomake examples     \
    247             -optimized-qmake     &amp;&amp;
    248 
    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 $QT4DIR /opt/qt4</userinput></screen>
    257 
    258     <para>
    259       Remove references to the build directory from installed files by
    260       running the following command as the
    261       <systemitem class="username">root</systemitem> user:
    262     </para>
    263 
    264 <screen role="root"><userinput>for file in `basename -a -s .prl $QT4DIR/lib/lib*.prl`; do
    265        sed -r -e '/^QMAKE_PRL_BUILD_DIR/d'    \
    266               -e 's/(QMAKE_PRL_LIBS =).*/\1/' \
    267               -i $QT4DIR/lib/${file}.prl
    268 
    269    perl -pi -e "s, -L$PWD/?\S+,,g" $QT4DIR/lib/pkgconfig/${file##lib}.pc
    270 done
    271 
    272 unset file</userinput></screen>
    273 
    274 <!-- ==== Common  ====== -->
    275     <bridgehead renderas="sect3">Continuing for Both Methods</bridgehead>
    276 
    277       <para>
    278         For all methods, install images and create the menu entries
    279         for installed applications.  Be sure that the <envar>QT4LINK</envar>
    280         variable is defined in root's environment and
    281         as the <systemitem class="username">root</systemitem> user:
    282       </para>
     264    <para>
     265      Install images and create the menu entries
     266      for installed applications.  Be sure that the <envar>QT4PREFIX</envar>
     267      variable is defined in root's environment and
     268      as the <systemitem class="username">root</systemitem> user:
     269    </para>
    283270
    284271<screen role="root"><userinput>install -v -Dm644 src/gui/dialogs/images/qtlogo-64.png \
     
    303290Name=Qt4 Assistant
    304291Comment=Shows Qt4 documentation and examples
    305 Exec=$QT4LINK/bin/assistant
     292Exec=$QT4PREFIX/bin/assistant
    306293Icon=assistant-qt4.png
    307294Terminal=false
     
    315302Name=Qt4 Designer
    316303Comment=Design GUIs for Qt4 applications
    317 Exec=$QT4LINK/bin/designer
     304Exec=$QT4PREFIX/bin/designer
    318305Icon=designer-qt4.png
    319306MimeType=application/x-designer;
     
    328315Name=Qt4 Linguist
    329316Comment=Add translations to Qt4 applications
    330 Exec=$QT4LINK/bin/linguist
     317Exec=$QT4PREFIX/bin/linguist
    331318Icon=linguist-qt4.png
    332319MimeType=text/vnd.trolltech.linguist;application/x-linguist;
     
    342329GenericName=D-Bus Debugger
    343330Comment=Debug D-Bus applications
    344 Exec=$QT4LINK/bin/qdbusviewer
     331Exec=$QT4PREFIX/bin/qdbusviewer
    345332Icon=qdbusviewer-qt4.png
    346333Terminal=false
     
    354341Name=Qt4 Config
    355342Comment=Configure Qt4 behavior, styles, fonts
    356 Exec=$QT4LINK/bin/qtconfig
     343Exec=$QT4PREFIX/bin/qtconfig
    357344Icon=qt4logo.png
    358345Terminal=false
Note: See TracChangeset for help on using the changeset viewer.