Difference between revisions of "Qt4"

From CBLFS
Jump to navigationJump to search
(Multilib)
Line 2: Line 2:
 
|-
 
|-
 
!Download Source:
 
!Download Source:
| ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-4.2.2.tar.gz
+
| ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-{{Qt4-Version}}.tar.gz
 
|}
 
|}
  
Line 68: Line 68:
 
Compile the package:
 
Compile the package:
  
  ./configure -prefix /opt/qt-4.2.2 \
+
  ./configure -prefix /opt/qt-{{Qt4-Version}} \
 
  -sysconfdir /etc/qt4 \
 
  -sysconfdir /etc/qt4 \
 
  -qt-gif \
 
  -qt-gif \
Line 82: Line 82:
  
 
  make install &&
 
  make install &&
  ln -v -sfn qt-4.2.2 /opt/qt4
+
  ln -v -sfn qt-{{Qt4-Version}} /opt/qt4
  
 
== Multilib ==
 
== Multilib ==
Line 99: Line 99:
 
  export QMAKESPEC=linux-g++-32 &&
 
  export QMAKESPEC=linux-g++-32 &&
 
  PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \
 
  PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \
  ./configure -prefix /opt/qt-4.2.2 \
+
  ./configure -prefix /opt/qt-{{Qt4-Version}} \
  -libdir /opt/qt-4.2.2/lib64 \
+
  -libdir /opt/qt-{{Qt4-Version}}/lib
  -plugindir /opt/qt-4.2.2/lib64/plugin \
+
  -plugindir /opt/qt-{{Qt4-Version}}/lib/plugin \
-L/usr/lib64 \
 
 
  -sysconfdir /etc/qt4 \
 
  -sysconfdir /etc/qt4 \
 
  -qt-gif \
 
  -qt-gif \
Line 116: Line 115:
  
 
  make install &&
 
  make install &&
  mv -v /opt/qt-4.2.2/bin/qmake{,-32} &&
+
  mv -v /opt/qt-{{Qt4-Version}}/bin/qmake{,-32} &&
  mv -v /opt/qt-4.2.2/bin/uic{,-32} &&
+
  mv -v /opt/qt-{{Qt4-Version}}/bin/uic{,-32} &&
  mv -v /opt/qt-4.2.2/bin/moc{,-32} &&
+
  mv -v /opt/qt-{{Qt4-Version}}/bin/moc{,-32} &&
  mv -v /opt/qt-4.2.2/bin/qtconfig{,-32} &&
+
  mv -v /opt/qt-{{Qt4-Version}}/bin/qtconfig{,-32} &&
  
 
=== N32 ===
 
=== N32 ===
Line 137: Line 136:
  
 
  export QMAKESPEC=linux-g++-64 &&
 
  export QMAKESPEC=linux-g++-64 &&
  PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \
+
  PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \
  ./configure -prefix /opt/qt-4.2.2 \
+
  ./configure -prefix /opt/qt-{{Qt4-Version}} \
  -libdir /opt/qt-4.2.2/lib64 \
+
  -libdir /opt/qt-{{Qt4-Version}}/lib64 \
  -plugindir /opt/qt-4.2.2/lib64/plugin \
+
  -plugindir /opt/qt-{{Qt4-Version}}/lib64/plugin \
 
  -L/usr/lib64 \
 
  -L/usr/lib64 \
 
  -sysconfdir /etc/qt4 \
 
  -sysconfdir /etc/qt4 \
Line 155: Line 154:
  
 
  make install &&
 
  make install &&
  mv -v /opt/qt-4.2.2/bin/qmake{,-64} &&
+
  mv -v /opt/qt-{{Qt4-Version}}/bin/qmake{,-64} &&
  mv -v /opt/qt-4.2.2/bin/uic{,-64} &&
+
  mv -v /opt/qt-{{Qt4-Version}}/bin/uic{,-64} &&
  mv -v /opt/qt-4.2.2/bin/moc{,-64} &&
+
  mv -v /opt/qt-{{Qt4-Version}}/bin/moc{,-64} &&
  mv -v /opt/qt-4.2.2/bin/qtconfig{,-64} &&
+
  mv -v /opt/qt-{{Qt4-Version}}/bin/qtconfig{,-64} &&
  ln -sfv /usr/bin/multiarch_wrapper /opt/qt-4.2.2/bin/qmake &&
+
  ln -sfv /usr/bin/multiarch_wrapper /opt/qt-{{Qt4-Version}}/bin/qmake &&
  ln -sfv /usr/bin/multiarch_wrapper /opt/qt-4.2.2/bin/uic &&
+
  ln -sfv /usr/bin/multiarch_wrapper /opt/qt-{{Qt4-Version}}/bin/uic &&
  ln -sfv /usr/bin/multiarch_wrapper /opt/qt-4.2.2/bin/moc &&
+
  ln -sfv /usr/bin/multiarch_wrapper /opt/qt-{{Qt4-Version}}/bin/moc &&
  ln -sfv /usr/bin/multiarch_wrapper /opt/qt-4.2.2/bin/qtconfig &&
