]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
Using gcc 4.4 on CentOS 5.5
authorvsr <vsr@opencascade.com>
Fri, 4 Jul 2014 10:48:56 +0000 (14:48 +0400)
committervsr <vsr@opencascade.com>
Fri, 4 Jul 2014 10:48:56 +0000 (14:48 +0400)
42 files changed:
config_files/HXX2SALOME.sh
config_files/OCCT.sh
config_files/ParaView.sh
config_files/PyQt.sh
config_files/Python.sh
config_files/Sphinx.sh
config_files/boost.sh
config_files/cgnslib.sh
config_files/cmake.sh
config_files/common.sh
config_files/docutils.sh
config_files/doxygen.sh
config_files/expat.sh
config_files/freeimage.sh
config_files/freeimage_3.15.4.sh [deleted file]
config_files/freetype.sh
config_files/ftgl.sh
config_files/gcc-common.sh [deleted file]
config_files/gcc.sh
config_files/gl2ps.sh
config_files/graphviz.sh
config_files/hdf5.sh
config_files/libBatch.sh
config_files/libxml2.sh
config_files/med.sh
config_files/metis.sh
config_files/netgen.sh
config_files/numpy.sh
config_files/omniORB.sh
config_files/patches/freeimage-3.16.0.patch [new file with mode: 0644]
config_files/qscintilla.sh
config_files/qt.sh
config_files/qwt.sh
config_files/scotch.sh
config_files/simanio.sh
config_files/sip.sh
config_files/swig.sh
config_files/tcltk.sh
config_files/wso2.sh
config_files/xdata.sh
runInstall
src/SALOME_InstallWizard.cxx

index e4a506446f77f5ad70d592322a8fcd38a074a303..1118cbb023f058d064fdeb018213446707f8fb8c 100755 (executable)
@@ -64,29 +64,20 @@ install_source
 # build sources
 test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
 cd ${PRODUCT_SRC_DIR}
-cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
--------------------
-Build configure...
--------------------
-EOF
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./build_configure
-cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
+
+check_job ${PRODUCT_DIR}/BUILD_CONFIGURE.LOG ./build_configure
+local CONFIGURE_OPTIONS="--prefix=${PRODUCT_DIR}"
+cat > ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
 -------------------
-Configure...
+Used options: ${CONFIGURE_OPTIONS}
 -------------------
 EOF
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR}
-
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=${GCC}
-EOF
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure ${CONFIGURE_OPTIONS}
 check_job ${PRODUCT_DIR}/MAKE.LOG make
-
 check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
 
 #du -sk ${PRODUCT_SRC_DIR} > ${PRODUCT_DIR}/size.log
-cd ${PRODUCT_DIR};
+cd ${PRODUCT_DIR}
 
 # remove sources and temporary files after building
 if [ ${REMOVE_SRC_TMP} = "TRUE" ] ; then
index 207d04ee6a92a7ed178e0e155d661875762d8d5e..f8e8af4810e5626b89e2fe07472d2089d9d91eb0 100755 (executable)
@@ -120,15 +120,11 @@ cd ${PRODUCT_SRC_DIR}
 
 # build_configure
 
-echo " +++++++++++ build_configure"
-
 check_job ${PRODUCT_DIR}/BUILD_CONFIGURE.LOG ./build_configure
 
 # configure
 
-echo " +++++++++++ configure"
-
-flags=""
+flags="--prefix=${PRODUCT_DIR}"
 
 # ... tcl/tk options
 if [ "${TCLHOME}" != "" ] ; then
@@ -159,20 +155,19 @@ fi
 # other options
 flags="${flags} --disable-debug --enable-production"
 
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} ${flags}
+cat > ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
+-------------------
+Used options: ${flags}
+-------------------
+EOF
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure ${flags}
 
 # make
 
-echo " +++++++++++ make"
-
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=${GCC}
-EOF
 check_job ${PRODUCT_DIR}/MAKE.LOG make -j4 install
 
 # fix libGL dependencies
-echo " +++++++++++ fix libGL dependencies"
+
 ( cd ${PRODUCT_DIR}/lib && fix_gl_libs )
 
 cd ${PRODUCT_DIR}
index 534c65663ec33b0c563aa0b5bf395764112b37dd..2d9710ebda1b0b3f5e7555afd5a38ba0a415eebf 100755 (executable)
@@ -87,6 +87,7 @@ local patch_matplotlib=0 # included to diff patch
 local patch_missing_headers=1
 local patch_python_threads=0 # included to diff patch
 local patch_vtk_math=0 # not needed for pv4.1
+local patch_kwprocess=1
 
 # patch: apply general sources patch if present
 if [ "${patch_sources}" = "1" ] ; then
@@ -142,6 +143,11 @@ if [ "${patch_vtk_math}" = "1" ] ; then
     ( test -f patches/vtkMath.h.patch && cp patches/vtkMath.h.patch ${PRODUCT_SRC_DIR}/VTK/Common/Core && cd ${PRODUCT_SRC_DIR}/VTK/Common/Core && patch -p1 < vtkMath.h.patch )
 fi
 
+# patch: fix long time compilation pb
+if [ "${patch_kwprocess}" = "1" ] ; then
+    sed -i "s%<< \"static const char\* \"%<< \"static const char* const \"%g" ${PRODUCT_SRC_DIR}/Utilities/ProcessXML/ProcessXML.cxx
+fi
+
 # to generate environment scripts
 try_preinstalled
 }
@@ -186,8 +192,8 @@ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DBUILD_TESTING:BOOL=OFF"
 
 ### general compiler settings
 #CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_HAVE_GETSOCKNAME_WITH_SOCKLEN_T=1"
-#CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_CXX_COMPILER:STRING=`which g++`"
-#CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_C_COMPILER:STRING=`which gcc`"
+#CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_CXX_COMPILER:STRING=${CXX:-`which g++`}"
+#CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_C_COMPILER:STRING=${CC:-`which gcc`}"
 
 ### compiler settings for 64 bit platforms
 if test `uname -m` = "x86_64" ; then
@@ -321,9 +327,7 @@ cmake  : `which cmake`
 python : `which python`
 tclsh  : `which tclsh`
 qmake  : `which qmake`
-
-used ParaView configuration options:
-${CMAKE_OPTIONS}
+Used options: ${CMAKE_OPTIONS}
 EOF
 check_job ${PRODUCT_DIR}/CONFIGURE.LOG cmake ${PRODUCT_SRC_DIR} ${CMAKE_OPTIONS}
 
@@ -334,14 +338,10 @@ fi
 
 # make
 
-cat > ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=`which gcc`
-EOF
-check_job ${PRODUCT_DIR}/MAKE.LOG make
-# VERBOSE=1
+check_job ${PRODUCT_DIR}/MAKE.LOG make VERBOSE=1 -j4
 
 # make install
-check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
+check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make VERBOSE=1 install
    
 # patch: modify config files properly
 if [ "${patch_vtkconfig}" = "1" ] ; then
index e3a7f6c3ecb7f021f6e10688b5529d62b6ba174f..b48b3b8aa2fa35b90fac60a4993ee9f36d61a693 100755 (executable)
@@ -109,13 +109,18 @@ cd ${PRODUCT_SRC_DIR}
 # configure
 
 PYQT_CONFIGURE_OPTIONS="-b ${PRODUCT_DIR}/bin -d ${PRODUCT_DIR} -v ${PRODUCT_DIR}/sip -p ${PRODUCT_DIR}/plugins --confirm-license"
-
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG python ./configure.py ${PYQT_CONFIGURE_OPTIONS}
-
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=${GCC}
+if [ "${CXX}" != "" ] ; then
+    # custom gcc
+    PYQT_CONFIGURE_OPTIONS="${PYQT_CONFIGURE_OPTIONS} CC=${CC} CXX=${CXX} LINK=${CXX} LINK_SHLIB=${CXX}"
+fi                                                                                                                                                                                                        
+
+cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
+-------------------
+Used options: ${PYQT_CONFIGURE_OPTIONS}
+-------------------
 EOF
+gen_qmake_cache ${PRODUCT_SRC_DIR}
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG python ./configure.py ${PYQT_CONFIGURE_OPTIONS}
 check_job ${PRODUCT_DIR}/MAKE.LOG make
 check_job ${PRODUCT_DIR}/INSTALL.LOG make install
 
@@ -146,6 +151,9 @@ test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
 check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
 
 PYQT_CONFIGURE_OPTIONS="-b ${PRODUCT_DIR}/bin -d ${PRODUCT_DIR} -v ${PRODUCT_DIR}/sip -p ${PRODUCT_DIR}/plugins --confirm-license"
+if [ "${CXX}" != "" ] ; then
+    PYQT_CONFIGURE_OPTIONS="${PYQT_CONFIGURE_OPTIONS} CC=${CC} CXX=${CXX} LINK=${CXX} LINK_SHLIB=${CXX}"
+fi                                                                                                                                                                                                        
 
 # modify pyqtconfig.py file
 if [ -n "${PYTHON_ROOT_DIR}" ] && [ -n "${QT4_ROOT_DIR}" ] ; then
index 407010895315c004d661ff76bf909a5a331be247..8d6e5e79311054ce45dfdd18aac442c8d96a0758 100755 (executable)
@@ -95,33 +95,27 @@ test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
 cd ${PRODUCT_SRC_DIR}
 
 export PYTHON_ARCHIVE_PREFIX=""
-PYTHON_CONFIGURE_OPTIONS="--with-threads --enable-shared --with-libs=-lstdc++ --without-pymalloc"
+PYTHON_CONFIGURE_OPTIONS="--prefix=${PRODUCT_DIR} --with-threads --enable-shared --with-libs=-lstdc++ --without-pymalloc"
 if test `uname -m` = "x86_64" ; then
     PYTHON_CONFIGURE_OPTIONS="${PYTHON_CONFIGURE_OPTIONS} CFLAGS=-m64 CXXFLAGS=-m64"
 fi
-### --with-pydebug ### (for debug)
-
-TCL_INCDIR=
-TCL_LIBDIR=
+if [ "${FOR_DEBUG}" = "1" ] ; then
+    # to debug Python
+    PYTHON_CONFIGURE_OPTIONS="${PYTHON_CONFIGURE_OPTIONS} --with-pydebug"
+fi
 tcl_dir=`where_tcl`
 if [ "${tcl_dir}" != "" ] ; then
     source ${tcl_dir}/tclConfig.sh
-    TCL_INCDIR="${TCL_INCLUDE_SPEC}"
-    TCL_LIBDIR="-L${TCL_PACKAGE_PATH}"
+    PYTHON_CONFIGURE_OPTIONS="${PYTHON_CONFIGURE_OPTIONS} CPPFLAGS=${TCL_INCLUDE_SPEC} LDFLAGS=-L${TCL_PACKAGE_PATH}"
 fi
-#tk_dir=`where_tk`
-#if [ "${tk_dir}" != "" ] ; then
-#    source ${tk_dir}/tkConfig.sh
-#    TCL_INCDIR="${TCL_INCDIR} ${TK_INCLUDE_SPEC}"
-#    TCL_LIBDIR="${TCL_LIBDIR} -L${TCL_PACKAGE_PATH}"
-#fi
-
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} ${PYTHON_CONFIGURE_OPTIONS} CPPFLAGS="${TCL_INCDIR}" LDFLAGS="${TCL_LIBDIR}"
-
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=${GCC}
+
+cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
+-------------------
+Used options: ${PYTHON_CONFIGURE_OPTIONS}
+-------------------
 EOF
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure ${PYTHON_CONFIGURE_OPTIONS}
+
 unset PYTHONPATH PYTHONHOME
 check_job ${PRODUCT_DIR}/MAKE.LOG make 
 check_job ${PRODUCT_DIR}/MAKINSTALL.LOG make install
