3 ####################################################################################
4 # File : graphviz-1.9.sh
5 # Created : Thu Dec 18 12:01:00 2002
6 # Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
8 # Module : Installation Wizard
9 # Copyright : 2002-2007 CEA
11 # This script is the part of the SALOME installation procedure.
13 ####################################################################################
17 isdot=`which dot 2>/dev/null`
18 if [ -n "$isdot" ]; then
19 ver=`dot -V 2>&1 | awk '{print $3}'`
20 if [ "$ver" == "1.9" ]; then
29 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
30 #$DELIM ${PRODUCT_TYPE} $DELIM
31 export PATH=\${INSTALL_ROOT}/${PRODUCT}/bin:\${PATH}
32 export LD_LIBRARY_PATH=\${INSTALL_ROOT}/${PRODUCT}/lib/graphviz:\${LD_LIBRARY_PATH}
35 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
36 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
39 # looks for the native product and collects it's environment (used by make_env())
42 if [ $? -eq 0 ] ; then
43 dot="`find_in_path dot ${PATH}`"
44 dot=`cd ${dot}/..; pwd`
45 tmp="${dot}/bin ${dot}/bin \${PATH} ${PATH}";
46 path=`sort_path ${tmp}`
47 tmp="${dot}/lib/graphviz ${dot}/lib/graphviz \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}";
48 ld_library_path=`sort_path ${tmp}`
49 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
50 #$DELIM ${PRODUCT_TYPE} $DELIM
52 export LD_LIBRARY_PATH=${ld_library_path}
55 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
62 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
68 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
69 source ${INSTALL_WORK}/$SHRC
71 check_jb tar xfz ${SOURCE_DIR}/graphviz-1.9.tar.gz -C ${INSTALL_WORK}
74 makedir ${PRODUCT_DIR}
75 check_job ${PRODUCT_DIR}/CONFIGURE.LOG configure --prefix=${PRODUCT_DIR} --with-tcl=${TCLHOME} --disable-rpath
77 cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
80 check_job ${PRODUCT_DIR}/MAKE.LOG make
81 check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
83 #du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log
84 cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK}
90 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
91 source ${INSTALL_WORK}/$SHRC
93 check_jb tar xfz ${SOURCE_DIR}/graphviz-1.9.tar.gz -C ${INSTALL_ROOT}
94 cd ${PRODUCT_DIR}/lib/graphviz
95 for l in `ls *.la`; do
96 libdir=`grep -e "libdir=.*" $l | sed -e "s/libdir=[\'|\"]\(.*\)[\'|\"]/\1/g"`
97 sed -e "s%${libdir}%${PRODUCT_DIR}/lib/graphviz%g" $l > _$l
98 libdir=`dirname $libdir`
99 sed -e "s%${libdir}%${PRODUCT_DIR}/lib/graphviz%g" _$l > $l
108 export INSTALL_WORK=$2;
109 export SOURCE_DIR=$3;
110 export INSTALL_ROOT=$4;
111 export PRODUCT_SEQUENCE=$5;
112 if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="graphviz" ; fi
113 export PRODUCT="graphviz-1.9"
114 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
115 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}