install_source()
{
-echo "The installation of Qt 3.3.3 from sources is not provided! Use native Qt."
-return 1
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+makedir ${PRODUCT_DIR}
+
+check_jb tar xfz ${SOURCE_DIR}/qt-3.3.3.tar.gz -C ${INSTALL_WORK}
+cd ${PRODUCT_WORK}
+
+mv -f configure configure-orig
+sed -e "s%read acceptance%acceptance=yes%" configure-orig > configure
+chmod +x configure
+
+export QTDIR=${PRODUCT_WORK}
+export LD_LIBRARY_PATH=${QTDIR}/lib:$LD_LIBRARY_PATH
+
+# basic flags
+QT_FLAGS="-release -thread -shared -qt-gif -platform linux-g++"
+# use system graphics libraries
+QT_FLAGS=$QT_FLAGS" -system-libpng -system-libjpeg -system-libmng -lpng -lmng -ljpeg"
+# prefix
+
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure $QT_FLAGS -prefix ${PRODUCT_DIR}
+
+sed -e "s%^all: symlinks src-qmake src-moc sub-src sub-tools sub-tutorial sub-examples%all: symlinks src-qmake src-moc sub-src sub-tools%g" Makefile > _Makefile
+mv -f _Makefile Makefile
+
+GCC=`which gcc`
+cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
+used gcc=$GCC
+EOF
+check_job ${PRODUCT_DIR}/MAKE.LOG make
+check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
+
+for b in `ls ${PRODUCT_WORK}/bin`; do
+ if [ ! -e ${PRODUCT_DIR}/bin/$b ] || [ -h ${PRODUCT_DIR}/bin/$b ]; then
+ if [ -h ${PRODUCT_DIR}/bin/$b ]; then
+ rm -f ${PRODUCT_DIR}/bin/$b
+ fi
+ cp -f ${PRODUCT_WORK}/bin/$b ${PRODUCT_DIR}/bin/$b
+ fi
+done
+#rm -rf ${PRODUCT_DIR}/doc
+
+#du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log
+rm -fr ${PRODUCT_WORK}
+print_env
}
install_binary()
cd ${PRODUCT_DIR}/lib
sed -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libqt-mt.la > libqt-mt.la.new
mv -f libqt-mt.la.new libqt-mt.la
-cd ${PRODUCT_DIR}/bin
-sed -e "s%export QTDIR=\(.*\)%export QTDIR=${PRODUCT_DIR}%g" designer > designer.new
-mv -f designer.new designer
-chmod 755 designer
+cd ${PRODUCT_DIR}/lib/pkgconfig
+sed -e "s%^prefix='\(.*\)'%prefix='${PRODUCT_DIR}/lib'%g" qt-mt.pc > qt-mt.pc.new
+mv -f qt-mt.pc.new qt-mt.pc
print_env
}