From ec7940be5b72313817c92396b780cea2105fb5fe Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Tue, 25 Feb 2014 19:00:30 +0000 Subject: [PATCH] Rewrite Qt pages Add corrections for some paths (e.g. man pages) Tags git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@12783 af4574ff-66df-0310-9fd7-8a98e5e911e0 --- {general/genutils => archive}/qtchooser.xml | 0 general.ent | 4 +- general/genutils/genutils.xml | 1 - general/prog/guile.xml | 53 ++- general/sysutils/udisks.xml | 2 +- kde/core/phonon-backend-gstreamer.xml | 2 +- kde/intro/pre-install-config.xml | 2 +- multimedia/libdriv/libmpeg2.xml | 2 +- networking/netlibs/glib-networking.xml | 2 +- networking/netlibs/libsoup.xml | 4 +- postlfs/config/profile.xml | 4 +- x/lib/qt4.xml | 414 ++++++++------------ x/lib/qt5.xml | 366 +++++++---------- xincludes/qt-alternatives.xml | 64 +++ xincludes/setqt.xml | 37 ++ 15 files changed, 458 insertions(+), 499 deletions(-) rename {general/genutils => archive}/qtchooser.xml (100%) create mode 100644 xincludes/qt-alternatives.xml create mode 100644 xincludes/setqt.xml diff --git a/general/genutils/qtchooser.xml b/archive/qtchooser.xml similarity index 100% rename from general/genutils/qtchooser.xml rename to archive/qtchooser.xml diff --git a/general.ent b/general.ent index ae49ebd4e5..eb86bf35d0 100644 --- a/general.ent +++ b/general.ent @@ -1,12 +1,12 @@ - + - + diff --git a/general/genutils/genutils.xml b/general/genutils/genutils.xml index 5675bee314..5160e614ac 100644 --- a/general/genutils/genutils.xml +++ b/general/genutils/genutils.xml @@ -33,7 +33,6 @@ $Date$ - diff --git a/general/prog/guile.xml b/general/prog/guile.xml index 3e2cc34d5c..0c89d12910 100644 --- a/general/prog/guile.xml +++ b/general/prog/guile.xml @@ -98,15 +98,24 @@ commands: -./configure --prefix=/usr \ - --disable-static \ - --docdir=/usr/share/doc/guile-&guile-version; && +./configure --prefix=/usr --disable-static && make && make html && makeinfo --plaintext -o doc/r5rs/r5rs.txt doc/r5rs/r5rs.texi && makeinfo --plaintext -o doc/ref/guile.txt doc/ref/guile.texi + + If you have installed and wish to build alternate + formats (PDF and postscript) of the documentation, issue the following + commands: + + +for DIRNAME in r5rs ref; do + make -k -C doc/${DIRNAME} pdf ps +done && +unset DIRNAME + To test the results, issue: make check. @@ -115,21 +124,37 @@ makeinfo --plaintext -o doc/ref/guile.txt doc/ref/guile.texiroot user: -make install && -make install-html && +make install && -mv /usr/share/doc/guile-&guile-version;/{guile.html,ref} && -mv /usr/share/doc/guile-&guile-version;/r5rs{.html,} && +find examples -name "Makefile*" -delete && +install -v -dm755 /usr/share/doc/guile-&guile-version; && +cp -vR examples /usr/share/doc/guile-&guile-version; && -find examples -name "Makefile*" -exec rm {} \; && -cp -vR examples /usr/share/doc/guile-&guile-version; && - -for DIRNAME in r5rs ref -do +for DIRNAME in r5rs ref; do + install -v -dm755 /usr/share/doc/guile-&guile-version;/${DIRNAME} && + install -v -m644 doc/${DIRNAME}/*.txt \ + /usr/share/doc/guile-&guile-version;/${DIRNAME} && + + if [ -d doc/${DIRNAME}/${DIRNAME}.html ]; then + cp -Rv doc/${DIRNAME}/${DIRNAME}.html \ /usr/share/doc/guile-&guile-version;/${DIRNAME} -done && -unset DIRNAME + fi +done + +cp -vR doc/ref/guile.html /usr/share/doc/guile-&guile-version;/ref + + + If you built the alternate formats of the documentation, install them + using the following commands issued by the + root user: + + +for DIRNAME in r5rs ref +do + install -v -m644 doc/${DIRNAME}/*.{pdf,ps,dvi} \ + /usr/share/doc/guile-&guile-version;/${DIRNAME} +done diff --git a/general/sysutils/udisks.xml b/general/sysutils/udisks.xml index 5ed6834ed3..b9014bf987 100644 --- a/general/sysutils/udisks.xml +++ b/general/sysutils/udisks.xml @@ -116,7 +116,7 @@ make Now, as the root user: -make install +make profiledir=/etc/bash_completion.d install diff --git a/kde/core/phonon-backend-gstreamer.xml b/kde/core/phonon-backend-gstreamer.xml index 1ecbc7bb18..a9a6122c4f 100644 --- a/kde/core/phonon-backend-gstreamer.xml +++ b/kde/core/phonon-backend-gstreamer.xml @@ -32,7 +32,7 @@ This package provides a Phonon backend which utilizes the GStreamer media framework. - &lfs74_checked; + &lfs75_checked; Package Information diff --git a/kde/intro/pre-install-config.xml b/kde/intro/pre-install-config.xml index eb59c07a3e..d9e293cf28 100644 --- a/kde/intro/pre-install-config.xml +++ b/kde/intro/pre-install-config.xml @@ -38,7 +38,7 @@ additional configuration changes. Best practice is to add those to your system or personal profile: -cat > /etc/profile.d/kde.sh << EOF +cat > /etc/profile.d/kde.sh << 'EOF' # Begin /etc/profile.d/kde.sh &kde-dir-var;=/opt/kde diff --git a/multimedia/libdriv/libmpeg2.xml b/multimedia/libdriv/libmpeg2.xml index 202e8c93d9..a39ed9ce39 100644 --- a/multimedia/libdriv/libmpeg2.xml +++ b/multimedia/libdriv/libmpeg2.xml @@ -36,7 +36,7 @@ This is useful for programs and applications needing to decode MPEG-2 and MPEG-1 video streams. - &lfs74_checked; + &lfs75_checked; Package Information diff --git a/networking/netlibs/glib-networking.xml b/networking/netlibs/glib-networking.xml index bb1529a83f..411475cb21 100644 --- a/networking/netlibs/glib-networking.xml +++ b/networking/netlibs/glib-networking.xml @@ -11,7 +11,7 @@ - + ]> diff --git a/networking/netlibs/libsoup.xml b/networking/netlibs/libsoup.xml index 7debc16acf..df689a6666 100644 --- a/networking/netlibs/libsoup.xml +++ b/networking/netlibs/libsoup.xml @@ -11,7 +11,7 @@ - + ]> @@ -35,7 +35,7 @@ The libsoup is HTTP client/server library for GNOME. It uses GObject and the GLib main loop to integrate with GNOME applications and - it also has asynchronous API for use in threaded applications. + it also has an asynchronous API for use in threaded applications. &lfs75_checked; diff --git a/postlfs/config/profile.xml b/postlfs/config/profile.xml index 5b9dc9fc0a..f293bbf471 100644 --- a/postlfs/config/profile.xml +++ b/postlfs/config/profile.xml @@ -128,6 +128,7 @@ pathappend () { export $PATHVARIABLE="${!PATHVARIABLE:+${!PATHVARIABLE}:}$1" } +export -f pathremove pathprepend pathappend # Set the initial path export PATH=/bin:/usr/bin @@ -157,9 +158,6 @@ for script in /etc/profile.d/*.sh ; do fi done -# Now to clean up -unset pathremove pathprepend pathappend - # End /etc/profile EOF diff --git a/x/lib/qt4.xml b/x/lib/qt4.xml index 1e7396872c..a9efb9089a 100644 --- a/x/lib/qt4.xml +++ b/x/lib/qt4.xml @@ -105,10 +105,8 @@ (For QtWebKit HTML5 Video), or , , - , - , and - (runtime, if also installing Qt5 and - installing in /usr) + , and + User Notes: @@ -116,63 +114,11 @@ + + Installation of Qt - - There are several ways to install a complicated package such as - Qt. The files are not completely position - independent. Installation procedures execute the program - pkg-config to determine the location of package - executables, libraries, headers, and other files. For - Qt, pkg-config will look - for the appropriate lib/pkgconfig/Qt*.pc files - which must be modified if relocating the package. These files are set up - correctly by the build process. - - - - The default installation places the files in /usr/local/qt/. Many commercial - distributions place the files in the system's /usr hierarchy. The package can also be - installed in an arbitrary directory. - - - - The advantage of installing in /usr is that no updates to the - /etc/ld.so.conf or - /etc/man_db.conf files are required. The package - files are distributed within several subdirectories of the /usr hierarchy. This is the method that - most commercial distributions use. It is also supported by the - optional qtchooser application. - - - - The disadvantage of installing in /usr is that the executable filenames - for Qt4 and Qt5 - conflict if both packages are installed in the - same directory. The instructions below give a workaround for - this problem using the helper program . - This requires renaming the Qt executables with a version suffix. - - - - The advantage of installing Qt4 in a custom - directory such as /opt/qt-&qt4-version; 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 developer to maintain multiple versions of - Qt4 or Qt5 - for testing. - - If you did not install some of the recommended dependencies, examine @@ -200,26 +146,25 @@ + Method 1: Installing in /usr - Install Qt4 by running the - following commands: + Install Qt4 into the /usr hierarchy by running the following + commands: - - If not also installing Qt5 - into the /usr directory, change the entry for -bindir below to /usr/bin. - +export QTLINK=/usr - -sed -i -e "/#if/d" -e "/#error/d" -e "/#endif/d" \ +sed -i -e "/#if/d" -e "/#error/d" -e "/#endif/d" \ config.tests/unix/libmng/libmng.cpp && + sed -i '/CONFIG -/ a\isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../..' \ src/3rdparty/webkit/Source/WebKit2/DerivedSources.pro && ./configure -prefix /usr \ - -bindir /usr/lib/qt4/bin \ + -bindir /usr/bin \ -plugindir /usr/lib/qt4/plugins \ -importdir /usr/lib/qt4/imports \ -headerdir /usr/include/qt4 \ @@ -257,22 +202,10 @@ make find . -name "*.pc" -exec perl -pi -e "s, -L$PWD/?\S+,,g" {} \; - - Now, as the root user: - + Now as the root user: make install && -rm -rf /usr/tests && -install -v -Dm644 src/gui/dialogs/images/qtlogo-64.png \ - /usr/share/pixmaps/qt4logo.png && -install -v -Dm644 tools/assistant/tools/assistant/images/assistant-128.png \ - /usr/share/pixmaps/assistant-qt4.png && -install -v -Dm644 tools/designer/src/designer/images/designer.png \ - /usr/share/pixmaps/designer-qt4.png && -install -v -Dm644 tools/linguist/linguist/images/icons/linguist-128-32.png \ - /usr/share/pixmaps/linguist-qt4.png && -install -v -Dm644 tools/qdbus/qdbusviewer/images/qdbusviewer-128.png \ - /usr/share/pixmaps/qdbusviewer-qt4.png +rm -rf /usr/tests Remove references to the build directory from installed files by @@ -282,51 +215,32 @@ install -v -Dm644 tools/qdbus/qdbusviewer/images/qdbusviewer-128.png \ for file in 3Support CLucene Core DBus Declarative DesignerComponents \ Designer Gui Help Multimedia Network OpenGL Script \ - ScriptTools Sql Svg Test UiTools WebKit XmlPatterns Xml phonon -do - [ -e /usr/lib/libQt${file}.prl ] && sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' \ - /usr/lib/libQt${file}.prl + ScriptTools Sql Svg Test UiTools WebKit XmlPatterns Xml phonon; do + + [ -e /usr/lib/libQt${file}.prl ] && + sed -r '/^QMAKE_PRL_BUILD_DIR/d;s/(QMAKE_PRL_LIBS =).*/\1/' \ + -i /usr/lib/libQt${file}.prl done unset file - - If also installing Qt5 into /usr, - symlink the Qt4 executables into - /usr/bin by running the - following commands as the - root user: - - -for file in /usr/lib/qt4/bin/* -do - ln -sfv ../lib/qt4/bin/$(basename $file) /usr/bin/$(basename $file)-qt4 -done - + Method 2: Installing in /opt/qt-&qt4-version; - This section provides an alternate way to install Qt4 by installing - almost all of the files in the /opt - directory. This allows management of all Qt4 related files in one unit. - For instance, a new version of Qt4 can be installed without over-writing - the existing installation and entire Qt4 instances can be easily removed. - However, it has the disadvantage of needing some extra configuration. - - - - - Install Qt in /opt/qt-&qt4-version; - by running the following commands: + This section provides for installing Qt4 almost all of the files in the + /opt directory. -sed -i -e "/#if/d" -e "/#error/d" -e "/#endif/d" \ +export QTDIR=/opt/qt-&qt4-version; && +export QTLINK=/opt/qt && + +sed -i -e "/#if/d" -e "/#error/d" -e "/#endif/d" \ config.tests/unix/libmng/libmng.cpp && + sed -i '/CONFIG -/ a\isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../..' \ src/3rdparty/webkit/Source/WebKit2/DerivedSources.pro && -export QTDIR=/opt/qt-&qt4-version; - -./configure -prefix $QTDIR \ +./configure -prefix $QTDIR \ -sysconfdir /etc/xdg \ -confirm-license \ -opensource \ @@ -349,19 +263,8 @@ make Now, as the root user: -make install && - -install -v -dm755 /usr/share/pixmaps/ && -install -v -Dm644 src/gui/dialogs/images/qtlogo-64.png \ - /usr/share/pixmaps/qt4logo.png && -install -v -Dm644 tools/assistant/tools/assistant/images/assistant-128.png \ - /usr/share/pixmaps/assistant-qt4.png && -install -v -Dm644 tools/designer/src/designer/images/designer.png \ - /usr/share/pixmaps/designer-qt4.png && -install -v -Dm644 tools/linguist/linguist/images/icons/linguist-128-32.png \ - /usr/share/pixmaps/linguist-qt4.png && -install -v -Dm644 tools/qdbus/qdbusviewer/images/qdbusviewer-128.png \ - /usr/share/pixmaps/qdbusviewer-qt4.png +make install +ln -svfn $QTDIR /opt/qt Remove references to the build directory from installed files by @@ -370,25 +273,104 @@ install -v -Dm644 tools/qdbus/qdbusviewer/images/qdbusviewer-128.png \ for file in `basename -a -s .prl $QTDIR/lib/lib*.prl`; do - sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' \ - $QTDIR/lib/${file}.prl - perl -pi -e "s, -L$PWD/?\S+,,g" $QTDIR/lib/pkgconfig/${file##lib}.pc + sed -r '/^QMAKE_PRL_BUILD_DIR/d' \ + -r 's/(QMAKE_PRL_LIBS =).*/\1/' \ + -i $QTDIR/lib/${file}.prl + + perl -pi -e "s, -L$PWD/?\S+,,g" $QTDIR/lib/pkgconfig/${file##lib}.pc done unset file - - Symlink the Qt4 executables into - /usr/bin by running the - following commands as the - root user: - + + Continuing for Both Methods -ln -svf $QTDIR /opt/qt && + + For all methods, install images and create the menu entries + for installed applications. Be sure that the QTLINK + variable is defined in root's environment and + as the root user: + -for file in /opt/qt/bin/*; do - ln -sfvn $file /usr/bin/$(basename $file)-qt4 -done +install -v -Dm644 src/gui/dialogs/images/qtlogo-64.png \ + /usr/share/pixmaps/qt4logo.png && + +install -v -Dm644 tools/assistant/tools/assistant/images/assistant-128.png \ + /usr/share/pixmaps/assistant-qt4.png && + +install -v -Dm644 tools/designer/src/designer/images/designer.png \ + /usr/share/pixmaps/designer-qt4.png && + +install -v -Dm644 tools/linguist/linguist/images/icons/linguist-128-32.png \ + /usr/share/pixmaps/linguist-qt4.png && + +install -v -Dm644 tools/qdbus/qdbusviewer/images/qdbusviewer-128.png \ + /usr/share/pixmaps/qdbusviewer-qt4.png && + +install -dm755 /usr/share/applications && + +cat > /usr/share/applications/assistant-qt4.desktop << EOF +[Desktop Entry] +Name=Qt4 Assistant +Comment=Shows Qt4 documentation and examples +Exec=$QTLINK/bin/assistant +Icon=assistant-qt4.png +Terminal=false +Encoding=UTF-8 +Type=Application +Categories=Qt;Development;Documentation; +EOF + +cat > /usr/share/applications/designer-qt4.desktop << EOF +[Desktop Entry] +Name=Qt4 Designer +Comment=Design GUIs for Qt4 applications +Exec=$QTLINK/bin/designer +Icon=designer-qt4.png +MimeType=application/x-designer; +Terminal=false +Encoding=UTF-8 +Type=Application +Categories=Qt;Development; +EOF + +cat > /usr/share/applications/linguist-qt4.desktop << EOF +[Desktop Entry] +Name=Qt4 Linguist +Comment=Add translations to Qt4 applications +Exec=$QTLINK/bin/linguist +Icon=linguist-qt4.png +MimeType=text/vnd.trolltech.linguist;application/x-linguist; +Terminal=false +Encoding=UTF-8 +Type=Application +Categories=Qt;Development; +EOF + +cat > /usr/share/applications/qdbusviewer-qt4.desktop << EOF +[Desktop Entry] +Name=Qt4 QDbusViewer +GenericName=D-Bus Debugger +Comment=Debug D-Bus applications +Exec=$QTLINK/bin/qdbusviewer +Icon=qdbusviewer-qt4.png +Terminal=false +Encoding=UTF-8 +Type=Application +Categories=Qt;Development;Debugger; +EOF + +cat > /usr/share/applications/qtconfig-qt4.desktop << EOF +[Desktop Entry] +Name=Qt4 Config +Comment=Configure Qt4 behavior, styles, fonts +Exec=$QTLINK/bin/qtconfig-qt4 +Icon=qt4logo.png +Terminal=false +Encoding=UTF-8 +Type=Application +Categories=Qt;Settings; +EOF @@ -398,7 +380,7 @@ done sed -i ...: First command fixes detection of libmng 2.0 and second one prevents configure - script to write in root directory if building as privileged user. + script from writing to the root directory if building as privileged user. @@ -419,7 +401,7 @@ done -nomake examples -nomake demos: These switches disable building programs that are only of - interest to a Qt developer. + interest to a developer using Qt. @@ -483,7 +465,6 @@ done # Begin /etc/profile.d/qt.sh QTDIR=/usr - export QTDIR # End /etc/profile.d/qt.sh @@ -532,78 +513,11 @@ export QTDIR # End /etc/profile.d/qt.sh EOF - - For all methods, create the menu entries for installed applications. - As the root user: - - -install -dm755 /usr/share/applications - -cat > /usr/share/applications/qtconfig-qt4.desktop << "EOF" -[Desktop Entry] -Name=Qt4 Config -Comment=Configure Qt4 behavior, styles, fonts -Exec=qtconfig-qt4 -Icon=qt4logo -Terminal=false -Encoding=UTF-8 -Type=Application -Categories=Qt;Settings; -EOF - -cat > /usr/share/applications/assistant-qt4.desktop << "EOF" -[Desktop Entry] -Name=Qt4 Assistant -Comment=Shows Qt4 documentation and examples -Exec=assistant-qt4 -Icon=assistant-qt4 -Terminal=false -Encoding=UTF-8 -Type=Application -Categories=Qt;Development;Documentation; -EOF - -cat > /usr/share/applications/designer-qt4.desktop << "EOF" -[Desktop Entry] -Name=Qt4 Designer -Comment=Design GUIs for Qt4 applications -Exec=designer-qt4 -Icon=designer-qt4 -MimeType=application/x-designer; -Terminal=false -Encoding=UTF-8 -Type=Application -Categories=Qt;Development; -EOF - -cat > /usr/share/applications/linguist-qt4.desktop << "EOF" -[Desktop Entry] -Name=Qt4 Linguist -Comment=Add translations to Qt4 applications -Exec=linguist-qt4 -Icon=linguist-qt4 -MimeType=text/vnd.trolltech.linguist;application/x-linguist; -Terminal=false -Encoding=UTF-8 -Type=Application -Categories=Qt;Development; -EOF - -cat > /usr/share/applications/qdbusviewer-qt4.desktop << "EOF" -[Desktop Entry] -Name=Qt4 QDbusViewer -GenericName=D-Bus Debugger -Comment=Debug D-Bus applications -Exec=qdbusviewer-qt4 -Icon=qdbusviewer-qt4 -Terminal=false -Encoding=UTF-8 -Type=Application -Categories=Qt;Development;Debugger; -EOF - + + @@ -616,13 +530,13 @@ EOF - assistant-qt4, designer-qt4, lconvert-qt4, linguist-qt4, - lrelease-qt4, lupdate-qt4, moc-qt4, pixeltool-qt4, - qcollectiongenerator-qt4, qdbuscpp2xml-qt4, qdbus-qt4, - qdbusviewer-qt4, qdbusxml2cpp-qt4, qdoc3-qt4, qhelpconverter-qt4, - qhelpgenerator-qt4, qmake-qt4, qmlplugindump-qt4, qmlviewer-qt4, - qt3to4-qt4, qtconfig-qt4, qttracereplay-qt4, rcc-qt4, uic3-qt4, - uic-qt4, xmlpatterns-qt4 and xmlpatternsvalidator-qt4 + assistant, designer, lconvert, linguist, + lrelease, lupdate, moc, pixeltool, + qcollectiongenerator, qdbuscpp2xml, qdbus, + qdbusviewer, qdbusxml2cpp, qdoc3, qhelpconverter, + qhelpgenerator, qmake, qmlplugindump, qmlviewer, + qt3to4, qtconfig, qttracereplay, rcc, uic3, + uic, xmlpatterns, and xmlpatternsvalidator libQt3Support.so, libQtCLucene.so, libQtCore.so, libQtDBus.so, @@ -630,14 +544,16 @@ EOF libQtDesigner.so, libQtGui.so, libQtHelp.so, libQtMultimedia.so, libQtNetwork.so, libQtOpenGL.so, libQtScript.so, libQtScriptTools.so, libQtSql.so, libQtSvg.so, libQtTest.so, libQtWebKit.so, - libQtXmlPatterns.so and libQtXml.so + libQtXmlPatterns.so, and libQtXml.so /usr/include/qt4, /usr/lib/qt4, /usr/share/doc/qt4, and - /usr/share/qt4 (OR $QTDIR) - (OR $QTDIR) + /usr/share/qt4 + OR + /opt/qt and + /opt/qt-&qt4-version; @@ -648,19 +564,19 @@ EOF - assistant-qt4 + assistant is a tool for presenting on-line documentation. - assistant-qt4 + assistant - designer-qt4 + designer is a full-fledged GUI builder. It includes @@ -669,39 +585,39 @@ EOF property editor. - designer-qt4 + designer - linguist-qt4 + linguist provides support for translating applications into local languages. - linguist-qt4 + linguist - lrelease-qt4 + lrelease is a simple command line tool. It reads a Qt project file and produces message files used by the application. - lrelease-qt4 + lrelease - lupdate-qt4 + lupdate reads a Qt project file, finds the translatable @@ -710,38 +626,38 @@ EOF files listed in the project file. - lupdate-qt4 + lupdate - moc-qt4 + moc generates Qt meta object support code. - moc-qt4 + moc - pixeltool-qt4 + pixeltool is a desktop magnifier and as you move your mouse around the screen it will show the magnified contents in its window. - pixeltool-qt4 + pixeltool - qmake-qt4 + qmake uses information stored in project files to @@ -749,61 +665,61 @@ EOF generates. - qmake-qt4 + qmake - qt3to4-qt4 + qt3to4 qt3to4 is a tool to help update Qt3 code to Qt4. - qt3to4-qt4 + qt3to4 - qtconfig-qt4 + qtconfig is used to customize the appearance of Qt applications. - qtconfig-qt4 + qtconfig - rcc-qt4 + rcc is a resource compiler used in conjunction with designer. - rcc-qt4 + rcc - uic-qt4 + uic is a Qt user interface compiler. - uic-qt4 + uic - uic3-qt4 + uic3 is a tool to generate Qt4 code out of @@ -811,7 +727,7 @@ EOF version of designer. - uic3-qt4 + uic3 diff --git a/x/lib/qt5.xml b/x/lib/qt5.xml index 69bb37f54c..2c85358bd1 100644 --- a/x/lib/qt5.xml +++ b/x/lib/qt5.xml @@ -38,11 +38,10 @@ with a graphical user interface (GUI) (in which cases Qt5 is classified as a widget toolkit), and also used for developing non-GUI programs such as command-line tools - and consoles for servers. One of the major users of - Qt5 is KDE Frameworks 5. + and consoles for servers. - &lfs74_checked; + &lfs75_checked; Package Information @@ -97,7 +96,7 @@ , , , + , Doesn't have all the features that the included one has. --> , , , @@ -122,75 +121,17 @@ - Required (Runtime) - - (if installing both - Qt4 and Qt5 - and installing in /usr) - - User Notes: + + Installation of Qt5 - - There are several ways to install a complicated package such as - Qt5. The files are not completely position - independent. Installation procedures execute the program - pkg-config to determine the location of package - executables, libraries, headers, and other files. For - Qt5, pkg-config will look - for the appropriate lib/pkgconfig/Qt5*.pc files - which must be modified if relocating the package. These files are set up - correctly by the build process. - - - - The default installation places the files in /usr/local/qt. Many - distributions place the files in the system's /usr hierarchy. The package can - also be installed in an arbitrary directory. - - - - The advantage of installing in /usr is that no updates to the - /etc/ld.so.conf or - /etc/man_db.conf files are required. The package - files are distributed within several subdirectories of the /usr hierarchy. This is the method that - most distributions use. - - - - The disadvantage of installing in /usr is that the executable filenames - for Qt4 and Qt5 - conflict if both packages are installed in the - same directory. The instructions below give a workaround for - this problem using the helper programs from . - - - - - The advantage of installing Qt5 in a custom - directory such as /opt/qt-&qt5-version; 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 developer to maintain multiple versions of - Qt4 or Qt5 - for testing. - - If you did not install some of the recommended dependencies, examine @@ -208,7 +149,7 @@ not be in use during the install process. - + Method 1: Installing in /usr @@ -217,7 +158,8 @@ -./configure -prefix /usr \ +export QTLINK=/usr + +./configure -prefix /usr \ -sysconfdir /etc/xdg \ - -bindir /usr/lib/qt5/bin \ + -bindir /usr/bin \ -headerdir /usr/include/qt5 \ -archdatadir /usr/lib/qt5 \ -datadir /usr/share/qt5 \ @@ -247,6 +191,10 @@ -optimized-qmake && make + + This package does not come with a test suite. + + Remove references to the build directory from the .pc files by running @@ -255,23 +203,11 @@ make find . -name "*.pc" -exec perl -pi -e "s, -L$PWD/?\S+,,g" {} \; - - This package does not come with a test suite. - - Now, as the root user: -make install && -install -v -Dm644 qttools/src/assistant/assistant/images/assistant-128.png \ - /usr/share/pixmaps/assistant-qt5.png && -install -v -Dm644 qttools/src/designer/src/designer/images/designer.png \ - /usr/share/pixmaps/designer-qt5.png && -install -v -Dm644 qttools/src/linguist/linguist/images/icons/linguist-128-32.png \ - /usr/share/pixmaps/linguist-qt5.png && -install -v -Dm644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer-128.png \ - /usr/share/pixmaps/qdbusviewer-qt5.png +make install Remove references to the build directory from installed files by @@ -279,39 +215,24 @@ install -v -Dm644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer-128.png \ root user: -sed -i -e "s:$PWD/qtbase:/usr/lib/qt5:g" \ - /usr/lib/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri && -find /usr/lib/lib{qgsttools_p,Qt5*}.prl -exec sed -i -e \ - '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \; + +sed -e "s:$PWD/qtbase:/usr/lib/qt5:g" \ + -i /usr/lib/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri && - - Symlink the - Qt5 executables into - /usr/bin by running the - following commands as the - root user: - +find /usr/lib/lib{qgsttools_p,Qt5*}.prl -exec sed -i -r \ + '/^QMAKE_PRL_BUILD_DIR/d;s/(QMAKE_PRL_LIBS =).*/\1/' {} \; -for file in /usr/lib/qt5/bin/* -do - ln -sfv ../lib/qt5/bin/$(basename $file) /usr/bin/$(basename $file)-qt5 -done + Method 2: Installing in /opt/qt-&qt5-version; - - This section provides an alternate way to install Qt5 - by installing almost all of the files in the /opt directory. This allows management of all - Qt5 related files in one unit. For instance, a new - version of Qt5 can be installed without over-writing - the existing installation and entire Qt5 instances can - be easily removed. However, it has the disadvantage of needing some extra - configuration and you need to switch manually between Qt4 - and Qt5 executables when needed. - + + This section provides for installing Qt4 almost all of the files in the + /opt directory. + -export QT5DIR=/opt/qt-&qt5-version; +export QT5DIR=/opt/qt-&qt5-version; && +export QTLINK=/opt/qt5 && ./configure -prefix $QT5DIR \ -sysconfdir /etc/xdg \ @@ -332,16 +253,7 @@ make make install && - -install -v -dm755 /usr/share/pixmaps/ && -install -v -Dm644 qttools/src/assistant/assistant/images/assistant-128.png \ - /usr/share/pixmaps/assistant-qt5.png && -install -v -Dm644 qttools/src/designer/src/designer/images/designer.png \ - /usr/share/pixmaps/designer-qt5.png && -install -v -Dm644 qttools/src/linguist/linguist/images/icons/linguist-128-32.png \ - /usr/share/pixmaps/linguist-qt5.png && -install -v -Dm644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer-128.png \ - /usr/share/pixmaps/qdbusviewer-qt5.png +ln -svfn $QT5DIR /opt/qt5 Remove references to the build directory from installed files by @@ -355,8 +267,7 @@ install -v -Dm644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer-128.png \ find $QT5DIR -name \*.prl \ -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; - + + + + Continuing for Both Methods + + + For all methods, install images and create the menu entries + for installed applications. Be sure that the QTLINK + variable is defined in root's environment and + as the root user: + + +install -v -dm755 /usr/share/pixmaps/ && + +install -v -Dm644 qttools/src/assistant/assistant/images/assistant-128.png \ + /usr/share/pixmaps/assistant-qt5.png && + +install -v -Dm644 qttools/src/designer/src/designer/images/designer.png \ + /usr/share/pixmaps/designer-qt5.png && + +install -v -Dm644 qttools/src/linguist/linguist/images/icons/linguist-128-32.png \ + /usr/share/pixmaps/linguist-qt5.png && + +install -v -Dm644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer-128.png \ + /usr/share/pixmaps/qdbusviewer-qt5.png && + +install -dm755 /usr/share/applications && + +cat > /usr/share/applications/assistant-qt5.desktop << EOF +[Desktop Entry] +Name=Qt5 Assistant +Comment=Shows Qt5 documentation and examples +Exec=$QTLINK/bin/assistant +Icon=assistant-qt5.png +Terminal=false +Encoding=UTF-8 +Type=Application +Categories=Qt;Development;Documentation; +EOF + +cat > /usr/share/applications/designer-qt5.desktop << EOF +[Desktop Entry] +Name=Qt5 Designer +GenericName=Interface Designer +Comment=Design GUIs for Qt5 applications +Exec=$QTLINK/bin/designer +Icon=designer-qt5.png +MimeType=application/x-designer; +Terminal=false +Encoding=UTF-8 +Type=Application +Categories=Qt;Development; +EOF + +cat > /usr/share/applications/linguist-qt5.desktop << EOF +[Desktop Entry] +Name=Qt5 Linguist +Comment=Add translations to Qt5 applications +Exec=$QTLINK/bin/linguist +Icon=linguist-qt5.png +MimeType=text/vnd.trolltech.linguist;application/x-linguist; +Terminal=false +Encoding=UTF-8 +Type=Application +Categories=Qt;Development; +EOF + +cat > /usr/share/applications/qdbusviewer-qt5.desktop << EOF +[Desktop Entry] +Name=Qt5 QDbusViewer +GenericName=D-Bus Debugger +Comment=Debug D-Bus applications +Exec=$QTLINK/bin/qdbusviewer +Icon=qdbusviewer-qt5.png +Terminal=false +Encoding=UTF-8 +Type=Application +Categories=Qt;Development;Debugger; +EOF @@ -455,58 +444,6 @@ done user: -install -dm755 /usr/share/applications -cat > /usr/share/applications/assistant-qt5.desktop << "EOF" -[Desktop Entry] -Name=Qt5 Assistant -Comment=Shows Qt5 documentation and examples -Exec=assistant-qt5 -Icon=assistant-qt5 -Terminal=false -Encoding=UTF-8 -Type=Application -Categories=Qt;Development;Documentation; -EOF -cat > /usr/share/applications/designer-qt5.desktop << "EOF" -[Desktop Entry] -Name=Qt5 Designer -GenericName=Interface Designer -Comment=Design GUIs for Qt5 applications -Exec=designer-qt5 -Icon=designer-qt5 -MimeType=application/x-designer; -Terminal=false -Encoding=UTF-8 -Type=Application -Categories=Qt;Development; -EOF -cat > /usr/share/applications/linguist-qt5.desktop << "EOF" -[Desktop Entry] -Name=Qt5 Linguist -Comment=Add translations to Qt5 applications -Exec=linguist-qt5 -Icon=linguist-qt5 -MimeType=text/vnd.trolltech.linguist;application/x-linguist; -Terminal=false -Encoding=UTF-8 -Type=Application -Categories=Qt;Development; -EOF -cat > /usr/share/applications/qdbusviewer-qt5.desktop << "EOF" -[Desktop Entry] -Name=Qt5 QDbusViewer -GenericName=D-Bus Debugger -Comment=Debug D-Bus applications -Exec=qdbusviewer-qt5 -Icon=qdbusviewer-qt5 -Terminal=false -Encoding=UTF-8 -Type=Application -Categories=Qt;Development;Debugger; -EOF - - - - - - If you have installed Qt5 in - /usr, you can skip - rest of this section. - - - If you installed Qt5 in a location other than /usr, you need to update the @@ -579,19 +505,10 @@ export QT5DIR # End /etc/profile.d/qt5.sh EOF - - - If you also installed Qt4 and need to use - the Qt5 version of an executable such as - qmake for building a program, make sure that - the Qt5 bin directory is listed prior to - the Qt5 bin directory in the - PATH variable. - - - + @@ -604,13 +521,13 @@ EOF - assistant-qt5, designer-qt5, lconvert-qt5, linguist-qt5, lrelease-qt5, - lupdate-qt5, moc-qt5, pixeltool-qt5, qcollectiongenerator-qt5, qdbuscpp2xml-qt5, - qdbus-qt5, qdbusviewer-qt5, qdbusxml2cpp-qt5, qdoc-qt5, qhelpconverter-qt5, - qhelpgenerator-qt5, qmake-qt5, qml1plugindump-qt5, qmlbundle-qt5, - qmlimportscanner-qt5, qmlmin-qt5, qmlplugindump-qt5, qmlprofiler-qt5, qml-qt5, - qmlscene-qt5, qmltestrunner-qt5, qmlviewer-qt5, qtpaths-qt5, rcc-qt5, - syncqt.pl-qt5, uic-qt5, xmlpatterns-qt5, and xmlpatternsvalidator-qt5 + assistant, designer, lconvert, linguist, lrelease, + lupdate, moc, pixeltool, qcollectiongenerator, qdbuscpp2xml, + qdbus, qdbusviewer, qdbusxml2cpp, qdoc, qhelpconverter, + qhelpgenerator, qmake, qml1plugindump, qmlbundle, + qmlimportscanner, qmlmin, qmlplugindump, qmlprofiler, qml, + qmlscene, qmltestrunner, qmlviewer, qtpaths, rcc, + syncqt.pl, uic, xmlpatterns, and xmlpatternsvalidator libqgsttools_p.so, libQt5Bluetooth.so, libQt5Bootstrap.a, libQt5CLucene.so, @@ -630,6 +547,9 @@ EOF /usr/lib/qt5, /usr/share/doc/qt5, and /usr/share/qt5 + OR + /opy/qt5 and + /opt/qt-&qt5-version; @@ -640,19 +560,19 @@ EOF - assistant-qt5 + assistant is a tool for presenting on-line documentation. - assistant-qt5 + assistant - designer-qt5 + designer is a full-fledged GUI builder. It includes @@ -661,39 +581,39 @@ EOF property editor. - designer-qt5 + designer - linguist-qt5 + linguist provides support for translating applications into local languages. - linguist-qt5 + linguist - lrelease-qt5 + lrelease is a simple command line tool. It reads a Qt project file and produces message files used by the application. - lrelease-qt5 + lrelease - lupdate-qt5 + lupdate reads a Qt project file, finds the translatable @@ -702,38 +622,38 @@ EOF files listed in the project file. - lupdate-qt5 + lupdate - moc-qt5 + moc generates Qt meta object support code. - moc-qt5 + moc - pixeltool-qt5 + pixeltool is a desktop magnifier and as you move your mouse around the screen it will show the magnified contents in its window. - pixeltool-qt5 + pixeltool - qmake-qt5 + qmake uses information stored in project files to @@ -741,31 +661,31 @@ EOF generates. - qmake-qt5 + qmake - rcc-qt5 + rcc is a resource compiler used in conjunction with designer. - rcc-qt5 + rcc - uic-qt5 + uic is a Qt user interface compiler. - uic-qt5 + uic diff --git a/xincludes/qt-alternatives.xml b/xincludes/qt-alternatives.xml new file mode 100644 index 0000000000..8b60c46643 --- /dev/null +++ b/xincludes/qt-alternatives.xml @@ -0,0 +1,64 @@ + + + %general-entities; +]> + + + + + Qt Installation Alternatives + + The installation of Qt presents + several challenges and choices. Complicating the Qt installation is the fact + that there are two versions, Qt4 and + Qt5, that have executable programs with + identical names. If both packages are installed on one system, + the only methods to manage which set of programs is used is to + either control the users' PATH or to rename files + either directly or via symbolic links. Both packages cannot + be installed in the same directory. + + + If you are only going to install one of the Qt versions, + the choice of installation methods is easier. You can either + install the components in the several directories of the /usr hierarchy or install the + 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". + + 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 + /opt directory. The selection of + which version is being used by individual users on a system is controlled + by the PATH variable. Other systems can be designed, but + the BLFS editors find the PATH method easiest. + + The advantage of installing in /usr is that no updates to the + /etc/ld.so.conf or + /etc/man_db.conf files are required. The package files + are distributed within several subdirectories of the /usr hierarchy. This is the method that most + commercial distributions use. The disadvantage for BLFS users is that this + Qt instance cannot be upgraded while it is in use. For instance, it cannot + be upgraded from a running KDE environment. It also precludes having + multiple versions of Qt on your system and does not allow reverting to + an existing, known working instance of Qt. + + The advantage of installing Qt in a + custom directory such as + /opt/qt-&qt4-version; or + /opt/qt-&qt5-version; or + 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 + developer to maintain multiple versions of Qt4 + or Qt5 for testing. + + diff --git a/xincludes/setqt.xml b/xincludes/setqt.xml new file mode 100644 index 0000000000..d4082c6712 --- /dev/null +++ b/xincludes/setqt.xml @@ -0,0 +1,37 @@ + + + %general-entities; +]> + + + + + Choosing Qt Program Versions + + If you install both Qt4 and Qt5, you can use some simple + scripts to select the currently active set of Qt programs. As the + root user, create + the following scripts: + +cat > /usr/bin/setqt4 << 'EOF' +if [ "x$QT5DIR" != "x/usr" ]; then pathremove $QT5DIR/bin; fi +if [ "x$QTDIR" != "x/usr" ]; then pathprepend $QTDIR/bin; fi +echo $PATH +EOF + +cat > /usr/bin/setqt5 << 'EOF' +if [ "x$QTDIR" != "x/usr" ]; then pathremove $QTDIR/bin; fi +if [ "x$QT5DIR" != "x/usr" ]; then pathprepend $QT5DIR/bin; fi +echo $PATH +EOF + + You should now be able to use the appropriate Qt version by running + source setqt4 or source setqt4 as + desired. (Setting the PATH wont work in a subshell.) Another technique that + can be used is to create appropriate alias additions to your ~/.bashrc like + alias setqt4='source setqt4'. + +