码迷,mamicode.com
首页 > 其他好文 > 详细

Port gtk2 with directfb as backend for arm

时间:2015-01-06 17:31:29      阅读:313      评论:0      收藏:0      [点我收藏+]

标签:

I have all the tar packages in netdisk http://mail.sina.com.cn/netdisk/download.php?id=04366451404ccd7717d6cf292e1cd92609 

I download them from below links:

 

http://ftp.gnome.org/pub/gnome/sources

glib-2.19.0 :ftp://ftp.gtk.org/pub/glib/2.19/
pango-1.20.2 :http://ftp.gnome.org/pub/gnome/sources/pango/1.20/ 
gtk+-2.12.9 :http://ftp.gnome.org/pub/gnome/sources/gtk+/2.12/


DirectFB-1.4.17 :http://www.directfb.org/downloads/

zlib-1.2.3 :http://www.zlib.net/ 
jpegsrc.v6b :ftp://ftp.gtk.org/pub/gtk/v2.10/dependencies/ (http://sourceforge.net/projects/libjpeg/files/libjpeg/6b/)
freetype-2.3.7 :http://freetype.sourceforge.net/index2.html    

fontconfig-2.6.0 :http://www.fontconfig.org/release/
libxml2-2.6.31 :http://xmlsoft.org/sources/ (/linux/gnome.org/sources/libxml2/2.6)

 

I write a build.sh file as below to do all the build work, this is also a list or a procedure.

