]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
Process graphviz, tcltk and Python dependencies in *.la files of Graphviz.
authorakl <akl@opencascade.com>
Wed, 27 Feb 2008 14:10:53 +0000 (14:10 +0000)
committerakl <akl@opencascade.com>
Wed, 27 Feb 2008 14:10:53 +0000 (14:10 +0000)
config_files/graphviz-2.16.1.sh

index 39724bc7683c88deb878d0ddbd3bcff12d5c2bbf..7f51bf11fc904c698804a38fa8ed16d84f704f14 100755 (executable)
@@ -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