+
  ln -sfv /usr/bin/multiarch_wrapper /opt/qt-{{Qt4-Version}}/bin/qtconfig &&
  ln -v -sfn qt-4.2.2 /opt/qt4
+
  ln -v -sfn qt-{{Qt4-Version}} /opt/qt4
 
   
 
   
 
== Configuring ==
 
== Configuring ==
Line 172: Line 171:
  
 
  cat >> /etc/ld.so.conf << "EOF" &&
 
  cat >> /etc/ld.so.conf << "EOF" &&
  # Begin qt addition to /etc/ld.so.conf
+
  # Begin qt4 addition to /etc/ld.so.conf
 
   
 
   
 
  /opt/qt4/lib
 
  /opt/qt4/lib
 
   
 
   
  # End qt addition
+
  # End qt4 addition
 
  EOF
 
  EOF
 
  ldconfig
 
  ldconfig
Line 183: Line 182:
  
 
  cat >> /etc/ld.so.conf << "EOF" &&
 
  cat >> /etc/ld.so.conf << "EOF" &&
  # Begin qt addition to /etc/ld.so.conf
+
  # Begin qt4 addition to /etc/ld.so.conf
 
   
 
   
 
  /opt/qt4/lib
 
  /opt/qt4/lib
Line 189: Line 188:
 
  /opt/qt4/lib64
 
  /opt/qt4/lib64
 
   
 
   
  # End qt addition
+
  # End qt4 addition
 
  EOF
 
  EOF
 
  ldconfig
 
  ldconfig

Revision as of 15:46, 16 December 2006

Download Source: ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-4.8.5.tar.gz

Introduction to Qt4

The Qt4 package contains a C++ GUI library. This is useful for creating graphical applications or executing graphical applications that are dynamically linked to the Qt4 library. One of the major users of Qt4 is upcoming KDE-4.

Dependencies

Required

Optional

Configuration Information

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

-plugin-sql-mysql -I/usr/include/mysql

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

-plugin-sql-psql -I/usr/include/postgresql/server

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

-plugin-sql-sqlite2 -system-sqlite

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

-plugin-sql-odbc

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

-system-nas-sound

If your X Window System is NOT Xorg, then add to configure:

-no-xfixes

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:

./configure -prefix /opt/qt-4.8.5 \
-sysconfdir /etc/qt4 \
-qt-gif \
-system-zlib \
-system-libpng \
-system-libjpeg \
-system-libmng \
-no-exceptions \
-tablet &&
make

Install the package

make install &&
ln -v -sfn qt-4.8.5 /opt/qt4

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

export QMAKESPEC=linux-g++-32 &&
PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \
./configure -prefix /opt/qt-4.8.5 \
-libdir /opt/qt-4.8.5/lib
-plugindir /opt/qt-4.8.5/lib/plugin \
-sysconfdir /etc/qt4 \
-qt-gif \
-system-zlib \
-system-libpng \
-system-libjpeg \
-system-libmng \
-no-exceptions \
-tablet &&
make

Install the package

make install &&
mv -v /opt/qt-4.8.5/bin/qmake{,-32} &&
mv -v /opt/qt-4.8.5/bin/uic{,-32} &&
mv -v /opt/qt-4.8.5/bin/moc{,-32} &&
mv -v /opt/qt-4.8.5/bin/qtconfig{,-32} &&

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

export QMAKESPEC=linux-g++-64 &&
PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \
./configure -prefix /opt/qt-4.8.5 \
-libdir /opt/qt-4.8.5/lib64 \
-plugindir /opt/qt-4.8.5/lib64/plugin \
-L/usr/lib64 \
-sysconfdir /etc/qt4 \
-qt-gif \
-system-zlib \
-system-libpng \
-system-libjpeg \
-system-libmng \
-no-exceptions \
-tablet &&
make

Install the package

make install &&
mv -v /opt/qt-4.8.5/bin/qmake{,-64} &&
mv -v /opt/qt-4.8.5/bin/uic{,-64} &&
mv -v /opt/qt-4.8.5/bin/moc{,-64} &&
mv -v /opt/qt-4.8.5/bin/qtconfig{,-64} &&
ln -sfv /usr/bin/multiarch_wrapper /opt/qt-4.8.5/bin/qmake &&
ln -sfv /usr/bin/multiarch_wrapper /opt/qt-4.8.5/bin/uic &&
ln -sfv /usr/bin/multiarch_wrapper /opt/qt-4.8.5/bin/moc &&
ln -sfv /usr/bin/multiarch_wrapper /opt/qt-4.8.5/bin/qtconfig &&
ln -v -sfn qt-4.8.5 /opt/qt4

Configuring

ld.so.conf

Non-Multilib

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

/opt/qt4/lib

# End qt4 addition
EOF
ldconfig

Multilib

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

/opt/qt4/lib
/opt/qt4/lib32
/opt/qt4/lib64

# End qt4 addition
EOF
ldconfig