从Java到嵌入式(三)——交叉编译GTK

http://johnson-lee.iteye.com/blog/967950

由于需要在Angstrom Linux上开发GUI应用,本想移植QT,但唯恐太麻烦,而且开发板厂商的技术支持太差,所以选择了GTK。首先Google了一下,有人对GTK的评价是依赖的第三方库比较多,配置起来比较麻烦,刚开始还不以为然,上GTK官网看了一下,主要依赖GLib, GdkPixbuf, Pango和ATK,于是乎,开始动手交叉编译。

  交叉编译环境:
   * Ubuntu 9.04
   * arm-none-linux-gnueabi-gcc version 4.4.3

  先Google了一下别人交叉编译GTK的步骤,发现大多数都是基于DirectFB的GTK交叉编译,基于DirectFB是什么也没搞清楚,就照猫画虎着开始配置环境变量,手工编译起来。

  首先从GTK官网FTP上下载最新版的gtk+-3.0.3.tar.bz2,解压后,阅读INSTALL文档,其中有说明编译GTK所需要的库,然后从相应的官网上download,开始照着依赖顺序编译起来,但对着网上别人的编译步骤,发现很多人的编译顺序都不一样,而且依赖的包也大同小异,因为始终没有弄清楚这些个库之间的关系,哪些个库是要交叉编译的,哪些个库是要在本地编译的,在Ubuntu上折腾了整整一周,未果,而且我在两台机器上编译的时候,报的错居然不一样,依赖的包也不一样,这下就傻眼了,一台机器是Ubuntu 9.04,另一台机器是Ubuntu 10.4,一周下来,每天都在Google编译的Error信息,未果。

  面对着Error,几乎快要崩溃的时候,忽然想起了曾经为了安装IEEE1394驱动,在RedHat9上升级内核的经历。当时在Redhat9上直接安装libusb, libraw1394和libdc1394死活编译不过,后来Google到一本英文文档--"Libdc1394-HOWTO",根据文档的说明,似乎需要升级内核才行,于是折腾了整整一个月升级内核,未果。几乎崩溃时,改变思路,换个Linux版本--Fedora9,因为当时买的友善的开发板,他们的手册上的例程是基于Fedora9操作的,本来之前是打算选择用Fedora9来做开发环境的,但是用习惯了Redhat后,改用Fedora很不习惯,于是放弃了它,坚决要用Redhat,但还是以失败而告终,结果勉强用Fedora安装试试,出人意料的是,一次性编译通过!Oh, My God!那我前面一个月的时间岂不是浪费了,不过话又说回来,那一个月,虽然在Redhat上是以失败告终,但也不枉此经历。

  想到这,决定再次拿Fedora试试,于是,在Ubuntu上安装了个VMware,创建个Fedora9虚拟机。之所以看好Fedora的原因在于它安装程序中已经内置了开发所必须的工具,不像Ubuntu Desktop版,很多工具都需要sudo apt-get install或者手工来安装,这样会导致整个编译环境受到污染,可能直接影响到编译结果。Fedora装机就已经自带了这些工具,不用自己安装。这只是一方面的原因,再次是比较一下三台机器之间的编译过程是否一样,因为前面两台Ubuntu机器编译过程中报的错都不一样,依赖的包也有差异,所以根本不知道哪个是正常的;再者,因为这两台Ubuntu机器都经历过sudo apt-get install和手工编译安装过些库到/usr/local下,所以为了避免这些外界环境的影响,选择用一个全新的环境来编译。

  前面在Ubuntu上经历了五天的折腾,写了个shell脚本来实现自动编译,正好把这脚本拿到Fedora用,省得手工tar解压,./configure配置,还要make && make install,很是麻烦,用shell可以一次搞定,这样还能再次学习shell。整个shell脚本差不多600多行,Fedora上一运行,结果Glib编译不过,报错找不到dbus库,好吧,我就先安装dbus,再次编译GLib时,报什么找不到glib-compile-schemas和glib-genmarshal。Google了一下,有人说先本地安装一个glib-devl版本,也就是先在本地安装GLib,于是单独./configure --prefix=/usr/local && make && make install来安装GLib,再次编译GLib,通过了!整个编译过程中,要是遇到类似 Cannot execute test program 这种错的,基本上都是通过cache文件来解决的,再次就是先在本地安装一下,再交叉编译,不过整个编译下来,只有zlib,GLib和libxml2需要先在本地安装,这样交叉编译才能通过。

  最后编译到GTK时,以为可以通过了,结果报错 Cannot find libX11,网上有很多人是编译的GTK+DirectFB版本,而我是GTK+X11版本,所以很多地方不同。看到这个错,我下意识的想到,差libX11库,Google了关天,发现有两种X11,一个是libX11-1.4.x,另一种是X11Rx,我都不知道到底要装哪个库,也不清楚它们之前有什么关系,后来一篇关键性的文章使得我成功编译GTK。http://git.exherbo.org/summer/packages/x11-libs/gtk+/index.html这个网站很不错,在这里可以查看到哪个库编译和运行时的依赖,以及下载地址,后来终于弄明白X11是一个库的集合,它包含了许多其它的libX库。

  根据上面的GTK的依赖关系,重新改写了shell,顺藤摸瓜,终于理清了依赖关系。后面又加了十几个X11的库,我想这下GTK应该可以编过了吧,结果还是找不到libX11,无语了,难道这些后面加上的x11-libs还是在本地安装不成,于是全部在本地安装到/usr/local,再次编译还是不过。后面在本地安装了libxml2才终于没有报Cannot find libX11,结果报什么Cannot link to Pango,分析config.log,报的错误信息是关于pango和cairo的,我明明成功编译过了Pango,和Cairo而且它们的动态库都在,怎么链接不到呢?根据这一周下来摸索的经验,怀疑是LDFLAGS或LD_LIBRARY_PATH环境变量的问题,Google了一下,发现有人说在编译pango的时候要使用cache文件,内容如下:
  have_cairo=true
  have_cairo_png=true
  have_cairo_freetype=true
于是加上cache文件,然后把usr/local下安装的库全部删掉,整个重新编译一下,看到Make进入gtk+-3.0.3目录时,终于感到全身轻松了。

  附上编译脚本,与大家分享。其中可能有多余的库(纯属猜测)

