3 ####################################################################################
4 # File : graphviz-2.2.1.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-2006 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 maj_ver=`echo $ver | awk -F. '{if(NF>0) print $1; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
21 min_ver=`echo $ver | awk -F. '{if(NF>1) print $2; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
22 rel_ver=`echo $ver | awk -F. '{if(NF>2) print $3; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
23 let ver=$maj_ver*10000+$min_ver*100+$rel_ver
24 if [ $ver -eq 20201 ] ; then
33 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
34 #$DELIM ${PRODUCT_TYPE} $DELIM
35 export PATH=\${INSTALL_ROOT}/${PRODUCT}/bin:\${PATH}
36 export LD_LIBRARY_PATH=\${INSTALL_ROOT}/${PRODUCT}/lib/graphviz:\${LD_LIBRARY_PATH}
39 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
40 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
43 # looks for the native product and collects it's environment (used by make_env())
45 dothome="`find_in_path dot ${PATH}:/usr/bin`"
46 if [ -n "${dothome}" ] ; then
47 ver=`dot -V 2>&1 | awk '{print $3}'`
48 maj_ver=`echo $ver | awk -F. '{if(NF>0) print $1; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
49 min_ver=`echo $ver | awk -F. '{if(NF>1) print $2; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
50 rel_ver=`echo $ver | awk -F. '{if(NF>2) print $3; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
51 let ver=$maj_ver*10000+$min_ver*100+$rel_ver
52 if [ $ver -ge 20201 ] ; then
53 dothome=`cd ${dothome}/..; pwd`
54 tmp="${dothome}/bin ${dothome}/bin \${PATH} ${PATH}";
55 path=`sort_path ${tmp}`
56 tmp="${dothome}/lib/graphviz ${dothome}/lib/graphviz \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}";
57 ld_library_path=`sort_path ${tmp}`
58 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
59 #$DELIM ${PRODUCT_TYPE} $DELIM
61 export LD_LIBRARY_PATH=${ld_library_path}
64 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
72 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
78 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
79 source ${INSTALL_WORK}/$SHRC
81 check_jb tar xfz ${SOURCE_DIR}/graphviz-2.2.1.tar.gz -C ${INSTALL_WORK}
84 makedir ${PRODUCT_DIR}
85 if test `uname -m` = "x86_64" ; then
86 check_job ${PRODUCT_DIR}/CONFIGURE.LOG configure --prefix=${PRODUCT_DIR} --with-expatlibdir=/usr/lib64 --with-tcl=${TCLHOME} --disable-rpath CFLAGS=-m64 CXXFLAGS=-m64
88 check_job ${PRODUCT_DIR}/CONFIGURE.LOG configure --prefix=${PRODUCT_DIR} --with-tcl=${TCLHOME} --disable-rpath
91 cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
94 check_job ${PRODUCT_DIR}/MAKE.LOG make
95 check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
97 #du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log
98 cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK}
104 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
105 source ${INSTALL_WORK}/$SHRC
107 check_jb tar xfz ${SOURCE_DIR}/graphviz-2.2.1.tar.gz -C ${INSTALL_ROOT}
108 cd ${PRODUCT_DIR}/lib/graphviz
109 for l in `ls *.la`; do
110 libdir=`grep -e "libdir=.*" $l | sed -e "s/libdir=[\'|\"]\(.*\)[\'|\"]/\1/g"`
111 sed -e "s%${libdir}%${PRODUCT_DIR}/lib/graphviz%g" $l > _$l
112 libdir=`dirname $libdir`
113 sed -e "s%${libdir}%${PRODUCT_DIR}/lib/graphviz%g" _$l > $l
122 export INSTALL_WORK=$2;
123 export SOURCE_DIR=$3;
124 export INSTALL_ROOT=$4;
125 export PRODUCT_SEQUENCE=$5;
126 if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="graphviz" ; fi
127 export PRODUCT="graphviz-2.2.1"
128 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
129 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}