]> SALOME platform Git repositories - tools/install.git/blob - config_files/doxygen-1.3.7.sh
Salome HOME
Remove v3.1.0 beta1 release notes
[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 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
61 source ${INSTALL_WORK}/$SHRC
62
63 check_jb tar xfz ${SOURCE_DIR}/doxygen-1.3.7.tar.gz -C ${INSTALL_WORK}
64
65 cd ${PRODUCT_WORK}
66 makedir ${PRODUCT_DIR}
67 # vsr: fix a bug on Mandrake-10.1: wrong qt library reference
68 sed -e "s/-lqt/-lqt-mt/g" ./tmake/lib/linux-g++/tmake.conf > ./tmake/lib/linux-g++/tmake.conf.new
69 mv ./tmake/lib/linux-g++/tmake.conf.new ./tmake/lib/linux-g++/tmake.conf
70 # vsr: fix bug - configure fails on Red Hat 9 because of incorrect autodetect check for install tool
71 # so it is necessary to put it directly
72 f_install="--install "`which install`
73 check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --with-doxywizard --prefix ${PRODUCT_DIR} $f_install
74 GCC=`which gcc`
75 cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
76 used gcc=$GCC
77 EOF
78 check_job ${PRODUCT_DIR}/MAKE.LOG make
79 check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
80
81 which epstopdf >/dev/null 2>&1;  ISFOUND=$?
82 if [ ${ISFOUND} -eq 0 ] ; then  which makeindex >/dev/null 2>&1; ISFOUND=$?; fi
83 if [ ${ISFOUND} -eq 0 ] ; then  which latex >/dev/null 2>&1; ISFOUND=$?; fi
84 #if [ ${ISFOUND} -eq 0 ] ; then  which latex2html >/dev/null 2>&1; ISFOUND=$?; fi
85 if [ ${ISFOUND} -eq 0 ] ; then  which pdflatex >/dev/null 2>&1; ISFOUND=$?; fi
86 if [ ${ISFOUND} -eq 0 ] ; then  which pslatex >/dev/null 2>&1; ISFOUND=$?; fi
87 #if [ ${ISFOUND} -eq 0 ] ; then  which pstoimg >/dev/null 2>&1; ISFOUND=$?; fi
88 if [ ${ISFOUND} -eq 0 ] ; then
89     check_job ${PRODUCT_DIR}/MAKEDOCS.LOG make docs
90     check_job ${PRODUCT_DIR}/MAKEINSTALLDOCS.LOG make install_docs
91 else
92     cat >> ${PRODUCT_DIR}/MAKEDOCS.LOG <<EOF
93 Can't find \"epstopdf\" and \"latex\" or another executables on the computer.
94 doxygen documentation will not be built!
95 SALOME DOCUMENTATION ALSO CAN NOT BE BUILT!
96 EOF
97 #    check_job ${PRODUCT_DIR}/MAKEDOCS.LOG make docs
98 #    rm -fr ${PRODUCT_WORK}
99 #    echo -e "Can't find \"epstopdf\" and \"latex\" or another executables on the computer."
100 #    echo -e "doxygen documentation will not be built!"
101 #    echo -e "SALOME DOCUMENTATION ALSO CAN NOT BE BUILT!"
102 #    echo -n "Would you like continue : (Y,N) [Y] : "
103 #    read rep;
104 #    rep=`echo $rep  | tr "[A-Z]" "[a-z]"`
105 #    if test -z $rep || [ $rep != "y" ] ; then
106 #       rm -fr ${PRODUCT_WORK}
107 #       exit 1
108 #    fi
109 fi
110
111 #du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log
112 cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK}
113 print_env
114 }
115
116 install_binary()
117 {
118 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
119 source ${INSTALL_WORK}/$SHRC
120
121 check_jb tar xfz ${SOURCE_DIR}/doxygen-1.3.7.tar.gz -C ${INSTALL_ROOT}
122
123 print_env
124 }
125
126 export PROCEDURE=$1;
127 export INSTALL_WORK=$2;
128 export SOURCE_DIR=$3;
129 export INSTALL_ROOT=$4;
130 export PRODUCT_SEQUENCE=$5;
131 if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="doxygen" ; fi
132 export PRODUCT="doxygen-1.3.7"
133 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
134 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
135 source ./common.sh
136 $PROCEDURE