5 isdot=`which dot 2>/dev/null`
6 if [ -n "$isdot" ]; then
7 ver=`dot -V 2>&1 | awk '{print $3}'`
8 if [ "$ver" == "1.9" ]; then
17 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
18 #$DELIM ${PRODUCT_TYPE} $DELIM
19 export PATH=\${INSTALL_ROOT}/${PRODUCT}/bin:\${PATH}
20 export LD_LIBRARY_PATH=\${INSTALL_ROOT}/${PRODUCT}/lib/graphviz:\${LD_LIBRARY_PATH}
23 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
24 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
27 # looks for the native product and collects it's environment (used by make_env())
30 if [ $? -eq 0 ] ; then
31 dot="`find_in_path dot ${PATH}`"
32 dot=`cd ${dot}/..; pwd`
33 tmp="${dot}/bin ${dot}/bin \${PATH} ${PATH}";
34 path=`sort_path ${tmp}`
35 tmp="${dot}/lib/graphviz ${dot}/lib/graphviz \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}";
36 ld_library_path=`sort_path ${tmp}`
37 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
38 #$DELIM ${PRODUCT_TYPE} $DELIM
40 export LD_LIBRARY_PATH=${ld_library_path}
43 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
50 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
56 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
57 source ${INSTALL_WORK}/$SHRC
59 check_jb tar xfz ${SOURCE_DIR}/graphviz-1.9.tar.gz -C ${INSTALL_WORK}
62 makedir ${PRODUCT_DIR}
63 check_job ${PRODUCT_DIR}/CONFIGURE.LOG configure --prefix=${PRODUCT_DIR} --with-tcl=${TCLHOME} --disable-rpath
65 cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
68 check_job ${PRODUCT_DIR}/MAKE.LOG make
69 check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
71 #du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log
72 cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK}
78 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
79 source ${INSTALL_WORK}/$SHRC
81 check_jb tar xfz ${SOURCE_DIR}/graphviz-1.9.tar.gz -C ${INSTALL_ROOT}
82 cd ${PRODUCT_DIR}/lib/graphviz
83 for l in `ls *.la`; do
84 libdir=`grep -e "libdir=.*" $l | sed -e "s/libdir=[\'|\"]\(.*\)[\'|\"]/\1/g"`
85 sed -e "s%${libdir}%${PRODUCT_DIR}/lib/graphviz%g" $l > _$l
86 libdir=`dirname $libdir`
87 sed -e "s%${libdir}%${PRODUCT_DIR}/lib/graphviz%g" _$l > $l
96 export INSTALL_WORK=$2;
98 export INSTALL_ROOT=$4;
99 export PRODUCT_SEQUENCE=$5;
100 if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="graphviz" ; fi
101 export PRODUCT="graphviz-1.9"
102 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
103 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}