From 13e2aa4b4061cc63d31ea2937e1dd8e388d0d8e2 Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 10 Apr 2006 10:32:50 +0000 Subject: [PATCH] Fix a problem with *.la files caused by modifications in KERNEL module compilation procedure --- config_files/CALCULATOR_BIN.sh | 2 +- config_files/COMPONENT_BIN.sh | 2 +- config_files/GEOM_BIN.sh | 2 +- config_files/GHS3DPLUGIN_BIN.sh | 2 +- config_files/HELLO_BIN.sh | 2 +- config_files/KERNEL_BIN.sh | 2 +- config_files/MED_BIN.sh | 2 +- config_files/NETGENPLUGIN_BIN.sh | 2 +- config_files/PYCALCULATOR_BIN.sh | 2 +- config_files/PYHELLO_BIN.sh | 2 +- config_files/SMESH_BIN.sh | 2 +- config_files/SUPERV_BIN.sh | 2 +- config_files/VISU_BIN.sh | 2 +- config_files/common.sh | 70 ++++++++++++++++++++------------ 14 files changed, 56 insertions(+), 40 deletions(-) diff --git a/config_files/CALCULATOR_BIN.sh b/config_files/CALCULATOR_BIN.sh index e1fdd7a..e3e10d7 100755 --- a/config_files/CALCULATOR_BIN.sh +++ b/config_files/CALCULATOR_BIN.sh @@ -71,7 +71,7 @@ check_jb tar xfz ${SOURCE_DIR}/CALCULATORbinariesV2.2.8.tar.gz -C ${INSTALL_ROOT # modify all *.la files export CALCULATOR_ROOT_DIR=${PRODUCT_DIR} -modif_la_files ${PRODUCT_DIR}/lib/salome +modif_la_files ${PRODUCT_DIR} print_env } diff --git a/config_files/COMPONENT_BIN.sh b/config_files/COMPONENT_BIN.sh index 99697dc..1171390 100755 --- a/config_files/COMPONENT_BIN.sh +++ b/config_files/COMPONENT_BIN.sh @@ -71,7 +71,7 @@ check_jb tar xfz ${SOURCE_DIR}/COMPONENTbinariesV2.2.8.tar.gz -C ${INSTALL_ROOT} # modify all *.la files export COMPONENT_ROOT_DIR=${PRODUCT_DIR} -modif_la_files ${PRODUCT_DIR}/lib/salome +modif_la_files ${PRODUCT_DIR} print_env } diff --git a/config_files/GEOM_BIN.sh b/config_files/GEOM_BIN.sh index 1be9957..5ebc7d2 100755 --- a/config_files/GEOM_BIN.sh +++ b/config_files/GEOM_BIN.sh @@ -71,7 +71,7 @@ check_jb tar xfz ${SOURCE_DIR}/GEOMbinariesV2.2.8.tar.gz -C ${INSTALL_ROOT} # modify all *.la files export GEOM_ROOT_DIR=${PRODUCT_DIR} -modif_la_files ${PRODUCT_DIR}/lib/salome +modif_la_files ${PRODUCT_DIR} print_env } diff --git a/config_files/GHS3DPLUGIN_BIN.sh b/config_files/GHS3DPLUGIN_BIN.sh index e1d1d86..2aec296 100755 --- a/config_files/GHS3DPLUGIN_BIN.sh +++ b/config_files/GHS3DPLUGIN_BIN.sh @@ -70,7 +70,7 @@ check_jb tar xfz ${SOURCE_DIR}/GHS3DPLUGINbinariesV2.2.8.tar.gz -C ${INSTALL_ROO # modify all *.la files export GHS3DPLUGIN_ROOT_DIR=${PRODUCT_DIR} -modif_la_files ${PRODUCT_DIR}/lib/salome +modif_la_files ${PRODUCT_DIR} print_env } diff --git a/config_files/HELLO_BIN.sh b/config_files/HELLO_BIN.sh index 66cffb4..b4885b2 100755 --- a/config_files/HELLO_BIN.sh +++ b/config_files/HELLO_BIN.sh @@ -70,7 +70,7 @@ check_jb tar xfz ${SOURCE_DIR}/HELLObinariesV2.2.8.tar.gz -C ${INSTALL_ROOT} # modify all *.la files export HELLO_ROOT_DIR=${PRODUCT_DIR} -modif_la_files ${PRODUCT_DIR}/lib/salome +modif_la_files ${PRODUCT_DIR} print_env } diff --git a/config_files/KERNEL_BIN.sh b/config_files/KERNEL_BIN.sh index 01dc47a..d98356d 100755 --- a/config_files/KERNEL_BIN.sh +++ b/config_files/KERNEL_BIN.sh @@ -79,7 +79,7 @@ fi # modify all *.la files export KERNEL_ROOT_DIR=${PRODUCT_DIR} -modif_la_files ${PRODUCT_DIR}/lib/salome +modif_la_files ${PRODUCT_DIR} print_env } diff --git a/config_files/MED_BIN.sh b/config_files/MED_BIN.sh index 9714f04..5bf38e2 100755 --- a/config_files/MED_BIN.sh +++ b/config_files/MED_BIN.sh @@ -71,7 +71,7 @@ check_jb tar xfz ${SOURCE_DIR}/MEDbinariesV2.2.8.tar.gz -C ${INSTALL_ROOT} # modify all *.la files export MED_ROOT_DIR=${PRODUCT_DIR} -modif_la_files ${PRODUCT_DIR}/lib/salome +modif_la_files ${PRODUCT_DIR} print_env } diff --git a/config_files/NETGENPLUGIN_BIN.sh b/config_files/NETGENPLUGIN_BIN.sh index 61a24d1..23c3076 100755 --- a/config_files/NETGENPLUGIN_BIN.sh +++ b/config_files/NETGENPLUGIN_BIN.sh @@ -70,7 +70,7 @@ check_jb tar xfz ${SOURCE_DIR}/NETGENPLUGINbinariesV2.2.8.tar.gz -C ${INSTALL_RO # modify all *.la files export NETGENPLUGIN_ROOT_DIR=${PRODUCT_DIR} -modif_la_files ${PRODUCT_DIR}/lib/salome +modif_la_files ${PRODUCT_DIR} print_env } diff --git a/config_files/PYCALCULATOR_BIN.sh b/config_files/PYCALCULATOR_BIN.sh index 4c257de..79a4337 100755 --- a/config_files/PYCALCULATOR_BIN.sh +++ b/config_files/PYCALCULATOR_BIN.sh @@ -69,7 +69,7 @@ check_jb tar xfz ${SOURCE_DIR}/PYCALCULATORbinariesV2.2.8.tar.gz -C ${INSTALL_RO # modify all *.la files export PYCALCULATOR_ROOT_DIR=${PRODUCT_DIR} -modif_la_files ${PRODUCT_DIR}/lib/salome +modif_la_files ${PRODUCT_DIR} print_env } diff --git a/config_files/PYHELLO_BIN.sh b/config_files/PYHELLO_BIN.sh index 4eada32..21cd99c 100755 --- a/config_files/PYHELLO_BIN.sh +++ b/config_files/PYHELLO_BIN.sh @@ -68,7 +68,7 @@ check_jb tar xfz ${SOURCE_DIR}/PYHELLObinariesV2.2.8.tar.gz -C ${INSTALL_ROOT} # modify all *.la files export PYHELLO_ROOT_DIR=${PRODUCT_DIR} -modif_la_files ${PRODUCT_DIR}/lib/salome +modif_la_files ${PRODUCT_DIR} print_env } diff --git a/config_files/SMESH_BIN.sh b/config_files/SMESH_BIN.sh index 83e551e..cf9c099 100755 --- a/config_files/SMESH_BIN.sh +++ b/config_files/SMESH_BIN.sh @@ -71,7 +71,7 @@ check_jb tar xfz ${SOURCE_DIR}/SMESHbinariesV2.2.8.tar.gz -C ${INSTALL_ROOT} # modify all *.la files export SMESH_ROOT_DIR=${PRODUCT_DIR} -modif_la_files ${PRODUCT_DIR}/lib/salome +modif_la_files ${PRODUCT_DIR} print_env } diff --git a/config_files/SUPERV_BIN.sh b/config_files/SUPERV_BIN.sh index 8bdc61f..59e546d 100755 --- a/config_files/SUPERV_BIN.sh +++ b/config_files/SUPERV_BIN.sh @@ -71,7 +71,7 @@ check_jb tar xfz ${SOURCE_DIR}/SUPERVbinariesV2.2.8.tar.gz -C ${INSTALL_ROOT} # modify all *.la files export SUPERV_ROOT_DIR=${PRODUCT_DIR} -modif_la_files ${PRODUCT_DIR}/lib/salome +modif_la_files ${PRODUCT_DIR} print_env } diff --git a/config_files/VISU_BIN.sh b/config_files/VISU_BIN.sh index 6b66bd3..1f42c73 100755 --- a/config_files/VISU_BIN.sh +++ b/config_files/VISU_BIN.sh @@ -71,7 +71,7 @@ check_jb tar xfz ${SOURCE_DIR}/VISUbinariesV2.2.8.tar.gz -C ${INSTALL_ROOT} # modify all *.la files export VISU_ROOT_DIR=${PRODUCT_DIR} -modif_la_files ${PRODUCT_DIR}/lib/salome +modif_la_files ${PRODUCT_DIR} print_env } diff --git a/config_files/common.sh b/config_files/common.sh index f48202c..9c38ddb 100755 --- a/config_files/common.sh +++ b/config_files/common.sh @@ -471,6 +471,19 @@ else fi } +where_dps(){ +if test -f /usr/X11R6/include/DPS/dpsconfig.h ; then + echo "/usr/X11R6" + return 0 +fi +if test -f /usr/include/DPS/dpsconfig.h ; then + echo "/usr" + return 0 +fi +echo "" +return 1 +} + modif_la_files(){ ldir=$1 if [ -z "$ldir" ] || [ ! -d "$ldir" ]; then return 1; fi @@ -480,18 +493,20 @@ srcdir=`pwd` SALOME_MODULES="`env | awk -F_ '/[[:alnum:]]*_ROOT_DIR/ { print $1 }'`" cd $ldir -la_files=`find . -name "*.la" -maxdepth 1` +la_files=`find . -name "*.la"` for l in X ${la_files}; do if [ "$l" != "X" ] ; then + d=`dirname $l` l=`basename $l` + cd $ldir; cd $d # 1. process salome modules dependencies for mod in $SALOME_MODULES; do moddir=`printenv ${mod}_ROOT_DIR` if [ -n "${moddir}" ] ; then #echo $l $mod $moddir - sed -e "s%-L[^[:space:]]*${mod}[^[:space:]]*/lib/salome%-L${moddir}/lib/salome%g" $l > _$l - mv -f _$l $l + sed -e "s%\(-L\|[[:space:]]\)[^[:space:]]*${mod}[^[:space:]]*/lib%\1${moddir}/lib%g" $l > $l"_" + mv -f $l"_" $l fi done # 2. process CAS.CADE dependencies @@ -500,51 +515,51 @@ if [ "$l" != "X" ] ; then if [ ! -d ${casdir} ] ; then casdir=`printenv CASROOT`/lin/lib ; fi if [ -n "${CASROOT}" ] && [ -d "${casdir}" ] ; then # echo $l $CASROOT $casdir - sed -e "s%-L[^[:space:]]*\(OCT\|CAS\)[^[:space:]]*%-L${casdir}%g" $l > _$l - mv -f _$l $l + sed -e "s%-L[^[:space:]]*\(OCT\|CAS\)[^[:space:]]*%-L${casdir}%g" $l > $l"_" + mv -f $l"_" $l fi # 3. process omniORB dependencies omnidir=`printenv OMNIORBDIR`/lib/i586_linux_2.0_glibc2.1 if [ ! -d ${omnidir} ] ; then omnidir=`printenv OMNIORBDIR`/lib ; fi if [ -n "${OMNIORBDIR}" ] && [ -d "${omnidir}" ] ; then # echo $l $OMNIORBDIR $omnidir - sed -e "s%-L[^[:space:]]*omni[^[:space:]]*%-L${omnidir}%g" $l > _$l - mv -f _$l $l + sed -e "s%-L[^[:space:]]*omni[^[:space:]]*%-L${omnidir}%g" $l > $l"_" + mv -f $l"_" $l fi # 4. process VTK dependencies vtkdir=`printenv VTKHOME`/lib/vtk if [ -n "${VTKHOME}" ] && [ -d "${vtkdir}" ] ; then # echo $l $VTKHOME $vtkdir - sed -e "s%-L[^[:space:]]*VTK[^[:space:]]*/lib/vtk%-L${vtkdir}%g" $l > _$l - mv -f _$l $l + sed -e "s%-L[^[:space:]]*VTK[^[:space:]]*/lib/vtk%-L${vtkdir}%g" $l > $l"_" + mv -f $l"_" $l fi # 5. process HDF dependencies hdfdir=`printenv HDF5HOME`/lib if [ -n "${HDF5HOME}" ] && [ -d "${hdfdir}" ] ; then # echo $l $HDF5HOME $hdfdir - sed -e "s%-L[^[:space:]]*hdf[^[:space:]]*/lib%-L${hdfdir}%g" $l > _$l - mv -f _$l $l + sed -e "s%-L[^[:space:]]*hdf[^[:space:]]*/lib%-L${hdfdir}%g" $l > $l"_" + mv -f $l"_" $l fi # 6. process MED dependencies meddir=`printenv MED2HOME`/lib if [ -n "${MED2HOME}" ] && [ -d "${meddir}" ] ; then # echo $l $MED2HOME $meddir - sed -e "s%-L[^[:space:]]*med[^[:space:]]*/lib%-L${meddir}%g" $l > _$l - mv -f _$l $l + sed -e "s%-L[^[:space:]]*med[^[:space:]]*/lib%-L${meddir}%g" $l > $l"_" + mv -f $l"_" $l fi # 7. process qwt dependencies qwtdir=`find_in_path libqwt.so ${LD_LIBRARY_PATH}` if [ -n "${qwtdir}" ] && [ -d "${qwtdir}" ] ; then # echo $l $qwtdir - sed -e "s%-L[^[:space:]]*qwt[^[:space:]]*/lib%-L${qwtdir}%g" $l > _$l - mv -f _$l $l + sed -e "s%-L[^[:space:]]*qwt[^[:space:]]*/lib%-L${qwtdir}%g" $l > $l"_" + mv -f $l"_" $l fi # 8. process qt dependencies qtdir=`printenv QTDIR`/lib if [ -n "${QTDIR}" ] && [ -d "${qtdir}" ] ; then # echo $l $QTDIR $qtdir - sed -e "s%-L[^[:space:]]*qt[^[:space:]]*/lib%-L${qtdir}%g" $l > _$l - mv -f _$l $l + sed -e "s%-L[^[:space:]]*qt[^[:space:]]*/lib%-L${qtdir}%g" $l > $l"_" + mv -f $l"_" $l fi # 9. process python dependencies where_python=`which python` # e.g. /usr/bin/python @@ -553,33 +568,34 @@ if [ "$l" != "X" ] ; then where_python=`dirname $where_python` # --> /usr python_version=`python -c "import sys; print sys.version[:3]"` # echo $l $where_python $python_version - sed -e "s%-L[^[:space:]]*python[0-9]\.[0-9]\([^[:space:]]*\)%-L${where_python}/lib/python${python_version}\1%g" $l > _$l - mv -f _$l $l + sed -e "s%-L[^[:space:]]*python[0-9]\.[0-9]\([^[:space:]]*\)%-L${where_python}/lib/python${python_version}\1%g" $l > $l"_" + mv -f $l"_" $l fi # 10. process sip dependencies sipdir=`find_in_path sip.so ${LD_LIBRARY_PATH}` if [ -n "${sipdir}" ] && [ -d "${sipdir}" ] ; then # echo $l $sipdir - sed -e "s%-L[^[:space:]]*sip[^[:space:]]*%-L${sipdir}%g" $l > _$l - mv -f _$l $l + sed -e "s%-L[^[:space:]]*sip[^[:space:]]*%-L${sipdir}%g" $l > $l"_" + mv -f $l"_" $l fi # 11. process PyQt dependencies pyqtdir=`find_in_path qt.so ${LD_LIBRARY_PATH}` if [ -n "${pyqtdir}" ] && [ -d "${pyqtdir}" ] ; then # echo $l $pyqtdir - sed -e "s%-L[^[:space:]]*PyQt[^[:space:]]*%-L${pyqtdir}%g" $l > _$l - mv -f _$l $l + sed -e "s%-L[^[:space:]]*PyQt[^[:space:]]*%-L${pyqtdir}%g" $l > $l"_" + mv -f $l"_" $l fi # 12. process tcl/tk dependencies tcldir=`printenv TCLHOME`/lib if [ -n "${tcldir}" ] && [ -d "${tcldir}" ] ; then # echo $l $TCLHOME $tcldir - sed -e "s%-L[^[:space:]]*tcltk[^[:space:]]*/lib%-L${tcldir}%g" $l > _$l - mv -f _$l $l + sed -e "s%-L[^[:space:]]*tcltk[^[:space:]]*/lib%-L${tcldir}%g" $l > $l"_" + mv -f $l"_" $l fi # 13. modify libdir - sed -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib/salome'%g" $l > _$l - mv -f _$l $l + #sed -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib/salome'%g" $l > $l"_" + sed -e "s%^libdir='[^[:space:]]*${mod}[^[:space:]]*/\(lib.*\)'%libdir='${moddir}/\1'%g" $l > $l"_" + mv -f $l"_" $l fi done -- 2.39.2