gtk+directfb

6 篇文章 0 订阅

export PREFIX=/home/xuyong/bin

export CC=arm-marvell-linux-gnueabi-gcc

export LDFLAGS=-L$PREFIX/lib

export CFLAGS="-g -I$PREFIX/include"

export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig


1.build libffi 3.1

./configure --host=arm-marvell-linux-gnueabi  --prefix=$PREFIX

make

make install


2.build zlib 1.2.3

CC=arm-marvell-linux-gnueabi-gcc ./configure  --prefix=$PREFIX

make;make install

3.build glib 2.18.1

echo ac_cv_type_long_long=yes>arm-linux.cache
echo glib_cv_stack_grows=no>>arm-linux.cache
echo glib_cv_uscore=no>>arm-linux.cache
echo ac_cv_func_posix_getpwuid_r=yes>>arm-linux.cache
echo ac_cv_func_posix_getgrgid_r=yes>>arm-linux.cache


./configure --host=arm-marvell-linux-gnueabi  --prefix=$PREFIX --cache-file=arm-linux.cache

make;make install

4.atk 1.24.0

./configure --host=arm-marvell-linux-gnueabi  --prefix=$PREFIX

make;make install

5.jpeg-6b


./configure --host=arm-marvell-linux-gnueabi  --prefix=$PREFIX
make;make install

report xuyong@xuyong-OptiPlex-790:~/code/gtk2/jpeg-6b$ make install
/usr/bin/install -c cjpeg /home/xuyong/bin/bin/cjpeg
/usr/bin/install -c djpeg /home/xuyong/bin/bin/djpeg
/usr/bin/install -c jpegtran /home/xuyong/bin/bin/jpegtran
/usr/bin/install -c rdjpgcom /home/xuyong/bin/bin/rdjpgcom
/usr/bin/install -c wrjpgcom /home/xuyong/bin/bin/wrjpgcom
/usr/bin/install -c -m 644 ./cjpeg.1 /home/xuyong/bin/man/man1/cjpeg.1
/usr/bin/install: cannot create regular file ‘/home/xuyong/bin/man/man1/cjpeg.1’: No such file or directory
make: *** [install] Error 1

so mkdir -p /home/xuyong/bin/man/man1

then make install again

6.libpng 1.2.33

./configure --host=arm-marvell-linux-gnueabi  --prefix=$PREFIX

make;make install


7.expat-2.0.1

./configure --host=arm-marvell-linux-gnueabi  --prefix=$PREFIX

make;make install


8.freetype 2.3.7

./configure --host=arm-marvell-linux-gnueabi  --prefix=$PREFIX

make;make install

9.libxml2-2.6.31

./configure --host=arm-marvell-linux-gnueabi  --prefix=$PREFIX

make;make install

/usr/include/python2.7/pyconfig.h:15:52: error: arm-linux-gnueabi/python2.7/pyconfig.h: No such file or directory
In file included from /usr/include/python2.7/Python.h:77,
                 from libxml.c:14:
