#
# gl2ps version
#
-GL2PS_VERSION=1.3.8
+VERSION_GL2PS=1.3.8
check_version()
{
# check availability of glp2s and its version
-if [ "${GL2PSHOME}" != "" ] && [ -f ${GL2PSHOME}/include/gl2ps.h ] ; then
- ver_major=`grep "#define GL2PS_MAJOR_VERSION" ${GL2PSHOME}/include/gl2ps.h | awk '{print $3}'`
- ver_minor=`grep "#define GL2PS_MINOR_VERSION" ${GL2PSHOME}/include/gl2ps.h | awk '{print $3}'`
- ver_maint=`grep "#define GL2PS_PATCH_VERSION" ${GL2PSHOME}/include/gl2ps.h | awk '{print $3}'`
- ver="$ver_major.$ver_minor.$ver_maint"
- if [ "$ver" == "${GL2PS_VERSION}" ] ; then
+if [ "${GL2PS_ROOT_DIR}" != "" ] && [ -f ${GL2PS_ROOT_DIR}/include/gl2ps.h ] ; then
+ ver_major=`grep "#define GL2PS_MAJOR_VERSION" ${GL2PS_ROOT_DIR}/include/gl2ps.h | awk '{print $3}'`
+ ver_minor=`grep "#define GL2PS_MINOR_VERSION" ${GL2PS_ROOT_DIR}/include/gl2ps.h | awk '{print $3}'`
+ ver_maint=`grep "#define GL2PS_PATCH_VERSION" ${GL2PS_ROOT_DIR}/include/gl2ps.h | awk '{print $3}'`
+ ver="${ver_major}.${ver_minor}.${ver_maint}"
+ if [ "${ver}" = "${VERSION_GL2PS}" ] ; then
return 0
fi
fi
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export GL2PSHOME=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export PATH=\${GL2PSHOME}/bin:\$PATH
-export LD_LIBRARY_PATH=\${GL2PSHOME}/lib:\${LD_LIBRARY_PATH}
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export GL2PS_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PATH=\${GL2PS_ROOT_DIR}/bin:\${PATH}
+export LD_LIBRARY_PATH=\${GL2PS_ROOT_DIR}/lib:\${LD_LIBRARY_PATH}
##
EOF
(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
print_env_src()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
+#${DELIM} ${PRODUCT_TYPE}_src ${DELIM}
# nothing to do
##
EOF
install_source()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
# unpack
check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
+# patch for missing library dependencies
+patch_for_libs=1
+if [ "${patch_for_libs}" = "1" ] ; then
+ sed -i "s%\(find_package(OpenGL)\)%find_library(LIBM_LIBRARY NAMES m)\nlist(APPEND EXTERNAL_LIBRARIES \${LIBM_LIBRARY})\n\n\1%g" ${PRODUCT_SRC_DIR}/CMakeLists.txt
+fi
+
+if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then
+ du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.src.size
+fi
+
# to generate environment scripts
try_preinstalled
}
# install
check_job ${PRODUCT_DIR}/INSTALL.LOG make install
-cd ${PRODUCT_DIR};
+cd ${PRODUCT_DIR}
+
+if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then
+ du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.build.size
+ du -sk ${PRODUCT_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.bin.size
+fi
# remove sources and temporary files after building
-if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
+if [ ${REMOVE_SRC_TMP} = "TRUE" ] ; then
test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
fi
install_binary()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
# create a product directory
test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
-### modifing la files
-cd ${PRODUCT_DIR}/lib
-
# to generate environment script for sources
try_preinstalled
}
export INSTALL_PRODUCTS=$7;
shift
REMOVE_SRC_TMP=$8;
-test $# == 10 && shift && SINGLE_DIR=$9
-export PRODUCT="gl2ps-${GL2PS_VERSION}"
+test $# = 10 && shift && SINGLE_DIR=$9
+export PRODUCT="gl2ps-${VERSION_GL2PS}"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT}_SRC
source ./common.sh
-$PROCEDURE
+${PROCEDURE}
#
# graphviz version
#
-GRAPHVIZ_VERSION=2.30.0
+VERSION_GRAPHVIZ=2.30.0
+GRAPHVIZ_XVERSION=`echo ${VERSION_GRAPHVIZ} | awk -F. '{printf("%d",$1*10000+$2*100+$3)}'`
check_version()
{
isdot=`which dot 2>/dev/null`
-if [ -n "$isdot" ]; then
+if [ -n "${isdot}" ]; then
ver=`dot -V 2>&1 | sed -e "s%[A-Za-z-]%%g" | awk '{print $1}'`
- maj_ver=`echo $ver | awk -F. '{if(NF>0) print $1; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
- min_ver=`echo $ver | awk -F. '{if(NF>1) print $2; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
- rel_ver=`echo $ver | awk -F. '{if(NF>2) print $3; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
- let ver=$maj_ver*10000+$min_ver*100+$rel_ver
- if [ $ver -eq 22400 ] ; then
+ maj_ver=`echo ${ver} | awk -F. '{if(NF>0) print $1; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
+ min_ver=`echo ${ver} | awk -F. '{if(NF>1) print $2; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
+ rel_ver=`echo ${ver} | awk -F. '{if(NF>2) print $3; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
+ let ver=${maj_ver}*10000+${min_ver}*100+${rel_ver}
+ if [ ${ver} -eq ${GRAPHVIZ_XVERSION} ] ; then
return 0
fi
fi
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export GRAPHVIZHOME=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export GRAPHVIZ_ROOT_DIR=\${GRAPHVIZHOME}
-export PATH=\${GRAPHVIZHOME}/bin:\${PATH}
-export LD_LIBRARY_PATH=\${GRAPHVIZHOME}/lib:\${GRAPHVIZHOME}/lib/graphviz:\${LD_LIBRARY_PATH}
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export GRAPHVIZ_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PATH=\${GRAPHVIZ_ROOT_DIR}/bin:\${PATH}
+export LD_LIBRARY_PATH=\${GRAPHVIZ_ROOT_DIR}/lib:\${GRAPHVIZ_ROOT_DIR}/lib/graphviz:\${LD_LIBRARY_PATH}
##
EOF
(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
print_env_src()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
+#${DELIM} ${PRODUCT_TYPE}_src ${DELIM}
# nothing to do
##
EOF
install_source()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
# unpack
check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
+if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then
+ du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.src.size
+fi
+
# to generate environment scripts
try_preinstalled
}
sed -i "s%echo 'puts \[info tclversion\]' | \$TCLSH%echo 'puts \[info tclversion\]' | \$TCLSH 2>/dev/null | grep -E '^[0-9.]+$'%g" configure
fi
-CONFIGURE_FLAGS="--disable-rpath -without-qt"
-if [ "${EXPAT_ROOT}" != "" ] ; then
- CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --with-expat --with-expatincludedir=${EXPAT_ROOT}/include --with-expatlibdir=${EXPAT_ROOT}/lib --enable-perl=no "
+CONFIGURE_FLAGS="--disable-rpath --disable-tcl --without-qt"
+if [ "${EXPAT_ROOT_DIR}" != "" ] ; then
+ CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --with-expat --with-expatincludedir=${EXPAT_ROOT_DIR}/include --with-expatlibdir=${EXPAT_ROOT_DIR}/lib --enable-perl=no "
fi
-if test `uname -m` == "x86_64" ; then
+if test `uname -m` = "x86_64" ; then
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} CFLAGS=-m64 CXXFLAGS=-m64"
fi
local without_cgraph=1
GCC=`which gcc`
cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=$GCC
+used gcc=${GCC}
EOF
check_job ${PRODUCT_DIR}/MAKE.LOG make
check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
-cd ${PRODUCT_DIR};
+cd ${PRODUCT_DIR}
+
+if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then
+ du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.build.size
+ du -sk ${PRODUCT_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.bin.size
+fi
# remove sources and temporary files after building
-if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
+if [ ${REMOVE_SRC_TMP} = "TRUE" ] ; then
test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
fi
install_binary()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
# create a product directory
test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
# modify *.la files
-ldir=${PRODUCT_DIR}/lib
-cd $ldir
-
-for l in X `find $ldir -name "*.la"`; do
- if [ "$l" != "X" ] ; then
- pydir="" ; tcldir="" ; freetypedir="" ;
- if [ -n "${PYTHONROOT}" ] ; then pydir=${PYTHONROOT} ; fi
- if [ -n "${TCLHOME}" ] ; then tcldir=${TCLHOME} ; fi
- if [ -n "${FREETYPEDIR}" ] ; then freetypedir=${FREETYPEDIR} ; fi
-
- sed -e "s%[[:space:]]\(-L\)\?[^[:space:]]*${PRODUCT}% \1${PRODUCT_DIR}%g" \
- -e "s%[[:space:]]\(-L\)\?[^[:space:]]*Python[^[:space:]]*/lib% \1${pydir}/lib%g" \
- -e "s%[[:space:]]\(-L\)\?[^[:space:]]*tcltk[^[:space:]]*/lib% \1${tcldir}/lib%g" \
- -e "s%[[:space:]]\(-L\)\?[^[:space:]]*freetype[^[:space:]]*/lib\(/libfreetype\.la\)% \1${freetypedir}/lib\2%g" $l > $l"_"
- chmod -f --reference=$l $l"_"
- mv -f $l"_" $l
-
- lpath=`dirname $l`
- libdir=`grep -e "^libdir=.*" $l | sed -e "s/^libdir=[\'|\"]\(.*\)[\'|\"]/\1/g"`
- sed -e "s%${libdir}%${lpath}%g" $l > $l"_"
- chmod -f --reference=$l $l"_" ; mv -f $l"_" $l
-
- if [ "${EXPAT_ROOT}" != "" ] ; then
- expatdir=${EXPAT_ROOT}/lib
- sed -e "s%-L[^[:space:]]*expat[^[:space:]]*/lib%-L${expatdir}%g" \
- -e "s%[^[:space:]]*expat[^[:space:]]*/lib/libexpat.la%-lexpat%g" $l > $l"_"
- chmod -f --reference=$l $l"_"
- mv -f $l"_" $l
- fi
+pydir=""
+tcldir=""
+freetypedir=""
+expatdir=""
+if [ -n "${PYTHON_ROOT_DIR}" ] ; then pydir=${PYTHON_ROOT_DIR} ; fi
+if [ -n "${TCLHOME}" ] ; then tcldir=${TCLHOME} ; fi
+if [ -n "${FREETYPE_ROOT_DIR}" ] ; then freetypedir=${FREETYPE_ROOT_DIR} ; fi
+if [ "${EXPAT_ROOT_DIR}" != "" ] ; then expatdir=${EXPAT_ROOT_DIR}/lib ; fi
+
+for l in X `find ${PRODUCT_DIR}/lib -name "*.la"`; do
+ if [ "${l}" != "X" ] ; then
+ sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*${PRODUCT}% \1${PRODUCT_DIR}%g" ${l}
+ sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*Python[^[:space:]]*/lib% \1${pydir}/lib%g" ${l}
+ sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*tcltk[^[:space:]]*/lib% \1${tcldir}/lib%g" ${l}
+ sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*freetype[^[:space:]]*/lib\(/libfreetype\.la\)% \1${freetypedir}/lib\2%g" ${l}
+ sed -i "s%-L[^[:space:]]*expat[^[:space:]]*/lib%-L${expatdir}%g;s%[^[:space:]]*expat[^[:space:]]*/lib/libexpat.la%-lexpat%g" ${l}
+
+ lpath=`dirname ${l}`
+ libdir=`grep -e "^libdir=.*" ${l} | sed -e "s/^libdir=[\'|\"]\(.*\)[\'|\"]/\1/g"`
+ sed -i "s%${libdir}%${lpath}%g" ${l}
fi
done
# modify pkgconfig
-cd ${PRODUCT_DIR}/lib/pkgconfig
-for l in X `find . -name "*.pc"`; do
+for l in X `find ${PRODUCT_DIR}/lib/pkgconfig -name "*.pc"`; do
if [ "${l}" != "X" ] ; then
sed -i "s%^prefix=.*%prefix=${PRODUCT_DIR}%g" ${l}
fi
export INSTALL_PRODUCTS=$7;
shift
REMOVE_SRC_TMP=$8;
-test $# == 10 && shift && SINGLE_DIR=$9
-export PRODUCT="graphviz-${GRAPHVIZ_VERSION}"
+test $# = 10 && shift && SINGLE_DIR=$9
+export PRODUCT="graphviz-${VERSION_GRAPHVIZ}"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT}_SRC
source ./common.sh
-$PROCEDURE
+${PROCEDURE}
#
# HDF5 version
#
-HDF5_VERSION=1.8.10
+VERSION_HDF5=1.8.10
#
# Default API version for hdf5: 1.6
#
check_version()
{
-if [ -z "$HDF5HOME" ]; then
+if [ -z "${HDF5_ROOT_DIR}" ]; then
return 1
fi
-check_lib_version libhdf5.so.0.0.0 ${HDF5HOME}/lib
+check_lib_version libhdf5.so.0.0.0 ${HDF5_ROOT_DIR}/lib
if [ "$?" -ne "0" ]; then
return 1
fi
-check_lib_version libhdf5.settings ${HDF5HOME}/lib
+cfg_file=${HDF5_ROOT_DIR}/lib/libhdf5.settings
+if [ ! -e ${cfg_file} ] ; then
+ cfg_file=${HDF5_ROOT_DIR}/share/cmake/hdf5/libhdf5.settings
+fi
if [ "$?" -eq "0" ]; then
- ver=`grep "HDF5 Version:" ${HDF5HOME}/lib/libhdf5.settings | awk '{print $3}'`
- if [ "$ver" == "${HDF5_VERSION}" ]; then
+ ver=`grep "HDF5 Version:" ${cfg_file} | awk '{print $3}'`
+ if [ "${ver}" = "${VERSION_HDF5}" ]; then
return 0
fi
fi
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export HDF5HOME=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export HDF5_ROOT_DIR=\${HDF5HOME}
-export PATH=\${HDF5HOME}/bin:\$PATH
-export LD_LIBRARY_PATH=\${HDF5HOME}/lib:\${LD_LIBRARY_PATH}
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export HDF5_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PATH=\${HDF5_ROOT_DIR}/bin:\${PATH}
+export LD_LIBRARY_PATH=\${HDF5_ROOT_DIR}/lib:\${LD_LIBRARY_PATH}
##
EOF
(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
print_env_src()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
+#${DELIM} ${PRODUCT_TYPE}_src ${DELIM}
# nothing to do
##
EOF
install_source()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
# unpack
check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
+if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then
+ du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.src.size
+fi
+
# to generate environment scripts
try_preinstalled
}
# install sources
install_source
-# build sources
-HDF_CONFIGURE_OPTIONS="--disable-debug --enable-production --enable-threadsafe --with-pthread=/usr/include,/usr/lib"
+test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
-if test "$V16_COMPATIBILITY" == "yes" ; then
- HDF_CONFIGURE_OPTIONS="${HDF_CONFIGURE_OPTIONS} --with-default-api-version=v16"
+# create build directory
+export PRODUCT_BUILD_DIR=${PRODUCT_DIR}_build
+mkdir ${PRODUCT_BUILD_DIR}
+cd ${PRODUCT_BUILD_DIR}
+
+# build options
+CMAKE_OPTIONS=""
+CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_INSTALL_PREFIX=${PRODUCT_DIR}"
+CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_BUILD_TYPE=Release -DHDF5_ENABLE_THREADSAFE=ON -DBUILD_SHARED_LIBS=ON"
+CMAKE_OPTIONS="${CMAKE_OPTIONS} -DHDF5_BUILD_TOOLS=ON -DHDF5_BUILD_HL_LIB=ON -DHDF5_ENABLE_Z_LIB_SUPPORT=ON"
+if test "${V16_COMPATIBILITY}" = "yes" ; then
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DHDF5_USE_16_API_DEFAULT=ON"
fi
-if test `uname -m` == "x86_64" ; then
- HDF_CONFIGURE_OPTIONS="${HDF_CONFIGURE_OPTIONS} CFLAGS=-m64 CXXFLAGS=-m64"
-fi
+cat > ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
+cmake : `which cmake`
-cd ${PRODUCT_SRC_DIR}
-test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} $HDF_CONFIGURE_OPTIONS
-GCC=`which gcc`
+used settings:
+${CMAKE_OPTIONS}
+EOF
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG cmake ${PRODUCT_SRC_DIR} ${CMAKE_OPTIONS}
cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=$GCC
+used gcc=which gcc`
EOF
check_job ${PRODUCT_DIR}/MAKE.LOG make
check_job ${PRODUCT_DIR}/INSTALL.LOG make install
-cd ${PRODUCT_DIR};
+cd ${PRODUCT_DIR}
+
+if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then
+ du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.build_src.size
+ du -sk ${PRODUCT_BUILD_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.build_bld.size
+ du -sk ${PRODUCT_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.bin.size
+fi
# remove sources and temporary files after building
-if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
+if [ ${REMOVE_SRC_TMP} = "TRUE" ] ; then
test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
fi
install_binary()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
# create a product directory
test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
-### modify libhdf5.la file to correct direct path to hdf5 library
-### no need to do this for sources installation because 'make install' does it!
-cd ${PRODUCT_DIR}/lib
-sed -i "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libhdf5.la
-if [ -e libhdf5_hl.la ] ; then
- sed -i "s%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 ${PRODUCT_DIR}/lib/libhdf5.la\3%g;s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libhdf5_hl.la
-fi
-
# modify settings file
-cd ${PRODUCT_DIR}/lib
-sed -i "s%Installation point: .*%Installation point: ${PRODUCT_DIR}%g" libhdf5.settings
+cfg_file=${PRODUCT_DIR}/lib/libhdf5.settings
+if [ ! -e ${cfg_file} ] ; then cfg_file=${PRODUCT_DIR}/share/cmake/hdf5/libhdf5.settings ; fi
+if [ -e ${cfg_file} ] ; then
+ sed -i "s%Installation point: .*%Installation point: ${PRODUCT_DIR}%g" ${cfg_file}
+fi
# to generate environment script for sources
try_preinstalled
export INSTALL_PRODUCTS=$7;
shift
REMOVE_SRC_TMP=$8;
-test $# == 10 && shift && SINGLE_DIR=$9
-export PRODUCT="hdf5-${HDF5_VERSION}"
+test $# = 10 && shift && SINGLE_DIR=$9
+export PRODUCT="hdf5-${VERSION_HDF5}"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT}_SRC
source ./common.sh
-$PROCEDURE
+${PROCEDURE}
#
# homard version
#
-HOMARD_VERSION=10.6
+VERSION_HOMARD=10.7
#
# homard's bin directory (platform)
#
if test `uname -m` = "x86_64" ; then
- HOMARD_DIR=HOMARD_V${HOMARD_VERSION}_64
+ HOMARD_DIR=HOMARD_V${VERSION_HOMARD}_64
else
- HOMARD_DIR=HOMARD_V${HOMARD_VERSION}_32
+ HOMARD_DIR=HOMARD_V${VERSION_HOMARD}_32
fi
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export homard_HOME=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export PATH=\${homard_HOME}/${HOMARD_DIR}:\$PATH
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export HOMARDHOME=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PATH=\${HOMARDHOME_HOME}/${HOMARD_DIR}:\${PATH}
##
EOF
(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
print_env_src()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
+#${DELIM} ${PRODUCT_TYPE}_src ${DELIM}
# nothing to do
##
EOF
install_source_and_build()
{
install_binary
+
+if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then
+ echo "0" > ${INST_ROOT}/${PRODUCT_TYPE}.src.size
+ du -sk ${PRODUCT_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.bin.size
+ cp ${INST_ROOT}/${PRODUCT_TYPE}.bin.size ${INST_ROOT}/${PRODUCT_TYPE}.build.size
+fi
}
install_binary()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
# create a product directory
test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
REMOVE_SRC_TMP=$9;
shift
BIN_DIR=$9;
-test $# == 10 && shift && SINGLE_DIR=$9
-export PRODUCT="homard-${HOMARD_VERSION}"
+test $# = 10 && shift && SINGLE_DIR=$9
+export PRODUCT="homard-${VERSION_HOMARD}"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT}_SRC
source ./common.sh
-$PROCEDURE
+${PROCEDURE}