index 1b295eee058fb8128913c98d89efecfdf05faca4..1840383b11d04b78a710a26b1244ae870acaa043 100755 (executable)
@@ -88,12 +88,16 @@ export PATH=${PRODUCT_DIR}/bin:${PATH}
 
 export PYTHONDONTWRITEBYTECODE=
 
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=${GCC}
+# - install docutils
+
+cd ${PRODUCT_SRC_DIR}/docutils-${VERSION_DOCUTILS}_SRC
+local DOCUTILS_SETUP_OPTIONS="--prefix=${PRODUCT_DIR}"
+cat > ${PRODUCT_DIR}/INSTALL_DOCUTILS.LOG <<EOF
+-------------------
+Used options: ${DOCUTILS_SETUP_OPTIONS}
+-------------------
 EOF
-# install docutils
-cd ${PRODUCT_SRC_DIR}/docutils-${VERSION_DOCUTILS}_SRC ; check_job ${PRODUCT_DIR}/MAKE.LOG python ./setup.py install --prefix=${PRODUCT_DIR}
+check_job ${PRODUCT_DIR}/INSTALL_DOCUTILS.LOG python ./setup.py install ${DOCUTILS_SETUP_OPTIONS}
 cd ${PRODUCT_DIR}/bin
 for f in X `find . -name "*.py" -exec basename {} ";" | awk -F. '{print $1}'` ; do
     case ${f} in
@@ -102,17 +106,48 @@ for f in X `find . -name "*.py" -exec basename {} ";" | awk -F. '{print $1}'` ;
     esac
 done
 
-# install setuptools
-cd ${PRODUCT_SRC_DIR}/setuptools-${VERSION_SETUPTOOLS}_SRC ; check_job ${PRODUCT_DIR}/MAKE.LOG python ./setup.py install --prefix=${PRODUCT_DIR}
+# - install setuptools
 
-# install Pygments
-cd ${PRODUCT_SRC_DIR}/Pygments-${VERSION_PYGMENTS}_SRC ; check_job ${PRODUCT_DIR}/MAKE.LOG python ./setup.py install --prefix=${PRODUCT_DIR}
+cd ${PRODUCT_SRC_DIR}/setuptools-${VERSION_SETUPTOOLS}_SRC
+local SETUPTOOLS_SETUP_OPTIONS="--prefix=${PRODUCT_DIR}"
+cat > ${PRODUCT_DIR}/INSTALL_SETUPTOOLS.LOG <<EOF
+-------------------
+Used options: ${SETUPTOOLS_SETUP_OPTIONS}
+-------------------
+EOF
+check_job ${PRODUCT_DIR}/INSTALL_SETUPTOOLS.LOG python ./setup.py install ${SETUPTOOLS_SETUP_OPTIONS}
+
+# - install Pygments
+
+cd ${PRODUCT_SRC_DIR}/Pygments-${VERSION_PYGMENTS}_SRC
+local PYGMENTS_SETUP_OPTIONS="--prefix=${PRODUCT_DIR}"
+cat > ${PRODUCT_DIR}/INSTALL_PYGMENTS.LOG <<EOF
+-------------------
+Used options: ${PYGMENTS_SETUP_OPTIONS}
+-------------------
+EOF
+check_job ${PRODUCT_DIR}/INSTALL_PYGMENTS.LOG python ./setup.py install ${PYGMENTS_SETUP_OPTIONS}
 
-# install Jinja2
-cd ${PRODUCT_SRC_DIR}/Jinja2-${VERSION_JINJA2}_SRC ; check_job ${PRODUCT_DIR}/MAKE.LOG python ./setup.py install --prefix=${PRODUCT_DIR}
+# - install Jinja2
+
+cd ${PRODUCT_SRC_DIR}/Jinja2-${VERSION_JINJA2}_SRC
+local JINJA2_SETUP_OPTIONS="--prefix=${PRODUCT_DIR}"
+cat > ${PRODUCT_DIR}/INSTALL_JINJA2.LOG <<EOF
+-------------------
+Used options: ${JINJA2_SETUP_OPTIONS}
+-------------------
+EOF
+check_job ${PRODUCT_DIR}/INSTALL_JINJA2.LOG python ./setup.py install ${JINJA2_SETUP_OPTIONS}
 
 # install Sphinx
-cd ${PRODUCT_SRC_DIR}/Sphinx-${VERSION_SPHINX}_SRC ; check_job ${PRODUCT_DIR}/MAKE.LOG python ./setup.py install --prefix=${PRODUCT_DIR}
+cd ${PRODUCT_SRC_DIR}/Sphinx-${VERSION_SPHINX}_SRC
+local SPHINX_SETUP_OPTIONS="--prefix=${PRODUCT_DIR}"
+cat > ${PRODUCT_DIR}/INSTALL_SPHINX.LOG <<EOF
+-------------------
+Used options: ${SPHINX_SETUP_OPTIONS}
+-------------------
+EOF
+check_job ${PRODUCT_DIR}/INSTALL_SPHINX.LOG python ./setup.py install ${SPHINX_SETUP_OPTIONS}
 
 # fix Python exec path
 cd ${PRODUCT_DIR}/bin
index 219a5daa77cadf2c6780a8f527cf20e38de12b1f..f17a3e3457675868921448c9e6f314c78945effa 100755 (executable)
@@ -82,14 +82,16 @@ install_source
 # build sources
 test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
 
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/BUILD.LOG <<EOF
-used gcc=${GCC}
-EOF
-
 # configure
 cd ${PRODUCT_SRC_DIR}
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./bootstrap.sh --with-toolset=gcc --with-python=`which python` --prefix=${PRODUCT_DIR}
+
+local BOOST_CONFIGURE_OPTIONS="--prefix=${PRODUCT_DIR} --with-toolset=gcc --with-python=`which python`"
+cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
+-------------------
+Used options: ${BOOST_CONFIGURE_OPTIONS}
+-------------------
+EOF
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./bootstrap.sh ${BOOST_CONFIGURE_OPTIONS}
 
 # make & install
 cd ${PRODUCT_SRC_DIR}
@@ -97,7 +99,19 @@ cd ${PRODUCT_SRC_DIR}
 PRODUCT_BUILD_DIR=${PRODUCT_DIR}_build
 mkdir -p ${PRODUCT_BUILD_DIR} >& /dev/null
 
-./b2 --prefix=${PRODUCT_DIR} --layout=tagged toolset=gcc variant=release runtime-link=shared threading=multi --build-dir=${PRODUCT_BUILD_DIR} install >& ${PRODUCT_DIR}/INSTALL.LOG 
+if [ "${CXX}" != "" ] ; then
+    # custom gcc
+    local gcc_ver=`${CXX} -dumpversion | awk -F. '{a1=0;a2=0;if(NF>0)a1=$1;if(NF>1)a2=$2;printf("%d.%d",a1,a2);}'`
+    sed -i "s%# using gcc : .* ;%using gcc : ${gcc_ver} : ${CXX} ;%g" ${PRODUCT_SRC_DIR}/tools/build/v2/user-config.jam
+fi
+
+local BJAM_OPTIONS="--prefix=${PRODUCT_DIR} --build-dir=${PRODUCT_BUILD_DIR} -d+2 --layout=tagged toolset=gcc variant=release runtime-link=shared threading=multi"
+cat >> ${PRODUCT_DIR}/INSTALL.LOG  <<EOF
+-------------------
+Used options: ${BJAM_OPTIONS}
+-------------------
+EOF
+check_job ${PRODUCT_DIR}/INSTALL.LOG ./b2 ${BJAM_OPTIONS} install
 
 if [ "$?" -ne "0" ] ; then
     cat ${PRODUCT_DIR}/INSTALL.LOG
index b475dcf9282b7da251c12cddd6b1dd94228939af..657b2c2c6b0cd5376172b8449cc49044dcbd32f9 100755 (executable)
@@ -81,12 +81,11 @@ mkdir ${PRODUCT_BUILD_DIR}
 cd ${PRODUCT_BUILD_DIR}
     
 CMAKE_OPTIONS=""
-
-### common settings
+# - common settings
 CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_DIR}"
 CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DCMAKE_BUILD_TYPE:STRING=Release"
 CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DBUILD_SHARED_LIBS:BOOL=ON"
-### HDF5 settings
+# - HDF5 settings
 if [ "${HDF5_ROOT_DIR}" != "" ]; then
     CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DENABLE_HDF5:BOOL=ON"
     CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DHDF5_INCLUDE_PATH:PATH=${HDF5_ROOT_DIR}/include"
@@ -108,17 +107,13 @@ if [ "${HDF5_ROOT_DIR}" != "" ]; then
 fi
 
 cat > ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
-cmake  : `which cmake`
-
-used settings:
-${CMAKE_OPTIONS}
+-------------------
+Used options: ${CMAKE_OPTIONS}
+-------------------
 EOF
 check_job ${PRODUCT_DIR}/CONFIGURE.LOG cmake ${PRODUCT_SRC_DIR} ${CMAKE_OPTIONS}
-cat > ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=`which gcc`
-EOF
-check_job ${PRODUCT_DIR}/MAKE.LOG make -j4
-check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
+check_job ${PRODUCT_DIR}/MAKE.LOG make VERBOSE=1 -j4
+check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make VERBOSE=1 install
 
 cd ${PRODUCT_DIR}
 
index 65f2ad084341ec0a889517249aceb9a709ce85bd..77e4f401c5c984b7e2c387335dc4b6abc585faff 100755 (executable)
@@ -74,10 +74,13 @@ test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
 
 cd ${PRODUCT_SRC_DIR}
 
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR}
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=${GCC}
+local CMAKE_CONFIGURE_OPTIONS="--prefix=${PRODUCT_DIR}"
+cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
+-------------------
+Used options: ${CMAKE_CONFIGURE_OPTIONS}
+-------------------
 EOF
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure ${CMAKE_CONFIGURE_OPTIONS}
 check_job ${PRODUCT_DIR}/MAKE.LOG make
 check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
 
index 73d43a78615b436d27f3e498d6e36ba4c54cb070..a5df6db4589dcb1bd95355195495efaa61483a42 100755 (executable)
@@ -66,13 +66,13 @@ check_job()
   shift
   errfile=/tmp/errlog
   if [ -n "${INSTALL_WORK}" ] ; then errfile=${INSTALL_WORK}/errlog; fi
-  cmd="`pwd` -> $*"
+  cmd="`pwd` -> $@"
   if [ "${out}" != "1" ] ; then cmd="${cmd} >> ${out}" ; fi
   echo -e ${cmd}
   if [ "${out}" != "1" ] ; then
-      $* >> ${out} 2>${errfile}
+      "$@" >> ${out} 2>${errfile}
   else
-      $*
+      "$@"
   fi
   if [ "$?" -ne "0" ] ; then
     if [ ${out} != "1" ] ; then
@@ -99,7 +99,7 @@ check_job()
 #all output will be put into terminal
 check_jb()
 {
-  check_job 1 $*
+  check_job 1 "$@"
   return
 }
 
@@ -516,38 +516,6 @@ fi
 return ${to_tail}
 }
 