/usr/include/python2.7/pymath.h:18: warning: redundant redeclaration of 'copysign'
/usr/include/python2.7/pymath.h:22: warning: redundant redeclaration of 'round'
/usr/include/python2.7/pymath.h:26: warning: redundant redeclaration of 'hypot'
libxml.c: In function 'libxml_xmlValidCtxtGenericErrorFuncHandler':
libxml.c:1746: warning: unused parameter 'severity'
libxml.c: In function 'libxml_xmlValidCtxtGenericWarningFuncHandler':
libxml.c:1773: warning: unused parameter 'severity'
libxml.c: At top level:
libxml.c:2672: warning: no previous prototype for 'libxml_xmlNodeRemoveNsDef'
make[3]: *** [libxml.lo] Error 1
make[3]: Leaving directory `/home/xuyong/code/gtk2/libxml2-2.6.31/python'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/xuyong/code/gtk2/libxml2-2.6.31/python'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/xuyong/code/gtk2/libxml2-2.6.31'
make: *** [all] Error 2



./configure --host=arm-marvell-linux-gnueabi  --prefix=$PREFIX   --with-python=/usr/include
make;make install

10.fontconfig-2.6.0

export LIBXML2_CFLAGS=-I$PREFIX/include/libxml2
export LIBXML2_LIBS="-L$PREFIX/lib -lxml2"
./configure --host=arm-marvell-linux-gnueabi --prefix=$PREFIX  --with-freetype-config=$PREFIX/bin/freetype-config --with-arch=arm
make
make install


11.tiff-3.8.2

 ./configure  --host=arm-marvell-linux-gnueabi --prefix=$PREFIX

make;make install


12.directfb 1.3.0

--enable-static./configure --host=arm-marvell-linux-gnueabi  --enable-zlib  --prefix=$PREFIX   --enable-sdl=no --enable-gif=no --disable-x11  --enable-jpeg  --enable-multi 

make;make install


report omapfb.h file can't find

refer to:

http://blog.csdn.net/pengguowen/article/details/6867017

把gfxdrivers/Makefile中的SUBDIRS中的OMAP_DIR和SH7722_DIR注释掉即可


13.pixman-0.22.0

./configure --host=arm-marvell-linux-gnueabi  --prefix=$PREFIX

make;make install


14. cairo1.8.4

 ./configure --host=arm-marvell-linux-gnueabi --prefix=$PREFIX --without-x --disable-xlib --disable-xlib-xrender --enable-directfb --enable-freetype --disable-win32 --enable-pdf --enable-ps --disable-svg --enable-png
make;make install


15. pango 1.20.2

modfiy the configure

have_cairo=true
have_cairo_png=true        
have_cairo_ps=true
have_cairo_pdf=true
have_cairo_freetype=true

./configure --host=arm-marvell-linux-gnueabi  --prefix=$PREFIX --enable-cairo --without-x

make;make install


16.gtk+ 2.12.9

./configure --host=arm-marvell-linux-gnueabi --prefix=$PREFIX  --with-gdktarget=directfb --without-x

report can't find libjpeg, so download jpeg-9a, then rebuild it. build jpeg-6b should use   --enable-shared  or build jpeg-9a instead it.

jpeg-9a

./configure --host=arm-marvell-linux-gnueabi  --prefix=$PREFIX
make;make install


./configure --host=arm-marvell-linux-gnueabi --prefix=$PREFIX  --with-gdktarget=directfb --without-x  --enable-static
make;make install




write a test program:

  1 #include <gtk/gtk.h>
  2
  3 int main(int argc, char *argv[])
  4 {
  5     GtkWidget *window;
  6
  7     gtk_init(&argc, &argv);
  8
  9     window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
 10     gtk_widget_show(window);
 11
 12     gtk_main();
 13
 14     return 0;
 15 }
~     



 arm-marvell-linux-gnueabi-gcc test1.c -I/home/xuyong/bin/include/gtk-2.0 -I/home/xuyong/bin/include/glib-2.0  -I/home/xuyong/bin/include/pango-1.0  -I/home/xuyong/bin/include/cairo  -I/home/xuyong/bin/include/directfb  -I/home/xuyong/bin/include/fontconfig  -I/home/xuyong/bin/include/freetype2 -I/home/xuyong/bin/lib/glib-2.0/include/  -I/home/xuyong/bin/lib/gtk-2.0/include/  -I/home/xuyong/bin/include/atk-1.0   -L/home/xuyong/bin/lib/gtk-2.0   -L/home/xuyong/bin/lib/glib-2.0 -L/home/xuyong/bin/lib/pango  -L/home/xuyong/bin/lib   -lgtk-directfb-2.0  -lgio-2.0  -latk-1.0 -lgobject-2.0 -lgdk-directfb-2.0  -lpango-1.0 -lglib-2.0 -lcairo -lpng -lfreetype -lfontconfig  -lpixman-1  -lgdk_pixbuf-2.0  -lexpat -lgmodule-2.0  -lxml2  -lz  -ltiff  -lpangocairo-1.0  -lpangoft2-1.0  -ldirectfb  -lfusion -ldirect

refererence:

http://blog.csdn.net/ubuntuqqqq/article/details/25160399


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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值