+sed -e 's%\(.*\)\([[:space:]].*libfreetype.la\)\(.*\)%\1 -lfreetype\3%g' \
+ -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libftgl.la > libftgl.la.new
+mv -f libftgl.la.new libftgl.la
+
+tmp=""
+if [ -n "${FREETYPEDIR}" ]; then
+ tmp="-L${FREETYPEDIR}/lib"
+fi
+sed -e "s%\(.*\)\([[:space:]].*-L.*/freetype-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libftgl.la > libftgl.la.new
+mv -f libftgl.la.new libftgl.la