-where_gcc(){
-maj_ver=`echo $1 | awk -F. '{if(NF>0) print $1; else print 0}'`
-min_ver=`echo $1 | awk -F. '{if(NF>1) print $2; else print 0}'`
-rel_ver=`echo $1 | awk -F. '{if(NF>2) print $3; else print 0}'`
-let ver=${maj_ver}*10000+${min_ver}*100+${rel_ver}
-newer=""
-newerver=0
-for i in `echo ${PATH}:/usr/bin:/usr/local/bin | sed -e"s%:% %g"` ; do
-    ret=`find ${i} -name gcc -maxdepth 1 2>/dev/null`
-    if [ -n "${ret}" ] ; then
-       maj_ver=`${ret} -dumpversion | awk -F. '{if(NF>0) print $1; else print 0}'`
-       min_ver=`${ret} -dumpversion | awk -F. '{if(NF>1) print $2; else print 0}'`
-       rel_ver=`${ret} -dumpversion | awk -F. '{if(NF>2) print $3; else print 0}'`
-       let ver1=${maj_ver}*10000+${min_ver}*100+${rel_ver}
-       if [ ${ver1} -eq ${ver} ] ; then
-           ret=`echo ${ret} | sed -e"s%/gcc$%%g"`
-           echo ${ret}
-           return 0
-       fi
-       if [ ${ver1} -gt ${ver} ] && [ ${ver1} -gt ${newerver} ] ; then
-           let newerver=${ver1}
-           newer=`echo ${ret} | sed -e"s%/gcc$%%g"`
-       fi
-    fi
-done
-if [ -n "${newer}" ] ; then
-    echo ${newer}
-    return 0
-fi
-return 1
-}
-
 where_tcl(){
 if test -z "${TCLHOME}"; then
     TCLHOME=/usr
@@ -695,32 +663,29 @@ fix_gl_libs(){
 }
 
 ##
-# function: workaround on some platforms to use latest available version of gcc (e.g. gcc44 on CentOS 5.5)
+# function: create .qmake.cache file for compilation of custom gcc compiler
+# usage: gen_qmake_cache <dir>
+#        <dir> is a directory to put .qmake.cache
 ##
-use_latest_gcc(){
-    local gcc_min=$1
-    local gcc_ver=`gcc -dumpversion | awk -F. '{a1=0;a2=0;a3=0;if(NF>0)a1=$1;if(NF>1)a2=$2;if(NF>2)a3=$3;printf("%02d%02d%02d",a1,a2,a3);}'`
-    local gcc_found
-    local gxx_found
-    if [ ${gcc_ver} -le ${gcc_min} ] ; then
-       local wheregcc=$(dirname `which gcc`)
-       local all_gcc=$(find ${wheregcc}/gcc*)
-       local gcc_alt
-       local gcc_max=0
-       for gcc_alt in ${all_gcc} XXX ; do
-           if [ ${gcc_alt} = "XXX" ] ; then continue ; fi
-           gcc_ver=`${gcc_alt} -dumpversion 2>/dev/null | awk -F. '{a1=0;a2=0;a3=0;if(NF>0)a1=$1;if(NF>1)a2=$2;if(NF>2)a3=$3;printf("%02d%02d%02d",a1,a2,a3);}'`
-           if [ "${gcc_ver}" = "" ] ; then continue ; fi
-           if [ ${gcc_ver} -gt ${gcc_min} ] && [ ${gcc_ver} -gt ${gcc_max} ] ; then
-               gcc_max=${gcc_ver}
-               gcc_found=${gcc_alt}
-               gxx_found=`echo ${gcc_found} | sed -e "s%gcc%g++%"`
-           fi
-       done
-       if [ "${gcc_found}" != "" ] ; then
-           echo "CC=${gcc_found} CXX=${gxx_found} LD=${gxx_found}"
+
+gen_qmake_cache()
+{
+    local d=$1
+    if [ "${d}" != "" ] && [ -d ${d} ] && [ "${CXX}" != "" ] ; then
+       touch ${d}/.qmake.cache >& /dev/null
+       if [ "$?" != "0" ]  ; then
+           return 1
        fi
+       cat > ${d}/.qmake.cache <<EOF
+QMAKE_CXX          = ${CXX}
+QMAKE_LINK         = ${CXX}
+QMAKE_LINK_SHLIB   = ${CXX}
+QMAKE_CC           = ${CC}
+QMAKE_LINK_C       = ${CC}
+QMAKE_LINK_C_SHLIB = ${CC}
+EOF
     fi
+    return 0
 }
 
 modif_la_files(){
index 2a6e1080583b805417e412fcc67d260adb348d7d..5660682f08a44e0f3692aa1568c668afb7d7e7c8 100755 (executable)
@@ -74,7 +74,16 @@ install_source
 
 # build sources
 test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
-cd ${PRODUCT_SRC_DIR} ; check_job ${PRODUCT_DIR}/BUILD.LOG python setup.py install --prefix=${PRODUCT_DIR}
+
+cd ${PRODUCT_SRC_DIR}
+
+local DOCUTILS_OPTIONS="--prefix=${PRODUCT_DIR}"
+cat > ${PRODUCT_DIR}/INSTALL.LOG <<EOF
+-------------------
+Used options: ${DOCUTILS_OPTIONS}
+-------------------
+EOF
+check_job ${PRODUCT_DIR}/INSTALL.LOG python setup.py install ${DOCUTILS_OPTIONS}
 
 cd ${PRODUCT_DIR}/bin
 for f in X `find . -name "*.py" -exec basename {} ";" | awk -F. '{print $1}'` ; do
index 5244e2cc032a1c3d9e4e86d40e533ffa9aa8da2b..5d1ed4cf9a974cfb7b9f7a9652c6d547eac3a293 100755 (executable)
@@ -81,6 +81,17 @@ if [ "${patch_sources}" = "1" ] ; then
     fi
 fi
 
+if [ "${CXX}" != "" ] ; then
+    # custom compiler
+    for d in ${PRODUCT_SRC_DIR}/tmake/lib/linux-g++ ${PRODUCT_SRC_DIR}/tmake/lib/linux-64 ; do
+       sed -i "s%\(^TMAKE_CC[[:space:]]*=[[:space:]]*\).*$%\1${CC}%g" ${d}/tmake.conf
+       sed -i "s%\(^TMAKE_CXX[[:space:]]*=[[:space:]]*\).*$%\1${CXX}%g" ${d}/tmake.conf
+       sed -i "s%\(^TMAKE_LINK[[:space:]]*=[[:space:]]*\).*$%\1${CXX}%g" ${d}/tmake.conf
+       sed -i "s%\(^TMAKE_LINK_SHLIB[[:space:]]*=[[:space:]]*\).*$%\1${CXX}%g" ${d}/tmake.conf
+       sed -i "s%\(^TMAKE_MOC[[:space:]]*=[[:space:]]*\).*$%\1`which moc`%g" ${d}/tmake.conf
+    done
+fi
+
 if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then
     du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.src.size
 fi
@@ -98,11 +109,13 @@ install_source
 cd ${PRODUCT_SRC_DIR}
 test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
 
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix ${PRODUCT_DIR}
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=${GCC}
+local CONFIGURE_OPTIONS="--prefix ${PRODUCT_DIR}"
+cat > ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
+-------------------
+Used options: ${CONFIGURE_OPTIONS}
+-------------------
 EOF
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure ${CONFIGURE_OPTIONS}
 check_job ${PRODUCT_DIR}/MAKE.LOG make
 check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
 
index c4da987223457b649e3e57c8dbb4f13b95762c47..a5c7f98585307064ed31b09331a6c3a57ebc8ddf 100755 (executable)
@@ -83,13 +83,16 @@ install_source
 # build sources
 test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
 
-# install
 cd ${PRODUCT_SRC_DIR}
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR}
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=${GCC}
+
+# install
+local CONFIGURE_OPTIONS="--prefix=${PRODUCT_DIR}"
+cat > ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
+-------------------
+Used options: ${CONFIGURE_OPTIONS}
+-------------------
 EOF
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure ${CONFIGURE_OPTIONS}
 check_job ${PRODUCT_DIR}/MAKE.LOG make
 check_job ${PRODUCT_DIR}/MAKE.LOG make install
 
index bd97c2ededd26cd26ff72210d65586eed454ba03..af685eea5dd2b8c3289363df2ea23769843ed5e2 100755 (executable)
@@ -72,11 +72,17 @@ check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
 
 # patch sources
 
+# [-] general patch for sources
+local patch_sources=1
 # [-] patch for build procedure
 local patch_build_procedure=1
 # [-] patch for gcc 4.7 compatibility
 local patch_gcc47_compat=1
 
+if [ "${patch_sources}" = "1" ] ; then
+    ( test -f patches/${PRODUCT}.patch && cp patches/${PRODUCT}.patch ${PRODUCT_SRC_DIR} && cd ${PRODUCT_SRC_DIR} && patch -p1 < ${PRODUCT}.patch )
+fi
+
 if [ "${patch_build_procedure}" = "1" ] ; then
     sed -i "s%DESTDIR ?= /%DESTDIR ?= /usr%g;s%INCDIR ?= \$(DESTDIR)/usr/include%INCDIR ?= \$(DESTDIR)/include%g;s%INSTALLDIR ?= \$(DESTDIR)/usr/lib%INSTALLDIR ?= \$(DESTDIR)/lib%g;s%-o root -g root %%g" ${PRODUCT_SRC_DIR}/Makefile.gnu
     sed -i "s%DESTDIR ?= /%DESTDIR ?= /usr%g;s%INCDIR ?= \$(DESTDIR)/usr/include%INCDIR ?= \$(DESTDIR)/include%g;s%INSTALLDIR ?= \$(DESTDIR)/usr/lib%INSTALLDIR ?= \$(DESTDIR)/lib%g;s%-o root -g root %%g" ${PRODUCT_SRC_DIR}/Makefile.fip
@@ -107,18 +113,11 @@ cd ${PRODUCT_SRC_DIR}
 
 ## building FreeImage library
 
-# workaround for CentOS 5.5: FreeImage 3.16.0 is not compiled with gcc 4.2 and older :(
-local workaround_gcc42_pb=1
-gcc_found=""
-if [ "${workaround_gcc42_pb}" = "1" ] ; then
-    gcc_found="`use_latest_gcc 040200`"
-fi
-
 # compile
-check_job ${PRODUCT_DIR}/MAKE.LOG make ${gcc_found} -f Makefile.gnu
+check_job ${PRODUCT_DIR}/MAKE.LOG make -f Makefile.gnu
 
 # install
-check_job ${PRODUCT_DIR}/INSTALL.LOG make ${gcc_found} -f Makefile.gnu DESTDIR=${PRODUCT_DIR} install 
+check_job ${PRODUCT_DIR}/INSTALL.LOG make -f Makefile.gnu DESTDIR=${PRODUCT_DIR} install 
 
 # clean temporary files
 ###make -f Makefile.gnu clean 
@@ -126,10 +125,10 @@ check_job ${PRODUCT_DIR}/INSTALL.LOG make ${gcc_found} -f Makefile.gnu DESTDIR=$
 ## building FreeImagePlus library
 
 # compile
-check_job ${PRODUCT_DIR}/MAKEPLUS.LOG make ${gcc_found} -f Makefile.fip 
+check_job ${PRODUCT_DIR}/MAKEPLUS.LOG make -f Makefile.fip 
 
 # install
-check_job ${PRODUCT_DIR}/INSTALLPLUS.LOG make ${gcc_found} -f Makefile.fip DESTDIR=${PRODUCT_DIR} install 
+check_job ${PRODUCT_DIR}/INSTALLPLUS.LOG make -f Makefile.fip DESTDIR=${PRODUCT_DIR} install 
 
 # clean temporary files
 ###make -f Makefile.fip clean 
diff --git a/config_files/freeimage_3.15.4.sh b/config_files/freeimage_3.15.4.sh
deleted file mode 100755 (executable)
index f2ab5ff..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-#!/bin/bash -noprofile
-
-####################################################################################
-#  File      : freeimage.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-2014 CEA
-#
-#  This script is the part of the SALOME installation procedure.
-#
-####################################################################################
-
-#
-# freeimage version
-#
-VERSION_FREEIMAGE=3.15.4
-
-check_version()
-{
-# check existance of freeimage and its version
-if [ "${FREEIMAGE_ROOT_DIR}" != "" ] && [ -f ${FREEIMAGE_ROOT_DIR}/include/FreeImage.h ] ; then
-    ver_major=`grep "#define FREEIMAGE_MAJOR_VERSION"  ${FREEIMAGE_ROOT_DIR}/include/FreeImage.h | awk '{print $3}'`
-    ver_minor=`grep "#define FREEIMAGE_MINOR_VERSION"  ${FREEIMAGE_ROOT_DIR}/include/FreeImage.h | awk '{print $3}'`
-    ver_maint=`grep "#define FREEIMAGE_RELEASE_SERIAL" ${FREEIMAGE_ROOT_DIR}/include/FreeImage.h | awk '{print $3}'`
-    ver="${ver_major}.${ver_minor}.${ver_maint}"
-    if [ "${ver}" = "${VERSION_FREEIMAGE}" ] ; then
-        return 0
-    fi
-fi
-return 1
-}
-
-print_env_bin()
-{
-cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
-#${DELIM} ${PRODUCT_TYPE} ${DELIM}
-export FREEIMAGE_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export PATH=\${FREEIMAGE_ROOT_DIR}/bin:\${PATH} 
-export LD_LIBRARY_PATH=\${FREEIMAGE_ROOT_DIR}/lib:\${LD_LIBRARY_PATH}
-##
-EOF
-(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
-make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
-}
-
-print_env_src()
-{
-cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#${DELIM} ${PRODUCT_TYPE}_src ${DELIM}
-# nothing to do
-##
-EOF
-(test -w ${PRODUCT_SRC_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_SRC_DIR})
-make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
-}
-
-try_preinstalled(){
-try_existing ${PRODUCT_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-try_existing ${PRODUCT_SRC_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-return $?
-}
-
-install_source()
-{
-make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/${SHRC}
-
-# unpack
-check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
-
-# patch sources
-
-# [-] patch for build procedure
-local patch_build_procedure=1
-# [-] patch for gcc 4.7 compatibility
-local patch_gcc47_compat=1
-
-if [ "${patch_build_procedure}" = "1" ] ; then
-    sed -i "s%DESTDIR ?= /%DESTDIR ?= /usr%g;s%INCDIR ?= \$(DESTDIR)/usr/include%INCDIR ?= \$(DESTDIR)/include%g;s%INSTALLDIR ?= \$(DESTDIR)/usr/lib%INSTALLDIR ?= \$(DESTDIR)/lib%g;s%-o root -g root %%g" ${PRODUCT_SRC_DIR}/Makefile.gnu
-    sed -i "s%DESTDIR ?= /%DESTDIR ?= /usr%g;s%INCDIR ?= \$(DESTDIR)/usr/include%INCDIR ?= \$(DESTDIR)/include%g;s%INSTALLDIR ?= \$(DESTDIR)/usr/lib%INSTALLDIR ?= \$(DESTDIR)/lib%g;s%-o root -g root %%g" ${PRODUCT_SRC_DIR}/Makefile.fip
-    sed -i "s%\(^[[:space:]]*\)\(install -m 755 \$(SHAREDLIB) \$(INSTALLDIR)\)%\1\2\n\1ln -sf \$(SHAREDLIB) \$(INSTALLDIR)/\$(VERLIBNAME)\n\1ln -sf \$(VERLIBNAME) \$(INSTALLDIR)/\$(LIBNAME)%g"            ${PRODUCT_SRC_DIR}/Makefile.fip
-fi
-
-if [ "${patch_gcc47_compat}" = "1" ] ; then
-    sed -i 's%\(#include "OpenEXRConfig.h"\)%\1\n#include <string.h>%g' ${PRODUCT_SRC_DIR}/Source/OpenEXR/IlmImf/ImfAutoArray.h
-fi
-
-if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then
-    du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.src.size
-fi
-
-# to generate environment scripts
-try_preinstalled
-}
-
-install_source_and_build()
-{
-# install sources
-install_source
-
-# build sources
-test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
-
-cd ${PRODUCT_SRC_DIR}
-
-## building FreeImage library
-
-# workaround for CentOS 5.5: FreeImage 3.16.0 is not compiled with gcc 4.2 and older :(
-local workaround_gcc42_pb=0
-gcc_found=""
-if [ "${workaround_gcc42_pb}" = "1" ] ; then
-    gcc_found="`use_latest_gcc 040200`"
-fi
-
-# compile
-check_job ${PRODUCT_DIR}/MAKE.LOG make ${gcc_found} -f Makefile.gnu
-
-# install
-check_job ${PRODUCT_DIR}/INSTALL.LOG make ${gcc_found} -f Makefile.gnu DESTDIR=${PRODUCT_DIR} install 
-
-# clean temporary files
-###make -f Makefile.gnu clean 
-
-## building FreeImagePlus library
-
-# compile
-check_job ${PRODUCT_DIR}/MAKEPLUS.LOG make ${gcc_found} -f Makefile.fip 
-
-# install
-check_job ${PRODUCT_DIR}/INSTALLPLUS.LOG make ${gcc_found} -f Makefile.fip DESTDIR=${PRODUCT_DIR} install 
-
-# clean temporary files
-###make -f Makefile.fip clean 
-
-cd ${PRODUCT_DIR}
-
-if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then
-    du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.build.size
-    du -sk ${PRODUCT_DIR}     > ${INST_ROOT}/${PRODUCT_TYPE}.bin.size
-fi
-
-# remove sources and temporary files after building
-if [ ${REMOVE_SRC_TMP} = "TRUE" ] ; then
-    test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
-fi
-
-# to generate environment scripts
-try_preinstalled
-}
-
-install_binary()
-{
-make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/${SHRC}
-
-# create a product directory
-test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
-
-check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
-
-# to generate environment script for sources
-try_preinstalled
-}
-
-export PROCEDURE=$1;
-export INSTALL_WORK=$2;
-export SOURCE_DIR=$3;
-export INST_ROOT=$4;
-export PRODUCT_SEQUENCE=$5;
-export PRODUCT_TYPE=$6;
-export INSTALL_PRODUCTS=$7;
-shift
-REMOVE_SRC_TMP=$8;
-test $# = 10 && shift && SINGLE_DIR=$9
-export PRODUCT="freeimage-${VERSION_FREEIMAGE}"
-export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
-export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT}_SRC
-source ./common.sh
-${PROCEDURE} 
index 2f01d124b39ea85437a95c1ea7eeb7a1e8419b42..8a7fca6441e29100ad649215223026b24aedb3c6 100755 (executable)
@@ -87,13 +87,18 @@ test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
 
 cd ${PRODUCT_SRC_DIR}
 
-FREETYPE_CONFIGURE_OPTIONS=
+local FREETYPE_CONFIGURE_OPTIONS="--prefix=${PRODUCT_DIR}"
 if test `uname -m` = "x86_64" ; then
     FREETYPE_CONFIGURE_OPTIONS="${FREETYPE_CONFIGURE_OPTIONS} CFLAGS='-m64 -fPIC' CPPFLAGS='-m64 -fPIC'"
 fi
 
-# congigure
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} ${FREETYPE_CONFIGURE_OPTIONS}
+# configure
+cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
+-------------------
+Used options: ${FREETYPE_CONFIGURE_OPTIONS}
+-------------------
+EOF
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure ${FREETYPE_CONFIGURE_OPTIONS}
 
 # compile
 check_job ${PRODUCT_DIR}/MAKE.LOG make
index 425398974b98059573e89b631607087892f78f63..93dd18ee2cc9060f6a7b85247bf01fc5f8ef0469 100755 (executable)
@@ -98,7 +98,7 @@ test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
 
 cd ${PRODUCT_SRC_DIR}
 
-FTGL_CONFIGURE_OPTIONS=""
+FTGL_CONFIGURE_OPTIONS="--prefix=${PRODUCT_DIR}"
 FTGL_CONFIGURE_OPTIONS="${FTGL_CONFIGURE_OPTIONS} --enable-shared=yes"
 FTGL_CONFIGURE_OPTIONS="${FTGL_CONFIGURE_OPTIONS} --with-ft-prefix=${FREETYPE_ROOT_DIR}"
 FTGL_CONFIGURE_OPTIONS="${FTGL_CONFIGURE_OPTIONS} --with-gl-inc=/usr/include"
@@ -110,7 +110,12 @@ else
 fi
 
 # congigure
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} ${FTGL_CONFIGURE_OPTIONS}
+cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
+-------------------
+Used options: ${FTGL_CONFIGURE_OPTIONS}
+-------------------
+EOF
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure ${FTGL_CONFIGURE_OPTIONS}
 
 # compile
 check_job ${PRODUCT_DIR}/MAKE.LOG make
diff --git a/config_files/gcc-common.sh b/config_files/gcc-common.sh
deleted file mode 100755 (executable)
index 1022af7..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/bin/bash -noprofile
-
-####################################################################################
-#  File      : gcc-common.sh
-#  Created   : Mon Jan 22 14:23:10 2007
-#  Author    : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
-#  Project   : SALOME
-#  Module    : Installation Wizard
-#  Copyright : 2002-2014 CEA
-#
-#  This script is the part of the SALOME installation procedure.
-#
-####################################################################################
-
-if [ "x${GCC_VERSION}" = "x" ] ; then
-    GCC_VERSION="3.2"
-fi
-GCC_VERSION_MAJ=`echo ${GCC_VERSION} | awk -F[.-] '{if(NF>0) print $1; else print 0}'`
-GCC_VERSION_MIN=`echo ${GCC_VERSION} | awk -F[.-] '{if(NF>1) print $2; else print 0}'`
-GCC_VERSION_REL=`echo ${GCC_VERSION} | awk -F[.-] '{if(NF>2) print $3; else print 0}'`
-let GCC_VERSION_ID=${GCC_VERSION_MAJ}*10000+${GCC_VERSION_MIN}*100+${GCC_VERSION_REL}
-
-check_version()
-{
-# version number is calculated as: <major>*10000+<minor>*100+<release>
-# e.g. for gcc 3.2 it is equal to 30200, for gcc 3.3.2 - 30202
-gcc_ver=`gcc -dumpversion | awk -F[.-] '{v1=0;v2=0;v3=0;if(NF>0)v1=$1;if(NF>1)v2=$2;if(NF>2)v3=$3;print v1*10000+v2*100+v3}'`
-if [ ${gcc_ver} -eq ${GCC_VERSION_ID} ]  ; then
-    return 0
-fi
-return 1
-}
-
-# looks for the native product and collects it's environment (used by make_env())
-try_native(){
-gcc_root="`where_gcc ${GCC_VERSION}`"
-if [ -n "${gcc_root}" ] ; then
-    gcc_root=`cd ${gcc_root}/..; pwd`
-    # get version number: <major>, <minor> and <release>
-    # <major> and <minor> numbers are checked strickly, but <release> number can be larger than required one
-    # version number is calculated as: <major>*10000+<minor>*100+<release>
-    # e.g. for gcc 3.2 it is equal to 30200, for gcc 3.3.2 - 30202
-    maj_ver=`${gcc_root}/bin/gcc -dumpversion | awk -F[.-] '{if(NF>0) print $1; else print 0}'`
-    min_ver=`${gcc_root}/bin/gcc -dumpversion | awk -F[.-] '{if(NF>1) print $2; else print 0}'`
-    rel_ver=`${gcc_root}/bin/gcc -dumpversion | awk -F[.-] '{if(NF>2) print $3; else print 0}'`
-    let gcc_ver=${maj_ver}*10000+${min_ver}*100+${rel_ver}
-    if [ ${gcc_ver} -ge ${GCC_VERSION_ID} ]  ; then
-       tmp="\${GCC_ROOT}/bin ${gcc_root}/bin \${PATH} ${PATH}";  
-       path=`sort_path ${tmp}`
-       tmp="\${GCC_ROOT}/lib ${gcc_root}/lib \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}";  
-       ld_library_path=`sort_path ${tmp}`
-       cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
-#${DELIM} ${PRODUCT_TYPE} ${DELIM}
-#export GCC_ROOT=${gcc_root}
-#export CXX=\${GCC_ROOT}/bin/g++
-#export CC=\${GCC_ROOT}/bin/gcc
-#export PATH=${path}
-#export LD_LIBRARY_PATH=${ld_library_path}
-##
-EOF
-       make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
-#######       THIS COULD BE USED FOR STRICT COMPARISON  ##############################
-#      if [ ${maj_ver} -eq 3 ] && [ ${min_ver} -eq 2 ] && [ ${rel_ver} -eq 0 ] ;  then 
-######################################################################################
-       if [ ${maj_ver} -eq ${GCC_VERSION_MAJ} ] && [ ${min_ver} -eq ${GCC_VERSION_MIN} ] && [ ${rel_ver} -ge ${GCC_VERSION_REL} ] ;  then 
-           return 0
-       else
-           return 2
-       fi
-   fi
-fi
-return 1
-}
-
-try_preinstalled(){
-#echo "It is impossible to install gcc from binaries or sources! So native gcc will be used."
-try_native
-}
-
-export PROCEDURE=$1;
-export INSTALL_WORK=$2;
-export SOURCE_DIR=$3;
-export INST_ROOT=$4;
-export PRODUCT_SEQUENCE=$5;
-export PRODUCT_TYPE=$6;
-export INSTALL_PRODUCTS=$7;
-export PRODUCT="gcc-${GCC_VERSION}"
-export PRODUCT_DIR=${INST_ROOT}/${PRODUCT}
-export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
-source ./common.sh
-${PROCEDURE} 
index e118734de61aa71b8fa8bfa60090168c486fc40c..326f87d73c224b42e5d3c98cfb2a1b343b435825 100755 (executable)
 #
 ####################################################################################
 
+# minimal supported version
+
+GCC_MIN_VERSION=4.2.0
+
 check_version()
 {
-return 0
+    return 0
 }
 
 print_env_bin()
 {
-echo "print_env_bin()"
-gcc_found="`use_latest_gcc 040200`"
-if [ "${gcc_found}" != "" ] ; then
-cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+    # check gcc available alternatives, to use version > GCC_MIN_VERSION if possible
+    local gcc_min=`echo ${GCC_MIN_VERSION} | awk -F. '{a1=0;a2=0;a3=0;if(NF>0)a1=$1;if(NF>1)a2=$2;if(NF>2)a3=$3;printf("%02d%02d%02d",a1,a2,a3);}'`
+    local gcc_ver=`gcc -dumpversion | awk -F. '{a1=0;a2=0;a3=0;if(NF>0)a1=$1;if(NF>1)a2=$2;if(NF>2)a3=$3;printf("%02d%02d%02d",a1,a2,a3);}'`
+    local gcc_found
+    local gxx_found
+    local fc_found
+    if [ ${gcc_ver} -le ${gcc_min} ] ; then
+       # search gcc
+       local wheregcc=$(dirname `which gcc`)
+       local all_gcc=$(find ${wheregcc}/gcc*)
+       local gcc_alt
+       local gcc_max=0
+       for gcc_alt in ${all_gcc} XXX ; do
+           if [ ${gcc_alt} = "XXX" ] ; then continue ; fi
+           gcc_ver=`${gcc_alt} -dumpversion 2>/dev/null | awk -F. '{a1=0;a2=0;a3=0;if(NF>0)a1=$1;if(NF>1)a2=$2;if(NF>2)a3=$3;printf("%02d%02d%02d",a1,a2,a3);}'`
+           if [ "${gcc_ver}" = "" ] ; then continue ; fi
+           if [ ${gcc_ver} -gt ${gcc_min} ] && [ ${gcc_ver} -gt ${gcc_max} ] ; then
+               gcc_max=${gcc_ver}
+               gcc_found=${gcc_alt}
+               gxx_found=`echo ${gcc_found} | sed -e "s%gcc%g++%"`
+               test -e ${gxx_found} || gxx_found=
+               fc_found=`echo ${gcc_found} | sed -e "s%gcc%gfortran%"`
+               test -e ${fc_found} || fc_found=
+           fi
+       done
+    fi
+    if [ "${gcc_found}" != "" ] && [ "${gxx_found}" != "" ] && [ "${fc_found}" != "" ] ; then
+       cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #${DELIM} ${PRODUCT_TYPE} ${DELIM}
-`echo ${gcc_found} | tr " " "\n" | sed -e "s%\(.*\)=%export \1=%g"`
+export CC=${gcc_found}
+export CXX=${gxx_found}
+export FC=${fc_found}
 ##
 EOF
-fi
-(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
-make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
+    fi
+    (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
+    make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
 }
 
 print_env_src()
 {
-echo "print_env_src()"
-return
+    return 0
 }
 
 # looks for the native product and collects it's environment (used by make_env())
 try_native()
 {
-    echo "try_native()"
-make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
-return 0
+    make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
+    return 0
 }
 
 install_source()
 {
-    echo "install_source()"
-try_existing ${PRODUCT_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}                                                                                                                         
+    try_existing ${PRODUCT_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}                                                                                                                         
 }
 
 install_source_and_build()
 {
-install_source
+    install_source
 }
 
 install_binary()
 {
-    echo "install_binary()"
-try_existing ${PRODUCT_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}                                                                                                                         
+    try_existing ${PRODUCT_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}                                                                                                                         
 }
 
 try_preinstalled()
 {
-    echo "try_preinstalled()"
-try_existing ${PRODUCT_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}                                                                                                                         
+    try_existing ${PRODUCT_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}                                                                                                                         
 }
 
 export PROCEDURE=$1;
index f2618464ca64b648c7874c3706c43711aaa054d3..279504348b777a01b38fdb207f76bc766f4a40cf 100755 (executable)
@@ -95,13 +95,22 @@ test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
 cd ${PRODUCT_SRC_DIR}
 
 # configure
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG cmake -DCMAKE_INSTALL_PREFIX=${PRODUCT_DIR} -DCMAKE_BUILD_TYPE=Release
+local CMAKE_OPTIONS=""
+CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_INSTALL_PREFIX=${PRODUCT_DIR}"
+CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_BUILD_TYPE=Release"
+
+cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
+-------------------
+Used options: ${CMAKE_OPTIONS}
+-------------------
+EOF
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG cmake ${CMAKE_OPTIONS}
 
 # compile
-check_job ${PRODUCT_DIR}/MAKE.LOG make
+check_job ${PRODUCT_DIR}/MAKE.LOG make VERBOSE=1
 
 # install
-check_job ${PRODUCT_DIR}/INSTALL.LOG make install 
+check_job ${PRODUCT_DIR}/INSTALL.LOG make VERBOSE=1 install 
 
 cd ${PRODUCT_DIR}
 
index c250caeb3662a6e861896683ba63c7464e027acf..cd6dd059a526a787f27a6e5bba5eacd2c01142ea 100755 (executable)
@@ -95,7 +95,7 @@ if [ "${patch_build_procedure}" = "1" ] ; then
     sed -i "s%echo 'puts \[info tclversion\]' | \$TCLSH%echo 'puts \[info tclversion\]' | \$TCLSH 2>/dev/null | grep -E '^[0-9.]+$'%g" configure
 fi
 
-CONFIGURE_FLAGS="--disable-rpath --disable-tcl --without-qt"
+CONFIGURE_FLAGS="--prefix=${PRODUCT_DIR} --disable-rpath --disable-tcl --without-qt"
 if [ "${EXPAT_ROOT_DIR}" != "" ] ; then
     CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --with-expat --with-expatincludedir=${EXPAT_ROOT_DIR}/include --with-expatlibdir=${EXPAT_ROOT_DIR}/lib  --enable-perl=no "
 fi
@@ -107,12 +107,12 @@ if [ "${without_cgraph}" = "1" ] ; then
     CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --with-cgraph=no"
 fi
 
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG configure --prefix=${PRODUCT_DIR} ${CONFIGURE_FLAGS}
-
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=${GCC}
+cat > ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
+-------------------
+Used options: ${CONFIGURE_FLAGS}
+-------------------
 EOF
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG configure ${CONFIGURE_FLAGS}
 check_job ${PRODUCT_DIR}/MAKE.LOG make
 check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
 
index 748207c44b49b26c4379f12c7bf3f4f58011397e..934307769654e6d56a0f79d17a7096e2ac98813b 100755 (executable)
@@ -102,7 +102,7 @@ mkdir ${PRODUCT_BUILD_DIR}
 cd ${PRODUCT_BUILD_DIR}
 
 # build options
-CMAKE_OPTIONS=""
+local CMAKE_OPTIONS=""
 CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_INSTALL_PREFIX=${PRODUCT_DIR}"
 CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_BUILD_TYPE=Release -DHDF5_ENABLE_THREADSAFE=ON -DBUILD_SHARED_LIBS=ON"
 CMAKE_OPTIONS="${CMAKE_OPTIONS} -DHDF5_BUILD_TOOLS=ON -DHDF5_BUILD_HL_LIB=ON -DHDF5_ENABLE_Z_LIB_SUPPORT=ON"
@@ -111,17 +111,13 @@ if test "${V16_COMPATIBILITY}" = "yes" ; then
 fi
 
 cat > ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
-cmake  : `which cmake`
-
-used settings:
-${CMAKE_OPTIONS}
+-------------------
+Used options: ${CMAKE_OPTIONS}
+-------------------
 EOF
 check_job ${PRODUCT_DIR}/CONFIGURE.LOG cmake ${PRODUCT_SRC_DIR} ${CMAKE_OPTIONS}
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=`which gcc`
-EOF
-check_job ${PRODUCT_DIR}/MAKE.LOG make 
-check_job ${PRODUCT_DIR}/INSTALL.LOG make install
+check_job ${PRODUCT_DIR}/MAKE.LOG make VERBOSE=1
+check_job ${PRODUCT_DIR}/INSTALL.LOG make VERBOSE=1 install
 
 cd ${PRODUCT_DIR}
 
index 71642f459b11a8ea4ba59835dc7cf1df569607ba..7717b05a24faf8c1be4f66569ae9c1c91efd21fc 100755 (executable)
@@ -70,13 +70,15 @@ install_source
 cd ${PRODUCT_SRC_DIR}
 test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
 
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG cmake -DCMAKE_INSTALL_PREFIX=${PRODUCT_DIR} 
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=${GCC}
+local CMAKE_OPTIONS="-DCMAKE_INSTALL_PREFIX=${PRODUCT_DIR}"
+cat > ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
+-------------------
+Used options: ${CMAKE_OPTIONS}
+-------------------
 EOF
-check_job ${PRODUCT_DIR}/MAKE.LOG make
-check_job ${PRODUCT_DIR}/INSTALL.LOG make install
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG cmake ${CMAKE_OPTIONS}
+check_job ${PRODUCT_DIR}/MAKE.LOG make VERBOSE=1
+check_job ${PRODUCT_DIR}/INSTALL.LOG make VERBOSE=1 install
 
 cd ${PRODUCT_DIR};
 
index cc5b3f06355fefd92ab12fb1e07c7481767a55ea..e42167c07c86235db0ee04f5cd6fd74719e56090 100755 (executable)
@@ -86,13 +86,15 @@ install_source
 cd ${PRODUCT_SRC_DIR}
 test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
 
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} 
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=${GCC}
+local CONFIGURE_OPTIONS="--prefix=${PRODUCT_DIR}"
+cat > ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
+-------------------
+Used options: ${CONFIGURE_OPTIONS}
+-------------------
 EOF
-check_job ${PRODUCT_DIR}/MAKE.LOG make
-check_job ${PRODUCT_DIR}/INSTALL.LOG make install 
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure ${CONFIGURE_OPTIONS}
+check_job ${PRODUCT_DIR}/MAKE.LOG make AM_DEFAULT_VERBOSITY=1
+check_job ${PRODUCT_DIR}/INSTALL.LOG make AM_DEFAULT_VERBOSITY=1 install 
 
 cd ${PRODUCT_DIR}
 
index 554aa4c4f19578235e66a2e9dfb26dbe1cfad550..255b05ea1a430d5d8d9a74808008a00088732b41 100755 (executable)
@@ -103,17 +103,13 @@ fi
 # -DMEDFILE_BUILD_STATIC_LIBS=ON
 
 cat > ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
-cmake  : `which cmake`
-
-used settings:
-${CMAKE_OPTIONS}
+-------------------
+Used options: ${CMAKE_OPTIONS}
+-------------------
 EOF
 check_job ${PRODUCT_DIR}/CONFIGURE.LOG cmake ${PRODUCT_SRC_DIR} ${CMAKE_OPTIONS}
-cat > ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=`which gcc`
-EOF
-check_job ${PRODUCT_DIR}/MAKE.LOG make
-check_job ${PRODUCT_DIR}/INSTALL.LOG make install
+check_job ${PRODUCT_DIR}/MAKE.LOG make VERBOSE=1
+check_job ${PRODUCT_DIR}/INSTALL.LOG make VERBOSE=1 install
 
 cd ${PRODUCT_DIR}
 
index 1803f0397fc2d16ea1ba1c53a0df0d7a04a82b6f..25302f361a9f40de12d230593f0aea8869d2c2d2 100755 (executable)
@@ -59,6 +59,21 @@ source ${INSTALL_WORK}/${SHRC}
 
 check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
 
+if [ "${METIS_MAJOR_VERSION}" = "4" ] ; then
+    # patch for 64bit platforms
+    local patch_64bits=1
+    if [ "${patch_64bits}" = "1" ] ; then
+       if test `uname -m` = "x86_64" ; then
+            sed -i "s%COPTIONS[[:space:]]*=[[:space:]]*\(.*\)%COPTIONS = -fPIC \1%g" ${PRODUCT_SRC_DIR}/Makefile.in
+       fi
+    fi
+    if [ "${CC}" != "" ] ; then
+       # custom compiler
+       sed -i "s%\(^CC[[:space:]]*=[[:space:]]*\).*$%\1${CC}%g" ${PRODUCT_SRC_DIR}/Makefile.in
+    fi
+fi
+
+
 if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then
     du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.src.size
 fi
@@ -91,14 +106,6 @@ if [ "${METIS_MAJOR_VERSION}" = "5" ] ; then
 else
     # for version 4
 
-    # patch for 64bit platforms
-    local patch_64bits=1
-    if [ "${patch_64bits}" = "1" ] ; then
-       if test `uname -m` = "x86_64" ; then
-            sed -i "s%COPTIONS[[:space:]]*=[[:space:]]*\(.*\)%COPTIONS = -fPIC \1%g" Makefile.in
-       fi
-    fi
-
     # make
     check_job ${PRODUCT_DIR}/MAKE.LOG make
 
index 82babf4f2cf08b2b6149d34501d7bd2943736fc3..5512387d5aac53ab5b82de3ec6ea9ab763f6ff4f 100755 (executable)
@@ -102,12 +102,20 @@ test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
 cd ${PRODUCT_SRC_DIR}
 
 # configure
-NETGEN_CONFIGURE_OPTIONS="--with-occ=${CAS_ROOT_DIR} --with-tcl=${TCLHOME}/lib --with-tk=${TCLHOME}/lib --with-tclinclude=${TCLHOME}/include"
+local NETGEN_CONFIGURE_OPTIONS="--prefix=${PRODUCT_DIR}"
+NETGEN_CONFIGURE_OPTIONS="${NETGEN_CONFIGURE_OPTIONS} --with-occ=${CAS_ROOT_DIR}"
+NETGEN_CONFIGURE_OPTIONS="${NETGEN_CONFIGURE_OPTIONS} --with-tcl=${TCLHOME}/lib --with-tk=${TCLHOME}/lib --with-tclinclude=${TCLHOME}/include"
 if test `uname -m` = "x86_64" ; then
-    ./configure --prefix=${PRODUCT_DIR} ${NETGEN_CONFIGURE_OPTIONS} CXXFLAGS='-O2 -m64' >> ${PRODUCT_DIR}/CONFIGURE.LOG 
+    NETGEN_CXXFLAGS="-O2 -m64"
 else
-    ./configure --prefix=${PRODUCT_DIR} ${NETGEN_CONFIGURE_OPTIONS} CXXFLAGS=-O0 >> ${PRODUCT_DIR}/CONFIGURE.LOG 
+    NETGEN_CXXFLAGS="-O0"
 fi
+cat > ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
+-------------------
+Used options: ${NETGEN_CONFIGURE_OPTIONS} CXXFLAGS=${NETGEN_CXXFLAGS}
+-------------------
+EOF
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure ${NETGEN_CONFIGURE_OPTIONS} CXXFLAGS="${NETGEN_CXXFLAGS}"
 
 # compile
 check_job ${PRODUCT_DIR}/MAKE.LOG make
index c28feeea3664b56c09f51633ebe4be5d3dda1b02..6ae5e8de8f477f5bc5cc18fcedeb35443057930f 100755 (executable)
@@ -80,25 +80,33 @@ install_source
 # build sources
 test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
 
+cd ${PRODUCT_SRC_DIR}/lapack-${VERSION_LAPACK}_SRC
+
 # lapack cmake options
-CMAKE_OPTIONS=""
+local CMAKE_OPTIONS=""
 CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_INSTALL_PREFIX=${PRODUCT_DIR}"
 CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS:BOOL=ON"
 CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_C_FLAGS=-fPIC"
 
 # install lapack
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=${GCC}
+cat > ${PRODUCT_DIR}/CONFIGURE_LAPACK.LOG <<EOF
+-------------------
+Used options: ${CMAKE_OPTIONS}
+-------------------
 EOF
-cd ${PRODUCT_SRC_DIR}/lapack-${VERSION_LAPACK}_SRC
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG cmake . ${CMAKE_OPTIONS}
-check_job ${PRODUCT_DIR}/MAKE.LOG make
-check_job ${PRODUCT_DIR}/INSTALL.LOG make install
+check_job ${PRODUCT_DIR}/CONFIGURE_LAPACK.LOG cmake . ${CMAKE_OPTIONS}
+check_job ${PRODUCT_DIR}/MAKE_LAPACK.LOG make VERBOSE=1
+check_job ${PRODUCT_DIR}/INSTALL_LAPACK.LOG make VERBOSE=1 install
 
 # install numpy
 cd ${PRODUCT_SRC_DIR}/numpy-${VERSION_NUMPY}_SRC
-check_job ${PRODUCT_DIR}/MAKE.LOG python setup.py install --prefix=${PRODUCT_DIR}
+local NUMPY_OPTIONS="--prefix=${PRODUCT_DIR}"
+cat > ${PRODUCT_DIR}/INSTALL_NUMPY.LOG <<EOF
+-------------------
+Used options: ${NUMPY_OPTIONS}
+-------------------
+EOF
+check_job ${PRODUCT_DIR}/INSTALL_NUMPY.LOG python setup.py install ${NUMPY_OPTIONS}
 
 cd ${PRODUCT_DIR}
 
index c526c752968761b1336022197107cc7bca2fefd1..98dd2079022fdc3d8f2dcc76365007c6aac445d3 100755 (executable)
@@ -135,12 +135,13 @@ cd ${PRODUCT_SRC_DIR}/omniORB-${VERSION_OMNIORB}_SRC
 mkdir build
 cd build
 
-check_job ${PRODUCT_DIR}/CONFIGURE_OMNIORB.LOG ../configure --prefix=${PRODUCT_DIR}
-
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE_OMNIORB.LOG <<EOF
-used gcc=${GCC}
+local OMNIORB_CONFIGURE_OPTIONS="--prefix=${PRODUCT_DIR}"
+cat >> ${PRODUCT_DIR}/CONFIGURE_OMNIORB.LOG <<EOF
+-------------------
+Used options: ${OMNIORB_CONFIGURE_OPTIONS}
+-------------------
 EOF
+check_job ${PRODUCT_DIR}/CONFIGURE_OMNIORB.LOG ../configure ${OMNIORB_CONFIGURE_OPTIONS}
 check_job ${PRODUCT_DIR}/MAKE_OMNIORB.LOG make
 check_job ${PRODUCT_DIR}/INSTALL_OMNIORB.LOG make install
 
@@ -149,12 +150,13 @@ cd ${PRODUCT_SRC_DIR}/omniORBpy-${VERSION_OMNIORBPY}_SRC
 mkdir build
 cd build
 
-check_job ${PRODUCT_DIR}/CONFIGURE_OMNIORBPY.LOG ../configure --prefix=${PRODUCT_DIR}
-
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE_OMNIORBPY.LOG <<EOF
-used gcc=${GCC}
+local OMNIORBPY_CONFIGURE_OPTIONS="--prefix=${PRODUCT_DIR}"
+cat >> ${PRODUCT_DIR}/CONFIGURE_OMNIORBPY.LOG <<EOF
+-------------------
+Used options: ${OMNIORBPY_CONFIGURE_OPTIONS}
+-------------------
 EOF
+check_job ${PRODUCT_DIR}/CONFIGURE_OMNIORBPY.LOG ../configure ${OMNIORBPY_CONFIGURE_OPTIONS}
 check_job ${PRODUCT_DIR}/MAKE_OMNIORBPY.LOG make
 check_job ${PRODUCT_DIR}/INSTALL_OMNIORBPY.LOG make install
 
@@ -172,12 +174,13 @@ cd ${PRODUCT_SRC_DIR}/omniNotify-${VERSION_OMNINOTIFY}_SRC
 mkdir build
 cd build
 
-check_job ${PRODUCT_DIR}/CONFIGURE_OMNINOTIFY.LOG ../configure --prefix=${PRODUCT_DIR}
-
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE_OMNINOTIFY.LOG <<EOF
-used gcc=${GCC}
+local OMNINOTIFY_CONFIGURE_OPTIONS="--prefix=${PRODUCT_DIR}"
+cat >> ${PRODUCT_DIR}/CONFIGURE_OMNINOTIFY.LOG <<EOF
+-------------------
+Used options: ${OMNINOTIFY_CONFIGURE_OPTIONS}
+-------------------
 EOF
+check_job ${PRODUCT_DIR}/CONFIGURE_OMNINOTIFY.LOG ../configure ${OMNINOTIFY_CONFIGURE_OPTIONS}
 check_job ${PRODUCT_DIR}/MAKE_OMNINOTIFY.LOG make
 check_job ${PRODUCT_DIR}/INSTALL_OMNINOTIFY.LOG make install
 
diff --git a/config_files/patches/freeimage-3.16.0.patch b/config_files/patches/freeimage-3.16.0.patch
new file mode 100644 (file)
index 0000000..84dffb5
--- /dev/null
@@ -0,0 +1,25 @@
+diff -Naur --exclude=CVS freeimage-3.16.0_orig/Source/LibWebP/src/utils/bit_writer.c freeimage-3.16.0_patch/Source/LibWebP/src/utils/bit_writer.c
+--- freeimage-3.16.0_orig/Source/LibWebP/src/utils/bit_writer.c        2014-03-08 19:31:50.000000000 +0400
++++ freeimage-3.16.0_patch/Source/LibWebP/src/utils/bit_writer.c       2014-06-10 12:16:20.000000000 +0400
+@@ -226,6 +226,21 @@
+ #define htole16(x) (x)\r
+ #else     // pretty much all linux and/or glibc\r
+ #include <endian.h>\r
++#if !defined(htole32)
++# include <byteswap.h>
++# ifdef __USE_BSD
++/* Conversion interfaces.  */
++#if __BYTE_ORDER == __LITTLE_ENDIAN
++#define htole16(x) (x)
++#define htole32(x) (x)
++#define htole64(x) (x)
++#else
++#define htole16(x) __bswap_16 (x)
++#define htole32(x) __bswap_32 (x)
++#define htole64(x) __bswap_64 (x)
++#endif
++#endif
++#endif
+ #endif\r
\r
+ // Returns 1 on success.\r
index a23fafadd7b9ec7cdcf34bb0deb4bbcbdc242fc1..3801b7bc8855f01aca98f0c94d053fb4af47c4ee 100755 (executable)
@@ -98,16 +98,25 @@ unset INSTALL_ROOT
 
 cd ${PRODUCT_SRC_DIR}/Qt4Qt5
 
+gen_qmake_cache ${PRODUCT_SRC_DIR}/Qt4Qt5
 qmake -o Makefile qscintilla.pro
 check_job ${PRODUCT_DIR}/MAKE.LOG make 
 check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
 
 if [ "${PYQT4_ROOT_DIR}" != "" ] ; then
     # install Python wrapping for QScintilla only if pre-installed version of PyQt is used
+    local QSCI_PY_CONFIGURE_OPTIONS="-a ${PRODUCT_DIR}/qsci -n ${PRODUCT_DIR}/include -o ${PRODUCT_DIR}/lib -p 4 -d ${PYQT4_ROOT_DIR}/PyQt4 -v ${PYQT4_ROOT_DIR}/sip"
+    if [ "${CXX}" != "" ] ; then
+        # custom gcc
+        false && QSCI_PY_CONFIGURE_OPTIONS="${QSCI_PY_CONFIGURE_OPTIONS} CC=${CC} CXX=${CXX} LINK=${CXX} LINK_SHLIB=${CXX}"
+    fi                                                                                                                                                                                                        
     cd ${PRODUCT_SRC_DIR}/Python
-    check_job ${PRODUCT_DIR}/PYCONFIGURE.LOG python configure.py -a ${PRODUCT_DIR}/qsci \
-       -n ${PRODUCT_DIR}/include -o ${PRODUCT_DIR}/lib -p 4 \
-       -d ${PYQT4_ROOT_DIR}/PyQt4 -v ${PYQT4_ROOT_DIR}/sip
+    cat >> ${PRODUCT_DIR}/PYCONFIGURE.LOG <<EOF
+-------------------
+Used options: ${QSCI_PY_CONFIGURE_OPTIONS}
+-------------------
+EOF
+    check_job ${PRODUCT_DIR}/PYCONFIGURE.LOG python configure.py ${QSCI_PY_CONFIGURE_OPTIONS}
     check_job ${PRODUCT_DIR}/PYMAKE.LOG make 
     check_job ${PRODUCT_DIR}/PYMAKEINSTALL.LOG make install
 fi
index c489b23f124b1a22600a6c883056ff37bdd29253..c6ebbf0e2c4bf6f11e135eacd2ddc905b50f3c89 100755 (executable)
@@ -91,21 +91,32 @@ test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
 
 cd ${PRODUCT_SRC_DIR}
 
-# configure
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure -prefix ${PRODUCT_DIR} -no-separate-debug-info -release -opensource -confirm-license
+# workaround for custom gcc
+if [ "${CXX}" != "" ] ; then
+    QMAKE_LD=${CXX}
+fi                                                                                                                                                                                                        
 
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=${GCC}
+# configure
+local QT_CONFIGURE_OPTIONS="-prefix ${PRODUCT_DIR} -no-separate-debug-info -opensource -confirm-license"
+if [ "${FOR_DEBUG}" = "1" ] ; then
+    # to debug Qt
+    QT_CONFIGURE_OPTIONS="${QT_CONFIGURE_OPTIONS} -debug"
+else
+    QT_CONFIGURE_OPTIONS="${QT_CONFIGURE_OPTIONS} -release"
+fi
+cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
+-------------------
+Used options: ${QT_CONFIGURE_OPTIONS}
+-------------------
 EOF
-
+# VSR: we pass custom LD (specified previously via QMAKE_LD variable) to the configure command
+# using env program; this is actually only needed when install scripts for all products are executed
+# in the same shell process, so we might just set directly LD environment variable instead of this;
+# this code is here just for possible future redesign of install procedure.
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG env LD=${QMAKE_LD} ./configure ${QT_CONFIGURE_OPTIONS}
 check_job ${PRODUCT_DIR}/MAKE.LOG make 
 check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
 
-#if test `uname -m` = "x86_64" ; then
-#    ( cd ${PRODUCT_DIR} && ln -sf lib lib64 )
-#fi
-
 # patch binaries
 local patch_webkit_deps=1
 if [ "${patch_webkit_deps}" = "1" ] ; then
index b7c68daab2446abd9bddbe9327e7f0abc2ab8f99..f1bca3d5f65df14b49b78bf0865a09eab48f6cca 100755 (executable)
@@ -109,15 +109,12 @@ unset INSTALL_ROOT
 
 # configure with qmake
 
+gen_qmake_cache ${PRODUCT_SRC_DIR}
+
 qmake
 
 # make
 
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=${GCC}
-EOF
-
 check_job ${PRODUCT_DIR}/MAKE.LOG make
 
 # make install
index 1d55eb6354e6e0b3fc2138fa6567371b749e4b33..40ee66129aa72d5abc341a31766c95561abc0cc6 100755 (executable)
@@ -57,6 +57,27 @@ source ${INSTALL_WORK}/${SHRC}
 
 check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
 
+if test `uname -m` = "x86_64" ; then
+    # create Makefile for Linux 64bit platforms
+    cd ${PRODUCT_SRC_DIR}/src && \
+       sed -e "s%CFLAGS\([[:space:]]*\)=\([[:space:]]*\)\(.*\)%CFLAGS\1=\2-fPIC \3%g" Make.inc/Makefile.inc.i686_pc_linux2.prof > Make.inc/Makefile.inc.x86-64_pc_linux2.prof && \
+       ln -sf Make.inc/Makefile.inc.x86-64_pc_linux2.prof Makefile.inc
+else
+    cd ${PRODUCT_SRC_DIR}/src && \
+       ln -sf Make.inc/Makefile.inc.i686_pc_linux2.prof Makefile.inc
+fi
+
+local patch_pthread=1
+if [ "${patch_pthread}" = "1" ] ; then
+    # add missing link agains pthread library
+    cd ${PRODUCT_SRC_DIR}/src && sed -i "s%^\(LDFLAGS.*\)%\1 -lpthread%g" $(readlink Makefile.inc)
+fi
+
+if [ "${CC}" != "" ] ; then
+    # custom compiler
+    sed -i "s%\(^CCS[[:space:]]*=[[:space:]]*\).*$%\1${CC}%;s%\(^CCD[[:space:]]*=[[:space:]]*\).*$%\1${CC}%;" ${PRODUCT_SRC_DIR}/src/Makefile.inc
+fi
+
 if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then
     du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.src.size
 fi
@@ -71,31 +92,23 @@ install_source_and_build()
 install_source
 
 # build sources
-cd ${PRODUCT_SRC_DIR}
 test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
 
-cd src
+cd ${PRODUCT_SRC_DIR}/src
 
-if test `uname -m` = "x86_64" ; then
-    # create Makefile for Linux 64bit platforms
-    sed -e "s%CFLAGS\([[:space:]]*\)=\([[:space:]]*\)\(.*\)%CFLAGS\1=\2-fPIC \3%g" \
-        Make.inc/Makefile.inc.i686_pc_linux2.prof > Make.inc/Makefile.inc.x86-64_pc_linux2.prof
-    ln -sf Make.inc/Makefile.inc.x86-64_pc_linux2.prof Makefile.inc
-else
-    ln -sf Make.inc/Makefile.inc.i686_pc_linux2.prof Makefile.inc
-fi
+local MAKE_OPTIONS="prefix=${PRODUCT_DIR}"
 
-local patch_pthread=1
-if [ "${patch_pthread}" = "1" ] ; then
-    cd ${PRODUCT_SRC_DIR}/src
-    sed -i "s%^\(LDFLAGS.*\)%\1 -lpthread%g" $(readlink Makefile.inc)
-fi
+cat > ${PRODUCT_DIR}/MAKE.LOG <<EOF
+-------------------
+Used options: ${MAKE_OPTIONS}
+-------------------
+EOF
 
 # make
-check_job ${PRODUCT_DIR}/MAKE.LOG make prefix=${PRODUCT_DIR}
+check_job ${PRODUCT_DIR}/MAKE.LOG make ${MAKE_OPTIONS}
 
 # make install
-check_job ${PRODUCT_DIR}/INSTALL.LOG make prefix=${PRODUCT_DIR} install
+check_job ${PRODUCT_DIR}/INSTALL.LOG make ${MAKE_OPTIONS} install
 
 cd ${PRODUCT_DIR}
 
index cc8e4ad4a59107b9e11e5f1035c85ae74b6b1947..1fa19d2d7eeb91d34f011be58443e24ef7144c64 100755 (executable)
@@ -84,13 +84,15 @@ install_source
 cd ${PRODUCT_SRC_DIR}
 test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
 
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG cmake -DCMAKE_INSTALL_PREFIX=${PRODUCT_DIR} -DCMAKE_BUILD_TYPE=Release
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=${GCC}
+local CMAKE_OPTIONS="-DCMAKE_INSTALL_PREFIX=${PRODUCT_DIR} -DCMAKE_BUILD_TYPE=Release"
+cat > ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
+-------------------
+Used options: ${CMAKE_OPTIONS}
+-------------------
 EOF
-check_job ${PRODUCT_DIR}/MAKE.LOG make
-check_job ${PRODUCT_DIR}/INSTALL.LOG make install
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG cmake ${CMAKE_OPTIONS}
+check_job ${PRODUCT_DIR}/MAKE.LOG make VERBOSE=1
+check_job ${PRODUCT_DIR}/INSTALL.LOG make VERBOSE=1 install
 
 cd ${PRODUCT_DIR}
 
index 6bcbd8a0bc6c547d2fc2ba723f0ff2a92fa17881..05294be5f2a25fdc6263871a765fff371807072d 100755 (executable)
@@ -95,12 +95,17 @@ SIP_CONFIGURE_OPTIONS="${SIP_CONFIGURE_OPTIONS} -v ${PRODUCT_DIR}/sip"
 if test `uname -m` = "x86_64" ; then
     SIP_CONFIGURE_OPTIONS="${SIP_CONFIGURE_OPTIONS} -p linux-g++-64"
 fi
+if [ "${CXX}" != "" ] ; then
+    # custom gcc
+    SIP_CONFIGURE_OPTIONS="${SIP_CONFIGURE_OPTIONS} CC=${CC} CXX=${CXX} LINK=${CXX} LINK_SHLIB=${CXX}"
+fi
 
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG python ./configure.py ${SIP_CONFIGURE_OPTIONS}
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=${GCC}
+cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
+-------------------
+Used options: ${SIP_CONFIGURE_OPTIONS}
+-------------------
 EOF
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG python ./configure.py ${SIP_CONFIGURE_OPTIONS}
 check_job ${PRODUCT_DIR}/MAKE.LOG make
 check_job ${PRODUCT_DIR}/INSTALL.LOG make install
 
@@ -137,6 +142,9 @@ SIP_CONFIGURE_OPTIONS="${SIP_CONFIGURE_OPTIONS} -v ${PRODUCT_DIR}/sip"
 if test `uname -m` = "x86_64" ; then
     SIP_CONFIGURE_OPTIONS="${SIP_CONFIGURE_OPTIONS} -p linux-g++-64"
 fi
+if [ "${CXX}" != "" ] ; then
+    SIP_CONFIGURE_OPTIONS="${SIP_CONFIGURE_OPTIONS} CC=${CC} CXX=${CXX} LINK=${CXX} LINK_SHLIB=${CXX}"
+fi
 
 # modify sipconfig.py file
 if [ -n "${PYTHON_ROOT_DIR}" ] && [ -n "${QT4_ROOT_DIR}" ] ; then
index 916bdb1d6c9abf7b63d2682f53e158d44faa6da7..14ef0805b09c3b16694e39c7d29d6b524ce574ac 100755 (executable)
@@ -80,17 +80,18 @@ install_source
 
 # build sources
 cd ${PRODUCT_SRC_DIR}
-SWIG_CONFIGURE_FLAGS="--with-boost=${BOOST_ROOT_DIR} --with-python=${PYTHON_ROOT_DIR}/bin/python --without-octave --with-tcl=${TCLHOME} --program-suffix=${SWIG_VERSION_SUFFIX}"
+SWIG_CONFIGURE_FLAGS="--prefix=${PRODUCT_DIR} --with-boost=${BOOST_ROOT_DIR} --with-python=${PYTHON_ROOT_DIR}/bin/python --without-octave --with-tcl=${TCLHOME} --program-suffix=${SWIG_VERSION_SUFFIX}"
 if test `uname -m` = "x86_64" ; then
     SWIG_CONFIGURE_FLAGS="${SWIG_CONFIGURE_FLAGS} CFLAGS=-m64 CXXFLAGS=-m64"
 fi
 test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
 
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} ${SWIG_CONFIGURE_FLAGS}
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=${GCC}
+cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
+-------------------
+Used options: ${SWIG_CONFIGURE_FLAGS}
+-------------------
 EOF
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure ${SWIG_CONFIGURE_FLAGS}
 check_job ${PRODUCT_DIR}/MAKE.LOG make
 check_job ${PRODUCT_DIR}/INSTALL.LOG make install 
 
index 75265efa1552c372cffda224fc248568d03f0050..fb88d9044484ae9a732e4485981e0fa1bc2ac674 100755 (executable)
@@ -119,25 +119,30 @@ install_source
 # build sources
 test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
 
+# ... tcl 
+
 cd ${PRODUCT_SRC_DIR}/tcl-${VERSION_TCL}_SRC/unix
+
+local TCL_CONFIGURE_FLAGS="--prefix=${PRODUCT_DIR} --enable-gcc --enable-shared --enable-threads"
+if test `uname -m` = "x86_64" ; then
+    TCL_CONFIGURE_FLAGS="${TCL_CONFIGURE_FLAGS} --enable-64bit"
+fi
+
 cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
 -------------------
 Configuring tcl...
+Used options: ${TCL_CONFIGURE_FLAGS}
 -------------------
 EOF
-local TCL_CONFIGURE_FLAGS="--enable-gcc --enable-shared --enable-threads"
-if test `uname -m` = "x86_64" ; then
-    TCL_CONFIGURE_FLAGS="${TCL_CONFIGURE_FLAGS} --enable-64bit"
-fi
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} ${TCL_CONFIGURE_FLAGS}
-GCC=`which gcc`
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure ${TCL_CONFIGURE_FLAGS}
+
 cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=${GCC}
 -------------------
 Making tcl...
 -------------------
 EOF
 check_job ${PRODUCT_DIR}/MAKE.LOG make
+
 cat >> ${PRODUCT_DIR}/MAKEINSTALL.LOG <<EOF
 -------------------
 Installing tcl...
@@ -149,23 +154,30 @@ check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
 (cd ${PRODUCT_DIR}/lib && ln -fs libtcl${TCL_LIBVERSION}.so libtcl.so)
 (cd ${PRODUCT_DIR}/lib && ln -fs libtclstub${TCL_LIBVERSION}.a libtclstub.a)
 
+# ... tk
+
 cd ${PRODUCT_SRC_DIR}/tk-${VERSION_TK}_SRC/unix
+
+local TK_CONFIGURE_FLAGS="--prefix=${PRODUCT_DIR} --enable-gcc --enable-shared --enable-threads --with-tcl=${PRODUCT_DIR}/lib"
+if test `uname -m` = "x86_64" ; then
+    TK_CONFIGURE_FLAGS="${TK_CONFIGURE_FLAGS} --enable-64bit"
+fi
+
 cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
 -------------------
 Configuring tk...
+Used options: ${TK_CONFIGURE_FLAGS}
 -------------------
 EOF
-local TK_CONFIGURE_FLAGS="--enable-gcc --enable-shared --enable-threads --with-tcl=${PRODUCT_DIR}/lib"
-if test `uname -m` = "x86_64" ; then
-    TK_CONFIGURE_FLAGS="${TK_CONFIGURE_FLAGS} --enable-64bit"
-fi
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} ${TK_CONFIGURE_FLAGS}
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure ${TK_CONFIGURE_FLAGS}
+
 cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
 -------------------
 Making tk...
 -------------------
 EOF
 check_job ${PRODUCT_DIR}/MAKE.LOG make
