From: maintenance team Date: Tue, 25 Sep 2007 10:20:46 +0000 (+0000) Subject: Adding QT 3.3.6 to IP for Mandriva2006 X-Git-Tag: V_3_2_9~26 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ccdc9493bec37d5bf88a53c079dc3ef1d11db0d4;p=tools%2Finstall.git Adding QT 3.3.6 to IP for Mandriva2006 --- diff --git a/config_files/qt-3.3.6.sh b/config_files/qt-3.3.6.sh new file mode 100755 index 0000000..012d478 --- /dev/null +++ b/config_files/qt-3.3.6.sh @@ -0,0 +1,219 @@ +#!/bin/bash -noprofile + +#################################################################################### +# File : qt-3.3.6.sh +# Created : Thu Dec 18 12:01:00 2002 +# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) +# Project : SALOME +# Module : Installation Wizard +# Copyright : 2002-2007 CEA +# +# This script is the part of the SALOME installation procedure. +# +#################################################################################### + +check_version(){ +if [ -z "$QTDIR" ]; then + return 1 +fi +ver=`grep "QT_VERSION_STR" ${QTDIR}/include/qglobal.h | sed -e 's%^#define QT_VERSION_STR\([[:space:]]*\)%%g' -e 's%\"%%g'` +if [ "$ver" == "3.3.6" ] ; then + return 0 +fi +return 1 +} + +print_env() +{ +cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < configure +chmod +x configure + +export QTDIR=${PRODUCT_WORK} +export LD_LIBRARY_PATH=${QTDIR}/lib:$LD_LIBRARY_PATH + +# basic flags + if test `uname -m` = "x86_64" ; then + QT_FLAGS="-release -thread -shared -qt-gif -platform linux-g++-64" + else + QT_FLAGS="-release -thread -shared -qt-gif -platform linux-g++" + fi +# use system graphics libraries +QT_FLAGS=$QT_FLAGS" -system-libjpeg -system-libpng -system-libmng -qt-imgfmt-jpeg -qt-imgfmt-png -qt-imgfmt-mng -lpng -lmng -ljpeg" + +# add -dlopen-opengl flag (ONLY if the corresponding patch was applied) +if [ "$patched_for_gl" == "yes" ] ; then + QT_FLAGS=$QT_FLAGS" -dlopen-opengl" +fi + +# plugins +if [ -e /etc/mandriva-release ] ; then + version=`cat /etc/mandriva-release | awk '{print $1$4}'` + if [ "$version" == "Mandriva2006.0" ] ; then + QT_FLAGS=$QT_FLAGS" -plugin-style-cde -plugin-style-compact -plugin-style-motif -plugin-style-motifplus -plugin-style-platinum -plugin-style-sgi" + fi +fi + +# configure +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 < ${PRODUCT_DIR}/lib/libqt-mt.la.new + mv -f ${PRODUCT_DIR}/lib/libqt-mt.la.new ${PRODUCT_DIR}/lib/libqt-mt.la +fi + +#rm -rf ${PRODUCT_DIR}/doc + +#du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} +print_env +} + +install_binary() +{ +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +source ${INSTALL_WORK}/$SHRC + +check_jb tar xfz ${SOURCE_DIR}/qt-3.3.6.tar.gz -C ${INSTALL_ROOT} + +# modify libdir +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 + +# modify libGL.so flags +has_gl_dep=`grep -E "^dependency_libs=.*-lGL.*" libqt-mt.la` +gllibdir="`where_gl_libs`" +if [ "$has_gl_dep" != "" ] && [ "$gllibdir" != "" ] ; then + sed -e "s%-lGL%%g" \ + -e "s%^dependency_libs='\(.*\)%dependency_libs='-L$gllibdir -lGL \1%g" \ + libqt-mt.la > libqt-mt.la.new + mv -f libqt-mt.la.new libqt-mt.la +fi + +# modify qt package config +cd ${PRODUCT_DIR}/lib/pkgconfig +sed -e "s%^prefix=\(.*\)%prefix=${PRODUCT_DIR}%g" qt-mt.pc > qt-mt.pc.new +mv -f qt-mt.pc.new qt-mt.pc + +print_env +} + +export PROCEDURE=$1; +export INSTALL_WORK=$2; +export SOURCE_DIR=$3; +export INSTALL_ROOT=$4; +export PRODUCT_SEQUENCE=$5; +if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="qt" ; fi +export PRODUCT="qt-3.3.6" +export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} +export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} +source ./common.sh +$PROCEDURE