Mercurial > MadButterfly
changeset 634:2f60a2dbe0b3
Merge heads from fourdollars and wycc.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sun, 25 Jul 2010 10:19:04 +0800 |
parents | 6f71f1b8e4e7 (diff) e517bbefe0e9 (current diff) |
children | 058945dff7bd |
files | |
diffstat | 3 files changed, 92 insertions(+), 72 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/build-mipsel.sh Sun Jul 25 10:19:04 2010 +0800 @@ -0,0 +1,5 @@ +#!/bin/sh + +autoreconf -ifs +./configure --host mipsel-linux --build i686-pc-linux-gnu --prefix ${TANGO} --disable-sh_text --disable-X_supp +make && make install
--- a/configure.ac Wed Jul 21 07:27:15 2010 +0800 +++ b/configure.ac Sun Jul 25 10:19:04 2010 +0800 @@ -33,106 +33,121 @@ AC_CHECK_FUNCS([gettimeofday memset select sqrt strdup]) AC_ARG_ENABLE([testcase], - [ --enable-testcase Enable testcase], -[case "${enableval}" in - yes) testcase=true ;; - no) testcase=false ;; - *) AC_MSG_ERROR([bad value ${enableval} for --enable-testcase]) ;; -esac],[testcase=false]) + [AS_HELP_STRING([--enable-testcase],[Enable testcase])], + [case "${enableval}" in + (yes) testcase=true ;; + (no) testcase=false ;; + (*) AC_MSG_ERROR([bad value ${enableval} for --enable-testcase]) ;; + esac],[testcase=false]) + AM_CONDITIONAL([TESTCASE], [test x$testcase = xtrue]) AC_ARG_ENABLE([sh_text], - [ --disable-sh_text Turn off sh_text], -[case "${enableval}" in - yes) sh_text=true ;; - no) sh_text=false ;; - *) AC_MSG_ERROR([bad value ${enableval} for --disable-sh_text]) ;; -esac],[sh_text=true]) + [AS_HELP_STRING([--disable-sh_text],[Turn off sh_text])], + [case "${enableval}" in + (yes) sh_text=true ;; + (no) sh_text=false ;; + (*) AC_MSG_ERROR([bad value ${enableval} for --disable-sh_text]) ;; + esac],[sh_text=true]) AC_ARG_ENABLE([sh_stext], - [ --disable-sh_stext Turn off sh_stext], -[case "${enableval}" in - yes) sh_stext=true ;; - no) sh_stext=false ;; - *) AC_MSG_ERROR([bad value ${enableval} for --disable-sh_stext]) ;; -esac],[sh_stext=true]) + [AS_HELP_STRING([--disable-sh_stext],[Turn off sh_stext])], + [case "${enableval}" in + (yes) sh_stext=true ;; + (no) sh_stext=false ;; + (*) AC_MSG_ERROR([bad value ${enableval} for --disable-sh_stext]) ;; + esac],[sh_stext=true]) + AM_CONDITIONAL([SH_STEXT], [test x$sh_stext = xtrue]) + [if [ x"${sh_stext}" = xtrue ]; then] -AC_DEFINE([SH_STEXT]) + AC_DEFINE([SH_STEXT]) [fi] AC_ARG_ENABLE([X_supp], - [ --disable-X_supp Turn off X backend], -[case "${enableval}" in - yes) X_supp=true ;; - no) X_supp=false ;; - *) AC_MSG_ERROR([bad value ${enableval} for --disable-X_supp]) ;; -esac],[X_supp=true]) + [AS_HELP_STRING([--disable-X_supp],[Turn off X backend])], + [case "${enableval}" in + (yes) X_supp=true ;; + (no) X_supp=false ;; + (*) AC_MSG_ERROR([bad value ${enableval} for --disable-X_supp]) ;; + esac],[X_supp=true]) AC_ARG_ENABLE([skia], - [ --enable-skia Turn on Skia instead of Cairo], -[case "${enableval}" in - yes) skia=true ;; - no) skia=false ;; - *) AC_MSG_ERROR([bad value ${enableval} for --enable-skia]) ;; -esac],[skia=false]) + [AS_HELP_STRING([--enable-skia],[Turn on Skia instead of Cairo])], + [case "${enableval}" in + (yes) skia=true ;; + (no) skia=false ;; + (*) AC_MSG_ERROR([bad value ${enableval} for --enable-skia]) ;; + esac],[skia=false]) + AM_CONDITIONAL([SKIA_GRAPH_ENGINE], [test x$skia = xtrue]) AM_CONDITIONAL([CAIRO_GRAPH_ENGINE], [test x$skia != xtrue]) + [if [ x"${skia}" = xtrue ]; then ] -AC_DEFINE([SKIA_GRAPH_ENGINE]) -cairo=false + AC_DEFINE([SKIA_GRAPH_ENGINE]) + cairo=false [else] -AC_DEFINE([CAIRO_GRAPH_ENGINE]) -cairo=true + AC_DEFINE([CAIRO_GRAPH_ENGINE]) + cairo=true [fi] AC_ARG_ENABLE([nodejs], - [ --enable-nodejs Turn on nodejs support], -[case "${enableval}" in - yes) nodejs=true ;; - no) nodejs=false ;; - *) AC_MSG_ERROR([bad value ${enableval} for --enable-nodejs]) ;; -esac],[nodejs=false]) + [AS_HELP_STRING([--enable-nodejs],[Turn on nodejs support])], + [case "${enableval}" in + (yes) nodejs=true ;; + (no) nodejs=false ;; + (*) AC_MSG_ERROR([bad value ${enableval} for --enable-nodejs]) ;; + esac],[nodejs=false]) + [if [ x"${nodejs}" = xtrue ]; then ] - AC_PATH_PROG([NODE_WAF], [node-waf]) - AC_CHECK_PROG([has_node], [node], [true], [false]) + AC_PATH_PROG([NODE_WAF], [node-waf]) + AC_CHECK_PROG([has_node], [node], [true], [false]) [fi] + AM_CONDITIONAL([NODEJS], [test x"${nodejs}-${has_node}" = xtrue-true]) # Define AM and AC variable for sh_text + AM_CONDITIONAL([SH_TEXT], [test x$sh_text = xtrue -a x$cairo = xtrue]) + [if [ x"${sh_text}" = xtrue -a x$cairo = xtrue ]; then] -AC_DEFINE([SH_TEXT]) + AC_DEFINE([SH_TEXT]) [fi] # Define AM and AC variable for X_supp -AM_CONDITIONAL([X_SUPP], - [test x$X_supp = xtrue -a x$cairo = xtrue]) + +AM_CONDITIONAL([X_SUPP], [test x$X_supp = xtrue -a x$cairo = xtrue]) + [if [ x"${X_supp}" = xtrue -a x"${cairo}" = xtrue ]; then] -AC_DEFINE([X_SUPP]) + AC_DEFINE([X_SUPP]) [fi] # Checks for libraries. + [if [ x"${cairo}" = xtrue ]; then] -PKG_CHECK_MODULES([cairo], [cairo >= 1.6], , AC_MSG_ERROR([cairo >= 1.6 not found])) -PKG_CHECK_MODULES([pangocairo], [pangocairo >= 1.0], , AC_MSG_ERROR([pangocairo >= 1.0 not found])) + PKG_CHECK_MODULES([cairo], [cairo >= 1.6], , AC_MSG_ERROR([cairo >= 1.6 not found])) + [if [ x"${sh_text}" = xtrue ]; then] + PKG_CHECK_MODULES([pangocairo], [pangocairo >= 1.0], , AC_MSG_ERROR([pangocairo >= 1.0 not found])) + [fi] [fi] -AC_CONFIG_FILES([Makefile - libmbfly.pc - libmbfly-uninstalled.pc - examples/Makefile - examples/calculator/Makefile - examples/svg2code_ex/Makefile - examples/tank/Makefile - examples/drag/Makefile - examples/dynamic/Makefile - examples/menu/Makefile - src/Makefile - include/Makefile - inkscape/Makefile - nodejs/Makefile - tools/Makefile]) +AC_CONFIG_FILES([ + Makefile + libmbfly.pc + libmbfly-uninstalled.pc + examples/Makefile + examples/calculator/Makefile + examples/svg2code_ex/Makefile + examples/tank/Makefile + examples/drag/Makefile + examples/dynamic/Makefile + examples/menu/Makefile + src/Makefile + include/Makefile + inkscape/Makefile + nodejs/Makefile + tools/Makefile + ]) AH_TEMPLATE([SH_TEXT],[Enable sh_text object]) AH_TEMPLATE([SH_STEXT],[Enable sh_stext object])
--- a/include/mb_graph_engine_cairo.h Wed Jul 21 07:27:15 2010 +0800 +++ b/include/mb_graph_engine_cairo.h Sun Jul 25 10:19:04 2010 +0800 @@ -3,7 +3,7 @@ #include <stdio.h> #include <cairo.h> -#include <cairo-xlib.h> +#include <cairo-directfb.h> #include "mb_basic_types.h" #include "mb_img_ldr.h" @@ -99,7 +99,7 @@ static void mbe_clear(mbe_t *canvas) { cairo_operator_t old_op; - + old_op = cairo_get_operator(canvas); cairo_set_operator(canvas, CAIRO_OPERATOR_CLEAR); cairo_paint(canvas); @@ -110,7 +110,7 @@ cairo_operator_t saved_op; cairo_surface_t *surf; cairo_pattern_t *ptn; - + surf = cairo_get_target(src); ptn = cairo_pattern_create_for_surface(surf); cairo_set_source(src, ptn); @@ -131,13 +131,13 @@ options = cairo_font_options_create(); if(options == NULL) return NULL; - + MB_MATRIX_2_CAIRO(cfnt_mtx, fnt_mtx); MB_MATRIX_2_CAIRO(cctm, ctm); scaled = cairo_scaled_font_create(face, &cfnt_mtx, &cctm, options); cairo_font_options_destroy(options); - + return scaled; } @@ -147,7 +147,7 @@ int width, int height, int stride) { cairo_format_t _fmt; - + switch(fmt) { case MB_IFMT_ARGB32: _fmt = CAIRO_FORMAT_ARGB32; @@ -198,7 +198,7 @@ static mbe_surface_t * mbe_image_surface_create(mb_img_fmt_t fmt, int width, int height) { cairo_format_t _fmt; - + switch(fmt) { case MB_IFMT_ARGB32: _fmt = CAIRO_FORMAT_ARGB32; @@ -215,7 +215,7 @@ default: return NULL; } - + return cairo_image_surface_create(_fmt, width, height); }