fi
happydoc 2&> /dev/null
if [ "$?" -eq "0" ]; then
- ver=`happydoc | grep "HappyDoc version 2.1"`
ver=`happydoc | grep "HappyDoc version 2.1" | sort -u | awk '{print $NF}'`
if [ "$ver" == "2.1" ]; then
return 0
try_native(){
happydoc="`find_in_path happydoc ${PATH}`"
if [ -n "${happydoc}" ] ; then
+ ver=`happydoc | grep "HappyDoc version 2.1" | sort -u | awk '{print $NF}'`
cat > ${INSTALL_WORK}/try_native.py <<EOF
import sys
try :
sys.exit(1)
EOF
python ${INSTALL_WORK}/try_native.py
- if [ $? -eq 0 ] ; then
+ if [ $? -eq 0 ] && [ "$ver" == "2.1" ] ; then
tmp="${happydoc} ${happydoc} \${PATH} ${PATH}";
path=`sort_path ${tmp}`
- pythonpath="`find_in_path happydocset ${PYTHONPATH}`"
+ pythonpath=`python -c "import happydoclib; print happydoclib.__file__" 2>/dev/null`
+ pythonpath=`dirname $pythonpath`
+ pythonpath=`dirname $pythonpath`
tmp="${pythonpath} ${pythonpath} \${PYTHONPATH} ${PYTHONPATH}";
pythonpath=`sort_path ${tmp}`
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
# looks for the native product and collects it's environment (used by make_env())
try_native(){
-check_version
-if [ $? -eq 0 ] ; then
- pythonpath="`find_in_path Numeric.py ${PYTHONPATH}`"
- tmp="${pythonpath} ${pythonpath} \${PYTHONPATH} ${PYTHONPATH}";
- pythonpath=`sort_path ${tmp}`
- cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
+numpath=`python -c "import Numeric; print Numeric.__file__" 2>/dev/null`
+if [ -n "${numpath}" ] ; then
+ numpath=`dirname ${numpath}`
+ ver=`python -c 'import Numeric; print Numeric.__version__' 2>/dev/null | awk -F. '{v=0;for(i=1;i<=NF;i++)v=v*100+$i;print v}'`
+ if [ $ver -ge 2200 ] ; then
+ tmp="${numpath} ${numpath} \${PYTHONPATH} ${PYTHONPATH}";
+ pythonpath=`sort_path ${tmp}`
+ cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
#$DELIM ${PRODUCT_TYPE} $DELIM
export PYTHONPATH=${pythonpath}
##
EOF
- make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
- return 0
+ make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
+ if [ $ver -eq 2200 ] ; then
+ return 0
+ else
+ return 2
+ fi
+ fi
fi
return 1
}
# looks for the native product and collects it's environment (used by make_env())
try_native(){
-check_version
-if [ $? -eq 0 ] ; then
- pythonpath="`find_in_path Numeric.py ${PYTHONPATH}`"
- tmp="${pythonpath} ${pythonpath} \${PYTHONPATH} ${PYTHONPATH}";
- pythonpath=`sort_path ${tmp}`
- cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
+numpath=`python -c "import Numeric; print Numeric.__file__" 2>/dev/null`
+if [ -n "${numpath}" ] ; then
+ numpath=`dirname ${numpath}`
+ ver=`python -c 'import Numeric; print Numeric.__version__' 2>/dev/null | awk -F. '{v=0;for(i=1;i<=NF;i++)v=v*100+$i;print v}'`
+ if [ $ver -ge 2307 ] ; then
+ tmp="${numpath} ${numpath} \${PYTHONPATH} ${PYTHONPATH}";
+ pythonpath=`sort_path ${tmp}`
+ cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
#$DELIM ${PRODUCT_TYPE} $DELIM
export PYTHONPATH=${pythonpath}
##
EOF
- make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
- return 0
+ make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
+ if [ $ver -eq 2307 ] ; then
+ return 0
+ else
+ return 2
+ fi
+ fi
fi
return 1
}
# get Python and tcl/tk version
python_version="`python -c 'import sys; print sys.version[:3]'`"
tcl_version=""
+tcl_includes=""
+tcl_libs=""
tcldir="`where_tcl`"
if [ $? -eq 0 ] && [ -e ${tcldir}/tclConfig.sh ] ; then
tcl_version=`grep -e "TCL_VERSION=.*" ${tcldir}/tclConfig.sh | sed -e "s%TCL_VERSION=[\'|\"]\(.*\)[\'|\"]%\1%g"`
+ tcl_includes=`grep -e "TCL_INCLUDE_SPEC=.*" ${tcldir}/tclConfig.sh | sed -e "s%TCL_INCLUDE_SPEC=[\'|\"]-I\(.*\)[\'|\"]%\1%g"`
+ if [ -z "$tcl_includes" ] ; then tcl_includes=/usr/include ; fi
+ tcl_libs=`grep -e "TCL_PACKAGE_PATH=.*" ${tcldir}/tclConfig.sh | sed -e "s%TCL_PACKAGE_PATH=[\'|\"]\(.*\)[\'|\"]%\1%g"`
fi
VTK_CMAKE_OPTIONS=""
VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DPYTHON_LIBRARY:STRING=${PYTHONHOME}/lib/python${python_version}/config/libpython${python_version}.a"
fi
### Wrap Tcl settings
-if [ "${tcl_version}" != "" ]; then
+if [ "${tcl_version}" != "" ] && [ "${tcl_includes}" != "" ] && [ "${tcl_libs}" != "" ] ; then
+# suppose that tcl and tk are installed in the same dir
VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DVTK_WRAP_TCL:BOOL=ON"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTCL_INCLUDE_PATH:STRING=${TCLHOME}/include"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTCL_LIBRARY:STRING=${TCLHOME}/lib/libtcl${tcl_version}.so"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTCL_STUB_LIBRARY:STRING=${TCLHOME}/lib/libtclstub${tcl_version}.a"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTCL_TCLSH:STRING=${TCLHOME}/bin/tclsh"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTK_INCLUDE_PATH:STRING=${TCLHOME}/include"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTK_LIBRARY:STRING=${TCLHOME}/lib/libtk${tcl_version}.so"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTK_STUB_LIBRARY:STRING=${TCLHOME}/lib/libtkstub${tcl_version}.a"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTK_WISH:STRING=${TCLHOME}/bin/wish"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTCL_INCLUDE_PATH:STRING=${tcl_includes}"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTCL_LIBRARY:STRING=${tcl_libs}/libtcl${tcl_version}.so"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTCL_STUB_LIBRARY:STRING=${tcl_libs}/libtclstub${tcl_version}.a"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTCL_TCLSH:STRING=${TCLHOME}/bin/tclsh${tcl_version}"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTK_INCLUDE_PATH:STRING=${tcl_includes}"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTK_LIBRARY:STRING=${tcl_libs}/libtk${tcl_version}.so"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTK_STUB_LIBRARY:STRING=${tcl_libs}/libtkstub${tcl_version}.a"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTK_WISH:STRING=${TCLHOME}/bin/wish${tcl_version}"
fi
### if Mesa is pre-installed
if [ -n "$MESA_HOME" ]; then
file=$1; shift;
path=$*
for i in `echo ${path} | sed -e"s%:% %g"` ; do
- ret=`find $i -name $file 2>/dev/null`
+ ret=`find $i -name $file -maxdepth 1 2>/dev/null`
if [ -n "$ret" ] ; then
ret=`echo $ret | sed -e"s%/\$file$%%g"`
echo $ret
cd ${PRODUCT_WORK}
makedir ${PRODUCT_DIR}
# vsr: fix a bug on Mandrake-10.1: wrong qt library reference
-sed -e "s/-lqt/-lqt-mt/g" ./tmake/lib/linux-g++/tmake.conf > ./tmake/lib/linux-g++/tmake.conf.new
+sed -e "s/-lqt$/-lqt-mt/g" ./tmake/lib/linux-g++/tmake.conf > ./tmake/lib/linux-g++/tmake.conf.new
mv ./tmake/lib/linux-g++/tmake.conf.new ./tmake/lib/linux-g++/tmake.conf
# vsr: fix bug - configure fails on Red Hat 9 because of incorrect autodetect check for install tool
# so it is necessary to put it directly
try_native(){
msg2qmroot="`find_in_path msg2qm ${PATH}`"
if [ -n "${msg2qmroot}" ] ; then
- msg2qmroot=`cd ${msg2qmroot}/..; pwd`
- tmp="\${msg2qmroot} ${MSG2QM_ROOT} \${PATH} ${PATH}";
+ tmp="\${MSG2QM_ROOT} ${msg2qmroot} \${PATH} ${PATH}";
path=`sort_path ${tmp}`
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
#$DELIM ${PRODUCT_TYPE} $DELIM
if [ -n "${sippython}" ]; then
tmp="${sipdir} ${sipdir} \${PATH} ${PATH}";
path=`sort_path ${tmp}`
- tmp="${sipdir} ${sipdir} \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}";
+ tmp="${sippython} ${sippython} \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}";
ld_library_path=`sort_path ${tmp}`
tmp="${sippython} ${sippython} \${PYTHONPATH} ${PYTHONPATH}";
pythonpath=`sort_path ${tmp}`
#!/bin/sh
+VERSION="8.3"
+
check_version()
{
-VERSION="8.3"
if [ -z "$TCLHOME" ]; then
echo "TCLHOME doesn't set"
return 1
export TCLHOME=\${INSTALL_ROOT}/${PRODUCT}
export PATH=\${TCLHOME}/bin:\${PATH}
export LD_LIBRARY_PATH=\${TCLHOME}/lib:\${LD_LIBRARY_PATH}
-export TCLLIBPATH="\${TCLHOME}/lib \${TCLHOME}/lib/tcl8.3 \${TCLHOME}/lib/tk8.3 \${TCLLIBPATH}"
+export TCLLIBPATH="\${TCLHOME}/lib \${TCLHOME}/lib/tcl${VERSION} \${TCLHOME}/lib/tk${VERSION} \${TCLLIBPATH}"
##
EOF
(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
export TCLHOME=${tclhome}
export PATH=${path}
export LD_LIBRARY_PATH=${ld_library_path}
-export TCLLIBPATH="\${TCLHOME}/lib \${TCLHOME}/lib/tcl8.3 \${TCLHOME}/lib/tk8.3 \${TCLLIBPATH}"
+export TCLLIBPATH="\${TCLHOME}/lib \${TCLHOME}/lib/tcl${VERSION} \${TCLHOME}/lib/tk${VERSION} \${TCLLIBPATH}"
##
EOF
(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
#!/bin/sh
+VERSION="8.4"
+
check_version()
{
-VERSION="8.4"
if [ -z "$TCLHOME" ]; then
echo "TCLHOME doesn't set"
return 1
export TCLHOME=\${INSTALL_ROOT}/${PRODUCT}
export PATH=\${TCLHOME}/bin:\${PATH}
export LD_LIBRARY_PATH=\${TCLHOME}/lib:\${LD_LIBRARY_PATH}
-export TCLLIBPATH="\${TCLHOME}/lib \${TCLHOME}/lib/tcl8.4 \${TCLHOME}/lib/tk8.4 \${TCLLIBPATH}"
+export TCLLIBPATH="\${TCLHOME}/lib \${TCLHOME}/lib/tcl${VERSION} \${TCLHOME}/lib/tk${VERSION} \${TCLLIBPATH}"
##
EOF
(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
export TCLHOME=${tclhome}
export PATH=${path}
export LD_LIBRARY_PATH=${ld_library_path}
-export TCLLIBPATH="\${TCLHOME}/lib \${TCLHOME}/lib/tcl8.4 \${TCLHOME}/lib/tk8.4 \${TCLLIBPATH}"
+export TCLLIBPATH="\${TCLHOME}/lib \${TCLHOME}/lib/tcl${VERSION} \${TCLHOME}/lib/tk${VERSION} \${TCLLIBPATH}"
##
EOF
(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})