From 2732ac0e5457ab2a31347c68cfb4f52435a8d989 Mon Sep 17 00:00:00 2001 From: inv Date: Tue, 27 Nov 2012 08:23:12 +0000 Subject: [PATCH] minor modifications for ftgl and freetype - la files are optional --- config_files/freetype.sh | 5 +++-- config_files/ftgl.sh | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/config_files/freetype.sh b/config_files/freetype.sh index fa93eb3..2bc2072 100755 --- a/config_files/freetype.sh +++ b/config_files/freetype.sh @@ -120,8 +120,9 @@ test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR} ### modifing la files -cd ${PRODUCT_DIR}/lib -sed -i "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g;" libfreetype.la +if [ -f ${PRODUCT_DIR}/lib/libfreetype.la ] ; then + ( cd ${PRODUCT_DIR}/lib && sed -i "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g;" libfreetype.la ) +fi # modify pkgconfig if [ -d ${PRODUCT_DIR}/lib/pkgconfig ] ; then diff --git a/config_files/ftgl.sh b/config_files/ftgl.sh index 3c28f6f..9ff1ea5 100755 --- a/config_files/ftgl.sh +++ b/config_files/ftgl.sh @@ -118,9 +118,11 @@ test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} 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 -sed -i "s%\(.*\)\([[:space:]].*-L.*/freetype-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${FREETYPEDIR}/lib \3%g" libftgl.la +if [ -f ${PRODUCT_DIR}/lib/libftgl.la ] ; then + cd ${PRODUCT_DIR}/lib + sed -i "s%\(.*\)\([[:space:]].*libfreetype.la\)\(.*\)%\1 -lfreetype\3%g;s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libftgl.la + sed -i "s%\(.*\)\([[:space:]].*-L.*/freetype-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${FREETYPEDIR}/lib \3%g" libftgl.la +fi # modify pkgconfig if [ -d ${PRODUCT_DIR}/lib/pkgconfig ] ; then -- 2.39.2