#!/bin/sh
export SRCDIR=$(pwd) export PREFIX=/opt/gtk_dfb_arm export PATH=$PATH:$PREFIX/bin export C_INCLUDE_PATH=$PREFIX/include export LD_LIBRARY_PATH=$PREFIX/lib export PKG_CONFIG_PATH=$LD_LIBRARY_PATH/pkgconfig export LDFLAGS=-L$LD_LIBRARY_PATH export CFLAGS=-I$PREFIX/include export MK="make -j4" export MK_INS="make install" # http://downloads.sourceforge.net/project/giflib/giflib-5.1.0.tar.bz2 # http://downloads.sourceforge.net/project/libpng/libpng12/1.2.44/libpng-1.2.44.tar.xz # http://ftp.gnome.org/pub/gnome/sources/atk/1.12/atk-1.12.2.tar.bz2 # http://cairographics.org/releases/cairo-1.12.18.tar.xz # http://cairographics.org/releases/pixman-0.18.4.tar.gz # http://linux.thai.net/pub/thailinux/software/libthai/libthai-0.1.21.tar.xz # http://linux.thai.net/pub/thailinux/software/libthai/libdatrie-0.2.8.tar.xz tar xf atk-1.12.2.tar.bz2 tar xf cairo-1.12.18.tar.xz tar xf DirectFB-1.4.17.tar.gz tar xf fontconfig-2.6.0.tar.gz tar xf freetype-2.3.7.tar.gz tar xf giflib-5.1.0.tar.bz2 tar xf glib-2.19.0.tar.gz tar xf gtk+-2.12.9.tar.gz tar xf jpegsrc.v6b.tar.gz tar xf libdatrie-0.2.8.tar.xz tar xf libpng-1.2.44.tar.gz tar xf libthai-0.1.21.tar.xz tar xf libxml2-2.6.30.tar.gz tar xf pango-1.20.2.tar.gz tar xf pixman-0.18.4.tar.gz tar xf tslib-1.4.tar.gz tar xf zlib-1.2.3.tar.gz sudo mkdir -p $PREFIX sudo chmod a+rw $PREFIX # tslib-1.4 cd $SRCDIR/tslib ./autogen.sh echo "ac_cv_func_malloc_0_nonnull=yes" >arm-linux.cache CC=arm-linux-gcc ./configure --host=arm-linux --prefix=$PREFIX --cache-file=arm-linux.cache $MK $MK_INS # giflib cd $SRCDIR/giflib-5.1.0 CC=arm-linux-gcc ./configure --host=arm-linux --prefix=$PREFIX $MK $MK_INS # libjpeg cd $SRCDIR/jpeg-6b CC=arm-linux-gcc AR="arm-linux-ar rc" AR2=arm-linux-ranlib ./configure --host=arm-linux --prefix=$PREFIX mkdir $PREFIX/man mkdir $PREFIX/man/man1 $MK $MK_INS $MK_INS-lib # zlib cd $SRCDIR/zlib-1.2.3 CC=arm-linux-gcc ./configure --prefix=$PREFIX -shared $MK $MK_INS #libpng-1.2.44 cd $SRCDIR/libpng-1.2.44 CC=arm-linux-gcc ./configure --host=arm-linux --prefix=$PREFIX $MK $MK_INS #freetype2 cd $SRCDIR/freetype-2.3.7 CC=arm-linux-gcc ./configure --host=arm-linux --prefix=$PREFIX $MK $MK_INS # DirectFB-1.4.17 cd $SRCDIR/DirectFB-1.4.17 CC=arm-linux-gcc ./configure --host=arm-linux --prefix=$PREFIX --with-gfxdrivers=none --enable-png --enable-jpeg --enable-gif --enable-zlib --enable-sdl=no --disable-x11 --with-inputdrivers=tslib --enable-debug --enable-trace $MK $MK_INS #glib-2.19.0 cd $SRCDIR/glib-2.19.0 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 CC=arm-linux-gcc ./configure --host=arm-linux --prefix=$PREFIX --cache-file=arm-linux.cache --enable-debug=no $MK $MK_INS #atk-1.12.2 cd $SRCDIR/atk-1.12.2 CC=arm-linux-gcc ./configure --host=arm-linux --prefix=$PREFIX $MK $MK_INS #libxml2-2.6.30 cd $SRCDIR/libxml2-2.6.30 echo ac_cv_type_long_long=yes>arm-linux.cache CC=arm-linux-gcc ./configure --host=arm-linux --prefix=$PREFIX --cache-file=arm-linux.cache $MK $MK_INS #build pass at archlinux 32bit, fail on opensuse 64bit #fontconfig-2.6.0 cd $SRCDIR/fontconfig-2.6.0 export LIBXML2_CFLAGS=-I$PREFIX/include/libxml2 export LIBXML2_LIBS="-L$PREFIX/lib -lxml2" CC=arm-linux-gcc ./configure --host=arm-linux --prefix=$PREFIX --with-freetype-config=$PREFIX/bin/freetype-config --with-arch=arm --enable-libxml2 --enable-shared $MK $MK_INS cp fontconfig $PREFIX/include -r #pixman-0.18.4 cd $SRCDIR/pixman-0.18.4 CC=arm-linux-gcc ./configure --host=arm-linux --prefix=$PREFIX --disable-gtk $MK $MK_INS #cairo-1.12.18 #cairo 1.12 , need pixman>=0.16 cd $SRCDIR/cairo-1.12.18 CC=arm-linux-gcc ./configure --host=arm-linux --prefix=$PREFIX --without-x --disable-xlib --disable-xlib-xrender --enable-directfb --enable-freetype --disable-win32 --enable-pdf --enable-ps --disable-svg --enable-png --enable-ft --disable-xcb-shm --disable-xcb $MK $MK_INS #libdatrie-0.2.8 cd $SRCDIR/libdatrie-0.2.8 CC=arm-linux-gcc ./configure --host=arm-linux --prefix=$PREFIX $MK $MK_INS #libthai-0.1.21 cd $SRCDIR/libthai-0.1.21 CC=arm-linux-gcc ./configure --host=arm-linux --prefix=$PREFIX $MK $MK_INS #pango-1.20.2 cd $SRCDIR/pango-1.20.2 echo have_cairo=true>>arm-linux.cache echo have_cairo_png=true>>arm-linux.cache echo have_cairo_ps=true>>arm-linux.cache echo have_cairo_pdf=true>>arm-linux.cache echo have_cairo_freetype=true>>arm-linux.cache export CAIRO_CFLAGS="-fno-strict-aliasing -I$PREFIX/include/cairo -I$PREFIX/include/fontconfig -I$PREFIX/include -I$PREFIX/include/pixman-1 -I$PREFIX/include/freetype2 -I$PREFIX/include/libpng12" export CAIRO_LIBS="-L$PREFIX/lib -lcairo" export GLIB_CFLAGS="-I$PREFIX/include -I$PREFIX/include/glib-2.0 -I$PREFIX/lib/glib-2.0/include" export GLIB_LIBS="-L$PREFIX/lib -lgobject-2.0 -lgmodule-2.0 -lglib-2.0" export FONTCONFIG_CFLAGS="-I$PREFIX/include/fontconfig -I$PREFIX/include" export FONTCONFIG_LIBS="-L$PREFIX/lib -lfontconfig" export FREETYPE_CFLAGS="-I$PREFIX/include/freetype2 -I$PREFIX/include" export FREETYPE_LIBS="-L$PREFIX/lib -lfreetype -lz" export FREETYPE_CONFIG="${PREFIX}/bin/freetype-config" export CAIRO_PREFIX=$prefix CC=arm-linux-gcc ./configure --host=arm-linux --prefix=$PREFIX --cache-file=arm-linux.cache --without-x $MK $MK_INS #gtk+-2.12.9 cd $SRCDIR/gtk+-2.12.9 export LDFLAGS="-L$PREFIX/lib -Wl,-rpath,$PREFIX/lib" export CPPFLAGS="-I$PREFIX/include" CC=arm-linux-gcc ./configure --host=arm-linux --prefix=$PREFIX --with-gdktarget=directfb --without-x --without-libtiff --disable-cups $MK $MK_INS

 

mv /opt/gtk_dfb_arm to root filesystem /opt/opt/gtk_dfb_arm

then add .directfbrc to root filesystem $HOME/.directfbrc content as below

# .directfbrc
system=fbdev fbdev=/dev/fb0 mode=240x320 depth=16 pixelformat=RGB16 # print info,warining,error,once # quiet=info # for send text output at remote with: "socat - udp4-listen:8088,fork" #Send all messages via UDP to the specified host and port. ## log-udp=192.168.1.110:8088 # debug ## debug

 

The /etc/profile in root filesystem 

#!/bin/sh
export TSLIB_PLUGINDIR=/lib/ts
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONSOLEDEVICE=none

# directfb
export DIRECTFB=/opt/gtk_dfb_arm
export PATH=$PATH:$DIRECTFB/bin

 

Port gtk2 with directfb as backend for arm

标签:

原文地址:http://www.cnblogs.com/kozmers/p/4205952.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!