]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
Correct path to the libGL in ALL *.la files (not libTKOpenGl.la only)
authorvsr <vsr@opencascade.com>
Mon, 3 Dec 2012 08:06:07 +0000 (08:06 +0000)
committervsr <vsr@opencascade.com>
Mon, 3 Dec 2012 08:06:07 +0000 (08:06 +0000)
config_files/OCCT.sh

index 90229164120c505a32b46dd3a0d68c1c72a03a84..73ac34ac6793e13ae6dd9d99576c0f23ad29512e 100755 (executable)
@@ -179,11 +179,16 @@ if [ "$gllibdir" != "" ] ; 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%" \
-       libTKOpenGl.la > libTKOpenGl.la.new
-    mv -f libTKOpenGl.la.new libTKOpenGl.la
+    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
 
 #du -sk ${PRODUCT_SRC_DIR} > ${PRODUCT_DIR}/size.log