cross-compile cleanly damnit!

SVN revision: 9002
This commit is contained in:
Carsten Haitzler 2004-02-17 07:12:38 +00:00
parent eeb498c48e
commit f11447ab8a
17 changed files with 132 additions and 156 deletions

View File

@ -116,10 +116,13 @@ AC_ARG_WITH(freetype-config,
PROG_CONFIG=$withval;
echo "using "$PROG_CONFIG" for freetype-config";
],[
PROG="freetype-config";
AC_PATH_PROG(PROG_CONFIG, $PROG, "", $PATH)
PROG="freetype-config";
AC_PATH_PROG(PROG_CONFIG, $PROG, "", $PATH)
])
if [ test -z $PROG_CONFIG ]; then
if [ test -n "$FREETYPE_CONFIG" ]; then
PROG_CONFIG=$FREETYPE_CONFIG;
fi
if [ test -z "$PROG_CONFIG" ]; then
echo $PROG " is not in your \$PATH. Please ensure it is.";
echo "You may need to install the librarya and/or development packages";
echo "that contain this configure-script.";
@ -129,7 +132,6 @@ fi
freetype_cflags=`$PROG_CONFIG --cflags`
freetype_libs=`$PROG_CONFIG --libs`
#####################################################################
## Engines
@ -498,8 +500,9 @@ if test "x$have_eet" = "xyes"; then
fi
if test "x$have_eet" = "xyes"; then
AC_DEFINE(BUILD_LOADER_EET, 1, [EET Image Loader Support])
eet_cflags=`eet-config --cflags`
eet_libs=`eet-config --libs`
if [ test -z "$EET_CONFIG" ]; then EET_CONFIG="eet-config"; fi
eet_cflags=`$EET_CONFIG --cflags`
eet_libs=`$EET_CONFIG --libs`
fi
#######################################
@ -531,8 +534,9 @@ if test "x$have_edb" = "xyes"; then
fi
if test "x$have_edb" = "xyes"; then
AC_DEFINE(BUILD_LOADER_EDB, 1, [EDB Image Loader Support])
edb_cflags=`edb-config --cflags`
edb_libs=`edb-config --libs`
if [ test -z "$EDB_CONFIG" ]; then EDV_CONFIG="edb-config"; fi
edb_cflags=`$EDB_CONFIG --cflags`
edb_libs=`$EDB_CONFIG --libs`
fi
#######################################
@ -564,8 +568,9 @@ if test "x$have_eet_fonts" = "xyes"; then
fi
if test "x$have_eet_fonts" = "xyes"; then
AC_DEFINE(BUILD_FONT_LOADER_EET, 1, [EET Font Loader Support])
eet_cflags=`eet-config --cflags`
eet_libs=`eet-config --libs`
if [ test -z "$EET_CONFIG" ]; then EET_CONFIG="eet-config"; fi
eet_cflags=`$EET_CONFIG --cflags`
eet_libs=`$EET_CONFIG --libs`
fi
#####################################################################

View File

