winlin

fix bug of freetype2 build for ffmpeg, depends on pkg-config

@@ -70,6 +70,7 @@ else @@ -70,6 +70,7 @@ else
70 fi 70 fi
71 71
72 # freetype-2.4.0 72 # freetype-2.4.0
  73 +# remark: we must ensure the pkg-config tool installed.
73 if [[ -f ${ff_release_dir}/lib/libfreetype.a ]]; then 74 if [[ -f ${ff_release_dir}/lib/libfreetype.a ]]; then
74 echo "libfreetype is ok" 75 echo "libfreetype is ok"
75 else 76 else
@@ -102,6 +102,14 @@ function Ubuntu_prepare() @@ -102,6 +102,14 @@ function Ubuntu_prepare()
102 sudo apt-get install -y --force-yes zlib1g-dev; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi 102 sudo apt-get install -y --force-yes zlib1g-dev; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
103 echo "install zlib1g-dev success" 103 echo "install zlib1g-dev success"
104 fi 104 fi
  105 +
  106 + # for freetype2
  107 + pkg-config --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
  108 + echo "install pkg-config"
  109 + require_sudoer "sudo apt-get install -y --force-yes pkg-config"
  110 + sudo apt-get install -y --force-yes pkg-config; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
  111 + echo "install pkg-config success"
  112 + fi
105 fi 113 fi
106 114
107 # for arm, install the cross build tool chain. 115 # for arm, install the cross build tool chain.
@@ -202,6 +210,14 @@ function Centos_prepare() @@ -202,6 +210,14 @@ function Centos_prepare()
202 sudo yum install -y zlib-devel; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi 210 sudo yum install -y zlib-devel; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
203 echo "install zlib-devel success" 211 echo "install zlib-devel success"
204 fi 212 fi
  213 +
  214 + # for freetype2
  215 + pkg-config --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
  216 + echo "install pkg-config"
  217 + require_sudoer "sudo yum install -y pkg-config"
  218 + sudo yum install -y pkg-config; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
  219 + echo "install pkg-config success"
  220 + fi
205 fi 221 fi
206 222
207 # for arm, install the cross build tool chain. 223 # for arm, install the cross build tool chain.