]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
Minor changes
authorvsr <vsr@opencascade.com>
Tue, 16 Apr 2013 15:47:21 +0000 (15:47 +0000)
committervsr <vsr@opencascade.com>
Tue, 16 Apr 2013 15:47:21 +0000 (15:47 +0000)
config_files/OCCT.sh

index 5ddcde9933bceacec2ee95eaf79bc2d8f12a4d10..d93d1a484fb33a871b701354c0b75911eac9322b 100755 (executable)
@@ -87,11 +87,17 @@ source ${INSTALL_WORK}/$SHRC
 # unpack
 check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
 
-# apply patch (if there's any)
 local patch_sources=1
+local patch_config=1
+
+# apply patch for sources (if there's any)
 if [ "${patch_sources}" = "1" ] ; then
     ( test -f patches/${PRODUCT}.patch && cp patches/${PRODUCT}.patch ${PRODUCT_SRC_DIR} && cd ${PRODUCT_SRC_DIR} && patch -p1 < ${PRODUCT}.patch )
 fi
+# patch pb on automake 1.12 and newer with obsolete AM_C_PROTOTYPES macro
+if [ "${patch_config}" = "1" ] ; then
+    ( cd ${PRODUCT_SRC_DIR} && sed -i "s%AM_C_PROTOTYPES%#AM_C_PROTOTYPES%g" configure.ac )
+fi
 
 # to generate environment scripts
 try_preinstalled
@@ -106,13 +112,12 @@ install_source
 
 test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
 cd ${PRODUCT_SRC_DIR}
-export CASROOT=${PRODUCT_SRC_DIR}
 
 # build_configure
 
 echo " +++++++++++ build_configure"
 
-check_job ${PRODUCT_DIR}/BUILDCONFIGURE.LOG ./build_configure
+check_job ${PRODUCT_DIR}/BUILD_CONFIGURE.LOG ./build_configure
 
 # configure
 
@@ -153,7 +158,7 @@ fi
 # other options
 flags="$flags --disable-debug --enable-production"
 
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} $flags
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} ${flags}
 
 # make
 
@@ -163,37 +168,11 @@ GCC=`which gcc`
 cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
 used gcc=$GCC
 EOF
-check_job ${PRODUCT_DIR}/MAKE.LOG make -j4 install-strip
+check_job ${PRODUCT_DIR}/MAKE.LOG make -j4 install
 
 # fix libGL dependencies
-
 echo " +++++++++++ fix libGL dependencies"
-
-cd ${PRODUCT_DIR}/lib
-
-gllibdir="`where_gl_libs`"
-if [ "$gllibdir" != "" ] ; then
-    if [ -f ${gllibdir}/libGL.la ] ; then
-       libdir=`grep "libdir=" ${gllibdir}/libGL.la | sed -e "s%libdir='\(.*\)'%\1%"`
-       if [ "`ls $libdir/libGL.so* 2>/dev/null`" ] ; then
-           str_to_replace="${gllibdir}/libGL.la"
-       fi
-    fi
-    if [ "$str_to_replace" == "" ] ; then
-       str_to_replace="-L${gllibdir} -lGL"
-    fi
-
-    la_files=`find . -name "*.la"`
-    for la_file in ${la_files} XXX ; do
-       if [ "${la_file}" = "XXX" ] ; then continue; fi
-       grep -e "libGL.la" ${la_file} >& /dev/null || grep -e "-lGL\b" ${la_file} >& /dev/null &&
-       sed -e "s%-lGL\b%%g"                                                       \
-           -e "s%[^[:space:]']*libGL.la[[:space:]]%%g"                             \
-           -e "s%^dependency_libs='\(.*\)%dependency_libs='${str_to_replace} \1%" \
-           ${la_file} > ${la_file}.new && 
-       mv -f ${la_file}.new ${la_file}
-    done
-fi
+cd ${PRODUCT_DIR}/lib && fix_gl_libs
 
 #du -sk ${PRODUCT_SRC_DIR} > ${PRODUCT_DIR}/size.log
 cd ${PRODUCT_DIR};