]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
SALOME 6.5.0 preparation: update script for libxml2 (2.7.8)
authorvsr <vsr@opencascade.com>
Tue, 3 Apr 2012 20:06:39 +0000 (20:06 +0000)
committervsr <vsr@opencascade.com>
Tue, 3 Apr 2012 20:06:39 +0000 (20:06 +0000)
config_CentOS_5.5_64bit.xml
config_Debian_4.0.xml
config_Debian_4.0_64bit.xml
config_Debian_5.0_64bit.xml
config_Debian_6.0_64bit.xml
config_Mandriva_2008.0.xml
config_Mandriva_2008.0_64bit.xml
config_Red_Hat_Enterprise_WS_4_64bit.xml
config_Scientific_SL_5.1_64bit.xml
config_files/libxml2-2.7.8.sh [deleted file]
config_files/libxml2.sh [new file with mode: 0755]

index de1a13eec663334fbbeb8c2301cdc67c4a91a0fa..a406404ca878e3130ec01f51647779aae0e0d973 100755 (executable)
                     version="2.7.8" 
                    disable="false"
                    installdiskspace="14740,43504,81544"
-                   script="libxml2-2.7.8.sh"/>
+                   script="libxml2.sh"/>
     </product>
   </products>
   <dependencies>
index 2cefcb8e7829abffe878bde812cf52553221f718..70b9a6695ef412664ddc4bd458b03df5841c0ac5 100755 (executable)
                     version="2.7.8" 
                    disable="false"
                    installdiskspace="14740,43504,81544"
-                   script="libxml2-2.7.8.sh"/>
+                   script="libxml2.sh"/>
     </product>
   </products>
   <dependencies>
index 3674f4595a4180771839cfbbec6d971f7d60a867..8fda2100986a102232e028db9c4cb41017c0019d 100755 (executable)
                     version="2.7.8" 
                    disable="false"
                    installdiskspace="14740,43504,81544"
-                   script="libxml2-2.7.8.sh"/>
+                   script="libxml2.sh"/>
     </product>
   </products>
   <dependencies>
index f82c28b1a031e93bec7b932e695dcbefa4055c0c..ce5b588f19f3579323fa973b38f2cda90734cb69 100755 (executable)
                     version="2.7.8" 
                    disable="false"
                    installdiskspace="14740,43504,81544"
-                   script="libxml2-2.7.8.sh"/>
+                   script="libxml2.sh"/>
     </product>
   </products>
   <dependencies>
index 97ac4764f4b940a3c3e9107139e44f3dd7f1927b..152dcf72a4e9246e2419c58af0df53f7b0c84975 100755 (executable)
                     version="2.7.8" 
                    disable="false"
                    installdiskspace="14740,43504,81544"
-                   script="libxml2-2.7.8.sh"/>
+                   script="libxml2.sh"/>
     </product>
   </products>
   <dependencies>
index 91979b980f4cece355e1df362b8591058176b240..641b2f16e2182485ec8f4cc4fc62fb92d8c98ff8 100755 (executable)
                     version="2.7.8" 
                    disable="false"
                    installdiskspace="14740,43504,81544"
-                   script="libxml2-2.7.8.sh"/>
+                   script="libxml2.sh"/>
     </product>
   </products>
   <dependencies>
index 8090c0fb7a35c281f440ecd8c02fae70eed3245c..3be808787de3f795f7d807d9da52b6fb9530d564 100755 (executable)
                     version="2.7.8" 
                    disable="false"
                    installdiskspace="14740,43504,81544"
-                   script="libxml2-2.7.8.sh"/>
+                   script="libxml2.sh"/>
     </product>
   </products>
   <dependencies>
index 3f28e6df9ce16293abb77c12dfec7065179cdef8..bb046548643ce7b0e87ebd1688c25c26173807fb 100755 (executable)
                     version="2.7.8" 
                    disable="false"
                    installdiskspace="14740,43504,81544"
