]> SALOME platform Git repositories - tools/install.git/blob - config_files/doxygen-1.3.7.sh
Salome HOME
Update for version 3.0.0
[tools/install.git] / config_files / doxygen-1.3.7.sh
1 #!/bin/sh
2
3 check_version()
4 {
5 check_lib_version doxygen $PATH
6 if [ "$?" -ne "0" ]; then
7    return 1
8 fi
9 check_lib_version doxytag $PATH
10 if [ "$?" -ne "0" ]; then
11    return 1
12 fi
13 check_lib_version doxywizard $PATH
14 if [ "$?" -ne "0" ]; then
15    return 1
16 fi
17 ver=`doxygen --version`
18 if [ "$ver" == "1.3.7" ]; then
19     return 0
20 fi
21 return 1
22 }
23
24 print_env()
25 {
26 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
27 #$DELIM ${PRODUCT_TYPE} $DELIM
28 export PATH=\${INSTALL_ROOT}/${PRODUCT}/bin:\${PATH}
29 ##
30 EOF
31 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
32 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
33 }
34
35 # looks for the native product and collects it's environment (used by make_env())
36 try_native(){
37 check_version
38 if [ $? -eq 0 ] ; then
39     doxygen="`find_in_path doxygen ${PATH}`"
40     tmp="${doxygen} ${doxygen} \${PATH} ${PATH}";  
41     path=`sort_path ${tmp}`
42     cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
43 #$DELIM ${PRODUCT_TYPE} $DELIM
44 export PATH=${path}
45 ##
46 EOF
47     make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
48     return 0
49 fi
50 return 1;
51 }
52
53 try_preinstalled(){
54 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
55 return $?
56 }
57
58 install_source()
59 {
60 echo "The installation of doxygen 1.3.7 from sources is not provided! Use native doxygen."
61 return 1
62 }
63
64 install_binary()
65 {
66 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
67 source ${INSTALL_WORK}/$SHRC
68
69 check_jb tar xfz ${SOURCE_DIR}/doxygen-1.3.7.tar.gz -C ${INSTALL_ROOT}
70
71 print_env
72 }
73
74 export PROCEDURE=$1;
75 export INSTALL_WORK=$2;
76 export SOURCE_DIR=$3;
77 export INSTALL_ROOT=$4;
78 export PRODUCT_SEQUENCE=$5;
79 if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="doxygen" ; fi
80 export PRODUCT="doxygen-1.3.7"
81 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
82 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
83 source ./common.sh
84 $PROCEDURE