]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
RNV: Fix GL dependencies for the OCCT and netgen. SALOME_6
authorinv <inv@opencascade.com>
Thu, 11 Jul 2013 09:14:15 +0000 (09:14 +0000)
committerinv <inv@opencascade.com>
Thu, 11 Jul 2013 09:14:15 +0000 (09:14 +0000)
config_files/OCCT.sh
config_files/netgen.sh

index 73ac34ac6793e13ae6dd9d99576c0f23ad29512e..10161e470296393991310e72f0db41d9d72d2a4f 100755 (executable)
@@ -299,11 +299,15 @@ fi
        str_to_replace="-L${gllibdir} -lGL"
     fi
 
-        sed -e "s%-lGL\b%%g"                                                   \
-       -e "s%[^[:space:]\']*libGL.la[[:space:]]%%g"                             \
+    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%" \
-       libTKOpenGl.la > libTKOpenGl.la.new
-        mv -f libTKOpenGl.la.new libTKOpenGl.la
+       ${la_file} > ${la_file}.new && mv -f ${la_file}.new ${la_file}
+    done
 fi
 
 # to generate environment script for sources
index b33aed0ab363be2fb1b595219de38e6227457edf..3750f5b7169c3f0c31e8617d27bb555fea8a90ae 100755 (executable)
@@ -180,6 +180,26 @@ chmod a+x libnglib.la
 
 sed -i "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g;s%[[:space:]]-L[^[:space:]]*\(OCCT\|CAS\)[^[:space:]]*/lib\?% -L${CASROOT}/lib%g;s%[[:space:]][^[:space:]]*\(OCCT\|CAS\)[^[:space:]]*/lib/lib\?% ${CASROOT}/lib/lib%g" libnglib.la
 
+
+# fix libGL dependencies
+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
+
+        sed -e "s%-lGL\b%%g"                                                   \
+       -e "s%[^[:space:]\']*libGL.la[[:space:]]%%g"                             \
+       -e "s%^dependency_libs='\(.*\)%dependency_libs='${str_to_replace} \1%" \
+       libnglib.la > libnglib.la.new && mv -f libnglib.la.new libnglib.la
+fi
+
 # to generate environment script for sources
 try_preinstalled
 }