Difference between revisions of "Qt3"

From CBLFS
Jump to navigationJump to search
m (Reverted edits by Jciccone (Talk); changed back to last version by Bigdissaved)
Line 91: Line 91:
  
 
  make install &&
 
  make install &&
 +
 
  cp -Rv doc/man /usr/share &&
 
  cp -Rv doc/man /usr/share &&
 
  cp -Rv examples /usr/share/doc/qt &&
 
  cp -Rv examples /usr/share/doc/qt &&
  ln -svf libqt-mt.so /usr/lib/libqt.so
+
  ln -v -sf libqt-mt.so /usr/lib/libqt.so &&
 +
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 ===
 
=== Command Explanations ===
Line 144: Line 148:
  
 
  make install &&
 
  make install &&
 +
 
  mv -v /usr/bin/qmake{,-32} &&
 
  mv -v /usr/bin/qmake{,-32} &&
 
  mv -v /usr/bin/uic{,-32} &&
 
  mv -v /usr/bin/uic{,-32} &&
 
  mv -v /usr/bin/moc{,-32} &&
 
  mv -v /usr/bin/moc{,-32} &&
 
  mv -v /usr/bin/qtconfig{,-32} &&
 
  mv -v /usr/bin/qtconfig{,-32} &&
 +
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
 
  ln -svf libqt-mt.so /usr/lib/libqt.so
  
Line 202: Line 210:
  
 
  make install &&
 
  make install &&
 +
 
  cp -Rv doc/man /usr/share &&
 
  cp -Rv doc/man /usr/share &&
 
  cp -Rv examples /usr/share/doc/qt &&
 
  cp -Rv examples /usr/share/doc/qt &&
 +
 
  mv -v /usr/bin/qmake{,-64} &&
 
  mv -v /usr/bin/qmake{,-64} &&
 
  mv -v /usr/bin/uic{,-64} &&
 
  mv -v /usr/bin/uic{,-64} &&
Line 212: Line 222:
 
  ln -svf /usr/bin/multiarch_wrapper /usr/bin/moc &&
 
  ln -svf /usr/bin/multiarch_wrapper /usr/bin/moc &&
 
  ln -svf /usr/bin/multiarch_wrapper /usr/bin/qtconfig &&
 
  ln -svf /usr/bin/multiarch_wrapper /usr/bin/qtconfig &&
 +
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/lib64/libqt.so
 
  ln -svf libqt-mt.so /usr/lib64/libqt.so
 
   
 
   
Line 227: Line 240:
 
  # Begin /etc/profile.d/20-qt.sh
 
  # Begin /etc/profile.d/20-qt.sh
 
   
 
   
  export QTDIR=/usr
+
  export QTDIR=/usr/share/qt
 
   
 
   
 
  # End /etc/profile.d/20-qt.sh
 
  # End /etc/profile.d/20-qt.sh
Line 277: Line 290:
 
  ln -svfn qt-{{Qt3-Version}} /opt/qt &&
 
  ln -svfn qt-{{Qt3-Version}} /opt/qt &&
 
  ln -sv libqt-mt.so /opt/qt/lib/libqt.so &&
 
  ln -sv libqt-mt.so /opt/qt/lib/libqt.so &&
 +
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&&
 
  cp -Rv doc/man /opt/qt/doc &&
 
  cp -Rv doc/man /opt/qt/doc &&
 
  cp -Rv examples /opt/qt/doc
 
  cp -Rv examples /opt/qt/doc
Line 323: Line 339:
 
  mv -v /opt/qt-{{Qt3-Version}}/bin/moc{,-32} &&
 
  mv -v /opt/qt-{{Qt3-Version}}/bin/moc{,-32} &&
 
  mv -v /opt/qt-{{Qt3-Version}}/bin/qtconfig{,-32} &&
 
  mv -v /opt/qt-{{Qt3-Version}}/bin/qtconfig{,-32} &&
  ln -sv libqt-mt.so /opt/qt-{{Qt3-Version}}/lib/libqt.so
+
  ln -sv libqt-mt.so /opt/qt-{{Qt3-Version}}/lib/libqt.so &&
 +
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
  
 
=== N32 ===
 
=== N32 ===
Line 381: Line 400:
 
  ln -svf /usr/bin/multiarch_wrapper /opt/qt-{{Qt3-Version}}/bin/qtconfig &&
 
  ln -svf /usr/bin/multiarch_wrapper /opt/qt-{{Qt3-Version}}/bin/qtconfig &&
 
  ln -sv libqt-mt.so /opt/qt-{{Qt3-Version}}/lib64/libqt.so &&
 
  ln -sv libqt-mt.so /opt/qt-{{Qt3-Version}}/lib64/libqt.so &&
 +
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 &&
 
  cp -Rv doc/man /opt/qt-{{Qt3-Version}}/doc &&
 
  cp -Rv doc/man /opt/qt-{{Qt3-Version}}/doc &&
 
  cp -Rv examples /opt/qt-{{Qt3-Version}}/doc &&
 
  cp -Rv examples /opt/qt-{{Qt3-Version}}/doc &&

Revision as of 18:25, 18 August 2007

Download Source: http://ftp.trolltech.com/qt/source/qt-x11-free-3.3.8.tar.gz
Dowload Patch: http://svn.cross-lfs.org/svn/repos/patches/qt/qt-3.3.8-utf8-1.patch

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 KDE is built and Qt3 is the version of Qt that KDE3 uses. You can of course use Qt for non-KDE applications as well, but if you wish to use KDE or any KDE-based applications, you must have Qt installed on your system.

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

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

Note to DESTDIR Fans

Unfortunately Qt3 ignores DESTDIR. However, it uses INSTALL_ROOT for the same purpose, so 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 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 PATH=$PWD/bin:$PATH &&
export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH &&
patch -Np1 -i ../qt-3.3.8-utf8-1.patch &&
./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 &&
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 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 PATH=$PWD/bin:$PATH &&
export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH &&
export QMAKESPEC=linux-g++-32 &&

patch -Np1 -i ../qt-3.3.8-utf8-1.patch &&
./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 &&
mv -v /usr/bin/qmake{,-32} &&
mv -v /usr/bin/uic{,-32} &&
mv -v /usr/bin/moc{,-32} &&
mv -v /usr/bin/qtconfig{,-32} &&
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 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

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 &&
patch -Np1 -i ../qt-3.3.8-utf8-1.patch &&
./configure -prefix /usr \
-libdir /usr/lib64 \
-docdir /usr/share/doc/qt \
-headerdir /usr/include/qt \
-datadir /usr/share/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 &&
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/lib64/libqt.so

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 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 &&
patch -Np1 -i ../qt-3.3.8-utf8-1.patch &&
./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/lib/libqt.so &&
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&&
cp -Rv doc/man /opt/qt/doc &&
cp -Rv 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 &&
patch -Np1 -i ../qt-3.3.8-utf8-1.patch &&
./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 -sv libqt-mt.so /opt/qt-3.3.8/lib/libqt.so &&
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

N32

TODO....

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

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 &&
patch -Np1 -i ../qt-3.3.8-utf8-1.patch &&
./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 -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 &&
ln -sv libqt-mt.so /opt/qt-3.3.8/lib64/libqt.so &&
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 &&
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

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=10902"