Difference between revisions of "Qt3"

From CBLFS
Jump to navigationJump to search
m (I add the "3" onto Qt in some places.)
Line 2: Line 2:
 
|-
 
|-
 
!Download Source:
 
!Download Source:
| http://ftp.silug.org/mirrors/ftp.trolltech.com/qt/source/qt-x11-free-3.3.6.tar.bz2
+
| http://ftp.silug.org/mirrors/ftp.trolltech.com/qt/source/qt-x11-free-{{Qt3-Version}}.tar.bz2
 
|}
 
|}
  
Line 55: Line 55:
 
  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 74:
  
 
  make install &&
 
  make install &&
  ln -v -sfn qt-3.3.6 /opt/qt &&
+
  ln -v -sfn qt-{{Qt3-Version}} /opt/qt &&
 
  ln -v -s libqt-mt.so /opt/qt/lib/libqt.so &&
 
  ln -v -s libqt-mt.so /opt/qt/lib/libqt.so &&
 
  cp -v -r doc/man /opt/qt/doc &&
 
  cp -v -r doc/man /opt/qt/doc &&
Line 97: Line 97:
 
  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 \
+
  ./configure -prefix /opt/qt-{{Qt3-Version}} \
  -plugindir /opt/qt-3.3.6/lib/plugin \
+
  -plugindir /opt/qt-{{Qt3-Version}}/lib/plugin \
 
  -sysconfdir /etc/qt \
 
  -sysconfdir /etc/qt \
 
  -qt-gif \
 
  -qt-gif \
Line 117: Line 117:
  
 
  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
+
  ln -v -s libqt-mt.so /opt/qt-{{Qt3-Version}}/lib/libqt.so
  
 
=== N32 ===
 
=== N32 ===
Line 143: Line 143:
 
  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 \
+
  ./configure -prefix /opt/qt-{{Qt3-Version}} \
  -libdir /opt/qt-3.3.6/lib64 \
+
  -libdir /opt/qt-{{Qt3-Version}}/lib64 \
  -plugindir /opt/qt-3.3.6/lib64/plugin \
+
  -plugindir /opt/qt-{{Qt3-Version}}/lib64/plugin \
 
  -L/usr/lib64 \
 
  -L/usr/lib64 \
 
  -sysconfdir /etc/qt \
 
  -sysconfdir /etc/qt \
Line 165: Line 165:
  
 
  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 -sfv /usr/bin/multiarch_wrapper /opt/qt-{{Qt3-Version}}/bin/qmake &&
  ln -sfv /usr/bin/multiarch_wrapper /opt/qt-3.3.6/bin/uic &&
+
  ln -sfv /usr/bin/multiarch_wrapper /opt/qt-{{Qt3-Version}}/bin/uic &&
  ln -sfv /usr/bin/multiarch_wrapper /opt/qt-3.3.6/bin/moc &&
+
  ln -sfv /usr/bin/multiarch_wrapper /opt/qt-{{Qt3-Version}}/bin/moc &&
  ln -sfv /usr/bin/multiarch_wrapper /opt/qt-3.3.6/bin/qtconfig &&
+
  ln -sfv /usr/bin/multiarch_wrapper /opt/qt-{{Qt3-Version}}/bin/qtconfig &&
  ln -v -s libqt-mt.so /opt/qt-3.3.6/lib64/libqt.so &&
+
  ln -v -s libqt-mt.so /opt/qt-{{Qt3-Version}}/lib64/libqt.so &&
  cp -v -r doc/man /opt/qt-3.3.6/doc &&
+
  cp -v -r doc/man /opt/qt-{{Qt3-Version}}/doc &&
  cp -v -r examples /opt/qt-3.3.6/doc &&
+
  cp -v -r examples /opt/qt-{{Qt3-Version}}/doc &&
  ln -v -sfn qt-3.3.6 /opt/qt
+
  ln -v -sfn qt-{{Qt3-Version}} /opt/qt
 
   
 
   
Fix a known issue with QTSPEC linux-g++-64
+
Fix a known issue with QTSPEC linux-g++-64:
  
 
  sed -i "/^QMAKE_LIBDIR_QT/s:/lib:&64:" ${QTDIR}/mkspecs/linux-g++-64/qmake.conf
 
  sed -i "/^QMAKE_LIBDIR_QT/s:/lib:&64:" ${QTDIR}/mkspecs/linux-g++-64/qmake.conf
Line 245: Line 245:
 
  EOF
 
  EOF
 
  ldconfig
 
  ldconfig
 
*[[Main Page]]
 

Revision as of 12:13, 17 December 2006

Download Source: http://ftp.silug.org/mirrors/ftp.trolltech.com/qt/source/qt-x11-free-3.3.8.tar.bz2

Introduction to 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

Required

Optional

Extra

If you would like to compile with MySQL support add the following to the configure command:

-qt-sql-mysql

And run this sed before compiling:

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

If you would like to compile with NAS support add the following to the configure command:

-system-nas-sound

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:

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 -v -sfn qt-3.3.8 /opt/qt &&
ln -v -s libqt-mt.so /opt/qt/lib/libqt.so &&
cp -v -r doc/man /opt/qt/doc &&
cp -v -r examples /opt/qt/doc

Multilib

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:

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 \
-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} &&
ln -v -s libqt-mt.so /opt/qt-3.3.8/lib/libqt.so

N32

TO BE DONE

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:

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++-64 &&
./configure -prefix /opt/qt-3.3.8 \
-libdir /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 -sfv /usr/bin/multiarch_wrapper /opt/qt-3.3.8/bin/qmake &&
ln -sfv /usr/bin/multiarch_wrapper /opt/qt-3.3.8/bin/uic &&
ln -sfv /usr/bin/multiarch_wrapper /opt/qt-3.3.8/bin/moc &&
ln -sfv /usr/bin/multiarch_wrapper /opt/qt-3.3.8/bin/qtconfig &&
ln -v -s libqt-mt.so /opt/qt-3.3.8/lib64/libqt.so &&
cp -v -r doc/man /opt/qt-3.3.8/doc &&
cp -v -r examples /opt/qt-3.3.8/doc &&
ln -v -sfn qt-3.3.8 /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

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