-                   script="libxml2-2.7.8.sh"/>
+                   script="libxml2.sh"/>
     </product>
   </products>
   <dependencies>
index d30a5cdf1ce2207f6ed6e99a09d8f33e22ebe5aa..1edb7746be5d8cb2cf17a9eaba9350efca7ead10 100755 (executable)
                     version="2.7.8" 
                    disable="false"
                    installdiskspace="14740,43504,81544"
-                   script="libxml2-2.7.8.sh"/>
+                   script="libxml2.sh"/>
     </product>
   </products>
   <dependencies>
diff --git a/config_files/libxml2-2.7.8.sh b/config_files/libxml2-2.7.8.sh
deleted file mode 100755 (executable)
index 4f478b4..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-#!/bin/bash -noprofile
-
-####################################################################################
-#  File      : libxml2-2.7.8.sh
-#  Created   : Thu Dec 18 12:01:00 2002
-#  Author    : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
-#  Project   : SALOME
-#  Module    : Installation Wizard
-#  Copyright : 2002-2008 CEA
-#
-#  This script is the part of the SALOME installation procedure.
-#
-####################################################################################
-
-#
-# libxml version
-#
-LIBXML_VERSION=2.7.8
-
-check_version(){
-# No way to check version!
-return 0
-}
-
-print_env_bin()
-{
-cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
-#$DELIM ${PRODUCT_TYPE} $DELIM 
-export LIBXML_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export PATH=\${LIBXML_DIR}/bin:\${PATH}
-export LD_LIBRARY_PATH=\${LIBXML_DIR}/lib:\${LD_LIBRARY_PATH}
-##
-EOF
-(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
-make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
-}
-
-print_env_src()
-{
-cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
-# nothing to do
-##
-EOF
-(test -w ${PRODUCT_SRC_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_SRC_DIR})
-make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
-}
-
-try_preinstalled(){
-try_existing ${PRODUCT_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-try_existing ${PRODUCT_SRC_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-return $?
-}
-
-install_source()
-{
-make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
-
-check_jb tar xfz ${SRC_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
-
-if [ -f patches/libxml2_2.7.8.patch ] ; then
-    cp patches/libxml2_2.7.8.patch ${PRODUCT_SRC_DIR}
-    ( cd ${PRODUCT_SRC_DIR}; patch < libxml2_2.7.8.patch )
-fi
-
-# to generate environment scripts
-try_preinstalled
-}
-
-install_source_and_build()
-{
-# install sources
-install_source
-
-# build sources
-
-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} 
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=$GCC
-EOF
-check_job ${PRODUCT_DIR}/MAKE.LOG make
-check_job ${PRODUCT_DIR}/INSTALL.LOG make install 
-
-cd ${PRODUCT_DIR};
-
-# remove sources and temporary files after building
-if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
-    test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
-fi
-
-# to generate environment scripts
-try_preinstalled
-}
-
-install_binary()
-{
-make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-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}
-
-cd ${PRODUCT_DIR}/lib
-export libdir=`grep -e "libdir=.*" libxml2.la | sed -e "s/libdir=[\'|\"]\(.*\)[\'|\"]/\1/g"`
-cd ..
-lnew="_new"
-for l in `find -type f -name *.la`; do
-sed -e "s%${libdir}%${PRODUCT_DIR}/lib%g" $l > $l$lnew
-mv $l$lnew $l
-chmod 755 $l
-done
-
-cd ${PRODUCT_DIR}/lib/pkgconfig
-for l in X `find . -name "*.pc"`; do
-    if [ "${l}" != "X" ] ; then
-       sed -e "s%prefix=.*%prefix=${PRODUCT_DIR}%g" ${l} > ${l}_
-       chmod -f --reference=${l} ${l}_ ; mv -f ${l}_ ${l}
-    fi
-done
-
-# to generate environment scripts
-try_preinstalled
-}
-
-export PROCEDURE=$1;
-export INSTALL_WORK=$2;
-export SOURCE_DIR=$3;
-export INST_ROOT=$4;
-export PRODUCT_SEQUENCE=$5;
-export PRODUCT_TYPE=$6;
-export INSTALL_PRODUCTS=$7;
-SRC_DIR=$8;
-shift
-REMOVE_SRC_TMP=$8;
-test $# == 10 && shift && SINGLE_DIR=$9
-export PRODUCT="libxml2-${LIBXML_VERSION}"
-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
diff --git a/config_files/libxml2.sh b/config_files/libxml2.sh
new file mode 100755 (executable)
index 0000000..e70c782
--- /dev/null
@@ -0,0 +1,147 @@
+#!/bin/bash -noprofile
+
+####################################################################################
+#  File      : libxml2.sh
+#  Created   : Thu Dec 18 12:01:00 2002
+#  Author    : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
+#  Project   : SALOME
+#  Module    : Installation Wizard
+#  Copyright : 2002-2012 CEA
+#
+#  This script is the part of the SALOME installation procedure.
+#
+####################################################################################
+
+#
+# libxml version
+#
+LIBXML_VERSION=2.7.8
+
+check_version(){
+# No way to check version!
+return 0
+}
+
+print_env_bin()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM 
+export LIBXML_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PATH=\${LIBXML_DIR}/bin:\${PATH}
+export LD_LIBRARY_PATH=\${LIBXML_DIR}/lib:\${LD_LIBRARY_PATH}
+##
+EOF
+(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
+}
+
+print_env_src()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
+#$DELIM ${PRODUCT_TYPE}_src $DELIM
+# nothing to do
+##
+EOF
+(test -w ${PRODUCT_SRC_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_SRC_DIR})
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
+}
+
+try_preinstalled(){
+try_existing ${PRODUCT_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+try_existing ${PRODUCT_SRC_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+return $?
+}
+
+install_source()
+{
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+source ${INSTALL_WORK}/$SHRC
+
+check_jb tar xfz ${SRC_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
+
+# patch problem with crash on 64bit platform; required at least for v2.7.8
+if [ -f patches/libxml2_2.7.8.patch ] ; then
+    cp patches/libxml2_2.7.8.patch ${PRODUCT_SRC_DIR}
+    ( cd ${PRODUCT_SRC_DIR}; patch < libxml2_2.7.8.patch )
+fi
+
+# to generate environment scripts
+try_preinstalled
+}
+
+install_source_and_build()
+{
+# install sources
+install_source
+
+# build sources
+
+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} 
+GCC=`which gcc`
+cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
+used gcc=$GCC
+EOF
+check_job ${PRODUCT_DIR}/MAKE.LOG make
+check_job ${PRODUCT_DIR}/INSTALL.LOG make install 
+
+cd ${PRODUCT_DIR};
+
+# remove sources and temporary files after building
+if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
+    test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
+fi
+
+# to generate environment scripts
+try_preinstalled
+}
+
+install_binary()
+{
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+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
+cd ${PRODUCT_DIR}/lib
+for l in X `find -type f -name *.la`; do
+    if [ "${l}" != "X" ] ; then
+        sed -i "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g;" ${l}
+    fis
+done
+
+# modify pkgconfig
+cd ${PRODUCT_DIR}/lib/pkgconfig
+for l in X `find . -name "*.pc"`; do
+    if [ "${l}" != "X" ] ; then
+       sed -i "s%prefix=.*%prefix=${PRODUCT_DIR}%g" ${l}
+    fi
+done
+
+# to generate environment scripts
+try_preinstalled
+}
+
+export PROCEDURE=$1;
+export INSTALL_WORK=$2;
+export SOURCE_DIR=$3;
+export INST_ROOT=$4;
+export PRODUCT_SEQUENCE=$5;
+export PRODUCT_TYPE=$6;
+export INSTALL_PRODUCTS=$7;
+SRC_DIR=$8;
+shift
+REMOVE_SRC_TMP=$8;
+test $# == 10 && shift && SINGLE_DIR=$9
+export PRODUCT="libxml2-${LIBXML_VERSION}"
+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