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
# modify *.la files
ldir=${PRODUCT_DIR}/lib
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=""
+ pydir="" ; tcldir=""
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"_"
+ sed -e "s%[[:space:]]\(-L\)\?[^[:space:]]*${PRODUCT}% \1${PRODUCT_DIR}%g" \
+ -e "s%[[:space:]]\(-L\)\?[^[:space:]]*Python[^[:space:]]*/lib% \1${pydir}/lib%g" \
+ -e "s%[[:space:]]\(-L\)\?[^[:space:]]*tcltk[^[:space:]]*/lib% \1${tcldir}/lib%g" $l > $l"_"
chmod -f --reference=$l $l"_"
mv -f $l"_" $l
+ lpath=`dirname $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