la_files=`find . -name "*.la"`
for l in X ${la_files}; do
+
if [ "$l" != "X" ] ; then
d=`dirname $l`
l=`basename $l`
for mod in $SALOME_MODULES; do
moddir=`printenv ${mod}_ROOT_DIR`
if [ -n "${moddir}" ] ; then
- #echo $l $mod $moddir
-# sed -e "s%[[:space:]]\(-L\)\?[^[:space:]]*${mod}[^[:space:]/]*/\(lib\|lib64\)% \1${moddir}/${myldir}%g" $l > $l"_"
-# sed -e "s%[[:space:]]\(-L\)\?[^[:space:]]*${mod}[^[:space:]/]*/lib% \1${moddir}/lib%g" $l > $l"_"
sed -e "s%[[:space:]]\(-L\)\?[^[:space:]]*${mod}[1]\?/lib% \1${moddir}/lib%g" \
-e "s%^libdir='[^[:space:]]*${mod}[1]\?/\(lib.*\)'%libdir='${moddir}/\1'%g" $l > $l"_"
mv -f $l"_" $l
-# for mod1 in $SALOME_MODULES; do
-# sed -e "s%[[:space:]]\(-L\)\?[^[:space:]]*${mod1}[^[:space:]]*/${mod1}_build%%g" $l > $l"_"
-# mv -f $l"_" $l
-# done
fi
done
- # . process netgen dependencies (WARNING! It should be before CAS.CADE)
- netgendir=`printenv NETGENHOME`/lib
- sed -e "s%[[:space:]]-L[^[:space:]]*Netgen[^[:space:]]*/lib\?% -L${netgendir}%g" \
- -e "s%[[:space:]][^[:space:]]*Netgen[^[:space:]]*/lib/lib\?% ${netgendir}/lib%g" $l > $l"_"
- chmod -f --reference=$l $l"_"
- mv -f $l"_" $l
+ # . process CASCASDE products dependencies
+ netgendir=`printenv NETGENHOME`
+ freetypedir=`printenv FREETYPEDIR`
+ ftgldir=`printenv FTGLDIR`
+ gl2psdir=`printenv GL2PSHOME`
+ freeimagedir=`printenv FREEIMAGEDIR`
+ tbbbasedir=`printenv TBBHOME`
+ cgnslibdir=`printenv CGNSHOME`
+
+ TBBKERNEL='cc4.1.0_libc2.4_kernel2.6.16.21'
+ if test `uname -m` = "x86_64" ; then
+ export TBBMODE="intel64/$TBBKERNEL"
+ else
+ export TBBMODE="ia32/$TBBKERNEL"
+ fi
+
+ tbbdir=${tbbbasedir}/lib/$TBBMODE
+
+ if [ -n "${netgendir}" ] && [ -d "${netgendir}" ] ; then
+ sed -e "s%\(.*\)\([[:space:]].*-L.*/netgen-[0-9]\.[0-9]\.[0-9][0-9]/lib[[:space:]]\)\(.*\)%\1 -L${netgendir}/lib \3%g" \
+ -e 's%\(.*\)\([[:space:]].*libnglib.la\)\(.*\)%\1 -lnglib \3%g' $l > _$l
+ mv -f _$l $l
+ fi
+ chmod a+x $l
+ if [ -n "${freetypedir}" ] && [ -d "${freetypedir}" ] ; then
+ sed -e "s%\(.*\)\([[:space:]].*-L.*/freetype-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freetypedir}/lib \3%g" \
+ -e 's%\(.*\)\([[:space:]].*libfreetype.la\)\(.*\)%\1 -lfreetype \3%g' $l > _$l
+ mv -f _$l $l
+ fi
+ chmod a+x $l
+ if [ -n "${ftgldir}" ] && [ -d "${ftgldir}" ] ; then
+ sed -e "s%\(.*\)\([[:space:]].*-L.*/ftgl-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${ftgldir}/lib \3%g" \
+ -e 's%\(.*\)\([[:space:]].*libftgl.la\)\(.*\)%\1 -lftgl \3%g' $l > _$l
+ mv -f _$l $l
+ fi
+ chmod a+x $l
+ if [ -n "${gl2psdir}" ] && [ -d "${gl2psdir}" ] ; then
+ sed -e "s%\(.*\)\([[:space:]].*-L.*/gl2ps-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${gl2psdir}/lib \3%g" $l > _$l
+ mv -f _$l $l
+ fi
+ chmod a+x $l
+ if [ -n "${freeimagedir}" ] && [ -d "${freeimagedir}" ] ; then
+ sed -e "s%\(.*\)\([[:space:]].*-L.*/freeimage-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freeimagedir}/lib \3%g" $l > _$l
+ mv -f _$l $l
+ fi
+ chmod a+x $l
+ if [ -n "${freeimagedir}" ] && [ -d "${freeimagedir}" ] ; then
+ sed -e "s%\(.*\)\([[:space:]].*-L.*/freeimage-[0-9]\.[0-9][0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freeimagedir}/lib \3%g" $l > _$l
+ mv -f _$l $l
+ fi
+ chmod a+x $l
+ if [ -n "${tbbdir}" ] && [ -d "${tbbdir}" ] ; then
+ sed -e "s%\(.*\)\([[:space:]].*-L.*/tbb[^[:space:]]*/lib[^[:space:]]*\)\(.*\)%\1 -L${tbbdir} \3%g" $l > _$l
+ mv -f _$l $l
+ fi
+ chmod a+x $l
+ if [ -n "${cgnslibdir}" ] && [ -d "${cgnslibdir}" ] ; then
+ sed -e "s%\(.*\)\([[:space:]].*-L.*/cgnslib-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${cgnslibdir}/lib \3%g" $l > _$l
+ mv -f _$l $l
+ fi
+ chmod a+x $l
# . process CAS.CADE dependencies
casdir=`printenv CASROOT`/lib
if [ ! -d ${casdir} ] ; then casdir=`printenv CASROOT`/Linux/lib ; fi
if [ ! -d ${casdir} ] ; then casdir=`printenv CASROOT`/lin/lib ; fi
if [ -n "${CASROOT}" ] && [ -d "${casdir}" ] ; then
- # echo $l $CASROOT $casdir
-# sed -e "s%[[:space:]]\(-L\)\?[^[:space:]]*\(OCT\|CAS\)[^[:space:]/]*/Linux/lib% \1${casdir}%g" \
-# -e "s%[[:space:]]\(-L\)\?[^[:space:]]*\(OCT\|CAS\)[^[:space:]/]*/lin/lib% \1${casdir}%g" \
-# -e "s%[[:space:]]\(-L\)\?[^[:space:]]*\(OCT\|CAS\)[^[:space:]/]*/lib% \1${casdir}%g" $l > $l"_"
-# mv -f $l"_" $l
-# sed -e "s%-L[^[:space:]]*OCCT[^[:space:]]*/install/lib%-L${casdir}%g" \
-# -e "s%[^[:space:]]*OCCT[^[:space:]]*/install/lib/%${casdir}/%g" $l > $l"_"
sed -e "s%-L[^[:space:]]*OCCT[^[:space:]]*/install/lib%-L${casdir}%g" \
-e "s%[^[:space:]]*OCCT[^[:space:]]*/install/lib/%${casdir}/%g" \
-e "s%[[:space:]]-L[^[:space:]]*\(OCCT\|CAS\)[^[:space:]]*/lib\?% -L${CASROOT}/lib%g" \
mv -f $l"_" $l
fi
-# # . modify libdir
-# #sed -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib/salome'%g" $l > $l"_"
-# mod=`basename $ldir | awk -F_ '{print $1}'`
-# moddir=`printenv ${mod}_ROOT_DIR`
-# sed -e "s%^libdir='[^[:space:]]*${mod}[^[:space:]]*/\(lib.*\)'%libdir='${moddir}/\1'%g" $l > $l"_"
-# mv -f $l"_" $l
-
# . process libxml dependencies
libxmldir=`printenv LIBXML_DIR`/lib
if [ ! -d ${libxmldir} ] ; then libxmldir=`printenv LIBXML_DIR`/lib ; fi
chmod -f --reference=$l $l"_"
mv -f $l"_" $l
- # . process CASCASDE products dependencies
-
-freetypedir=`printenv FREETYPEDIR`
-ftgldir=`printenv FTGLDIR`
-gl2psdir=`printenv GL2PSHOME`
-freeimagedir=`printenv FREEIMAGEDIR`
-tbbbasedir=`printenv TBBHOME`
-cgnslibdir=`printenv CGNSHOME`
-
-TBBKERNEL='cc4.1.0_libc2.4_kernel2.6.16.21'
-if test `uname -m` = "x86_64" ; then
- export TBBMODE="intel64/$TBBKERNEL"
-else
- export TBBMODE="ia32/$TBBKERNEL"
-fi
-
-tbbdir=${tbbbasedir}/lib/$TBBMODE
-
- if [ -n "${freetypedir}" ] && [ -d "${freetypedir}" ] ; then
- sed -e "s%\(.*\)\([[:space:]].*-L.*/freetype-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freetypedir}/lib \3%g" \
- -e 's%\(.*\)\([[:space:]].*libfreetype.la\)\(.*\)%\1 -lfreetype \3%g' $l > _$l
- mv -f _$l $l
- fi
- chmod a+x $l
- if [ -n "${ftgldir}" ] && [ -d "${ftgldir}" ] ; then
- sed -e "s%\(.*\)\([[:space:]].*-L.*/ftgl-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${ftgldir}/lib \3%g" \
- -e 's%\(.*\)\([[:space:]].*libftgl.la\)\(.*\)%\1 -lftgl \3%g' $l > _$l
- mv -f _$l $l
- fi
- chmod a+x $l
- if [ -n "${gl2psdir}" ] && [ -d "${gl2psdir}" ] ; then
- sed -e "s%\(.*\)\([[:space:]].*-L.*/gl2ps-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${gl2psdir}/lib \3%g" $l > _$l
- mv -f _$l $l
- fi
- chmod a+x $l
- if [ -n "${freeimagedir}" ] && [ -d "${freeimagedir}" ] ; then
- sed -e "s%\(.*\)\([[:space:]].*-L.*/freeimage-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freeimagedir}/lib \3%g" $l > _$l
- mv -f _$l $l
- fi
- chmod a+x $l
- if [ -n "${freeimagedir}" ] && [ -d "${freeimagedir}" ] ; then
- sed -e "s%\(.*\)\([[:space:]].*-L.*/freeimage-[0-9]\.[0-9][0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freeimagedir}/lib \3%g" $l > _$l
- mv -f _$l $l
- fi
- chmod a+x $l
- if [ -n "${tbbdir}" ] && [ -d "${tbbdir}" ] ; then
- sed -e "s%\(.*\)\([[:space:]].*-L.*/tbb[^[:space:]]*/lib[^[:space:]]*\)\(.*\)%\1 -L${tbbdir} \3%g" $l > _$l
- mv -f _$l $l
- fi
- chmod a+x $l
- if [ -n "${cgnslibdir}" ] && [ -d "${cgnslibdir}" ] ; then
- sed -e "s%\(.*\)\([[:space:]].*-L.*/cgnslib-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${cgnslibdir}/lib \3%g" $l > _$l
- mv -f _$l $l
- fi
- chmod a+x $l
-
fi
done