+
 cat >> ${PRODUCT_DIR}/MAKEINSTALL.LOG <<EOF
 -------------------
 Installing tk...
@@ -177,22 +189,30 @@ check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
 (cd ${PRODUCT_DIR}/lib && ln -fs libtk${TK_LIBVERSION}.so libtk.so)
 (cd ${PRODUCT_DIR}/lib && ln -fs libtkstub${TK_LIBVERSION}.a libtkstub.a)
 
+# ... tclX
+
+cd ${PRODUCT_SRC_DIR}/tclx-${VERSION_TCLX}_SRC
+
+local TCLX_CONFIGURE_FLAGS="--prefix=${PRODUCT_DIR} --enable-gcc --enable-shared --enable-threads --with-tcl=${PRODUCT_DIR}/lib --with-tk=${PRODUCT_DIR}/lib"
+if test `uname -m` = "x86_64" ; then
+    TCLX_CONFIGURE_FLAGS="${TCLX_CONFIGURE_FLAGS} --enable-64bit"
+fi
+
 cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
 -------------------
 Configuring tclx...
+Used options: ${TCLX_CONFIGURE_FLAGS}
 -------------------
 EOF
-local TCLX_CONFIGURE_FLAGS="--enable-gcc --enable-shared --enable-threads --with-tcl=${PRODUCT_DIR}/lib --with-tk=${PRODUCT_DIR}/lib"
-if test `uname -m` = "x86_64" ; then
-    TCLX_CONFIGURE_FLAGS="${TCLX_CONFIGURE_FLAGS} --enable-64bit"
-fi
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} ${TCLX_CONFIGURE_FLAGS}
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure ${TCLX_CONFIGURE_FLAGS}
+
 cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
 -------------------
 Making tclx...
 -------------------
 EOF
 check_job ${PRODUCT_DIR}/MAKE.LOG make
