Author: bdubbs
Date: Fri Jun 19 12:25:49 2015
New Revision: 16141
Log:
Simplify qt4 and qt5 install instructions.
Modified:
trunk/BOOK/introduction/welcome/changelog.xml
trunk/BOOK/x/lib/qt4.xml
trunk/BOOK/x/lib/qt5.xml
trunk/BOOK/xincludes/qt-alternatives.xml
Modified: trunk/BOOK/introduction/welcome/changelog.xml
==============================================================================
--- trunk/BOOK/introduction/welcome/changelog.xml Fri Jun 19 11:17:15
2015 (r16140)
+++ trunk/BOOK/introduction/welcome/changelog.xml Fri Jun 19 12:25:49
2015 (r16141)
@@ -48,6 +48,9 @@
<para>June 19th, 2015</para>
<itemizedlist>
<listitem>
+ <para>[bdubbs] - Simplify qt4 and qt5 install instructions.</para>
+ </listitem>
+ <listitem>
<para>[fernando] - Update to mariadb-10.0.20. Fixes
<ulink url="&blfs-ticket-root;6627">#6627</ulink>.</para>
</listitem>
Modified: trunk/BOOK/x/lib/qt4.xml
==============================================================================
--- trunk/BOOK/x/lib/qt4.xml Fri Jun 19 11:17:15 2015 (r16140)
+++ trunk/BOOK/x/lib/qt4.xml Fri Jun 19 12:25:49 2015 (r16141)
@@ -116,6 +116,55 @@
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="../../xincludes/qt-alternatives.xml"/>
+ <sect2 role="qt4-prefix">
+ <title>Setting the installation prefix</title>
+
+ <bridgehead renderas="sect3">Installing in /usr</bridgehead>
+
+ <para>
+ If you want to install <application>Qt4</application>
+ in <filename class="directory">/usr</filename>, set the
+ following environment variable:
+ </para>
+
+<screen><userinput>export QT4PREFIX=/usr</userinput></screen>
+
+ <bridgehead renderas="sect3">Installing in /opt/qt4</bridgehead>
+
+ <para>
+ If you want to install <application>Qt4</application>
+ in a directory other than <filename
+ class="directory">/usr</filename>, ie
+ <filename class="directory">/opt/qt4</filename>, set
+ the following environment variable:
+ </para>
+
+<screen><userinput>export QT4PREFIX=/opt/qt4</userinput></screen>
+
+ <tip>
+ <para>
+ Sometimes, the installation paths are hardcoded into installed files.
+ This is the reason why <filename class="directory">/opt/qt4</filename>
+ is used as installation prefix instead of <filename
+ class="directory">/opt/qt-&qt4-version;</filename>. To create a
+ versioned <application>Qt4</application> directory, you may rename
+ the directory and create a symlink:
+ </para>
+
+<screen role="root"><userinput>mkdir /opt/qt-&qt4-version;
+ln -sfnv qt-&qt4-version; /opt/qt4</userinput></screen>
+
+ <para>
+ Later on, you may want to install other versions of
+ <application>Qt4</application>. To do that, just remove the symlink
+ and use <filename class="directory">/opt/qt4</filename> as the
+ prefix again. Which version of <application>Qt4</application> you
+ use depends only on where the symlink points.
+ </para>
+ </tip>
+
+ </sect2>
+
<sect2 role="installation">
<title>Installation of Qt</title>
@@ -147,28 +196,23 @@
</para>
</note>
-<!-- ==== Method 1 ====== -->
- <bridgehead renderas="sect3">Method 1: Installing in /usr</bridgehead>
-
<para>
Install <application>Qt4</application> into the <filename
class='directory'>/usr</filename> hierarchy by running the following
commands:
</para>
-<screen><userinput>export QT4LINK=/usr
-
-./configure -prefix /usr \
- -bindir /usr/bin \
- -plugindir /usr/lib/qt4/plugins \
- -importdir /usr/lib/qt4/imports \
- -headerdir /usr/include/qt4 \
- -datadir /usr/share/qt4 \
- -sysconfdir /etc/xdg \
- -docdir /usr/share/doc/qt4 \
- -demosdir /usr/share/doc/qt4/demos \
- -examplesdir /usr/share/doc/qt4/examples \
- -translationdir /usr/share/qt4/translations \
+<screen><userinput>./configure -prefix $QT4PREFIX
\
+ -sysconfdir /etc/xdg \
+ -bindir $QT4BINDIR \
+ -plugindir $QT4PREFIX/lib/qt4/plugins \
+ -importdir $QT4PREFIX/lib/qt4/imports \
+ -headerdir $QT4PREFIX/include/qt4 \
+ -datadir $QT4PREFIX/share/qt4 \
+ -docdir $QT4PREFIX/share/doc/qt4 \
+ -translationdir $QT4PREFIX/share/qt4/translations \
+ -demosdir $QT4PREFIX/share/doc/qt4/demos \
+ -examplesdir $QT4PREFIX/share/doc/qt4/examples \
-confirm-license \
-opensource \
-release \
@@ -177,7 +221,6 @@
-system-sqlite \
-no-phonon \
-no-phonon-backend \
- -no-nis \
-no-openvg \
-nomake demos \
-nomake examples \
@@ -218,69 +261,13 @@
done
unset file</userinput></screen>
-<!-- ==== Method 2 ====== -->
- <bridgehead renderas="sect3">Method 2: Installing in
/opt/qt-&qt4-version;</bridgehead>
-
<para>
- This section provides for installing Qt4 almost all of the files in the
- <filename class="directory">/opt</filename> directory.
+ Install images and create the menu entries
+ for installed applications. Be sure that the <envar>QT4PREFIX</envar>
+ variable is defined in root's environment and
+ as the <systemitem class="username">root</systemitem> user:
</para>
-<screen><userinput>export QT4DIR=/opt/qt-&qt4-version; &&
-export QT4LINK=/opt/qt4 &&
-
-./configure -prefix $QT4DIR \
- -sysconfdir /etc/xdg \
- -confirm-license \
- -opensource \
- -release \
- -dbus-linked \
- -openssl-linked \
- -system-sqlite \
- -plugin-sql-sqlite \
- -no-phonon \
- -no-phonon-backend \
- -no-nis \
- -no-openvg \
- -nomake demos \
- -nomake examples \
- -optimized-qmake &&
-
-make</userinput></screen>
-
- <para>
- Now, as the <systemitem class="username">root</systemitem> user:
- </para>
-
-<screen role="root"><userinput>make install
-ln -svfn $QT4DIR /opt/qt4</userinput></screen>
-
- <para>
- Remove references to the build directory from installed files by
- running the following command as the
- <systemitem class="username">root</systemitem> user:
- </para>
-
-<screen role="root"><userinput>for file in `basename -a -s .prl
$QT4DIR/lib/lib*.prl`; do
- sed -r -e '/^QMAKE_PRL_BUILD_DIR/d' \
- -e 's/(QMAKE_PRL_LIBS =).*/\1/' \
- -i $QT4DIR/lib/${file}.prl
-
- perl -pi -e "s, -L$PWD/?\S+,,g" $QT4DIR/lib/pkgconfig/${file##lib}.pc
-done
-
-unset file</userinput></screen>
-
-<!-- ==== Common ====== -->
- <bridgehead renderas="sect3">Continuing for Both Methods</bridgehead>
-
- <para>
- For all methods, install images and create the menu entries
- for installed applications. Be sure that the <envar>QT4LINK</envar>
- variable is defined in root's environment and
- as the <systemitem class="username">root</systemitem> user:
- </para>
-
<screen role="root"><userinput>install -v -Dm644
src/gui/dialogs/images/qtlogo-64.png \
/usr/share/pixmaps/qt4logo.png &&
@@ -302,7 +289,7 @@
<literal>[Desktop Entry]
Name=Qt4 Assistant
Comment=Shows Qt4 documentation and examples
-Exec=$QT4LINK/bin/assistant
+Exec=$QT4PREFIX/bin/assistant
Icon=assistant-qt4.png
Terminal=false
Encoding=UTF-8
@@ -314,7 +301,7 @@
<literal>[Desktop Entry]
Name=Qt4 Designer
Comment=Design GUIs for Qt4 applications
-Exec=$QT4LINK/bin/designer
+Exec=$QT4PREFIX/bin/designer
Icon=designer-qt4.png
MimeType=application/x-designer;
Terminal=false
@@ -327,7 +314,7 @@
<literal>[Desktop Entry]
Name=Qt4 Linguist
Comment=Add translations to Qt4 applications
-Exec=$QT4LINK/bin/linguist
+Exec=$QT4PREFIX/bin/linguist
Icon=linguist-qt4.png
MimeType=text/vnd.trolltech.linguist;application/x-linguist;
Terminal=false
@@ -341,7 +328,7 @@
Name=Qt4 QDbusViewer
GenericName=D-Bus Debugger
Comment=Debug D-Bus applications
-Exec=$QT4LINK/bin/qdbusviewer
+Exec=$QT4PREFIX/bin/qdbusviewer
Icon=qdbusviewer-qt4.png
Terminal=false
Encoding=UTF-8
@@ -353,7 +340,7 @@
<literal>[Desktop Entry]
Name=Qt4 Config
Comment=Configure Qt4 behavior, styles, fonts
-Exec=$QT4LINK/bin/qtconfig
+Exec=$QT4PREFIX/bin/qtconfig
Icon=qt4logo.png
Terminal=false
Encoding=UTF-8
Modified: trunk/BOOK/x/lib/qt5.xml
==============================================================================
--- trunk/BOOK/x/lib/qt5.xml Fri Jun 19 11:17:15 2015 (r16140)
+++ trunk/BOOK/x/lib/qt5.xml Fri Jun 19 12:25:49 2015 (r16141)
@@ -135,6 +135,54 @@
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="../../xincludes/qt-alternatives.xml"/>
+ <sect2 role="qt5-prefix">
+ <title>Setting the installation prefix</title>
+
+ <bridgehead renderas="sect3">Installing in /usr</bridgehead>
+
+ <para>
+ If you want to install <application>Qt5</application>
+ in <filename class="directory">/usr</filename>, set the
+ following environment variable:
+ </para>
+
+<screen><userinput>export QT5PREFIX=/usr</userinput></screen>
+
+ <bridgehead renderas="sect3">Installing in /opt/qt5</bridgehead>
+
+ <para>
+ If you want to install <application>Qt5</application> in a directory
+ other than <filename class="directory">/usr</filename>, ie <filename
+ class="directory">/opt/qt4</filename>, set the following environment
+ variable:
+ </para>
+
+<screen><userinput>export QT5PREFIX=/opt/qt5</userinput></screen>
+
+ <tip>
+ <para>
+ Sometimes, the installation paths are hardcoded into installed files.
+ This is the reason why <filename class="directory">/opt/qt5</filename>
+ is used as installation prefix instead of <filename
+ class="directory">/opt/qt-&qt5-version;</filename>. To create a
+ versioned <application>Qt5</application> directory, you may rename
+ the directory and create a symlink:
+ </para>
+
+<screen role="root"><userinput>mkdir /opt/qt-&qt5-version;
+ln -sfnv qt-&qt5-version; /opt/qt5</userinput></screen>
+
+ <para>
+ Later on, you may want to install other versions of
+ <application>Qt4</application>. To do that, just remove the symlink
+ and use <filename class="directory">/opt/qt5</filename> as the
+ prefix again. Which version of <application>Qt5</application> you
+ use depends only on where the symlink points.
+ </para>
+ </tip>
+
+ </sect2>
+
<sect2 role="installation">
<title>Installation of Qt5</title>
@@ -157,47 +205,32 @@
</para>
</warning>
-<!-- ==== Method 1 ====== -->
- <bridgehead renderas="sect3">Method 1: Installing in /usr</bridgehead>
-
<para>
Install <application>Qt5</application> by running the
following commands:
</para>
- <!-- This is rather a bad idea. Most apps that I've seen using Qt5 look for
- -qt5 suffixed programs. On the other hand, the developer is used to
- running qmake, linguist, etc from the command line.
-
- <note>
- <para>
- If <emphasis>not</emphasis> also installing
<application>Qt4</application>
- into the /usr directory, change the entry for -bindir below to
/usr/bin.
- </para>
- </note> -->
-
-<screen><userinput>export QT5LINK=/usr
+<screen><userinput>./configure -prefix $QT5PREFIX
\
+ -sysconfdir /etc/xdg \
+ -bindir $QT5BINDIR \
+ -headerdir $QT5PREFIX/include/qt5 \
+ -archdatadir $QT5PREFIX/lib/qt5 \
+ -datadir $QT5PREFIX/share/qt5 \
+ -docdir $QT5PREFIX/share/doc/qt5 \
+ -translationdir $QT5PREFIX/share/qt5/translations \
+ -examplesdir $QT5PREFIX/share/doc/qt5/examples \
+ -confirm-license \
+ -opensource \
+ -dbus-linked \
+ -openssl-linked \
+ -journald \
+ -system-harfbuzz \
+ -system-sqlite \
+ -nomake examples \
+ -no-rpath \
+ -optimized-qmake \
+ -skip qtwebengine &&
-./configure -prefix /usr \
- -sysconfdir /etc/xdg \
- -bindir /usr/bin \
- -headerdir /usr/include/qt5 \
- -archdatadir /usr/lib/qt5 \
- -datadir /usr/share/qt5 \
- -docdir /usr/share/doc/qt5 \
- -translationdir /usr/share/qt5/translations \
- -examplesdir /usr/share/doc/qt5/examples \
- -confirm-license \
- -opensource \
- -dbus-linked \
- -openssl-linked \<!--
- -system-harfbuzz \-->
- -system-sqlite \
- -no-nis \
- -skip qtwebengine \
- -nomake examples \
- -nomake tests \
- -optimized-qmake &&
make</userinput></screen>
<para>
@@ -230,73 +263,9 @@
find /usr/lib/lib{qgsttools_p,Qt5*}.prl -exec sed -i -r \
'/^QMAKE_PRL_BUILD_DIR/d;s/(QMAKE_PRL_LIBS =).*/\1/' {}
\;</userinput></screen>
-<!-- ==== Method 2 ====== -->
-
- <bridgehead renderas="sect3">Method 2: Installing in
/opt/qt-&qt5-version;</bridgehead>
-
- <para>
- This section provides instructions for installing Qt5 in the
- <filename class="directory">/opt</filename> directory.
- </para>
-
-<screen><userinput>export QT5DIR=/opt/qt-&qt5-version; &&
-export QT5LINK=/opt/qt5 &&
-
-./configure -prefix $QT5DIR \
- -sysconfdir /etc/xdg \
- -confirm-license \
- -opensource \
- -dbus-linked \
- -openssl-linked \<!--
- -system-harfbuzz \-->
- -system-sqlite \
- -no-nis \
- -nomake examples \
- -nomake tests \
- -skip qtwebengine \
- -optimized-qmake &&
-make</userinput></screen>
-
- <para>
- Now, as the <systemitem class="username">root</systemitem> user:
- </para>
-
-<screen role="root"><userinput>make install &&
-ln -svfn $QT5DIR /opt/qt5</userinput></screen>
-
- <para>
- Remove references to the build directory from installed files by
- running the following commands as the
- <systemitem class="username">root</systemitem> user:
- </para>
-
-<screen role="root"><userinput>find $QT5DIR -name qt_lib_bootstrap_private.pri
\
- -exec sed -i -e "s:$PWD/qtbase:/$QT5DIR/lib/:g" {} \; &&
-
-find $QT5DIR -name \*.prl \
- -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;</userinput></screen>
-
-<!-- This is useful for packages looking explicitly for Qt apps with -qt5
suffix.
-
- <para>
- Symlink the <application>Qt5</application> executables into
- <filename class="directory">/usr/bin</filename> by running the
- following commands as the
- <systemitem class="username">root</systemitem> user:
- </para>
-
-<screen role="root"><userinput>ln -svf $QT5DIR /opt/qt5 &&
-
-for file in /opt/qt5/bin/*; do
- ln -sfv $file /usr/bin/$(basename $file)-qt5
-done</userinput></screen> -->
-
-<!-- ==== Common ====== -->
- <bridgehead renderas="sect3">Continuing for Both Methods</bridgehead>
-
<para>
- For all methods, install images and create the menu entries
- for installed applications. Be sure that the <envar>QT5LINK</envar>
+ Install images and create the menu entries
+ for installed applications. Be sure that the <envar>QT5PREFIX</envar>
variable is defined in root's environment and
as the <systemitem class="username">root</systemitem> user:
</para>
@@ -321,7 +290,7 @@
<literal>[Desktop Entry]
Name=Qt5 Assistant
Comment=Shows Qt5 documentation and examples
-Exec=$QT5LINK/bin/assistant
+Exec=$QT5PREFIX/bin/assistant
Icon=assistant-qt5.png
Terminal=false
Encoding=UTF-8
@@ -334,7 +303,7 @@
Name=Qt5 Designer
GenericName=Interface Designer
Comment=Design GUIs for Qt5 applications
-Exec=$QT5LINK/bin/designer
+Exec=$QT5PREFIX/bin/designer
Icon=designer-qt5.png
MimeType=application/x-designer;
Terminal=false
@@ -347,7 +316,7 @@
<literal>[Desktop Entry]
Name=Qt5 Linguist
Comment=Add translations to Qt5 applications
-Exec=$QT5LINK/bin/linguist
+Exec=$QT5PREFIX/bin/linguist
Icon=linguist-qt5.png
MimeType=text/vnd.trolltech.linguist;application/x-linguist;
Terminal=false
@@ -361,7 +330,7 @@
Name=Qt5 QDbusViewer
GenericName=D-Bus Debugger
Comment=Debug D-Bus applications
-Exec=$QT5LINK/bin/qdbusviewer
+Exec=$QT5PREFIX/bin/qdbusviewer
Icon=qdbusviewer-qt5.png
Terminal=false
Encoding=UTF-8
Modified: trunk/BOOK/xincludes/qt-alternatives.xml
==============================================================================
--- trunk/BOOK/xincludes/qt-alternatives.xml Fri Jun 19 11:17:15 2015
(r16140)
+++ trunk/BOOK/xincludes/qt-alternatives.xml Fri Jun 19 12:25:49 2015
(r16141)
@@ -26,9 +26,9 @@
the choice of installation methods is easier. You can either
install the components in the several directories of the <filename
class='directory'>/usr</filename> hierarchy or install the
- entire package in a separate directory of your choice. We
+ entire package in a separate directory of your choice. <!-- We
refer to these options below as "Method 1: Installing in /usr"
- and "Method 2: Installing in /opt".</para>
+ and "Method 2: Installing in /opt". --></para>
<para>If both versions of Qt are to be installed, one or both versions need
to be installed in a separate directory. For the purposes here we use the
@@ -50,11 +50,10 @@
an existing, known working instance of Qt.</para>
<para> The advantage of installing <application>Qt</application> in a
- custom directory such as
- <filename class='directory'>/opt/qt-&qt4-version;</filename> or
- <filename class='directory'>/opt/qt-&qt5-version;</filename> or
- is that it keeps all the
- package files consolidated in a dedicated directory hierarchy. By using
+ custom directory such as <filename
+ class='directory'>/opt/qt-&qt4-version;</filename> or <filename
+ class='directory'>/opt/qt-&qt5-version;</filename> is that it keeps all
+ the package files consolidated in a dedicated directory hierarchy. By using
this method, an update can be made without overwriting a previous
installation and users can easily revert to a previous version by changing
one symbolic link or merely changing the PATH variable. It also allows a
--
http://lists.linuxfromscratch.org/listinfo/blfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page