From f297b35e917a810cf0fd7bed6a0b08b8055c4ed7 Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 4 Jul 2014 14:48:56 +0400 Subject: [PATCH] Using gcc 4.4 on CentOS 5.5 --- config_files/HXX2SALOME.sh | 23 +-- config_files/OCCT.sh | 21 +-- config_files/ParaView.sh | 22 +-- config_files/PyQt.sh | 20 ++- config_files/Python.sh | 32 ++-- config_files/Sphinx.sh | 59 +++++-- config_files/boost.sh | 28 ++- config_files/cgnslib.sh | 19 +- config_files/cmake.sh | 9 +- config_files/common.sh | 83 +++------ config_files/docutils.sh | 11 +- config_files/doxygen.sh | 21 ++- config_files/expat.sh | 13 +- config_files/freeimage.sh | 21 ++- config_files/freeimage_3.15.4.sh | 182 -------------------- config_files/freetype.sh | 11 +- config_files/ftgl.sh | 9 +- config_files/gcc-common.sh | 91 ---------- config_files/gcc.sh | 67 ++++--- config_files/gl2ps.sh | 15 +- config_files/graphviz.sh | 12 +- config_files/hdf5.sh | 16 +- config_files/libBatch.sh | 14 +- config_files/libxml2.sh | 14 +- config_files/med.sh | 14 +- config_files/metis.sh | 23 ++- config_files/netgen.sh | 14 +- config_files/numpy.sh | 26 ++- config_files/omniORB.sh | 33 ++-- config_files/patches/freeimage-3.16.0.patch | 25 +++ config_files/qscintilla.sh | 15 +- config_files/qt.sh | 31 ++-- config_files/qwt.sh | 7 +- config_files/scotch.sh | 47 +++-- config_files/simanio.sh | 14 +- config_files/sip.sh | 16 +- config_files/swig.sh | 11 +- config_files/tcltk.sh | 55 ++++-- config_files/wso2.sh | 11 +- config_files/xdata.sh | 10 +- runInstall | 14 -- src/SALOME_InstallWizard.cxx | 1 - 42 files changed, 535 insertions(+), 645 deletions(-) delete mode 100755 config_files/freeimage_3.15.4.sh delete mode 100755 config_files/gcc-common.sh create mode 100644 config_files/patches/freeimage-3.16.0.patch diff --git a/config_files/HXX2SALOME.sh b/config_files/HXX2SALOME.sh index e4a5064..1118cbb 100755 --- a/config_files/HXX2SALOME.sh +++ b/config_files/HXX2SALOME.sh @@ -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 <> ${PRODUCT_DIR}/CONFIGURE.LOG < ${PRODUCT_DIR}/CONFIGURE.LOG <> ${PRODUCT_DIR}/MAKE.LOG < ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; +cd ${PRODUCT_DIR} # remove sources and temporary files after building if [ ${REMOVE_SRC_TMP} = "TRUE" ] ; then diff --git a/config_files/OCCT.sh b/config_files/OCCT.sh index 207d04e..f8e8af4 100755 --- a/config_files/OCCT.sh +++ b/config_files/OCCT.sh @@ -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 <> ${PRODUCT_DIR}/MAKE.LOG < ${PRODUCT_DIR}/MAKE.LOG <> ${PRODUCT_DIR}/MAKE.LOG <> ${PRODUCT_DIR}/CONFIGURE.LOG <> ${PRODUCT_DIR}/MAKE.LOG <> ${PRODUCT_DIR}/CONFIGURE.LOG <> ${PRODUCT_DIR}/MAKE.LOG < ${PRODUCT_DIR}/INSTALL_DOCUTILS.LOG < ${PRODUCT_DIR}/INSTALL_SETUPTOOLS.LOG < ${PRODUCT_DIR}/INSTALL_PYGMENTS.LOG < ${PRODUCT_DIR}/INSTALL_JINJA2.LOG < ${PRODUCT_DIR}/INSTALL_SPHINX.LOG <> ${PRODUCT_DIR}/BUILD.LOG <> ${PRODUCT_DIR}/CONFIGURE.LOG <& /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 < ${PRODUCT_DIR}/CONFIGURE.LOG < ${PRODUCT_DIR}/MAKE.LOG <> ${PRODUCT_DIR}/MAKE.LOG <> ${PRODUCT_DIR}/CONFIGURE.LOG <> ${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 +# 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 < ${PRODUCT_DIR}/INSTALL.LOG < ${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 < ${PRODUCT_DIR}/CONFIGURE.LOG <> ${PRODUCT_DIR}/MAKE.LOG < ${PRODUCT_DIR}/CONFIGURE.LOG < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <%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} diff --git a/config_files/freetype.sh b/config_files/freetype.sh index 2f01d12..8a7fca6 100755 --- a/config_files/freetype.sh +++ b/config_files/freetype.sh @@ -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 <> ${PRODUCT_DIR}/CONFIGURE.LOG <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: *10000+*100+ -# 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: , and - # and numbers are checked strickly, but number can be larger than required one - # version number is calculated as: *10000+*100+ - # 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 < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < 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 <> ${PRODUCT_DIR}/CONFIGURE.LOG </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 < ${PRODUCT_DIR}/CONFIGURE.LOG < ${PRODUCT_DIR}/CONFIGURE.LOG <> ${PRODUCT_DIR}/MAKE.LOG <> ${PRODUCT_DIR}/MAKE.LOG < ${PRODUCT_DIR}/CONFIGURE.LOG <> ${PRODUCT_DIR}/MAKE.LOG < ${PRODUCT_DIR}/CONFIGURE.LOG < ${PRODUCT_DIR}/CONFIGURE.LOG < ${PRODUCT_DIR}/MAKE.LOG < ${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 diff --git a/config_files/netgen.sh b/config_files/netgen.sh index 82babf4..5512387 100755 --- a/config_files/netgen.sh +++ b/config_files/netgen.sh @@ -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 <> ${PRODUCT_DIR}/MAKE.LOG < ${PRODUCT_DIR}/CONFIGURE_LAPACK.LOG < ${PRODUCT_DIR}/INSTALL_NUMPY.LOG <> ${PRODUCT_DIR}/MAKE_OMNIORB.LOG <> ${PRODUCT_DIR}/CONFIGURE_OMNIORB.LOG <> ${PRODUCT_DIR}/MAKE_OMNIORBPY.LOG <> ${PRODUCT_DIR}/CONFIGURE_OMNIORBPY.LOG <> ${PRODUCT_DIR}/MAKE_OMNINOTIFY.LOG <> ${PRODUCT_DIR}/CONFIGURE_OMNINOTIFY.LOG < ++#if !defined(htole32) ++# include ++# 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 + + // Returns 1 on success. diff --git a/config_files/qscintilla.sh b/config_files/qscintilla.sh index a23fafa..3801b7b 100755 --- a/config_files/qscintilla.sh +++ b/config_files/qscintilla.sh @@ -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 <> ${PRODUCT_DIR}/MAKE.LOG <> ${PRODUCT_DIR}/CONFIGURE.LOG <> ${PRODUCT_DIR}/MAKE.LOG < 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 <> ${PRODUCT_DIR}/MAKE.LOG < ${PRODUCT_DIR}/CONFIGURE.LOG <> ${PRODUCT_DIR}/MAKE.LOG <> ${PRODUCT_DIR}/CONFIGURE.LOG <> ${PRODUCT_DIR}/MAKE.LOG <> ${PRODUCT_DIR}/CONFIGURE.LOG <> ${PRODUCT_DIR}/CONFIGURE.LOG <> ${PRODUCT_DIR}/MAKE.LOG <> ${PRODUCT_DIR}/MAKEINSTALL.LOG <> ${PRODUCT_DIR}/CONFIGURE.LOG <> ${PRODUCT_DIR}/MAKE.LOG <> ${PRODUCT_DIR}/MAKEINSTALL.LOG <> ${PRODUCT_DIR}/CONFIGURE.LOG <> ${PRODUCT_DIR}/MAKE.LOG <> ${PRODUCT_DIR}/MAKEINSTALL.LOG <> ${PRODUCT_DIR}/MAKE.LOG < ${PRODUCT_DIR}/CONFIGURE.LOG <> ${PRODUCT_DIR}/MAKE.LOG < ${PRODUCT_DIR}/CONFIGURE.LOG <