From: inv Date: Thu, 24 May 2012 14:03:33 +0000 (+0000) Subject: SALOME 6.5.0 preparation: fix problems with la files X-Git-Tag: V6_5_0rc1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e077f7e7e5afb22efed59bb4fd999410889190ce;p=tools%2Finstall.git SALOME 6.5.0 preparation: fix problems with la files --- diff --git a/config_files/OCCT.sh b/config_files/OCCT.sh index 4034d9b..fa32276 100755 --- a/config_files/OCCT.sh +++ b/config_files/OCCT.sh @@ -245,8 +245,8 @@ for l in X `find . -name "*.la"`; do fi chmod a+x $l if [ -n "${freetypedir}" ] && [ -d "${freetypedir}" ] ; then - sed -e "s%\(.*\)\([[:space:]].*-L.*/freetype-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freetypedir}/lib \3%g" \ - -e 's%\(.*\)\([[:space:]].*libfreetype.la\)\(.*\)%\1 -lfreetype \3%g' $l > _$l + sed -e "s%-L[^[:space:]]*/freetype[^[:space:]]*/lib%-L${freetypedir}/lib%g" \ + -e "s%[^[:space:]]*/freetype[^[:space:]]*/lib/libfreetype.la%-lfreetype%g" $l > _$l mv -f _$l $l fi chmod a+x $l diff --git a/config_files/freetype.sh b/config_files/freetype.sh index b852bc5..b8eb11b 100755 --- a/config_files/freetype.sh +++ b/config_files/freetype.sh @@ -123,6 +123,16 @@ check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR} cd ${PRODUCT_DIR}/lib sed -i "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g;" libfreetype.la +# modify pkgconfig +if [ -d ${PRODUCT_DIR}/lib/pkgconfig ] ; then + 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 +fi + # to generate environment script for sources try_preinstalled } diff --git a/config_files/ftgl.sh b/config_files/ftgl.sh index fe32a74..5f6164a 100755 --- a/config_files/ftgl.sh +++ b/config_files/ftgl.sh @@ -120,12 +120,17 @@ check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR} ### modifing la files cd ${PRODUCT_DIR}/lib sed -i "s%\(.*\)\([[:space:]].*libfreetype.la\)\(.*\)%\1 -lfreetype\3%g;s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libftgl.la - -tmp="" -if [ -n "${FREETYPEDIR}" ]; then - tmp="-L${FREETYPEDIR}/lib" +sed -i "s%\(.*\)\([[:space:]].*-L.*/freetype-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${FREETYPEDIR}/lib \3%g" libftgl.la + +# modify pkgconfig +if [ -d ${PRODUCT_DIR}/lib/pkgconfig ] ; then + 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;s%-L[^[:space:]]*/freetype[^[:space:]]*/lib%-L${FREETYPEDIR}/lib%g;s%-I[^[:space:]]*/freetype[^[:space:]]*/include%-I${FREETYPEDIR}/include%g" ${l} + fi + done fi -sed -i "s%\(.*\)\([[:space:]].*-L.*/freetype-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libftgl.la # to generate environment script for sources try_preinstalled diff --git a/config_files/hdf5.sh b/config_files/hdf5.sh index 02d190a..88b8ad0 100755 --- a/config_files/hdf5.sh +++ b/config_files/hdf5.sh @@ -128,11 +128,9 @@ 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 -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libhdf5.la > libhdf5.la.new -mv -f libhdf5.la.new libhdf5.la +sed -i "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libhdf5.la if [ -e libhdf5_hl.la ] ; then - sed -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libhdf5_hl.la > libhdf5_hl.la.new - mv -f libhdf5_hl.la.new libhdf5_hl.la + 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 # to generate environment script for sources diff --git a/config_files/netgen.sh b/config_files/netgen.sh index b24b81a..25f683f 100755 --- a/config_files/netgen.sh +++ b/config_files/netgen.sh @@ -168,12 +168,7 @@ if [ -n "${gl2psdir}" ] && [ -d "${gl2psdir}" ] ; then fi chmod a+x libnglib.la if [ -n "${freeimagedir}" ] && [ -d "${freeimagedir}" ] ; then - sed -e "s%\(.*\)\([[:space:]].*-L.*/freeimage-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freeimagedir}/lib \3%g" libnglib.la > _libnglib.la - mv -f _libnglib.la libnglib.la -fi -chmod a+x libnglib.la -if [ -n "${freeimagedir}" ] && [ -d "${freeimagedir}" ] ; then - sed -e "s%\(.*\)\([[:space:]].*-L.*/freeimage-[0-9]\.[0-9][0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freeimagedir}/lib \3%g" libnglib.la > _libnglib.la + sed -e "s%\(.*\)\([[:space:]].*-L.*/freeimage[^[:space:]]*/lib[[:space:]]\)\(.*\)%\1 -L${freeimagedir}/lib \3%g" libnglib.la > _libnglib.la mv -f _libnglib.la libnglib.la fi chmod a+x libnglib.la