Shell代码   收藏代码
  1. #!/bin/sh  
  2.   
  3. #-------------------------------------------------------------------------------  
  4. # check arguments  
  5. #-------------------------------------------------------------------------------  
  6. case $1 in  
  7. --help|-help|help|\?)  
  8. echo Usage: `basename $0` [prefix]  
  9. cat << "EOF"  
  10.   
  11.     prefix - install path  
  12.   
  13. EOF  
  14. exit  
  15. ;;  
  16. esac  
  17.   
  18. #-------------------------------------------------------------------------------  
  19. # check linux issue  
  20. #-------------------------------------------------------------------------------  
  21. case "`head -1 /etc/issue | awk '{ print $1 }'`" in  
  22. Ubuntu)  
  23. INSTALL="sudo apt-get install"  
  24. ;;  
  25. Fedora)  
  26. INSTALL="sudo yum install"  
  27. ;;  
  28. *)  
  29. echo "Unrecoginzed issue"; exit;  
  30. ;;  
  31. esac  
  32.   
  33. #-------------------------------------------------------------------------------  
  34. # install automake  
  35. #-------------------------------------------------------------------------------  
  36. if [ -z "`command -v automake`" ]; then  
  37. $INSTALL automake  
  38. fi  
  39.   
  40. #-------------------------------------------------------------------------------  
  41. # install autoconf  
  42. #-------------------------------------------------------------------------------  
  43. if [ -z "`command -v autoconf`" ]; then  
  44. $INSTALL autoconf  
  45. fi  
  46.   
  47. #-------------------------------------------------------------------------------  
  48. # install autoheader  
  49. #-------------------------------------------------------------------------------  
  50. if [ -z "`command -v autoheader`" ]; then  
  51. $INSTALL autoheader  
  52. fi  
  53.   
  54. #-------------------------------------------------------------------------------  
  55. # install aclocal  
  56. #-------------------------------------------------------------------------------  
  57. if [ -z "`command -v aclocal`" ]; then  
  58. $INSTALL aclocal  
  59. fi  
  60.   
  61. #-------------------------------------------------------------------------------  
  62. # install libtoolize  
  63. #-------------------------------------------------------------------------------  
  64. if [ -z "`command -v libtoolize`" ]; then  
  65. $INSTALL libtoolize  
  66. fi  
  67.   
  68. #-------------------------------------------------------------------------------  
  69. # install pkg-config  
  70. #-------------------------------------------------------------------------------  
  71. if [ -z "`command -v pkg-config`" ]; then  
  72. $INSTALL pkg-config  
  73. fi  
  74.   
  75. #-------------------------------------------------------------------------------  
  76. # install GNU make  
  77. #-------------------------------------------------------------------------------  
  78. if [ -z "`command -v make`" ]; then  
  79. $INSTALL make  
  80. fi  
  81.   
  82. #-------------------------------------------------------------------------------  
  83. # set compile environment variables  
  84. #-------------------------------------------------------------------------------  
  85. PREFIX=/usr/local  
  86.   
  87. export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig  
  88.   
  89. #-------------------------------------------------------------------------------  
  90. # install local zlib  
  91. #-------------------------------------------------------------------------------  
  92. if [ ! -e $PKG_CONFIG_PATH/zlib.pc ]; then  
  93. echo "installing local zlib......"  
  94. if [ ! -d zlib-1.2.5 ]; then  
  95. if [ ! -e zlib-1.2.5.tar.bz2 ]; then  
  96. wget http://www.zlib.net/zlib-1.2.5.tar.bz2  
  97. fi  
  98. tar -xjf zlib-1.2.5.tar.bz2  
  99. fi  
  100. cd zlib-1.2.5 && ./configure --prefix=$PREFIX && make && make install && cd .. || exit  
  101. fi  
  102.   
  103. #-------------------------------------------------------------------------------  
  104. # install local glib  
  105. #-------------------------------------------------------------------------------  
  106. if [ ! -e $PKG_CONFIG_PATH/glib-2.0.pc ]; then  
  107. echo "installing local glib......"  
  108. if [ ! -d glib-2.28.3 ]; then  
  109. if [ ! -e glib-2.28.3.tar.bz2 ]; then  
  110. wget ftp://ftp.gtk.org/pub/glib/2.28/glib-2.28.3.tar.bz2  
  111. fi  
  112. tar -xjf glib-2.28.3.tar.bz2  
  113. fi  
  114. cd glib-2.28.3 && ./configure --prefix=$PREFIX && make && make install && cd .. || exit  
  115. fi  
  116.   
  117. #-------------------------------------------------------------------------------  
  118. # install local libxml2  
  119. #-------------------------------------------------------------------------------  
  120. if [ ! -e $PKG_CONFIG_PATH/libxml-2.0.pc ]; then  
  121. echo "installing local libxml2......"  
  122. if [ ! -d libxml2-2.7.8 ]; then  
  123. if [ ! -e libxml2-2.7.8.tar.gz  ]; then  
  124. wget ftp://www.xmlsoft.org/libxml2/libxml2-2.7.8.tar.gz   
  125. fi  
  126. tar -xzf libxml2-2.7.8.tar.gz   
  127. fi  
  128. cd libxml2-2.7.8 && ./configure --prefix=$PREFIX && make && make install && cd .. || exit  
  129. fi  
  130.   
  131. #-------------------------------------------------------------------------------  
  132. # set xcompile environment variables  
  133. #-------------------------------------------------------------------------------  
  134. if [ ! -z $1 ]; then  
  135.   PREFIX=$1  
  136. else  
  137.   PREFIX=$PWD/gtk+/arm  
  138. fi  
  139.   
  140. export PATH=$PATH:$PREFIX/bin  
  141. export HOST=arm-linux  
  142. export BUILD=i686-pc-linux  
  143. export CC=arm-linux-gcc  
  144. export LD=arm-linux-ld  
  145. export AR=arm-linux-ar  
  146. export AS=arm-linux-as  
  147. export NM=arm-linux-nm  
  148. export CXX=arm-linux-g++  
  149. export RANLIB=arm-linux-ranlib  
  150. export LD_LIBRARY_PATH=$PREFIX/lib  
  151. export LD_RUN_PATH=$LD_LIBRARY_PATH  
  152. export CFLAGS="-g -I$PREFIX/include"  
  153. export CPPFLAGS=-I$PREFIX/include  
  154. export LDFLAGS="-L$LD_LIBRARY_PATH -Wl,-rpath -Wl,$LD_LIBRARY_PATH"  
  155. export PKG_CONFIG_PATH=$LD_LIBRARY_PATH/pkgconfig  
  156.   
  157. #-------------------------------------------------------------------------------  
  158. # Install tslib  
  159. #-------------------------------------------------------------------------------  
  160. if [ ! -e $PKG_CONFIG_PATH/tslib-0.0.pc ]; then  
  161. echo "installing tslib......"  
  162. if [ ! -d tslib ]; then  
  163. if [ ! -e tslib-1.4.tar.gz ]; then  
  164. wget http://tslib.googlecode.com/files/tslib-1.4.tar.gz  
  165. fi  
  166. tar -xzf tslib-1.4.tar.gz  
  167. fi  
  168. cd tslib  
  169. ./autogen.sh  
  170. cat > $HOST.cache << "EOF"  
  171. ac_cv_func_malloc_0_nonnull=yes  
  172. EOF  
  173. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX --cache-file=$HOST.cache && make && make install || exit  
  174. cd ..  
  175. rm -rf tslib  
  176. fi  
  177.   
  178. #-------------------------------------------------------------------------------  
  179. # install zlib  
  180. #-------------------------------------------------------------------------------  
  181. if [ ! -e $PKG_CONFIG_PATH/zlib.pc ]; then  
  182. echo "installing zlib......"  
  183. if [ ! -d zlib-1.2.5 ]; then  
  184. if [ ! -e zlib-1.2.5.tar.bz2 ]; then  
  185. wget http://www.zlib.net/zlib-1.2.5.tar.bz2  
  186. fi  
  187. tar -xjf zlib-1.2.5.tar.bz2  
  188. fi  
  189. cd zlib-1.2.5  
  190. ./configure --prefix=$PREFIX && make && make install || exit  
  191. cd ..  
  192. rm -rf zlib-1.2.5  
  193. fi  
  194.   
  195. #-------------------------------------------------------------------------------  
  196. # install libxml2  
  197. #   
  198. # dependencies: {  
  199. #   sys-libs/zlib,  
  200. #   sys-devel/libtool,  
  201. #   sys-devel/autoconf,  
  202. #   sys-devel/automake  
  203. # }  
  204. #-------------------------------------------------------------------------------  
  205. if [ ! -e $PKG_CONFIG_PATH/libxml-2.0.pc ]; then  
  206. echo "installing libxml2......"  
  207. if [ ! -d libxml2-2.7.8 ]; then  
  208. if [ ! -e libxml2-2.7.8.tar.gz  ]; then  
  209. wget ftp://www.xmlsoft.org/libxml2/libxml2-2.7.8.tar.gz   
  210. fi  
  211. tar -xzf libxml2-2.7.8.tar.gz   
  212. fi  
  213. cd libxml2-2.7.8  
  214. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX && make && make install || exit  
  215. cd ..  
  216. rm -rf libxml2-2.7.8  
  217. fi  
  218.   
  219. #-------------------------------------------------------------------------------  
  220. # install expat  
  221. #-------------------------------------------------------------------------------  
  222. if [ ! -e $PREFIX/lib/libexpat.so ]; then  
  223. echo "installing expat......"  
  224. if [ ! -d expat-2.0.1 ]; then  
  225. if [ ! -e expat-2.0.1.tar.gz ]; then  
  226. wget http://nchc.dl.sourceforge.net/project/expat/expat/2.0.1/expat-2.0.1.tar.gz  
  227. fi  
  228. tar -xzf expat-2.0.1.tar.gz  
  229. fi  
  230. cd expat-2.0.1  
  231. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX && make && make install || exit  
  232. cd ..  
  233. rm -rf expat-2.0.1  
  234. fi  
  235.   
  236. #-------------------------------------------------------------------------------  
  237. # install dbus  
  238. #   
  239. # dependencies: {  
  240. #   app-text/docbook-xml-dtd,  
  241. #   app-text/xmlto,  
  242. #   sys-devel/gettext,  
  243. #   dev-util/pkg-config,  
  244. #   dev-libs/expat,  
  245. #   group/messagebus,  
  246. #   user/messagebus,  
  247. #   group/plugdev,  
  248. # }  
  249. #-------------------------------------------------------------------------------  
  250. if [ ! -e $PKG_CONFIG_PATH/dbus-1.pc ]; then  
  251. echo "installing dbus......"  
  252. if [ ! -d dbus-1.4.6 ]; then  
  253. if [ ! -e dbus-1.4.6.tar.gz ]; then  
  254. wget http://dbus.freedesktop.org/releases/dbus/dbus-1.4.6.tar.gz  
  255. fi  
  256. tar -xzf dbus-1.4.6.tar.gz  
  257. fi  
  258. cd dbus-1.4.6  
  259. cat > $HOST.cache << "EOF"  
  260. ac_cv_have_abstract_sockets=yes  
  261. EOF  
  262. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX \  
  263. --cache-file=$HOST.cache --without-x && make && make install || exit  
  264. cd ..  
  265. rm -rf dbus-1.4.6  
  266. fi  
  267.   
  268. #-------------------------------------------------------------------------------  
  269. # install glib  
  270. #   
  271. # dependencies: {  
  272. #   app-doc/gtk-doc-autotools,  
  273. #   sys-devel/gettext,  
  274. #   dev-util/pkg-config,  
  275. #   dev-doc/gtk-doc,  
  276. #   sys-apps/dbus  
  277. # }  
  278. #-------------------------------------------------------------------------------  
  279. if [ ! -e $PKG_CONFIG_PATH/glib-2.0.pc ]; then  
  280. echo "installing GLib......"  
  281. if [ ! -d glib-2.28.3 ]; then  
  282. if [ ! -e glib-2.28.3.tar.bz2 ]; then  
  283. wget ftp://ftp.gtk.org/pub/glib/2.28/glib-2.28.3.tar.bz2  
  284. fi  
  285. tar -xjf glib-2.28.3.tar.bz2  
  286. fi  
  287. cd glib-2.28.3  
  288. cat > $HOST.cache << "EOF"  
  289. glib_cv_stack_grows=no  
  290. glib_cv_has__inline=yes  
  291. glib_cv_working_bcopy=no  
  292. glib_cv_uscore=no  
  293. ac_cv_func_posix_getpwuid_r=yes  
  294. ac_cv_func_posix_getgrgid_r=yes  
  295. EOF  
  296. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX --cache-file=$HOST.cache && make && make install || exit  
  297. cd ..  
  298. rm -rf glib-2.28.3  
  299. fi  
  300.   
  301. #-------------------------------------------------------------------------------  
  302. # install atk  
  303. #-------------------------------------------------------------------------------  
  304. if [ ! -e $PKG_CONFIG_PATH/atk.pc ]; then  
  305. echo "installing atk......"  
  306. if [ ! -d atk-1.33.6 ]; then  
  307. if [ ! -e atk-1.33.6.tar.bz2 ]; then  
  308. wget ftp://ftp.acc.umu.se/pub/gnome/sources/atk/1.33/atk-1.33.6.tar.bz2  
  309. fi  
  310. tar -xjf atk-1.33.6.tar.bz2  
  311. fi  
  312. cd atk-1.33.6  
  313. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX && make && make install || exit  
  314. cd ..  
  315. rm -rf atk-1.33.6  
  316. fi  
  317.   
  318. #-------------------------------------------------------------------------------  
  319. # install libpng  
  320. #   
  321. # dependencies: {  
  322. #   app-arch/xz  
  323. # }  
  324. #-------------------------------------------------------------------------------  
  325. if [ ! -e $PKG_CONFIG_PATH/libpng.pc ]; then  
  326. echo "installing libpng......"  
  327. if [ ! -d libpng-1.2.44 ]; then  
  328. if [ ! -e libpng-1.2.44.tar.bz2 ]; then  
  329. wget ftp://ftp.simplesystems.org/pub/png/src/libpng-1.2.44.tar.bz2  
  330. #wget http://ncu.dl.sourceforge.net/project/libpng/libpng15/1.5.1/libpng-1.5.1.tar.bz2  
  331. fi  
  332. tar -xjf libpng-1.2.44.tar.bz2  
  333. fi  
  334. cd libpng-1.2.44  
  335. cat > $HOST.cache << "EOF"  
  336. ac_cv_lib_z_zlibVersion=yes  
  337. EOF  
  338. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX \  
  339. --cache-file=$HOST.cache && make && make install || exit  
  340. cd ..  
  341. rm -rf libpng-1.2.44  
  342. fi  
  343.   
  344. #-------------------------------------------------------------------------------  
  345. # install jpeg  
  346. #-------------------------------------------------------------------------------  
  347. if [ ! -e $PREFIX/lib/libjpeg.so ]; then  
  348. echo "installing jpeg......"  
  349. if [ ! -d jpeg-8c ]; then  
  350. if [ ! -e jpegsrc.v8c.tar.gz ]; then  
  351. wget http://www.ijg.org/files/jpegsrc.v8c.tar.gz  
  352. fi  
  353. tar -xzf jpegsrc.v8c.tar.gz  
  354. fi  
  355. cd jpeg-8c  
  356. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX && make && make install || exit  
  357. cd ..  
  358. rm -rf jpeg-8c  
  359. fi  
  360.   
  361. #-------------------------------------------------------------------------------  
  362. # install tiff  
  363. #-------------------------------------------------------------------------------  
  364. if [ ! -e $PREFIX/lib/libtiff.so ]; then  
  365. echo "installing tiff......"  
  366. if [ ! -d tiff-3.7.4 ]; then  
  367. if [ ! -e tiff-3.7.4.tar.gz ]; then  
  368. wget ftp://ftp.gtk.org/pub/gtk/v2.10/dependencies/tiff-3.7.4.tar.gz  
  369. fi  
  370. tar -xzf tiff-3.7.4.tar.gz  
  371. fi  
  372. cd tiff-3.7.4  
  373. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX --enable-shared && make && make install || exit  
  374. cd ..  
  375. rm -rf tiff-3.7.4  
  376. fi  
  377.   
  378. #-------------------------------------------------------------------------------  
  379. # install pixman  
  380. #   
  381. # dependencies: {  
  382. #   dev-util/pkg-config  
  383. # }  
  384. #-------------------------------------------------------------------------------  
  385. if [ ! -e $PKG_CONFIG_PATH/pixman-1.pc ]; then  
  386. echo "installing pixman......"  
  387. if [ ! -d pixman-0.20.2 ]; then  
  388. if [ ! -e pixman-0.20.2.tar.gz ]; then  
  389. wget http://www.cairographics.org/releases/pixman-0.20.2.tar.gz  
  390. fi  
  391. tar -xzf pixman-0.20.2.tar.gz  
  392. fi  
  393. cd pixman-0.20.2  
  394. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX --disable-gtk && make && make install || exit  
  395. cd ..  
  396. rm -rf pixman-0.20.2  
  397. fi  
  398.   
  399. #-------------------------------------------------------------------------------  
  400. # install freetype  
  401. #-------------------------------------------------------------------------------  
  402. if [ ! -e $PKG_CONFIG_PATH/freetype2.pc ]; then  
  403. echo "installing freetype......"  
  404. if [ ! -d freetype-2.4.4 ]; then  
  405. if [ ! -e freetype-2.4.4.tar.bz2 ]; then  
  406. wget http://download.savannah.gnu.org/releases/freetype/freetype-2.4.4.tar.bz2  
  407. fi  
  408. tar -xjf freetype-2.4.4.tar.bz2  
  409. fi  
  410. cd freetype-2.4.4  
  411. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX && make && make install || exit  
  412. cd ..  
  413. rm -rf freetype-2.4.4  
  414. fi  
  415.   
  416. #-------------------------------------------------------------------------------  
  417. # install fontconfig  
  418. #   
  419. # dependencies: {  
  420. #   dev-util/pkg-config,  
  421. #   dev-libs/expat,  
  422. #   media-libs/freetype  
  423. # }  
  424. #-------------------------------------------------------------------------------  
  425. if [ ! -e $PKG_CONFIG_PATH/fontconfig.pc ]; then  
  426. echo "installing fontconfig......"  
  427. if [ ! -d fontconfig-2.8.0 ]; then  
  428. if [ ! -e fontconfig-2.8.0.tar.gz ]; then  
  429. wget http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.8.0.tar.gz  
  430. fi  
  431. tar -xzf fontconfig-2.8.0.tar.gz  
  432. fi  
  433. cd fontconfig-2.8.0  
  434. ./configure --host=$HOST --build=$BUILD --with-arch=arm --prefix=$PREFIX && make && make install || exit  
  435. cd ..  
  436. rm -rf fontconfig-2.8.0  
  437. fi  
  438.   
  439. #-------------------------------------------------------------------------------  
  440. # install xtrans  
  441. #-------------------------------------------------------------------------------  
  442. if [ ! -e $PKG_CONFIG_PATH/xtrans.pc ]; then  
  443. echo "installing xtrans......"  
  444. if [ ! -d xtrans-1.2 ]; then  
  445. if [ ! -e xtrans-1.2.tar.bz2 ]; then  
  446. wget http://xorg.freedesktop.org/archive/individual/lib/xtrans-1.2.tar.bz2  
  447. fi  
  448. tar -xjf xtrans-1.2.tar.bz2  
  449. fi  
  450. cd xtrans-1.2  
  451. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX && make && make install || exit  
  452. cd ..  
  453. rm -rf xtrans-1.2  
  454. fi  
  455.   
  456. #-------------------------------------------------------------------------------  
  457. # install inputproto  
  458. #-------------------------------------------------------------------------------  
  459. if [ ! -e $PKG_CONFIG_PATH/inputproto.pc ]; then  
  460. echo "installing inputproto......"  
  461. if [ ! -d inputproto-2.0 ]; then  
  462. if [ ! -e inputproto-2.0.tar.bz2 ]; then  
  463. wget http://xorg.freedesktop.org/archive/individual/proto/inputproto-2.0.tar.bz2  
  464. fi  
  465. tar -xjf inputproto-2.0.tar.bz2  
  466. fi  
  467. cd inputproto-2.0  
  468. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX && make && make install || exit  
  469. cd ..  
  470. rm -rf inputproto-2.0  
  471. fi  
  472.   
  473. #-------------------------------------------------------------------------------  
  474. # install kbproto  
  475. #-------------------------------------------------------------------------------  
  476. if [ ! -e $PKG_CONFIG_PATH/kbproto.pc ]; then  
  477. echo "installing kbproto......"  
  478. if [ ! -d kbproto-1.0.5 ]; then  
  479. if [ ! -e kbproto-1.0.5.tar.bz2 ]; then  
  480. wget http://xorg.freedesktop.org/archive/individual/proto/kbproto-1.0.5.tar.bz2  
  481. fi  
  482. tar -xjf kbproto-1.0.5.tar.bz2  
  483. fi  
  484. cd kbproto-1.0.5  
  485. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX && make && make install || exit  
  486. cd ..  
  487. rm -rf kbproto-1.0.5  
  488. fi  
  489.   
  490. #-------------------------------------------------------------------------------  
  491. # install xextproto  
  492. #-------------------------------------------------------------------------------  
  493. if [ ! -e $PKG_CONFIG_PATH/xextproto.pc ]; then  
  494. echo "installing xextproto......"  
  495. if [ ! -d xextproto-7.2.0 ]; then  
  496. if [ ! -e xextproto-7.2.0.tar.bz2 ]; then  
  497. wget http://xorg.freedesktop.org/archive/individual/proto/xextproto-7.2.0.tar.bz2  
  498. fi  
  499. tar -xjf xextproto-7.2.0.tar.bz2  
  500. fi  
  501. cd xextproto-7.2.0  
  502. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX && make && make install || exit  
  503. cd ..  
  504. rm -rf xextproto-7.2.0  
  505. fi  
  506.   
  507. #-------------------------------------------------------------------------------  
  508. # install xproto  
  509. #-------------------------------------------------------------------------------  
  510. if [ ! -e $PKG_CONFIG_PATH/xproto.pc ]; then  
  511. echo "installing xproto......"  
  512. if [ ! -d xproto-7.0.20 ]; then  
  513. if [ ! -e xproto-7.0.20.tar.bz2 ]; then  
  514. wget http://xorg.freedesktop.org/archive/individual/proto/xproto-7.0.20.tar.bz2  
  515. fi  
  516. tar -xjf xproto-7.0.20.tar.bz2  
  517. fi  
  518. cd xproto-7.0.20  
  519. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX && make && make install || exit  
  520. cd ..  
  521. rm -rf xproto-7.0.20  
  522. fi  
  523.   
  524. #-------------------------------------------------------------------------------  
  525. # install xcb-proto  
  526. #-------------------------------------------------------------------------------  
  527. if [ ! -e $PKG_CONFIG_PATH/xcb-proto.pc ]; then  
  528. echo "installing xcb-proto......"  
  529. if [ ! -d xcb-proto-1.6 ]; then  
  530. if [ ! -e xcb-proto-1.6.tar.bz2 ]; then  
  531. wget http://xcb.freedesktop.org/dist/xcb-proto-1.6.tar.bz2  
  532. fi  
  533. tar -xjf xcb-proto-1.6.tar.bz2  
  534. fi  
  535. cd xcb-proto-1.6  
  536. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX && make && make install || exit  
  537. cd ..  
  538. rm -rf xcb-proto-1.6  
  539. fi  
  540.   
  541. #-------------------------------------------------------------------------------  
  542. # install libpthread-stubs  
  543. #-------------------------------------------------------------------------------  
  544. if [ ! -e $PKG_CONFIG_PATH/pthread-stubs.pc ]; then  
  545. echo "installing libpthread-stubs......"  
  546. if [ ! -d libpthread-stubs-0.3 ]; then  
  547. if [ ! -e libpthread-stubs-0.3.tar.bz2 ]; then  
  548. wget http://xcb.freedesktop.org/dist/libpthread-stubs-0.3.tar.bz2  
  549. fi  
  550. tar -xjf libpthread-stubs-0.3.tar.bz2  
  551. fi  
  552. cd libpthread-stubs-0.3  
  553. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX && make && make install || exit  
  554. cd ..  
  555. rm -rf libpthread-stubs-0.3  
  556. fi  
  557.   
  558. #-------------------------------------------------------------------------------  
  559. # install libxslt  
  560. #   
  561. # dependencies: {  
  562. #   dev-libs/libxml2,  
  563. #   sys-devel/libtool,  
  564. #   sys-devel/autoconf:2.5,  
  565. #   sys-devel/automake:1.11   
  566. # }  
  567. #-------------------------------------------------------------------------------  
  568. if [ ! -e $PKG_CONFIG_PATH/libxslt.pc ]; then  
  569. echo "installing libxslt......"  
  570. if [ ! -d libxslt-1.1.26 ]; then  
  571. if [ ! -e libxslt-1.1.26.tar.gz ]; then  
  572. wget ftp://xmlsoft.org/libxslt/libxslt-1.1.26.tar.gz  
  573. fi  
  574. tar -xzf libxslt-1.1.26.tar.gz  
  575. fi  
  576. cd libxslt-1.1.26  
  577. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX && \  
  578. make && make install || exit  
  579. cd ..  
  580. rm -rf libxslt-1.1.26  
  581. fi  
  582.   
  583. #-------------------------------------------------------------------------------  
  584. # install libXau  
  585. #   
  586. # dependencies: {  
  587. #   x11-proto/xproto  
  588. # }  
  589. #-------------------------------------------------------------------------------  
  590. if [ ! -e $PKG_CONFIG_PATH/xau.pc ]; then  
  591. echo "installing libXau......"  
  592. if [ ! -d libXau-1.0.6 ]; then  
  593. if [ ! -e libXau-1.0.6.tar.bz2 ]; then  
  594. wget http://xorg.freedesktop.org/archive/individual/lib/libXau-1.0.6.tar.bz2  
  595. fi  
  596. tar -xjf libXau-1.0.6.tar.bz2  
  597. fi  
  598. cd libXau-1.0.6  
  599. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX && make && make install || exit  
  600. cd ..  
  601. rm -rf libXau-1.0.6  
  602. fi  
  603.   
  604. #-------------------------------------------------------------------------------  
  605. # install libXdmcp  
  606. #   
  607. # dependencies: {  
  608. #   x11-proto/xproto  
  609. # }  
  610. #-------------------------------------------------------------------------------  
  611. if [ ! -e $PKG_CONFIG_PATH/xdmcp.pc ]; then  
  612. echo "installing libXau......"  
  613. if [ ! -d libXdmcp-1.1.0 ]; then  
  614. if [ ! -e libXdmcp-1.1.0.tar.bz2 ]; then  
  615. wget http://xorg.freedesktop.org/archive/individual/lib/libXdmcp-1.1.0.tar.bz2  
  616. fi  
  617. tar -xjf libXdmcp-1.1.0.tar.bz2  
  618. fi  
  619. cd libXdmcp-1.1.0  
  620. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX && make && make install || exit  
  621. cd ..  
  622. rm -rf libXdmcp-1.1.0  
  623. fi  
  624.   
  625. #-------------------------------------------------------------------------------  
  626. # install libxcb  
  627. #   
  628. # dependencies: {  
  629. #   x11-proto/xcb-proto,   
  630. #   dev-libs/libpthread-stubs,  
  631. #   dev-libs/libxslt,  
  632. #   x11-libs/libXau,  
  633. #   x11-libs/libXdmcp  
  634. # }  
  635. #-------------------------------------------------------------------------------  
  636. if [ ! -e $PKG_CONFIG_PATH/xcb.pc ]; then  
  637. echo "installing libxcb......"  
  638. if [ ! -d libxcb-1.7 ]; then  
  639. if [ ! -e libxcb-1.7.tar.bz2 ]; then  
  640. wget http://xcb.freedesktop.org/dist/libxcb-1.7.tar.bz2  
  641. fi  
  642. tar -xjf libxcb-1.7.tar.bz2  
  643. fi  
  644. cd libxcb-1.7  
  645. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX && make && make install || exit  
  646. cd ..  
  647. rm -rf libxcb-1.7  
  648. fi  
  649.   
  650. #-------------------------------------------------------------------------------  
  651. # install libX11  
  652. #   
  653. # dependencies: {  
  654. #   x11-libs/xtrans,  
  655. #   x11-proto/inputproto,  
  656. #   x11-proto/kbproto,  
  657. #   x11-proto/xextproto,  
  658. #   x11-proto/xproto,  
  659. #   x11-libs/libxcb  
  660. # }  
  661. #-------------------------------------------------------------------------------  
  662. if [ ! -e $PKG_CONFIG_PATH/x11.pc ]; then  
  663. echo "installing libX11......"  
  664. if [ ! -d libX11-1.4.2 ]; then  
  665. if [ ! -e libX11-1.4.2.tar.bz2 ]; then  
  666. wget http://xorg.freedesktop.org/archive/individual/lib/libX11-1.4.2.tar.bz2  
  667. fi  
  668. tar -xjf libX11-1.4.2.tar.bz2  
  669. fi  
  670. cd libX11-1.4.2  
  671. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX && make && make install || exit  
  672. cd ..  
  673. rm -rf libX11-1.4.2  
  674. fi  
  675.   
  676. #-------------------------------------------------------------------------------  
  677. # install compositeproto  
  678. #   
  679. # dependencies: {  
  680. #   dev-util/pkg-config  
  681. # }  
  682. #-------------------------------------------------------------------------------  
  683. if [ ! -e $PKG_CONFIG_PATH/compositeproto.pc ]; then  
  684. echo "installing compositeproto......"  
  685. if [ ! -d compositeproto-0.4.2 ]; then  
  686. if [ ! -e compositeproto-0.4.2.tar.bz2 ]; then  
  687. wget http://xorg.freedesktop.org/archive/individual/proto/compositeproto-0.4.2.tar.bz2  
  688. fi  
  689. tar -xjf compositeproto-0.4.2.tar.bz2  
  690. fi  
  691. cd compositeproto-0.4.2  
  692. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX && make && make install || exit  
  693. cd ..  
  694. rm -rf compositeproto-0.4.2  
  695. fi  
  696.   
  697. #-------------------------------------------------------------------------------  
  698. # install xext  
  699. #   
  700. # dependencies: {  
  701. #   dev-util/pkg-config,  
  702. #   x11-proto/xextproto,  
  703. #   x11-proto/xproto,  
  704. #   x11-libs/libX11  
  705. # }  
  706. #-------------------------------------------------------------------------------  
  707. if [ ! -e $PKG_CONFIG_PATH/xext.pc ]; then  
  708. echo "installing xext......"  
  709. if [ ! -d libXext-1.2.0 ]; then  
  710. if [ ! -e libXext-1.2.0.tar.bz2 ]; then  
  711. wget http://xorg.freedesktop.org/archive/individual/lib/libXext-1.2.0.tar.bz2  
  712. fi  
  713. tar -xjf libXext-1.2.0.tar.bz2  
  714. fi  
  715. cd libXext-1.2.0  
  716. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX && make && make install || exit  
  717. cd ..  
  718. rm -rf libXext-1.2.0  
  719. fi  
  720.   
  721. #-------------------------------------------------------------------------------  
  722. # install compositeproto  
  723. #   
  724. # dependencies: {  
  725. #   dev-util/pkg-config,  
  726. #   x11-proto/xextproto  
  727. # }  
  728. #-------------------------------------------------------------------------------  
  729. if [ ! -e $PKG_CONFIG_PATH/fixesproto.pc ]; then  
  730. echo "installing fixesproto......"  
  731. if [ ! -d fixesproto-5.0 ]; then  
  732. if [ ! -e fixesproto-5.0.tar.bz2 ]; then  
  733. wget http://xorg.freedesktop.org/archive/individual/proto/fixesproto-5.0.tar.bz2  
  734. fi  
  735. tar -xjf fixesproto-5.0.tar.bz2  
  736. fi  
  737. cd fixesproto-5.0  
  738. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX && make && make install || exit  
  739. cd ..  
  740. rm -rf fixesproto-5.0  
  741. fi  
  742.   
  743. #-------------------------------------------------------------------------------  
  744. # install libXfixes  
  745. #   
  746. # dependencies: {  
  747. #   x11-proto/fixesproto,  
  748. #   x11-proto/xextproto,  
  749. #   x11-proto/xproto,  
  750. #   x11-libs/libX11  
  751. # }  
  752. #-------------------------------------------------------------------------------  
  753. if [ ! -e $PKG_CONFIG_PATH/xfixes.pc ]; then  
  754. echo "installing libXfixes......"  
  755. if [ ! -d libXfixes-5.0 ]; then  
  756. if [ ! -e libXfixes-5.0.tar.bz2 ]; then  
  757. wget http://xorg.freedesktop.org/archive/individual/lib/libXfixes-5.0.tar.bz2  
  758. fi  
  759. tar -xjf libXfixes-5.0.tar.bz2  
  760. fi  
  761. cd libXfixes-5.0  
  762. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX && make && make install || exit  
  763. cd ..  
  764. rm -rf libXfixes-5.0  
  765. fi  
  766.   
  767. #-------------------------------------------------------------------------------  
  768. # install libXcomposite  
  769. #   
  770. # dependencies: {  
  771. #   x11-proto/compositeproto,  
  772. #   x11-libs/libX11,  
  773. #   x11-libs/libXfixes,  
  774. #   dev-util/pkg-config  
  775. # }  
  776. #-------------------------------------------------------------------------------  
  777. if [ ! -e $PKG_CONFIG_PATH/xcomposite.pc ]; then  
  778. echo "installing libXcomposite......"  
  779. if [ ! -d libXcomposite-0.4.3 ]; then  
  780. if [ ! -e libXcomposite-0.4.3.tar.bz2 ]; then  
  781. wget http://xorg.freedesktop.org/archive/individual/lib/libXcomposite-0.4.3.tar.bz2  
  782. fi  
  783. tar -xjf libXcomposite-0.4.3.tar.bz2  
  784. fi  
  785. cd libXcomposite-0.4.3  
  786. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX && make && make install || exit  
  787. cd ..  
  788. rm -rf libXcomposite-0.4.3  
  789. fi  
  790.   
  791. #-------------------------------------------------------------------------------  
  792. # install cairo  
  793. #   
  794. # dependencies: {  
  795. #   dev-util/pkg-config,  
  796. #   media-libs/libpng,  
  797. #   x11-dri/mesa,  
  798. #   media-libs/freetype,  
  799. #   media-libs/fontconfig,  
  800. #   x11-libs/pixman,  
  801. #   dev-libs/glib,  
  802. #}  
  803. #-------------------------------------------------------------------------------  
  804. if [ ! -e $PKG_CONFIG_PATH/cairo.pc ]; then  
  805. echo "installing cairo......"  
  806. if [ ! -d cairo-1.10.2 ]; then  
  807. if [ ! -e cairo-1.10.2.tar.gz ]; then  
  808. wget http://www.cairographics.org/releases/cairo-1.10.2.tar.gz  
  809. fi  
  810. tar -xzf cairo-1.10.2.tar.gz  
  811. fi  
  812. cd cairo-1.10.2  
  813. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX && make && make install || exit  
  814. cd ..  
  815. rm -rf cairo-1.10.2  
  816. fi  
  817.   
  818. #-------------------------------------------------------------------------------  
  819. # install pango  
  820. #-------------------------------------------------------------------------------  
  821. if [ ! -e $PKG_CONFIG_PATH/pango.pc ]; then  
  822. echo "installing pango......"  
  823. if [ ! -d pango-1.28.3 ]; then  
  824. if [ ! -e pango-1.28.3.tar.bz2 ]; then  
  825. wget ftp://ftp.gnome.org/pub/GNOME/sources/pango/1.28/pango-1.28.3.tar.bz2  
  826. fi  
  827. tar -xjf pango-1.28.3.tar.bz2  
  828. fi  
  829. cd pango-1.28.3  
  830. cat > $HOST.cache << "EOF"  
  831. have_cairo=true  
  832. have_cairo_png=true  
  833. have_cairo_freetype=true  
  834. EOF  
  835. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX \  
  836. --cache-file=$HOST.cache --with-x && make && make install || exit  
  837. cd ..  
  838. rm -rf pango-1.28.3  
  839. fi  
  840.   
  841. #-------------------------------------------------------------------------------  
  842. # install gdk-pixbuf  
  843. #-------------------------------------------------------------------------------  
  844. if [ ! -e $PKG_CONFIG_PATH/gdk-pixbuf-2.0.pc ]; then  
  845. echo "installing gdk-pixbuf......"  
  846. if [ ! -d gdk-pixbuf-2.22.1 ]; then  
  847. if [ ! -e gdk-pixbuf-2.22.1.tar.bz2 ]; then  
  848. wget http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.22/gdk-pixbuf-2.22.1.tar.bz2  
  849. fi  
  850. tar -xjf gdk-pixbuf-2.22.1.tar.bz2  
  851. fi  
  852. cd gdk-pixbuf-2.22.1  
  853. cat > $HOST.cache << "EOF"  
  854. gio_can_sniff=yes  
  855. EOF  
  856. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX \  
  857. --cache-file=$HOST.cache && make && make install || exit  
  858. cd ..  
  859. rm -rf gdk-pixbuf-2.22.1  
  860. fi  
  861.   
  862. #-------------------------------------------------------------------------------  
  863. # install xineramaproto  
  864. #   
  865. # dependencies: {  
  866. #   dev-util/pkg-config  
  867. # }  
  868. #-------------------------------------------------------------------------------  
  869. if [ ! -e $PKG_CONFIG_PATH/xineramaproto.pc ]; then  
  870. echo "installing xineramaproto......"  
  871. if [ ! -d xineramaproto-1.2.1 ]; then  
  872. if [ ! -e xineramaproto-1.2.1.tar.bz2 ]; then  
  873. wget http://xorg.freedesktop.org/archive/individual/proto/xineramaproto-1.2.1.tar.bz2  
  874. fi  
  875. tar -xjf xineramaproto-1.2.1.tar.bz2  
  876. fi  
  877. cd xineramaproto-1.2.1  
  878. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX && make && make install || exit  
  879. cd ..  
  880. rm -rf xineramaproto-1.2.1  
  881. fi  
  882.   
  883. #-------------------------------------------------------------------------------  
  884. # install libXinerama  
  885. #   
  886. # dependencies: {  
  887. #   x11-proto/xextproto,  
  888. #   x11-proto/xineramaproto,  
  889. #   x11-libs/libX11,  
  890. #   x11-libs/libXext,  
  891. #   dev-util/pkg-config  
  892. # }  
  893. #-------------------------------------------------------------------------------  
  894. if [ ! -e $PKG_CONFIG_PATH/xinerama.pc ]; then  
  895. echo "installing libXinerama......"  
  896. if [ ! -d libXinerama-1.1.1 ]; then  
  897. if [ ! -e libXinerama-1.1.1.tar.bz2 ]; then  
  898. wget http://xorg.freedesktop.org/archive/individual/lib/libXinerama-1.1.1.tar.bz2  
  899. fi  
  900. tar -xjf libXinerama-1.1.1.tar.bz2  
  901. fi  
  902. cd libXinerama-1.1.1  
  903. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX && make && make install || exit  
  904. cd ..  
  905. rm -rf libXinerama-1.1.1  
  906. fi  
  907.   
  908. #-------------------------------------------------------------------------------  
  909. # install libXi  
  910. #   
  911. # dependencies: {  
  912. #   x11-proto/xproto,  
  913. #   x11-proto/xextproto,  
  914. #   x11-proto/xineramaproto,  
  915. #   x11-libs/libX11,  
  916. #   x11-libs/libXext,  
  917. #   dev-util/pkg-config,  
  918. #   x11-proto/inputproto  
  919. # }  
  920. #-------------------------------------------------------------------------------  
  921. if [ ! -e $PKG_CONFIG_PATH/xi.pc ]; then  
  922. echo "installing libXi......"  
  923. if [ ! -d libXi-1.4.1 ]; then  
  924. if [ ! -e libXi-1.4.1.tar.bz2 ]; then  
  925. wget http://xorg.freedesktop.org/archive/individual/lib/libXi-1.4.1.tar.bz2  
  926. fi  
  927. tar -xjf libXi-1.4.1.tar.bz2  
  928. fi  
  929. cd libXi-1.4.1  
  930. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX && make && make install || exit  
  931. cd ..  
  932. rm -rf libXi-1.4.1  
  933. fi  
  934.   
  935. #-------------------------------------------------------------------------------  
  936. # install GTK+  
  937. #   
  938. # dependencies: {  
  939. #   sys-devel/gettext,  
  940. #   dev-util/pkg-config,  
  941. #   dev-libs/glib,  
  942. #   dev-libs/atk,  
  943. #   x11-libs/pango,  
  944. #   x11-libs/cairo,  
  945. #   x11-libs/gdk-pixbuf,  
  946. #   x11-libs/libXinerama,  
  947. #   x11-libs/libXi,  
  948. #   x11-libs/libXrandr,  
  949. #   x11-libs/libXcursor,  
  950. #   x11-libs/libXfixes,  
  951. #   x11-libs/libXcomposite,  
  952. #   x11-libs/libXdamage,  
  953. #   x11-themes/hicolor-icon-theme  
  954. # }  
  955. #-------------------------------------------------------------------------------  
  956. if [ ! -e $PKG_CONFIG_PATH/gtk+.pc ]; then  
  957. echo "installing GTK+......"  
  958. if [ ! -d gtk+-3.0.3 ]; then  
  959. if [ ! -e gtk+-3.0.3.tar.bz2 ]; then  
  960. wget ftp://ftp.gtk.org/pub/gtk/3.0/gtk+-3.0.3.tar.bz2  
  961. fi  
  962. tar -xjf gtk+-3.0.3.tar.bz2  
  963. fi  
  964. cd gtk+-3.0.3  
  965. cat > $HOST.cache << "EOF"  
  966. ac_cv_func_XOpenDisplay=yes  
  967. ac_cv_func__NSGetEnviron=yes  
  968. ac_cv_func_XextFindDisplay=yes  
  969. ac_cv_func_XShapeCombineMask=yes  
  970. EOF  
  971. ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX \  
  972. --cache-file=$HOST.cache --with-x && make && make install || exit  
  973. cd ..  
  974. rm -rf gtk+-3.0.3  
  975. fi  



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值