From: maintenance team Date: Fri, 26 Oct 2007 08:18:11 +0000 (+0000) Subject: Update for Salome series 4x X-Git-Tag: V_4_1_1~120 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=310a94722baa57b070e8db36dd9cf3ccace6ffac;p=tools%2Finstall.git Update for Salome series 4x --- diff --git a/config_files/hdf5-1.6.3.sh b/config_files/hdf5-1.6.3.sh deleted file mode 100755 index d09b4c6..0000000 --- a/config_files/hdf5-1.6.3.sh +++ /dev/null @@ -1,135 +0,0 @@ -#!/bin/bash -noprofile - -#################################################################################### -# File : hdf5-1.6.3.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 "$HDF5HOME" ]; then - return 1 -fi -check_lib_version libhdf5.so.0.0.0 ${HDF5HOME}/lib -if [ "$?" -ne "0" ]; then - return 1 -fi -check_lib_version libhdf5.settings ${HDF5HOME}/lib -if [ "$?" -eq "0" ]; then - ver=`grep "HDF5 Version:" ${HDF5HOME}/lib/libhdf5.settings | awk '{print $3}'` - if [ "$ver" == "1.6.3" ]; then - return 0 - fi -fi -return 1 -} - -print_env_bin() -{ -cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <> ${PRODUCT_DIR}/MAKE.LOG < ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; - -# remove sources and temporary files after building -if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then - test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC -fi - -# to generate environment scripts -try_preinstalled -} - -install_binary() -{ -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} -source ${INSTALL_WORK}/$SHRC - -check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} - -### modify libhdf5.la file to correct direct path to hdf5 library -### no need to do this for sources installation because 'make install' does it! -cd ${PRODUCT_DIR}/lib -sed -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libhdf5.la > libhdf5.la.new -mv -f libhdf5.la.new libhdf5.la - -# to generate environment script for sources -try_preinstalled -} - -export PROCEDURE=$1; -export INSTALL_WORK=$2; -export SOURCE_DIR=$3; -export INSTALL_ROOT=$4; -export PRODUCT_SEQUENCE=$5; -export PRODUCT_TYPE=$6; -export INSTALL_PRODUCTS=$7; -shift -REMOVE_SRC_TMP=$8; -export PRODUCT="hdf5-1.6.3" -export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} -export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh -$PROCEDURE diff --git a/config_files/med-2.2.3.sh b/config_files/med-2.2.3.sh deleted file mode 100755 index 38d8d82..0000000 --- a/config_files/med-2.2.3.sh +++ /dev/null @@ -1,196 +0,0 @@ -#!/bin/bash -noprofile - -#################################################################################### -# File : med-2.2.3.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 "$MED2HOME" ]; then - #echo "MED2HOME doesn't set" - return 1 -fi -check_lib_version libmed.so.1.0.2 ${MED2HOME}/lib -if [ "$?" -eq "0" ]; then - #echo "The product ${PRODUCT} has been already installed on yours system" - return 0 -fi -return 1 -} - -print_env_bin() -{ -cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < /dev/null - if [ $? == 0 ] ; then is_mandriva=1 ; fi - grep -e "Fedora Core release 4" /etc/redhat-release > /dev/null - if [ $? == 0 ] ; then is_fedora=1 ; fi -fi - -if [ $is_mandriva == 1 ] || [ $is_fedora == 1 ] ; then - if test `uname -m` = "x86_64" ; then - echo "`pwd` -> ./configure --prefix=${PRODUCT_DIR} FFLAGS='-g -O2 -ffixed-line-length-none' CFLAGS=-m64 CXXFLAGS=-m64 >> ${PRODUCT_DIR}/CONFIGURE.LOG" - ./configure --prefix=${PRODUCT_DIR} FFLAGS="-g -O2 -ffixed-line-length-none" CFLAGS=-m64 CXXFLAGS=-m64 >> ${PRODUCT_DIR}/CONFIGURE.LOG 2> ${PRODUCT_DIR}_SRC/errlog - else - echo "`pwd` -> ./configure --prefix=${PRODUCT_DIR} FFLAGS='-g -O2 -ffixed-line-length-none' >> ${PRODUCT_DIR}/CONFIGURE.LOG" - ./configure --prefix=${PRODUCT_DIR} FFLAGS="-g -O2 -ffixed-line-length-none" >> ${PRODUCT_DIR}/CONFIGURE.LOG 2> ${PRODUCT_DIR}_SRC/errlog - fi - if [ "$?" -ne "0" ] ; then - cat ${PRODUCT_DIR}/CONFIGURE.LOG - cat ${PRODUCT_DIR}_SRC/errlog >&2 - cat ${PRODUCT_DIR}_SRC/errlog >> ${PRODUCT_DIR}/CONFIGURE.LOG - exit 1 - fi -else - check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} -fi - -GCC=`which gcc` -cat >> ${PRODUCT_DIR}/MAKE.LOG < ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; - -### modify libmed.la libmedC.la files to correct direct path to hdf5 library -cd ${PRODUCT_DIR}/lib -sed -e 's%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 -lhdf5\3%g' libmed.la > libmed.la.new -mv -f libmed.la.new libmed.la -sed -e 's%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 -lhdf5\3%g' libmedC.la > libmedC.la.new -mv -f libmedC.la.new libmedC.la -tmp="" -if [ -n "${HDF5HOME}" ]; then - tmp="-L${HDF5HOME}/lib" -fi -sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmed.la > libmed.la.new -mv -f libmed.la.new libmed.la -sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmedC.la > libmedC.la.new -mv -f libmedC.la.new libmedC.la - -chmod 755 libmed.la -chmod 755 libmedC.la - -# remove sources and temporary files after building -if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then - test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC -fi - -# to generate environment scripts -try_preinstalled -} - -install_binary() -{ -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} -source ${INSTALL_WORK}/$SHRC - -check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} - -### modify libmed.la libmedC.la files to correct direct path to hdf5 library -### also modify libmed.la and libmedC.la files to correct direct path to med libraries -### no need to do this for sources installation because 'make install' does it! -cd ${PRODUCT_DIR}/lib -sed -e 's%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 -lhdf5\3%g' -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libmed.la > libmed.la.new -mv -f libmed.la.new libmed.la -sed -e 's%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 -lhdf5\3%g' -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libmedC.la > libmedC.la.new -mv -f libmedC.la.new libmedC.la -tmp="" -if [ -n "${HDF5HOME}" ]; then - tmp="-L${HDF5HOME}/lib" -fi -sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmed.la > libmed.la.new -mv -f libmed.la.new libmed.la -sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmedC.la > libmedC.la.new -mv -f libmedC.la.new libmedC.la - -chmod 755 libmed.la -chmod 755 libmedC.la - -### modify scripts to correct installation path -cd ${PRODUCT_DIR}/bin -sed -e "s%set cmd \".*/bin/mdump\"%set cmd \"${PRODUCT_DIR}/bin/mdump\"%g" xmdump > _xmdump -mv _xmdump xmdump -chmod a+x xmdump - -# to generate environment script for sources -try_preinstalled -} - -export PROCEDURE=$1; -export INSTALL_WORK=$2; -export SOURCE_DIR=$3; -export INSTALL_ROOT=$4; -export PRODUCT_SEQUENCE=$5; -export PRODUCT_TYPE=$6; -export INSTALL_PRODUCTS=$7; -shift -REMOVE_SRC_TMP=$8; -export PRODUCT="med-2.2.3" -export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} -export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh -$PROCEDURE diff --git a/config_files/med-2.3.1.sh b/config_files/med-2.3.1.sh new file mode 100755 index 0000000..74e1872 --- /dev/null +++ b/config_files/med-2.3.1.sh @@ -0,0 +1,185 @@ +#!/bin/bash -noprofile + +#################################################################################### +# File : med-2.3.1.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 "$MED2HOME" ]; then + #echo "MED2HOME doesn't set" + return 1 +fi +check_lib_version libmed.so.1.0.2 ${MED2HOME}/lib +if [ "$?" -eq "0" ]; then + #echo "The product ${PRODUCT} has been already installed on yours system" + return 0 +fi +return 1 +} + +print_env_bin() +{ +cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < /dev/null + if [ $? == 0 ] ; then is_mandriva=1 ; fi + grep -e "Mandriva Linux release 2007.0" /etc/redhat-release > /dev/null + if [ $? == 0 ] ; then is_mandriva2007=1 ; fi + grep -e "Fedora Core release 4" /etc/redhat-release > /dev/null + if [ $? == 0 ] ; then is_fedora=1 ; fi +fi +if [ $is_mandriva2007 == 1 ] ; then +chmod +w ./Makefile.am +mv Makefile.am Makefile.am.orig +sed -e 's/ include src tests tools doc / include src tools doc /g' Makefile.am.orig > Makefile.am +fi +if [ $is_mandriva == 1 ] || [ $is_mandriva2007 == 1 ] || [ $is_fedora == 1 ] ; then + if test `uname -m` = "x86_64" ; then + echo "`pwd` -> ./configure --prefix=${PRODUCT_DIR} FFLAGS='-g -O2 -ffixed-line-length-none' CFLAGS=-m64 CXXFLAGS=-m64 >> ${PRODUCT_DIR}/CONFIGURE.LOG" + ./configure --prefix=${PRODUCT_DIR} FFLAGS="-g -O2 -ffixed-line-length-none" CFLAGS=-m64 CXXFLAGS=-m64 >> ${PRODUCT_DIR}/CONFIGURE.LOG 2> ${PRODUCT_DIR}_SRC/errlog + else + echo "`pwd` -> ./configure --prefix=${PRODUCT_DIR} FFLAGS='-g -O2 -ffixed-line-length-none' >> ${PRODUCT_DIR}/CONFIGURE.LOG" + ./configure --prefix=${PRODUCT_DIR} FFLAGS="-g -O2 -ffixed-line-length-none" >> ${PRODUCT_DIR}/CONFIGURE.LOG 2> ${PRODUCT_DIR}_SRC/errlog + fi + if [ "$?" -ne "0" ] ; then + cat ${PRODUCT_DIR}/CONFIGURE.LOG + cat ${PRODUCT_DIR}_SRC/errlog >&2 + cat ${PRODUCT_DIR}_SRC/errlog >> ${PRODUCT_DIR}/CONFIGURE.LOG + exit 1 + fi +else + check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} +fi + +GCC=`which gcc` +cat >> ${PRODUCT_DIR}/MAKE.LOG < ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi + +# to generate environment scripts +try_preinstalled +} + +install_binary() +{ +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} +source ${INSTALL_WORK}/$SHRC + +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} + +### modify libmed.la libmedC.la files to correct direct path to hdf5 library +### also modify libmed.la and libmedC.la files to correct direct path to med libraries +### no need to do this for sources installation because 'make install' does it! +cd ${PRODUCT_DIR}/lib +sed -e 's%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 -lhdf5\3%g' -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libmed.la > libmed.la.new +mv -f libmed.la.new libmed.la +sed -e 's%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 -lhdf5\3%g' -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libmedC.la > libmedC.la.new +mv -f libmedC.la.new libmedC.la +tmp="" +if [ -n "${HDF5HOME}" ]; then + tmp="-L${HDF5HOME}/lib" +fi +sed -e "s%\(-L[^[:space:]]*/hdf5-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)%$tmp %g" libmed.la > libmed.la.new +mv -f libmed.la.new libmed.la +sed -e "s%\(-L[^[:space:]]*/hdf5-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)%$tmp %g" libmedC.la > libmedC.la.new +mv -f libmedC.la.new libmedC.la + +chmod 755 libmed.la +chmod 755 libmedC.la + +### modify scripts to correct installation path +cd ${PRODUCT_DIR}/bin +sed -e "s%set cmd \".*/bin/mdump\"%set cmd \"${PRODUCT_DIR}/bin/mdump\"%g" xmdump > _xmdump +mv _xmdump xmdump +chmod a+x xmdump + +# to generate environment script for sources +try_preinstalled +} + +export PROCEDURE=$1; +export INSTALL_WORK=$2; +export SOURCE_DIR=$3; +export INSTALL_ROOT=$4; +export PRODUCT_SEQUENCE=$5; +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; +export PRODUCT="med-2.3.1" +export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} +export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} +source ./common.sh +$PROCEDURE diff --git a/config_files/qt-3.3.3.sh b/config_files/qt-3.3.3.sh deleted file mode 100755 index 9cd044a..0000000 --- a/config_files/qt-3.3.3.sh +++ /dev/null @@ -1,201 +0,0 @@ -#!/bin/bash -noprofile - -#################################################################################### -# File : qt-3.3.3.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" ] || [ ! -f ${QTDIR}/include/qglobal.h ]; 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.3" ] ; then - return 0 -fi -return 1 -} - -print_env_bin() -{ -cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < configure -chmod +x configure - -export QTDIR=${PRODUCT_DIR}_SRC -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-libjpeg -system-libpng -system-libmng -qt-imgfmt-jpeg -qt-imgfmt-png -qt-imgfmt-mng -lpng -lmng -ljpeg" -# use all plugin styles except -plugin-style-windows -QT_FLAGS=$QT_FLAGS" -plugin-style-cde -plugin-style-compact -plugin-style-motif -plugin-style-motifplus -plugin-style-platinum -plugin-style-sgi" - -# add -dlopen-opengl flag (ONLY if the corresponding patch was applied) -if [ "$patched_for_gl" == "yes" ] ; then - QT_FLAGS=$QT_FLAGS" -dlopen-opengl" -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_DIR}_SRC > ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; - -# remove sources and temporary files after building -if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then - test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC -fi - -# to generate environment scripts -try_preinstalled -} - -install_binary() -{ -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} -source ${INSTALL_WORK}/$SHRC - -check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT} - -cd ${PRODUCT_DIR}/lib - -# modify libdir -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 - -# to generate environment scripts -try_preinstalled -} - -export PROCEDURE=$1; -export INSTALL_WORK=$2; -export SOURCE_DIR=$3; -export INSTALL_ROOT=$4; -export PRODUCT_SEQUENCE=$5; -export PRODUCT_TYPE=$6; -export INSTALL_PRODUCTS=$7; -shift -REMOVE_SRC_TMP=$8; -export PRODUCT="qt-3.3.3" -export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} -export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh -$PROCEDURE diff --git a/config_files/qt-3.3.4.sh b/config_files/qt-3.3.4.sh deleted file mode 100755 index 3c2f015..0000000 --- a/config_files/qt-3.3.4.sh +++ /dev/null @@ -1,222 +0,0 @@ -#!/bin/bash -noprofile - -#################################################################################### -# File : qt-3.3.4.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.4" ] ; then - return 0 -fi -return 1 -} - -print_env_bin() -{ -cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < configure -chmod +x configure - -export QTDIR=${PRODUCT_DIR}_SRC -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_DIR}_SRC > ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; - -# remove sources and temporary files after building -if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then - test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC -fi - -# to generate environment scripts -try_preinstalled -} - -install_binary() -{ -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} -source ${INSTALL_WORK}/$SHRC - -check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.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 - -# to generate environment scripts -try_preinstalled -} - -export PROCEDURE=$1; -export INSTALL_WORK=$2; -export SOURCE_DIR=$3; -export INSTALL_ROOT=$4; -export PRODUCT_SEQUENCE=$5; -export PRODUCT_TYPE=$6; -export INSTALL_PRODUCTS=$7; -shift -REMOVE_SRC_TMP=$8; -export PRODUCT="qt-3.3.4" -export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} -export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh -$PROCEDURE diff --git a/config_files/qt-3.3.8.sh b/config_files/qt-3.3.8.sh new file mode 100755 index 0000000..a5a7266 --- /dev/null +++ b/config_files/qt-3.3.8.sh @@ -0,0 +1,207 @@ +#!/bin/bash -noprofile + +#################################################################################### +# File : qt-3.3.8.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.8" ] ; then + return 0 +fi +return 1 +} + +print_env_bin() +{ +cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < configure +chmod +x configure + +export QTDIR=${PRODUCT_DIR}_SRC +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_DIR}_SRC > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC +fi + +# to generate environment scripts +try_preinstalled +} + +install_binary() +{ +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} +source ${INSTALL_WORK}/$SHRC + +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.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 + +# to generate environment scripts +try_preinstalled +} + +export PROCEDURE=$1; +export INSTALL_WORK=$2; +export SOURCE_DIR=$3; +export INSTALL_ROOT=$4; +export PRODUCT_SEQUENCE=$5; +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; +export PRODUCT="qt-3.3.8" +export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} +export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} +source ./common.sh +$PROCEDURE