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