Difference between revisions of "Qt3"

From CBLFS
Jump to navigationJump to search
m (I add the "3" onto Qt in some places.)
(64Bit)
 
(33 intermediate revisions by 11 users not shown)
Line 1: Line 1:
 
{| style="text-align: left; background-color: AliceBlue;"
 
{| style="text-align: left; background-color: AliceBlue;"
|-
+
|-valign="top"
 
!Download Source:
 
!Download Source:
| http://ftp.silug.org/mirrors/ftp.trolltech.com/qt/source/qt-x11-free-3.3.6.tar.bz2
+
| ftp://ftp.trolltech.com/qt/source/qt-x11-free-{{Qt3-Version}}b.tar.gz
 
|}
 
|}
  
 
----
 
----
  
== Introduction to Qt3 ==
+
{{Package-Introduction|Qt is a comprehensive development framework that includes an extensive array of features, capabilities and tools that enable development of high-performance, cross-platform rich-client and server-side applications. Qt is the GUI framework on which [[KDE3]] is built and Qt3 is the version of Qt that [[KDE3]] uses. You can of course use Qt for non-[[KDE3]] applications as well, but if you wish to use [[KDE3]] or any [[KDE3]]-based applications, you must have Qt installed on your system.|http://www.trolltech.com/products/qt/qt3}}
 
 
The Qt3 package contains a C++ GUI library. This is useful for creating graphical applications or executing graphical applications that are dynamically linked to the Qt3 library. One of the major users of Qt3 is KDE (in particular, KDE 3).
 
  
 
== Dependencies ==
 
== Dependencies ==
Line 17: Line 15:
 
* [[libjpeg]]
 
* [[libjpeg]]
 
* [[libmng]]
 
* [[libmng]]
 +
 
=== Optional ===
 
=== Optional ===
 
* [[MySQL]]
 
* [[MySQL]]
Line 26: Line 25:
 
* [[Firebird]]
 
* [[Firebird]]
  
== Extra ==
+
== Configuration Information ==
 +
 
 +
{|style="text-align: left;"
 +
|-
 +
|''-qt-sql-mysql'': to compile with [[MySQL]] support.
 +
|-
 +
|''-system-nas-sound'': to compile with [[NAS]] support.
 +
|}
 +
 
 +
If you would like to compile with [[MySQL]] support, in addition to passing the switch above, execute this sed before compiling:
 +
 
 +
sed -i "s@mysql.h@mysql/mysql.h@g" src/sql/drivers/mysql/qsql_mysql.h
 +
 
 +
{{Note|Qt3 does not use ''DESTDIR'', it uses ''INSTALL_ROOT'' for the same purpose.  Use ''INSTALL_ROOT'' as you would normally use ''DESTDIR''.}}
 +
 
 +
= Installing Qt3 in /usr =
 +
 
 +
If you want to install Qt3 in /usr, these are in the instructions to do so. If you want to install it in /opt, the instructions are below.
 +
 
 +
== Non-Multilib ==
 +
 
 +
If your [[X Window System]] prefix is something other then '''/usr/X11R6''' then run the following command to change the hard coded paths in the sources:
 +
 
 +
for file in $(grep -lr "X11R6" *)
 +
do
 +
  sed -i "s@/usr/X11R6@${XORG_PREFIX}@g" $file
 +
done
 +
 
 +
Compile the package:
 +
 
 +
bash
 +
export PATH=$PWD/bin:$PATH &&
 +
export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH &&
 +
 
 +
./configure -prefix /usr \
 +
-docdir /usr/share/doc/qt \
 +
-headerdir /usr/include/qt \
 +
-datadir /usr/share/qt \
 +
-plugindir /usr/lib/qt/plugin \
 +
-translationdir /usr/share/qt/translations \
 +
-sysconfdir /etc/qt \
 +
-qt-gif \
 +
-system-zlib \
 +
-system-libpng \
 +
-system-libjpeg \
 +
-system-libmng \
 +
-plugin-imgfmt-png \
 +
-plugin-imgfmt-jpeg \
 +
-plugin-imgfmt-mng \
 +
-no-exceptions \
 +
-thread \
 +
-tablet &&
 +
 +
find -type f -name Makefile | xargs sed -i "s@-Wl,-rpath,/usr/lib@@g" &&
 +
make &&
 +
exit
 +
 
 +
Install the package:
 +
 
 +
make install &&
 +
cp -Rv doc/man /usr/share &&
 +
cp -Rv examples /usr/share/doc/qt &&
 +
ln -v -sf libqt-mt.so /usr/lib/libqt.so &&
 +
install -dv /usr/share/qt &&
 +
ln -v -snf ../../bin /usr/share/qt/bin &&
 +
ln -v -snf ../../include/qt /usr/share/qt/include &&
 +
ln -v -snf ../../lib /usr/share/qt/lib
 +
 
 +
=== Command Explanations ===
  
If you would like to compile with [[MySQL]] support add the following to the configure command:
+
''find -type f -name Makefile | xargs sed -i "s@-Wl,-rpath,/usr/lib@@g"'': This command removes the harcoding of /usr/lib in a number of files.
 +
 
 +
== Multilib ==
 +
 
 +
=== 32Bit ===
 +
 
 +
If your [[X Window System]] prefix is something other then '''/usr/X11R6''' then run the following command to change the hard coded paths in the sources:
 +
 
 +
for file in $(grep -lr "X11R6" *)
 +
do
 +
  sed -i "s@/usr/X11R6@${XORG_PREFIX}@g" $file
 +
done
  
-qt-sql-mysql
+
Compile the package:
  
And run this sed before compiling:
+
bash
 +
export PATH=$PWD/bin:$PATH &&
 +
export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH &&
 +
export QMAKESPEC=linux-g++-32 &&
  
  sed -i "s@mysql.h@mysql/mysql.h@g" src/sql/drivers/mysql/qsql_mysql.h
+
  ./configure -prefix /usr \
 +
-docdir /usr/share/doc/qt \
 +
-headerdir /usr/include/qt \
 +
-datadir /usr/lib/qt \
 +
-plugindir /usr/lib/qt/plugin \
 +
-translationdir /usr/share/qt/translations \
 +
-sysconfdir /etc/qt \
 +
-qt-gif \
 +
-system-zlib \
 +
-system-libpng \
 +
-system-libjpeg \
 +
-system-libmng \
 +
-plugin-imgfmt-png \
 +
-plugin-imgfmt-jpeg \
 +
-plugin-imgfmt-mng \
 +
-no-exceptions \
 +
-thread \
 +
-tablet &&
 +
 +
find -type f -name Makefile | xargs sed -i "s@-Wl,-rpath,/usr/lib@@g" &&
 +
make &&
 +
exit
 +
 
 +
Install the package:
 +
 
 +
make install &&
 +
mv -v /usr/bin/qmake{,-32} &&
 +
mv -v /usr/bin/uic{,-32} &&
 +
mv -v /usr/bin/moc{,-32} &&
 +
mv -v /usr/bin/qtconfig{,-32} &&
 +
mv -v /usr/include/qt/qconfig{,-32}.h &&
 +
install -dv /usr/share/qt &&
 +
ln -v -snf ../../bin /usr/share/qt/bin &&
 +
ln -v -snf ../../include/qt /usr/share/qt/include &&
 +
ln -v -snf ../../lib /usr/share/qt/lib
 +
ln -svf libqt-mt.so /usr/lib/libqt.so
 +
 
 +
=== N32 ===
 +
 
 +
''TODO....''
 +
 
 +
=== 64Bit ===
 +
 
 +
If your [[X Window System]] prefix is something other then '''/usr/X11R6''' then run the following command to change the hard coded paths in the sources:
 +
 
 +
for file in $(grep -lr "X11R6" *)
 +
do
 +
  sed -i "s@/usr/X11R6@${XORG_PREFIX}@g" $file
 +
done
 +
 
 +
Fix a known issue with QTSPEC linux-g++-64:
 +
 
 +
sed -i "/^QMAKE_LIBDIR_QT/s:/lib:&64:" mkspecs/linux-g++-64/qmake.conf
 +
 
 +
Compile the package:
 +
 
 +
bash
 +
export PATH=$PWD/bin:$PATH &&
 +
export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH &&
 +
export QMAKESPEC=linux-g++-64 &&
 +
 +
./configure -prefix /usr \
 +
-libdir /usr/lib64 \
 +
-docdir /usr/share/doc/qt \
 +
-headerdir /usr/include/qt \
 +
-datadir /usr/lib64/qt \
 +
-plugindir /usr/lib64/qt/plugin \
 +
-translationdir /usr/share/qt/translations \
 +
-sysconfdir /etc/qt \
 +
-qt-gif \
 +
-system-zlib \
 +
-system-libpng \
 +
-system-libjpeg \
 +
-system-libmng \
 +
-plugin-imgfmt-png \
 +
-plugin-imgfmt-jpeg \
 +
-plugin-imgfmt-mng \
 +
-no-exceptions \
 +
-thread \
 +
-tablet &&
 +
 +
find -type f -name Makefile | xargs sed -i "s@-Wl,-rpath,/usr/lib64@@g" &&
 +
make &&
 +
exit
 +
 
 +
Install the package:
 +
 
 +
make install &&
 +
cp -Rv doc/man /usr/share &&
 +
cp -Rv examples /usr/share/doc/qt &&
 +
mv -v /usr/bin/qmake{,-64} &&
 +
mv -v /usr/bin/uic{,-64} &&
 +
mv -v /usr/bin/moc{,-64} &&
 +
mv -v /usr/bin/qtconfig{,-64} &&
 +
ln -svf /usr/bin/multiarch_wrapper /usr/bin/qmake &&
 +
ln -svf /usr/bin/multiarch_wrapper /usr/bin/uic &&
 +
ln -svf /usr/bin/multiarch_wrapper /usr/bin/moc &&
 +
ln -svf /usr/bin/multiarch_wrapper /usr/bin/qtconfig &&
 +
mv -v /usr/include/qt/qconfig{,-64}.h &&
 +
install -dv /usr/share/qt &&
 +
ln -v -snf ../../bin /usr/share/qt/bin &&
 +
ln -v -snf ../../include/qt /usr/share/qt/include &&
 +
ln -v -snf ../../lib64 /usr/share/qt/lib64
 +
ln -svf libqt-mt.so /usr/lib64/libqt.so
 +
 
 +
Create a qconfig.h header file which selects the actual architecture-dependent qconfig-{32,64}.h header file:
 +
 
 +
{{Stub-Header|qconfig|/usr/include}}
 +
 
 +
== Configuring ==
 +
 
 +
=== profile.d/20-qt.sh ===
 +
 
 +
If you're using the setup defined in [[Bash Startup Files]] then run the following commands. If you're not using the setup defined in [[Bash Startup Files]] make sure that your enviornment is setup correctly.
 +
 
 +
==== Non-Multilib and Multilib ====
 +
 
 +
Note that this file isn't really necessary in most cases since /usr is already in the search path, but there are a few packages that care about QTDIR and some of the packages in CBLFS have instructions that include QTDIR, so creating this file means that those instructions should work correctly without any modification.
 +
 
 +
cat > /etc/profile.d/20-qt.sh << "EOF"
 +
# Begin /etc/profile.d/20-qt.sh
 +
 +
export QTDIR=/usr/share/qt
 +
 +
# End /etc/profile.d/20-qt.sh
 +
EOF
 +
source /etc/profile
 +
 
 +
=== ld.so.conf ===
  
If you would like to compile with [[NAS]] support add the following to the configure command:
+
There is no need to update ld.so.conf when installing Qt3 in /usr.
  
-system-nas-sound
+
= Installing Qt3 in /opt =
  
 
== Non-Multilib ==
 
== Non-Multilib ==
  
If you're [[X Window System]] prefix is something other then '''/usr/X11R6''' then run the following command to change the hard coded paths in the sources:
+
If your [[X Window System]] prefix is something other then '''/usr/X11R6''' then run the following command to change the hard coded paths in the sources:
  
 
  for file in $(grep -lr "X11R6" *)
 
  for file in $(grep -lr "X11R6" *)
Line 55: Line 264:
 
  export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH &&
 
  export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH &&
 
  export PATH=$PWD/bin:$PATH &&
 
  export PATH=$PWD/bin:$PATH &&
  ./configure -prefix /opt/qt-3.3.6 \
+
 +
  ./configure -prefix /opt/qt-{{Qt3-Version}} \
 
  -sysconfdir /etc/qt \
 
  -sysconfdir /etc/qt \
 
  -qt-gif \
 
  -qt-gif \
Line 74: Line 284:
  
 
  make install &&
 
  make install &&
  ln -v -sfn qt-3.3.6 /opt/qt &&
+
  ln -svfn qt-{{Qt3-Version}} /opt/qt &&
  ln -v -s libqt-mt.so /opt/qt/lib/libqt.so &&
+
  ln -sv libqt-mt.so /opt/qt-{{Qt3-Version}}/lib/libqt.so &&
  cp -v -r doc/man /opt/qt/doc &&
+
  cp -Rv doc/man /opt/qt-{{Qt3-Version}}/doc &&
  cp -v -r examples /opt/qt/doc
+
  cp -Rv examples /opt/qt-{{Qt3-Version}}/doc
  
 
== Multilib ==
 
== Multilib ==
Line 83: Line 293:
 
=== 32Bit ===
 
=== 32Bit ===
  
If you're [[X Window System]] prefix is something other then '''/usr/X11R6''' then run the following command to change the hard coded paths in the sources:
+
If your [[X Window System]] prefix is something other then '''/usr/X11R6''' then run the following command to change the hard coded paths in the sources:
  
 
  for file in $(grep -lr "X11R6" *)
 
  for file in $(grep -lr "X11R6" *)
Line 97: Line 307:
 
  export PATH=$PWD/bin:$PATH &&
 
  export PATH=$PWD/bin:$PATH &&
 
  export QMAKESPEC=linux-g++-32 &&
 
  export QMAKESPEC=linux-g++-32 &&
  ./configure -prefix /opt/qt-3.3.6 \
+
  -plugindir /opt/qt-3.3.6/lib/plugin \
+
  ./configure -prefix /opt/qt-{{Qt3-Version}} \
 +
-datadir /opt/qt-{{Qt3-Version}}/lib \
 +
  -plugindir /opt/qt-{{Qt3-Version}}/lib/plugin \
 
  -sysconfdir /etc/qt \
 
  -sysconfdir /etc/qt \
 
  -qt-gif \
 
  -qt-gif \
Line 117: Line 329:
  
 
  make install &&
 
  make install &&
  mv -v /opt/qt-3.3.6/bin/qmake{,-32} &&
+
  mv -v /opt/qt-{{Qt3-Version}}/bin/qmake{,-32} &&
  mv -v /opt/qt-3.3.6/bin/uic{,-32} &&
+
  mv -v /opt/qt-{{Qt3-Version}}/bin/uic{,-32} &&
  mv -v /opt/qt-3.3.6/bin/moc{,-32} &&
+
  mv -v /opt/qt-{{Qt3-Version}}/bin/moc{,-32} &&
  mv -v /opt/qt-3.3.6/bin/qtconfig{,-32} &&
+
  mv -v /opt/qt-{{Qt3-Version}}/bin/qtconfig{,-32} &&
  ln -v -s libqt-mt.so /opt/qt-3.3.6/lib/libqt.so
+
  mv -v /opt/qt-{{Qt3-Version}}/include/qconfig{,-32}.h &&
 +
ln -sv libqt-mt.so /opt/qt-{{Qt3-Version}}/lib/libqt.so
  
 
=== N32 ===
 
=== N32 ===
  
TO BE DONE
+
''TODO....''
  
 
=== 64Bit ===
 
=== 64Bit ===
  
If you're [[X Window System]] prefix is something other then '''/usr/X11R6''' then run the following command to change the hard coded paths in the sources:
+
If your [[X Window System]] prefix is something other then '''/usr/X11R6''' then run the following command to change the hard coded paths in the sources:
  
 
  for file in $(grep -lr "X11R6" *)
 
  for file in $(grep -lr "X11R6" *)
Line 135: Line 348:
 
     sed -i "s@/usr/X11R6@${XORG_PREFIX}@g" $file
 
     sed -i "s@/usr/X11R6@${XORG_PREFIX}@g" $file
 
  done
 
  done
 +
 +
Fix a known issue with QTSPEC linux-g++-64:
 +
 +
sed -i "/^QMAKE_LIBDIR_QT/s:/lib:&64:" mkspecs/linux-g++-64/qmake.conf
  
 
Compile the package
 
Compile the package
Line 143: Line 360:
 
  export PATH=$PWD/bin:$PATH &&
 
  export PATH=$PWD/bin:$PATH &&
 
  export QMAKESPEC=linux-g++-64 &&
 
  export QMAKESPEC=linux-g++-64 &&
  ./configure -prefix /opt/qt-3.3.6 \
+
  -libdir /opt/qt-3.3.6/lib64 \
+
  ./configure -prefix /opt/qt-{{Qt3-Version}} \
  -plugindir /opt/qt-3.3.6/lib64/plugin \
+
  -libdir /opt/qt-{{Qt3-Version}}/lib64 \
 +
-datadir /opt/qt-{{Qt3-Version}}/lib64 \
 +
  -plugindir /opt/qt-{{Qt3-Version}}/lib64/plugin \
 
  -L/usr/lib64 \
 
  -L/usr/lib64 \
 
  -sysconfdir /etc/qt \
 
  -sysconfdir /etc/qt \
Line 165: Line 384:
  
 
  make install &&
 
  make install &&
  mv -v /opt/qt-3.3.6/bin/qmake{,-64} &&
+
  mv -v /opt/qt-{{Qt3-Version}}/bin/qmake{,-64} &&
  mv -v /opt/qt-3.3.6/bin/uic{,-64} &&
+
  mv -v /opt/qt-{{Qt3-Version}}/bin/uic{,-64} &&
  mv -v /opt/qt-3.3.6/bin/moc{,-64} &&
+
  mv -v /opt/qt-{{Qt3-Version}}/bin/moc{,-64} &&
  mv -v /opt/qt-3.3.6/bin/qtconfig{,-64} &&
+
  mv -v /opt/qt-{{Qt3-Version}}/bin/qtconfig{,-64} &&
  ln -sfv /usr/bin/multiarch_wrapper /opt/qt-3.3.6/bin/qmake &&
+
  ln -svf /usr/bin/multiarch_wrapper /opt/qt-{{Qt3-Version}}/bin/qmake &&
  ln -sfv /usr/bin/multiarch_wrapper /opt/qt-3.3.6/bin/uic &&
+
  ln -svf /usr/bin/multiarch_wrapper /opt/qt-{{Qt3-Version}}/bin/uic &&
  ln -sfv /usr/bin/multiarch_wrapper /opt/qt-3.3.6/bin/moc &&
+
  ln -svf /usr/bin/multiarch_wrapper /opt/qt-{{Qt3-Version}}/bin/moc &&
  ln -sfv /usr/bin/multiarch_wrapper /opt/qt-3.3.6/bin/qtconfig &&
+
  ln -svf /usr/bin/multiarch_wrapper /opt/qt-{{Qt3-Version}}/bin/qtconfig &&
  ln -v -s libqt-mt.so /opt/qt-3.3.6/lib64/libqt.so &&
+
  mv -v /opt/qt-{{Qt3-Version}}/include/qconfig{,-64}.h &&
  cp -v -r doc/man /opt/qt-3.3.6/doc &&
+
ln -sv libqt-mt.so /opt/qt-{{Qt3-Version}}/lib64/libqt.so &&
  cp -v -r examples /opt/qt-3.3.6/doc &&
+
  cp -Rv doc/man /opt/qt-{{Qt3-Version}}/doc &&
  ln -v -sfn qt-3.3.6 /opt/qt
+
  cp -Rv examples /opt/qt-{{Qt3-Version}}/doc &&
+
  ln -svfn qt-{{Qt3-Version}} /opt/qt
Fix a known issue with QTSPEC linux-g++-64
 
  
sed -i "/^QMAKE_LIBDIR_QT/s:/lib:&64:" ${QTDIR}/mkspecs/linux-g++-64/qmake.conf
+
{{Stub-Header|qconfig|/opt/qt/include}}
  
 
== Configuring ==
 
== Configuring ==
Line 246: Line 464:
 
  ldconfig
 
  ldconfig
  
*[[Main Page]]
+
[[Category:X Libs]]

Latest revision as of 15:46, 13 April 2010

Download Source: ftp://ftp.trolltech.com/qt/source/qt-x11-free-3.3.8b.tar.gz

Introduction to Qt3

Qt is a comprehensive development framework that includes an extensive array of features, capabilities and tools that enable development of high-performance, cross-platform rich-client and server-side applications. Qt is the GUI framework on which KDE3 is built and Qt3 is the version of Qt that KDE3 uses. You can of course use Qt for non-KDE3 applications as well, but if you wish to use KDE3 or any KDE3-based applications, you must have Qt installed on your system.

Project Homepage: http://www.trolltech.com/products/qt/qt3

Dependencies

Required

Optional

Configuration Information

-qt-sql-mysql: to compile with MySQL support.
-system-nas-sound: to compile with NAS support.

If you would like to compile with MySQL support, in addition to passing the switch above, execute this sed before compiling:

sed -i "s@mysql.h@mysql/mysql.h@g" src/sql/drivers/mysql/qsql_mysql.h
Caution.png

Note

Qt3 does not use DESTDIR, it uses INSTALL_ROOT for the same purpose. Use INSTALL_ROOT as you would normally use DESTDIR.

Installing Qt3 in /usr

If you want to install Qt3 in /usr, these are in the instructions to do so. If you want to install it in /opt, the instructions are below.

Non-Multilib

If your X Window System prefix is something other then /usr/X11R6 then run the following command to change the hard coded paths in the sources:

for file in $(grep -lr "X11R6" *)
do
  sed -i "s@/usr/X11R6@${XORG_PREFIX}@g" $file
done

Compile the package:

bash
export PATH=$PWD/bin:$PATH &&
export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH &&
./configure -prefix /usr \
-docdir /usr/share/doc/qt \
-headerdir /usr/include/qt \
-datadir /usr/share/qt \
-plugindir /usr/lib/qt/plugin \
-translationdir /usr/share/qt/translations \
-sysconfdir /etc/qt \
-qt-gif \
-system-zlib \
-system-libpng \
-system-libjpeg \
-system-libmng \
-plugin-imgfmt-png \
-plugin-imgfmt-jpeg \
-plugin-imgfmt-mng \
-no-exceptions \
-thread \
-tablet &&

find -type f -name Makefile | xargs sed -i "s@-Wl,-rpath,/usr/lib@@g" &&
make &&
exit

Install the package:

make install &&
cp -Rv doc/man /usr/share &&
cp -Rv examples /usr/share/doc/qt &&
ln -v -sf libqt-mt.so /usr/lib/libqt.so &&
install -dv /usr/share/qt &&
ln -v -snf ../../bin /usr/share/qt/bin &&
ln -v -snf ../../include/qt /usr/share/qt/include &&
ln -v -snf ../../lib /usr/share/qt/lib 

Command Explanations

find -type f -name Makefile | xargs sed -i "s@-Wl,-rpath,/usr/lib@@g": This command removes the harcoding of /usr/lib in a number of files.

Multilib

32Bit

If your X Window System prefix is something other then /usr/X11R6 then run the following command to change the hard coded paths in the sources:

for file in $(grep -lr "X11R6" *)
do
  sed -i "s@/usr/X11R6@${XORG_PREFIX}@g" $file
done

Compile the package:

bash
export PATH=$PWD/bin:$PATH &&
export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH &&
export QMAKESPEC=linux-g++-32 &&
./configure -prefix /usr \
-docdir /usr/share/doc/qt \
-headerdir /usr/include/qt \
-datadir /usr/lib/qt \
-plugindir /usr/lib/qt/plugin \
-translationdir /usr/share/qt/translations \
-sysconfdir /etc/qt \
-qt-gif \
-system-zlib \
-system-libpng \
-system-libjpeg \
-system-libmng \
-plugin-imgfmt-png \
-plugin-imgfmt-jpeg \
-plugin-imgfmt-mng \
-no-exceptions \
-thread \
-tablet &&

find -type f -name Makefile | xargs sed -i "s@-Wl,-rpath,/usr/lib@@g" &&
make &&
exit

Install the package:

make install &&
mv -v /usr/bin/qmake{,-32} &&
mv -v /usr/bin/uic{,-32} &&
mv -v /usr/bin/moc{,-32} &&
mv -v /usr/bin/qtconfig{,-32} &&
mv -v /usr/include/qt/qconfig{,-32}.h &&
install -dv /usr/share/qt &&
ln -v -snf ../../bin /usr/share/qt/bin &&
ln -v -snf ../../include/qt /usr/share/qt/include &&
ln -v -snf ../../lib /usr/share/qt/lib
ln -svf libqt-mt.so /usr/lib/libqt.so

N32

TODO....

64Bit

If your X Window System prefix is something other then /usr/X11R6 then run the following command to change the hard coded paths in the sources:

for file in $(grep -lr "X11R6" *)
do
  sed -i "s@/usr/X11R6@${XORG_PREFIX}@g" $file
done

Fix a known issue with QTSPEC linux-g++-64:

sed -i "/^QMAKE_LIBDIR_QT/s:/lib:&64:" mkspecs/linux-g++-64/qmake.conf

Compile the package:

bash
export PATH=$PWD/bin:$PATH &&
export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH &&
export QMAKESPEC=linux-g++-64 &&

./configure -prefix /usr \
-libdir /usr/lib64 \
-docdir /usr/share/doc/qt \
-headerdir /usr/include/qt \
-datadir /usr/lib64/qt \
-plugindir /usr/lib64/qt/plugin \
-translationdir /usr/share/qt/translations \
-sysconfdir /etc/qt \
-qt-gif \
-system-zlib \
-system-libpng \
-system-libjpeg \
-system-libmng \
-plugin-imgfmt-png \
-plugin-imgfmt-jpeg \
-plugin-imgfmt-mng \
-no-exceptions \
-thread \
-tablet &&

find -type f -name Makefile | xargs sed -i "s@-Wl,-rpath,/usr/lib64@@g" &&
make &&
exit

Install the package:

make install &&
cp -Rv doc/man /usr/share &&
cp -Rv examples /usr/share/doc/qt &&
mv -v /usr/bin/qmake{,-64} &&
mv -v /usr/bin/uic{,-64} &&
mv -v /usr/bin/moc{,-64} &&
mv -v /usr/bin/qtconfig{,-64} &&
ln -svf /usr/bin/multiarch_wrapper /usr/bin/qmake &&
ln -svf /usr/bin/multiarch_wrapper /usr/bin/uic &&
ln -svf /usr/bin/multiarch_wrapper /usr/bin/moc &&
ln -svf /usr/bin/multiarch_wrapper /usr/bin/qtconfig &&
mv -v /usr/include/qt/qconfig{,-64}.h &&
install -dv /usr/share/qt &&
ln -v -snf ../../bin /usr/share/qt/bin &&
ln -v -snf ../../include/qt /usr/share/qt/include &&
ln -v -snf ../../lib64 /usr/share/qt/lib64
ln -svf libqt-mt.so /usr/lib64/libqt.so

Create a qconfig.h header file which selects the actual architecture-dependent qconfig-{32,64}.h header file:

Creating a Stub Header (Multilib Only)

Creating a Generic Stub Header

cat > /usr/include/qconfig.h << "EOF"
/* qconfig.h - Stub Header  */
#ifndef __STUB__QCONFIG_H__
#define __STUB__QCONFIG_H__

#if defined(__x86_64__) || \
    defined(__sparc64__) || \
    defined(__arch64__) || \
    defined(__powerpc64__) || \
    defined (__s390x__)
# include "qconfig-64.h"
#else
# include "qconfig-32.h"
#endif

#endif /* __STUB__QCONFIG_H__ */
EOF

Creating a Stub Header For Mips

cat > /usr/include/qconfig.h << "EOF"
/* qconfig.h - Stub Header  */
#ifndef __STUB__QCONFIG_H__
#define __STUB__QCONFIG_H__

#include <sgidefs.h>

#if (_MIPS_SIM == _ABIO32)
# include "qconfig-32.h"
#elif (_MIPS_SIM == _ABIN32)
# include "qconfig-n32.h"
#elif (_MIPS_SIM == _ABI64)
# include "qconfig-64.h"
#endif

#endif /* __STUB__QCONFIG_H__ */
EOF

Configuring

profile.d/20-qt.sh

If you're using the setup defined in Bash Startup Files then run the following commands. If you're not using the setup defined in Bash Startup Files make sure that your enviornment is setup correctly.

Non-Multilib and Multilib

Note that this file isn't really necessary in most cases since /usr is already in the search path, but there are a few packages that care about QTDIR and some of the packages in CBLFS have instructions that include QTDIR, so creating this file means that those instructions should work correctly without any modification.

cat > /etc/profile.d/20-qt.sh << "EOF"
# Begin /etc/profile.d/20-qt.sh

export QTDIR=/usr/share/qt

# End /etc/profile.d/20-qt.sh
EOF
source /etc/profile

ld.so.conf

There is no need to update ld.so.conf when installing Qt3 in /usr.

Installing Qt3 in /opt

Non-Multilib

If your X Window System prefix is something other then /usr/X11R6 then run the following command to change the hard coded paths in the sources:

for file in $(grep -lr "X11R6" *)
do
    sed -i "s@/usr/X11R6@${XORG_PREFIX}@g" $file
done

Compile the package:

bash
export QTDIR=$PWD &&
export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH &&
export PATH=$PWD/bin:$PATH &&

./configure -prefix /opt/qt-3.3.8 \
-sysconfdir /etc/qt \
-qt-gif \
-system-zlib \
-system-libpng \
-system-libjpeg \
-system-libmng \
-plugin-imgfmt-png \
-plugin-imgfmt-jpeg \
-plugin-imgfmt-mng \
-no-exceptions \
-thread \
-tablet &&
make &&
exit

Install the package

make install &&
ln -svfn qt-3.3.8 /opt/qt &&
ln -sv libqt-mt.so /opt/qt-3.3.8/lib/libqt.so &&
cp -Rv doc/man /opt/qt-3.3.8/doc &&
cp -Rv examples /opt/qt-3.3.8/doc

Multilib

32Bit

If your X Window System prefix is something other then /usr/X11R6 then run the following command to change the hard coded paths in the sources:

for file in $(grep -lr "X11R6" *)
do
    sed -i "s@/usr/X11R6@${XORG_PREFIX}@g" $file
done

Compile the package:

bash
export QTDIR=$PWD &&
export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH &&
export PATH=$PWD/bin:$PATH &&
export QMAKESPEC=linux-g++-32 &&

./configure -prefix /opt/qt-3.3.8 \
-datadir /opt/qt-3.3.8/lib \
-plugindir /opt/qt-3.3.8/lib/plugin \
-sysconfdir /etc/qt \
-qt-gif \
-system-zlib \
-system-libpng \
-system-libjpeg \
-system-libmng \
-plugin-imgfmt-png \
-plugin-imgfmt-jpeg \
-plugin-imgfmt-mng \
-no-exceptions \
-thread \
-tablet &&
make &&
exit

Install the package

make install &&
mv -v /opt/qt-3.3.8/bin/qmake{,-32} &&
mv -v /opt/qt-3.3.8/bin/uic{,-32} &&
mv -v /opt/qt-3.3.8/bin/moc{,-32} &&
mv -v /opt/qt-3.3.8/bin/qtconfig{,-32} &&
mv -v /opt/qt-3.3.8/include/qconfig{,-32}.h &&
ln -sv libqt-mt.so /opt/qt-3.3.8/lib/libqt.so

N32

TODO....

64Bit

If your X Window System prefix is something other then /usr/X11R6 then run the following command to change the hard coded paths in the sources:

for file in $(grep -lr "X11R6" *)
do
    sed -i "s@/usr/X11R6@${XORG_PREFIX}@g" $file
done

Fix a known issue with QTSPEC linux-g++-64:

sed -i "/^QMAKE_LIBDIR_QT/s:/lib:&64:" mkspecs/linux-g++-64/qmake.conf

Compile the package

bash
export QTDIR=$PWD &&
export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH &&
export PATH=$PWD/bin:$PATH &&
export QMAKESPEC=linux-g++-64 &&

./configure -prefix /opt/qt-3.3.8 \
-libdir /opt/qt-3.3.8/lib64 \
-datadir /opt/qt-3.3.8/lib64 \
-plugindir /opt/qt-3.3.8/lib64/plugin \
-L/usr/lib64 \
-sysconfdir /etc/qt \
-qt-gif \
-system-zlib \
-system-libpng \
-system-libjpeg \
-system-libmng \
-plugin-imgfmt-png \
-plugin-imgfmt-jpeg \
-plugin-imgfmt-mng \
-no-exceptions \
-thread \
-tablet &&
make &&
exit

Install the package

make install &&
mv -v /opt/qt-3.3.8/bin/qmake{,-64} &&
mv -v /opt/qt-3.3.8/bin/uic{,-64} &&
mv -v /opt/qt-3.3.8/bin/moc{,-64} &&
mv -v /opt/qt-3.3.8/bin/qtconfig{,-64} &&
ln -svf /usr/bin/multiarch_wrapper /opt/qt-3.3.8/bin/qmake &&
ln -svf /usr/bin/multiarch_wrapper /opt/qt-3.3.8/bin/uic &&
ln -svf /usr/bin/multiarch_wrapper /opt/qt-3.3.8/bin/moc &&
ln -svf /usr/bin/multiarch_wrapper /opt/qt-3.3.8/bin/qtconfig &&
mv -v /opt/qt-3.3.8/include/qconfig{,-64}.h &&
ln -sv libqt-mt.so /opt/qt-3.3.8/lib64/libqt.so &&
cp -Rv doc/man /opt/qt-3.3.8/doc &&
cp -Rv examples /opt/qt-3.3.8/doc &&
ln -svfn qt-3.3.8 /opt/qt

Creating a Stub Header (Multilib Only)

Creating a Generic Stub Header

cat > /opt/qt/include/qconfig.h << "EOF"
/* qconfig.h - Stub Header  */
#ifndef __STUB__QCONFIG_H__
#define __STUB__QCONFIG_H__

#if defined(__x86_64__) || \
    defined(__sparc64__) || \
    defined(__arch64__) || \
    defined(__powerpc64__) || \
    defined (__s390x__)
# include "qconfig-64.h"
#else
# include "qconfig-32.h"
#endif

#endif /* __STUB__QCONFIG_H__ */
EOF

Creating a Stub Header For Mips

cat > /opt/qt/include/qconfig.h << "EOF"
/* qconfig.h - Stub Header  */
#ifndef __STUB__QCONFIG_H__
#define __STUB__QCONFIG_H__

#include <sgidefs.h>

#if (_MIPS_SIM == _ABIO32)
# include "qconfig-32.h"
#elif (_MIPS_SIM == _ABIN32)
# include "qconfig-n32.h"
#elif (_MIPS_SIM == _ABI64)
# include "qconfig-64.h"
#endif

#endif /* __STUB__QCONFIG_H__ */
EOF

Configuring

profile.d/20-qt.sh

If you're using the setup defined in Bash Startup Files then run the following commands. If you're not using the setup defined in Bash Startup Files make sure that your enviornment is setup correctly.

Non-Multilib

cat > /etc/profile.d/20-qt.sh << "EOF"
# Begin /etc/profile.d/20-qt.sh

export QTDIR=/opt/qt

export PATH="${PATH}:${QTDIR}/bin"

export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}${PKG_CONFIG_PATH+:}${QTDIR}/lib/pkgconfig"

# End /etc/profile.d/20-qt.sh
EOF
source /etc/profile

Multilib

cat > /etc/profile.d/20-qt.sh << "EOF"
# Begin /etc/profile.d/20-qt.sh

export QTDIR=/opt/qt

export PATH="${PATH}:${QTDIR}/bin"

export PKG_CONFIG_PATH32="${PKG_CONFIG_PATH32}${PKG_CONFIG_PATH32+:}${QTDIR}/lib/pkgconfig"
export PKG_CONFIG_PATHN32="${PKG_CONFIG_PATHN32}${PKG_CONFIG_PATHN32+:}${QTDIR}/lib32/pkgconfig"
export PKG_CONFIG_PATH64="${PKG_CONFIG_PATH64}${PKG_CONFIG_PATH64+:}${QTDIR}/lib64/pkgconfig"

# End /etc/profile.d/20-qt.sh
EOF
source /etc/profile

ld.so.conf

Non-Multilib

cat >> /etc/ld.so.conf << "EOF" &&
# Begin qt addition to /etc/ld.so.conf

/opt/qt/lib

# End qt addition
EOF
ldconfig

Multilib

cat >> /etc/ld.so.conf << "EOF" &&
# Begin qt addition to /etc/ld.so.conf

/opt/qt/lib
/opt/qt/lib32
/opt/qt/lib64

# End qt addition
EOF
ldconfig
Retrieved from "?title=Qt3&oldid=20038"