@ -1,7 +1,23 @@
#!/bin/sh
PROJ="evas"
SKIFF="/skiff/local"
HOSTARCH="i686-pc-linux-gnu"
TARGETCPU="arm"
TARGETARCH=$TARGETCPU"-pc-linux-gnu"
export EDB_CONFIG=$SKIFF"/"$TARGETCPU"-linux/bin/edb-config"
export EET_CONFIG=$SKIFF"/"$TARGETCPU"-linux/bin/eet-config"
export FREETYPE_CONFIG=$SKIFF"/"$TARGETCPU"-linux/bin/freetype-config"
make clean distclean
export CC=/skiff/local/bin/arm-linux-gcc
export CFLAGS=-O9
./configure \
--host=$HOSTARCH \
--build=$TARGETARCH \
--target=$TARGETARCH \
--disable-software-x11 \
--disable-directfb \
--enable-fb \
@ -45,97 +61,60 @@ make clean distclean
--disable-convert-32-rgb-rot-270 \
--disable-convert-32-rgb-rot-90
CC="/skiff/local/bin/arm-linux-gcc"
ST="/skiff/local/bin/arm-linux-strip"
CFLAGS="-O9"
INST="/tmp/"$PROJ"-instroot"
sudo rm -rf $INST
rm -rf "build"
mkdir "build"
DST=`pwd`"/build";
make
mkdir $DST"/lib";
mkdir $DST"/bin";
mkdir $DST"/include";
mkdir $DST"/share";
mkdir $DST"/share/evas";
for I in find . -name "*.la" -print; do
sed s:"/usr/local":$INST:g < $I > "/tmp/.sed.tmp"
sudo cp "/tmp/.sed.tmp" $I
rm -f "/tmp/.sed.tmp"
done
pushd src
sudo \
make \
prefix=$INST \
exec_prefix=$INST \
bindir=$INST"/bin" \
sbindir=$INST"/sbin" \
sysconfdir=$INST"/etc" \
datadir=$INST"/share" \
includedir=$INST"/include" \
libdir=$INST"/lib" \
libexecdir=$INST"/libexec" \
localstatedir=$INST"/var/run" \
mandir=$INST"/share/man" \
infodir=$INST"/share/info" \
install
pushd lib
LIB="evas"
$CC \
main.c canvas/*.c data/*.c engines/fb/*.c file/*.c \
engines/common/evas_blend_alpha_color_pixel.c \
engines/common/evas_blend_color_pixel.c \
engines/common/evas_blend_main.c \
engines/common/evas_blend_pixel_cmod_pixel.c \
engines/common/evas_blend_pixel_mul_pixel.c \
engines/common/evas_blend_pixel_pixel.c \
engines/common/evas_blit_main.c \
engines/common/evas_convert_color.c \
engines/common/evas_convert_gry_1.c \
engines/common/evas_convert_gry_4.c \
engines/common/evas_convert_gry_8.c \
engines/common/evas_convert_main.c \
engines/common/evas_convert_rgb_16.c \
engines/common/evas_convert_rgb_24.c \
engines/common/evas_convert_rgb_32.c \
engines/common/evas_convert_rgb_8.c \
engines/common/evas_cpu.c \
engines/common/evas_draw_main.c \
engines/common/evas_font_draw.c \
engines/common/evas_font_load.c \
engines/common/evas_font_main.c \
engines/common/evas_font_query.c \
engines/common/evas_gradient_main.c \
engines/common/evas_image_load.c \
engines/common/evas_image_main.c \
engines/common/evas_line_main.c \
engines/common/evas_polygon_main.c \
engines/common/evas_rectangle_main.c \
engines/common/evas_scale_main.c \
engines/common/evas_scale_sample.c \
engines/common/evas_scale_smooth.c \
engines/common/evas_tiler.c \
$CFLAGS \
-I. -Icanvas -Idata -Iengines/common -Iengines/fb -Ifile -Iinclude \
-I/skiff/local/include/freetype2 \
-I../.. \
-I/skiff/local/include \
-shared -fPIC -DPIC \
-Wl,-soname -Wl,"lib"$LIB".so.1" \
-o "lib"$LIB".so.1.0.0"
$ST -g "lib"$LIB".so.1.0.0"
rm -f "lib"$LIB".so"
ln -s "lib"$LIB".so.1.0.0" "lib"$LIB".so"
rm -f "lib"$LIB".so.1"
ln -s "lib"$LIB".so.1.0.0" "lib"$LIB".so.1"
rm -f "lib"$LIB".so.1.0"
ln -s "lib"$LIB".so.1.0.0" "lib"$LIB".so.1.0"
cp -a "lib"$LIB".so"* $DST"/lib";
cp -a Evas.h Evas_Engine_FB.h $DST"/include";
popd
## FIXUPS
for I in $INST"/bin/"* $INST"/sbin/"* $INST"/libexec/"*; do
J=`echo $I | sed s:$TARGETARCH"-"::g`
sudo mv $I $J
done
pushd bin
BIN="evas_fb_test"
$CC evas_fb_main.c evas_test_main.c \
-I../.. -I../lib \
-I. \
-I/skiff/local/include \
-L. -L../lib \
-levas -leet -ljpeg -lpng -lfreetype -lm -lz \
-o $BIN
$ST $BIN
cp -a $BIN $DST"/bin";
popd
popd
CF=$INST"/bin/"$PROJ"-config"
sed s:"/usr/local":$SKIFF"/"$TARGETCPU"-linux":g < $CF > "/tmp/.sed.tmp"
sudo cp "/tmp/.sed.tmp" $CF
rm -f "/tmp/.sed.tmp"
cp -ar data $DST"/share/evas"
for I in $INST"/lib/"*.la; do
sed s:"/usr/local":$SKIFF"/"$TARGETCPU"-linux":g < $I > "/tmp/.sed.tmp"
sudo cp "/tmp/.sed.tmp" $I
rm -f "/tmp/.sed.tmp"
done
PD=`pwd`
pushd "build"
tar zcvf $PD"/data.tar.gz" *
pushd "/skiff/local"
sudo tar zxvf $PD"/data.tar.gz"
popd
popd
## package it all up
PACK=$PROJ"-"$TARGETCPU"-inst.tar.gz"
DIR=$PWD
cd $INST
sudo tar zcvf $DIR"/"$PACK *
sudo chown $USER $DIR"/"$PACK
cd $DIR
sudo rm -rf $INST
## install it in our skiff tree
cd $SKIFF"/"$TARGETCPU"-linux"
sudo tar zxvf $DIR"/"$PACK

View File

@ -1,7 +1,7 @@
## Process this file with automake to produce Makefile.in
INCLUDES = \
-I. -I$(top_srcdir)/src/lib -I$(includedir) -I$(top_srcdir) \
-I. -I$(top_srcdir)/src/lib -I$(top_srcdir) \
@DIRECTFB_CFLAGS@ @qt_cflags@ @gl_cflags@
bin_PROGRAMS = \

View File

@ -7,12 +7,11 @@ AUTOMAKE_OPTIONS = 1.4 foreign
# A list of all the files in the current directory which can be regenerated
MAINTAINERCLEANFILES = Makefile.in
LDFLAGS = -L/usr/local/lib
LDFLAGS =
INCLUDES = @freetype_cflags@ @x_cflags@ @qt_cflags@ @DIRECTFB_CFLAGS@ @gl_cflags@ \
-I/usr/local/include \
-I$(top_srcdir)/src/lib/include \
-I$(includedir) \
-I/usr/local/include
-I. \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include
lib_LTLIBRARIES = libevas.la

View File

@ -5,13 +5,11 @@ AUTOMAKE_OPTIONS = 1.4 foreign
# A list of all the files in the current directory which can be regenerated
MAINTAINERCLEANFILES = Makefile.in
LDFLAGS = -L/usr/local/lib
LDFLAGS =
INCLUDES = @freetype_cflags@ @x_cflags@ @DIRECTFB_CFLAGS@ \
-I. \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
-I$(includedir) \
-I/usr/local/include
-I$(top_srcdir)/src/lib/include
noinst_LTLIBRARIES = libevas_canvas.la
libevas_canvas_la_SOURCES = \

View File

@ -5,13 +5,11 @@ AUTOMAKE_OPTIONS = 1.4 foreign
# A list of all the files in the current directory which can be regenerated
MAINTAINERCLEANFILES = Makefile.in
LDFLAGS = -L/usr/local/lib
LDFLAGS =
INCLUDES = @freetype_cflags@ \
-I. \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
-I$(includedir) \
-I/usr/local/include
-I$(top_srcdir)/src/lib/include
noinst_LTLIBRARIES = libevas_data.la
libevas_data_la_SOURCES = \

View File

@ -5,14 +5,11 @@ AUTOMAKE_OPTIONS = 1.4 foreign
# A list of all the files in the current directory which can be regenerated
MAINTAINERCLEANFILES = Makefile.in
LDFLAGS = -L/usr/local/lib
LDFLAGS =
INCLUDES = @freetype_cflags@ \
-I. \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
-I$(includedir) \
-I/usr/local/include
-I$(top_srcdir)/src/lib/include
if BUILD_ENGINE_BUFFER

View File

@ -5,13 +5,12 @@ AUTOMAKE_OPTIONS = 1.4 foreign
# A list of all the files in the current directory which can be regenerated
MAINTAINERCLEANFILES = Makefile.in
LDFLAGS = -L/usr/local/lib
LDFLAGS =
INCLUDES = @freetype_cflags@ \
-I. \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
-I$(includedir) \
-I/usr/local/include
-I$(top_srcdir)/src/lib/include
noinst_LTLIBRARIES = libevas_engine_common.la
libevas_engine_common_la_SOURCES = \

View File

@ -71,21 +71,36 @@ evas_common_font_source_load(const char *name)
return NULL;
}
#if 0 /* debugging to look at charmaps in a ttf */
printf("%i\n", fs->ft.face->num_charmaps);
printf("charmaps [%s]: %i\n", name, fs->ft.face->num_charmaps);
{
int i;
for (i = 0; i < fs->ft.face->num_charmaps; i++)
{
printf("%i: %x, %c\n",
i, fs->ft.face->charmaps[i]->encoding,
fs->ft.face->charmaps[i]->encoding);
printf(" %i: %x, ",
i, fs->ft.face->charmaps[i]->encoding);
if (fs->ft.face->charmaps[i]->encoding == FT_ENCODING_NONE) printf("none\n");
else if (fs->ft.face->charmaps[i]->encoding == FT_ENCODING_UNICODE) printf("unicode\n");
else if (fs->ft.face->charmaps[i]->encoding == FT_ENCODING_MS_SYMBOL) printf("ms_symbol\n");
else if (fs->ft.face->charmaps[i]->encoding == FT_ENCODING_SJIS) printf("sjis\n");
else if (fs->ft.face->charmaps[i]->encoding == FT_ENCODING_GB2312) printf("gb3212\n");
else if (fs->ft.face->charmaps[i]->encoding == FT_ENCODING_BIG5) printf("big5\n");
else if (fs->ft.face->charmaps[i]->encoding == FT_ENCODING_WANSUNG) printf("wansung\n");
else if (fs->ft.face->charmaps[i]->encoding == FT_ENCODING_JOHAB) printf("johab\n");
else if (fs->ft.face->charmaps[i]->encoding == FT_ENCODING_ADOBE_LATIN_1) printf("adobe_latin_1\n");
else if (fs->ft.face->charmaps[i]->encoding == FT_ENCODING_ADOBE_STANDARD) printf("adobe_standard\n");
else if (fs->ft.face->charmaps[i]->encoding == FT_ENCODING_ADOBE_EXPERT) printf("adobe_expert\n");
else if (fs->ft.face->charmaps[i]->encoding == FT_ENCODING_ADOBE_CUSTOM) printf("adobe_custom\n");
else if (fs->ft.face->charmaps[i]->encoding == FT_ENCODING_APPLE_ROMAN) printf("apple_roman\n");
else printf("UNKNOWN");
printf("\n");
}
}
#endif
error = FT_Select_Charmap(fs->ft.face, ft_encoding_unicode);
if (error)
{
printf("cant select unicode!\n");
/* disable this for now...
error = FT_Select_Charmap(fs->ft.face, ft_encoding_latin_2);
if (error)

View File

@ -5,13 +5,11 @@ AUTOMAKE_OPTIONS = 1.4 foreign
# A list of all the files in the current directory which can be regenerated
MAINTAINERCLEANFILES = Makefile.in
LDFLAGS = -L/usr/local/lib
LDFLAGS =
INCLUDES = @freetype_cflags@ @DIRECTFB_CFLAGS@ \
-I. \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
-I$(includedir) \
-I/usr/local/include
-I$(top_srcdir)/src/lib/include
if BUILD_ENGINE_DIRECTFB

View File

@ -5,13 +5,11 @@ AUTOMAKE_OPTIONS = 1.4 foreign
# A list of all the files in the current directory which can be regenerated
MAINTAINERCLEANFILES = Makefile.in
LDFLAGS = -L/usr/local/lib
LDFLAGS =
INCLUDES = @freetype_cflags@ \
-I. \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
-I$(includedir) \
-I/usr/local/include
-I$(top_srcdir)/src/lib/include
if BUILD_ENGINE_FB

View File

@ -5,13 +5,11 @@ AUTOMAKE_OPTIONS = 1.4 foreign
# A list of all the files in the current directory which can be regenerated
MAINTAINERCLEANFILES = Makefile.in
LDFLAGS = -L/usr/local/lib
LDFLAGS =
INCLUDES = @freetype_cflags@ @gl_cflags@ \
-I. \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
-I$(includedir) \
-I/usr/local/include
-I$(top_srcdir)/src/lib/include
if BUILD_ENGINE_GL_COMMON

View File

@ -5,13 +5,11 @@ AUTOMAKE_OPTIONS = 1.4 foreign
# A list of all the files in the current directory which can be regenerated
MAINTAINERCLEANFILES = Makefile.in
LDFLAGS = -L/usr/local/lib
LDFLAGS =
INCLUDES = @freetype_cflags@ @x_cflags@ @gl_cflags@ \
-I. \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
-I$(includedir) \
-I/usr/local/include
-I$(top_srcdir)/src/lib/include
if BUILD_ENGINE_GL_X11

View File

@ -5,13 +5,11 @@ AUTOMAKE_OPTIONS = 1.4 foreign
# A list of all the files in the current directory which can be regenerated
MAINTAINERCLEANFILES = Makefile.in
LDFLAGS = -L/usr/local/lib
LDFLAGS =
INCLUDES = @freetype_cflags@ @qt_cflags@ \
-I. \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
-I$(includedir) \
-I/usr/local/include
-I$(top_srcdir)/src/lib/include
CXXFLAGS = $(CFLAGS) -DQT_QWS_EBX -DQT_QWS_CUSTOM -DQWS -DNO_DEBUG

View File

@ -5,14 +5,12 @@ AUTOMAKE_OPTIONS = 1.4 foreign
# A list of all the files in the current directory which can be regenerated
MAINTAINERCLEANFILES = Makefile.in
LDFLAGS = -L/usr/local/lib
LDFLAGS =
INCLUDES = @freetype_cflags@ @x_cflags@ \
-I. \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
-I$(includedir) \
-I/usr/local/include
-I$(top_srcdir)/src/lib/include
if BUILD_ENGINE_SOFTWARE_X11
noinst_LTLIBRARIES = libevas_engine_software_x11.la

View File

@ -5,13 +5,11 @@ AUTOMAKE_OPTIONS = 1.4 foreign
# A list of all the files in the current directory which can be regenerated
MAINTAINERCLEANFILES = Makefile.in
LDFLAGS = -L/usr/local/lib
LDFLAGS =
INCLUDES = @freetype_cflags@ \
-I. \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
-I$(includedir) \
-I/usr/local/include
-I$(top_srcdir)/src/lib/include
noinst_LTLIBRARIES = libevas_file.la
libevas_file_la_SOURCES = \

View File

@ -1,6 +1,3 @@
#include "evas_common.h"
#include "evas_private.h"
/* os dependant file code. for unix-y like fs's only for now */
/* if your os doesn't use unix-like fs starting with "/" for the root and */
/* the file path separator isn't "/" then you may need to help out by */
@ -19,6 +16,9 @@
#include <fnmatch.h>
#include <dirent.h>
#include "evas_common.h"
#include "evas_private.h"
int
evas_file_path_is_full_path(char *path)
{