From: akl Date: Wed, 27 Feb 2008 14:10:53 +0000 (+0000) Subject: Process graphviz, tcltk and Python dependencies in *.la files of Graphviz. X-Git-Tag: V_4_1_1~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=741af97320c9411115221a3cbdf5f84128be907e;p=tools%2Finstall.git Process graphviz, tcltk and Python dependencies in *.la files of Graphviz. --- diff --git a/config_files/graphviz-2.16.1.sh b/config_files/graphviz-2.16.1.sh index 39724bc..7f51bf1 100755 --- a/config_files/graphviz-2.16.1.sh +++ b/config_files/graphviz-2.16.1.sh @@ -113,18 +113,32 @@ test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR} cd ${PRODUCT_DIR}/lib/graphviz -for l in `ls *.la`; do - libdir=`grep -e "libdir=.*" $l | sed -e "s/libdir=[\'|\"]\(.*\)[\'|\"]/\1/g"` - sed -e "s%${libdir}%${PRODUCT_DIR}/lib/graphviz%g" $l > _$l - libdir=`dirname $libdir` - sed -e "s%${libdir}%${PRODUCT_DIR}/lib/graphviz%g" _$l > $l - tmp="" - if [ -n "${TCLHOME}" ]; then - tmp="-L${TCLHOME}/lib" +# modify *.la files +ldir=${PRODUCT_DIR}/lib +cd $ldir + +for l in X `find $ldir -name "*.la"`; do + if [ "$l" != "X" ] ; then + lpath=`dirname $l` + sed -e "s%[[:space:]]\(-L\)\?[^[:space:]]*${PRODUCT}% \1${PRODUCT_DIR}%g" $l > $l"_" + chmod -f --reference=$l $l"_" ; mv -f $l"_" $l + + pydir="" + if [ -n "${PYTHONHOME}" ] ; then pydir=${PYTHONHOME} ; fi + sed -e "s%[[:space:]]\(-L\)\?[^[:space:]]*Python-[0-9]\+\.[0-9]\+\.[0-9]\+-rl% \1${pydir}%g" $l > $l"_" + chmod -f --reference=$l $l"_" + mv -f $l"_" $l + + tcldir="" + if [ -n "${TCLHOME}" ] ; then tcldir=${TCLHOME} ; fi + sed -e "s%[[:space:]]\(-L\)\?[^[:space:]]*tcltk-[0-9]\+\.[0-9]\+\.[0-9]\+% \1${tcldir}%g" $l > $l"_" + chmod -f --reference=$l $l"_" + mv -f $l"_" $l + + libdir=`grep -e "^libdir=.*" $l | sed -e "s/^libdir=[\'|\"]\(.*\)[\'|\"]/\1/g"` + sed -e "s%${libdir}%${lpath}%g" $l > $l"_" + chmod -f --reference=$l $l"_" ; mv -f $l"_" $l fi - sed -e "s%-L[^[:space:]]*/tcltk-[0-9]\+\.[0-9]\+\.[0-9]\+/lib[[:space:]]%$tmp %g" $l > _$l - mv -f _$l $l - chmod a+x $l done # to generate environment scripts