+
 cat >> ${PRODUCT_DIR}/MAKEINSTALL.LOG <<EOF
 -------------------
 Installing tclx...
@@ -202,7 +222,6 @@ check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
 
 (cd ${PRODUCT_DIR}/lib && ln -fs tclx${TCLX_LIBVERSION}/libtclx${TCLX_LIBVERSION}.so .)
 (cd ${PRODUCT_DIR}/lib && ln -fs libtclx${TCLX_LIBVERSION}.so libtclx.so)
-###(cd ${PRODUCT_DIR} && test `uname -m` = "x86_64" && test ! -e lib64 && ln -sf lib lib64)
 
 cd ${PRODUCT_DIR}
 
index 7149e0633a0c9d79d11e89653d3dbc5f4268cd4a..81fbcdc96bf4c93f365e1a25a6d126c8f112f879 100755 (executable)
@@ -77,16 +77,17 @@ test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
 # build sources
 cd ${PRODUCT_SRC_DIR}
 
-CONFIGURE_FLAGS=
+local CONFIGURE_FLAGS="--prefix=${PRODUCT_DIR} "
 if test `uname -m` = "x86_64" ; then
     CONFIGURE_FLAGS="${CONFIGURE_FLAGS} CFLAGS=-m64 CXXFLAGS=-m64"
 fi
 
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} ${CONFIGURE_FLAGS}
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=${GCC}
+cat > ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
+-------------------
+Used options: ${CONFIGURE_FLAGS}
+-------------------
 EOF
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure ${CONFIGURE_FLAGS}
 check_job ${PRODUCT_DIR}/MAKE.LOG make
 check_job ${PRODUCT_DIR}/INSTALL.LOG make install 
 
