Changeset 54e9eea for x


Ignore:
Timestamp:
08/24/2013 01:27:03 AM (11 years ago)
Author:
Krejzi <krejzi@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
Children:
a8ece039
Parents:
2a33982
Message:

re-add qt4 instructions.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • x/lib/qt4.xml

    r2a33982 r54e9eea  
    4040    </para>
    4141
    42     &lfs73_checked;
     42    &lfs74_checked;
    4343
    4444    <bridgehead renderas="sect3">Package Information</bridgehead>
     
    118118    <title>Installation of Qt</title>
    119119
    120    <warning>
     120    <para>
     121       There are several ways to install a complicated package such as
     122       <application>Qt</application>. The files are not completely position
     123       independent. Installation procedures execute the program
     124       <command>pkg-config</command> to determine the location of package
     125       executables, libraries, headers, and other files. For
     126       <application>Qt</application>, <command>pkg-config</command> will look
     127       for the appropriate <filename>lib/pkgconfig/Qt*.pc</filename> files
     128       which must be modified if relocating the package. These files are set up
     129       correctly by the build process.
     130    </para>
     131
     132    <para>
     133       The default installation places the files in <filename
     134       class="directory">/usr/local/qt</filename>. Many commercial
     135       distributions place the files in the system's <filename
     136       class="directory">/usr</filename> hierarchy. The package can also be
     137       installed in an arbitrary directory.
     138    </para>
     139   
     140    <para>
     141       The advantage of installing in <filename
     142       class="directory">/usr</filename> is that no updates to the
     143       <filename>/etc/ld.so.conf</filename> or
     144       <filename>/etc/man_db.conf</filename> files are required. The package
     145       files are distributed within several subdirectories of the <filename
     146       class="directory">/usr</filename> hierarchy. This is the method that
     147       most commercial distributions use. It is also supported by the
     148       <application>qtchooser</application> application.
     149    </para>
     150
     151    <para>
     152       The advantage of installing <application>Qt</application> in a custom
     153       directory such as <filename
     154       class="directory">/opt/qt-&qt4-version;</filename> is that it keeps all
     155       the package files consolidated in a dedicated directory hierarchy. By
     156       using this method, an update can be made without overwriting a previous
     157       installation and users can easily revert to a previous version by
     158       changing one symbolic link or merely changing the PATH variable. It
     159       also allows a developer to maintain multiple versions of
     160       <application>Qt</application> for testing.
     161    </para>
     162
     163    <warning>
    121164      <para>
    122165        If you did not install some of the recommended dependencies, examine
     
    128171    <caution>
    129172      <para>
    130         If <application>Qt</application> is being reinstalled, run the
     173        If <application>Qt</application> is being reinstalled into the
     174        same directory as an existing instance, run the
    131175        following commands from a console or non-Qt based window manager.
    132176        It overwrites <application>Qt</application> libraries that should
     
    143187      </para>
    144188    </note>
     189
     190    <bridgehead renderas="sect3">Method 1: Installing in /usr</bridgehead>
    145191
    146192    <para>
     
    227273done</userinput></screen>
    228274
     275    <bridgehead renderas="sect3">Method 2: Installing in /opt/qt-&qt4-version;</bridgehead>
     276
     277    <para>
     278      Install <application>Qt</application> in  /opt/qt-&qt4-version;
     279      by running the following commands:
     280    </para>
     281
     282<screen><userinput>sed -i -e "/#if/d" -e "/#error/d" -e "/#endif/d" \
     283     config.tests/unix/libmng/libmng.cpp &amp;&amp;
     284
     285export QTDIR=/opt/qt-&qt4-version;
     286
     287./configure -prefix $QTDIR       \
     288            -sysconfdir /etc/xdg \
     289            -confirm-license     \
     290            -opensource          \
     291            -release             \
     292            -dbus-linked         \
     293            -openssl-linked      \
     294            -system-sqlite       \
     295            -plugin-sql-sqlite   \
     296            -no-phonon           \
     297            -no-phonon-backend   \
     298            -no-nis              \
     299            -no-openvg           \
     300            -nomake demos        \
     301            -nomake examples     \
     302            -optimized-qmake     &amp;&amp;
     303
     304make</userinput></screen>
     305
     306    <para>
     307      Now, as the <systemitem class="username">root</systemitem> user:
     308    </para>
     309
     310<screen role="root"><userinput>make install                 &amp;&amp;
     311ln -svfn qt-$VERSION /opt/qt &amp;&amp;
     312
     313install -v -Dm644 src/gui/dialogs/images/qtlogo-64.png \
     314                  /usr/share/pixmaps/qt4logo.png       &amp;&amp;
     315install -v -Dm644 tools/assistant/tools/assistant/images/assistant-128.png \
     316                  /usr/share/pixmaps/assistant-qt4.png &amp;&amp;
     317install -v -Dm644 tools/designer/src/designer/images/designer.png \
     318                  /usr/share/pixmaps/designer-qt4.png  &amp;&amp;
     319install -v -Dm644 tools/linguist/linguist/images/icons/linguist-128-32.png \
     320                  /usr/share/pixmaps/linguist-qt4.png  &amp;&amp;
     321install -v -Dm644 tools/qdbus/qdbusviewer/images/qdbusviewer-128.png \
     322                  /usr/share/pixmaps/qdbusviewer-qt4.png</userinput></screen>
     323
     324    <para>
     325      Remove references to the build directory from installed files by
     326      running the following command as the
     327      <systemitem class="username">root</systemitem> user:
     328    </para>
     329
     330<screen role="root"><userinput>for file in 3Support CLucene Core DBus Declarative DesignerComponents \
     331            Designer Gui Help Multimedia Network OpenGL Script \
     332            ScriptTools Sql Svg Test UiTools WebKit XmlPatterns Xml; do
     333  sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' \
     334       $QTDIR/lib/libQt${file}.prl
     335  perl -pi -e "s, -L$PWD/?\S+,,g" $QTDIR/lib/pkgconfig/Qt${file}.pc
     336done
     337
     338unset file</userinput></screen>
     339
    229340  </sect2>
    230341
     
    305416
    306417      <para>
    307         Create an environment variable needed by certain packages.
     418        If you installed <application>Qt</application> in
     419        <filename class="directory">/usr</filename>, create
     420        an environment variable needed by certain packages.
    308421        As the <systemitem class="username">root</systemitem> user:
    309422      </para>
     
    319432EOF</userinput></screen>
    320433
     434   <para>
     435      If you installed <application>Qt</application> in a location other
     436      than <filename class="directory">/usr</filename>, you need to update
     437      the following configuration files so that <application>Qt</application>
     438      is correctly found by other packages and system processes.
     439    </para>
     440
     441    <para>
     442      As the <systemitem class="username">root</systemitem> user, update
     443      the <filename>/etc/ld.so.conf</filename> file and the dynamic linker's
     444      run-time cache file:
     445   </para>
     446
     447<screen role="root"><userinput>cat &gt;&gt; /etc/ld.so.conf &lt;&lt; EOF
     448<literal># Begin Qt addition
     449   
     450/opt/qt/lib
     451   
     452# End Qt addition</literal>
     453EOF
     454
     455ldconfig</userinput></screen>
     456
     457   <para>
     458      As the <systemitem class="username">root</systemitem> user, create
     459      the <filename>/etc/profile.d/qt.sh</filename> file:
     460   </para>
     461
     462<screen role="root"><userinput>cat &gt; /etc/profile.d/qt.sh &lt;&lt; EOF
     463<literal># Begin /etc/profile.d/qt.sh
     464
     465QTDIR=/opt/qt
     466
     467pathappend /opt/qt/bin           PATH
     468pathappend /opt/qt/lib/pkgconfig PKG_CONFIG_PATH
     469
     470export QTDIR
     471
     472# End /etc/profile.d/qt.sh</literal>
     473EOF</userinput></screen>
     474
     475   <indexterm zone="qt4 qtconfig-qt4">
     476      <primary sortas="e-etc-profile.d-qt.sh">/etc/profile.d/qt.sh</primary>
     477   </indexterm>
     478
    321479      <para>
    322         Create the menu entries for installed applications.
     480        For all methods, Create the menu entries for installed applications.
    323481        As the <systemitem class="username">root</systemitem> user:
    324482      </para>
    325483
    326484<screen role="root"><userinput>install -dm755 /usr/share/applications
     485
    327486cat &gt; /usr/share/applications/qtconfig-qt4.desktop &lt;&lt; "EOF"
    328487<literal>[Desktop Entry]
     
    336495Categories=Qt;Settings;</literal>
    337496EOF
     497
    338498cat &gt; /usr/share/applications/assistant-qt4.desktop &lt;&lt; "EOF"
    339499<literal>[Desktop Entry]
     
    347507Categories=Qt;Development;Documentation;</literal>
    348508EOF
     509
    349510cat &gt; /usr/share/applications/designer-qt4.desktop &lt;&lt; "EOF"
    350511<literal>[Desktop Entry]
     
    359520Categories=Qt;Development;</literal>
    360521EOF
     522
    361523cat &gt; /usr/share/applications/linguist-qt4.desktop &lt;&lt; "EOF"
    362524<literal>[Desktop Entry]
     
    371533Categories=Qt;Development;</literal>
    372534EOF
     535
    373536cat &gt; /usr/share/applications/qdbusviewer-qt4.desktop &lt;&lt; "EOF"
    374537<literal>[Desktop Entry]
     
    417580          /usr/include/qt4,
    418581          /usr/lib/qt4,
    419           /usr/share/doc/qt4 and
     582          /usr/share/doc/qt4, and
    420583          /usr/share/qt4
     584          (OR $QTDIR)
    421585        </seg>
    422586      </seglistitem>
Note: See TracChangeset for help on using the changeset viewer.