index 79916bdfc7fd8a2ab4b29dfb715cc65040abb660..fef72a0d494723c6048fb242b9c2b84f1fdb8bcf 100755 (executable)
@@ -73,11 +73,13 @@ install_source
 cd ${PRODUCT_SRC_DIR}
 test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
 
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} 
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=${GCC}
+local CONFIGURE_OPTIONS="--prefix=${PRODUCT_DIR}"
+cat > ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
+-------------------
+Used options: ${CONFIGURE_OPTIONS}
+-------------------
 EOF
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure ${CONFIGURE_OPTIONS}
 check_job ${PRODUCT_DIR}/MAKE.LOG make
 check_job ${PRODUCT_DIR}/INSTALL.LOG make install
 
index 5410999811de3ff7a43b768e2e7357043467bb0c..8616318081828ce08e7a3d63546e18319f686afb 100755 (executable)
@@ -529,20 +529,6 @@ class ConfigParser:
             pass
         self.products.extend( req_prods_list )
         self.products.extend( sal_prods_list )
-        if False and len(self.products) != 0: # VSR 2014-05-21 : not needed anymore
-            gcc_product = Product("gcc",
-                                  __CTX__PREREQUISITE__,
-                                  self.products[0].os,
-                                  "",
-                                  [],
-                                  None,
-                                  "0,0,0",
-                                  "gcc-common.sh",
-                                  "")
-            gcc_product.setMode(__PREINSTALL__)
-            self.products.insert(0, gcc_product)
-            prereqs_list.insert(0, gcc_product.name)
-            pass
         self.full_prods_list.extend( prereqs_list )
         self.full_prods_list.extend( modules_list )
         pass
index 9d03b9f2c135bcd722a75c1bde6e329228efcc12..e56831898c17baef510515ea8c9ac8dac5df5eaa 100644 (file)
@@ -2668,7 +2668,6 @@ void SALOME_InstallWizard::pageChanged( const QString & mytitle)
     }
     // add extra products to install list
     extraProducts.clear();
-    //extraProducts.insert( "gcc", "gcc-common.sh" );
     if ( refPlatform == commonPlatform && installType == Binaries )
       extraProducts.insert( "DebianLibsForSalome", "DEBIANFORSALOME-3.1.sh" );
   }