summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Grandin <grandinp@altern.org>2017-01-01 14:35:30 -0800
committerPierre Grandin <grandinp@altern.org>2017-01-01 14:35:30 -0800
commitdadc39585cd41aadf42a6a840f29e0bfea25288f (patch)
tree0e990ac3a1673b0a9a536ce923dd6622deb519f3
parent37596b0863e5c821724fe65775eba5d66736b81b (diff)
downloadnavit-dadc39585cd41aadf42a6a840f29e0bfea25288f.tar.gz
Reducing code duplication in the tomtom builds
-rw-r--r--ci/build_tomtom_minimal.sh147
-rw-r--r--ci/build_tomtom_plugin.sh291
-rw-r--r--ci/setup_tomtom_requirements.sh154
3 files changed, 175 insertions, 417 deletions
diff --git a/ci/build_tomtom_minimal.sh b/ci/build_tomtom_minimal.sh
index 3c8a65030..e7c58ed1c 100644
--- a/ci/build_tomtom_minimal.sh
+++ b/ci/build_tomtom_minimal.sh
@@ -7,152 +7,7 @@
set -e
-export ARCH=arm-linux
-cp Toolchain/$ARCH.cmake /tmp
-
-# toolchain
-export TOMTOM_SDK_DIR=/opt/tomtom-sdk
-mkdir -p $TOMTOM_SDK_DIR >/dev/null 2>&1 || export TOMTOM_SDK_DIR=$HOME/tomtom-sdk
-export PREFIX=$TOMTOM_SDK_DIR/gcc-3.3.4_glibc-2.3.2/$ARCH/sys-root
-export PATH=$TOMTOM_SDK_DIR/gcc-3.3.4_glibc-2.3.2/bin:$PREFIX/bin/:$PATH
-export CFLAGS="-O2 -I$PREFIX/include -I$PREFIX/usr/include"
-export CPPFLAGS="-I$PREFIX/include -I$PREFIX/usr/include"
-export LDFLAGS="-L$PREFIX/lib -L$PREFIX/usr/lib"
-export CC=$ARCH-gcc
-export CXX=$ARCH-g++
-export LD=$ARCH-ld
-export NM="$ARCH-nm -B"
-export AR=$ARCH-ar
-export RANLIB=$ARCH-ranlib
-export STRIP=$ARCH-strip
-export OBJCOPY=$ARCH-objcopy
-export LN_S="ln -s"
-export PKG_CONFIG_LIBDIR=$PREFIX/lib/pkgconfig
-JOBS=`getconf _NPROCESSORS_ONLN`
-
-echo "Jobs"
-echo $JOBS
-
-mkdir -p ~/tomtom_assets
-
-if ! [ -e "~/tomtom_assets/toolchain_redhat_gcc-3.3.4_glibc-2.3.2-20060131a.tar.gz" ]
- then
- wget -nv -c http://www.tomtom.com/gpl/toolchain_redhat_gcc-3.3.4_glibc-2.3.2-20060131a.tar.gz -P ~/tomtom_assets
-fi
-
-if ! test -f "~/tomtom_assets/libpng-1.6.27.tar.gz"
-then
- wget -nv -c ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng16/libpng-1.6.27.tar.gz -P ~/tomtom_assets
-fi
-
-# toolchain
-cd /tmp
-mkdir -p $TOMTOM_SDK_DIR
-tar xzf ~/tomtom_assets/toolchain_redhat_gcc-3.3.4_glibc-2.3.2-20060131a.tar.gz -C $TOMTOM_SDK_DIR
-
-
-# zlib
-cd /tmp
-wget -nv -c http://zlib.net/zlib-1.2.9.tar.gz
-tar xzf zlib-1.2.9.tar.gz
-cd zlib-1.2.9
-./configure --prefix=$PREFIX
-make -j$JOBS
-make install
-
-# libxml
-cd /tmp/
-wget -nv -c http://xmlsoft.org/sources/libxml2-2.7.8.tar.gz
-tar xzf libxml2-2.7.8.tar.gz
-cd libxml2-2.7.8/
-./configure --prefix=$PREFIX --host=$ARCH --without-python
-make -j$JOBS
-make install
-
-# libpng
-cd /tmp/
-tar xzf ~/tomtom_assets/libpng-1.6.27.tar.gz
-cd libpng-1.6.27/
-./configure --prefix=$PREFIX --host=$ARCH
-make -j$JOBS
-make install
-
-
-cd /tmp
-wget -nv -c http://download.savannah.gnu.org/releases/freetype/freetype-2.5.0.tar.gz
-tar xzf freetype-2.5.0.tar.gz
-cd freetype-2.5.0
-./configure --prefix=$PREFIX --host=$ARCH
-make -j$JOBS
-make install
-
-freetype-config --cflags
-
-# glib
-cd /tmp
-wget -nv -c http://ftp.gnome.org/pub/gnome/sources/glib/2.25/glib-2.25.17.tar.gz
-tar xzf glib-2.25.17.tar.gz
-cd glib-2.25.17
-cat > tomtom.cache << EOF
-glib_cv_long_long_format=ll
-glib_cv_stack_grows=no
-glib_cv_uscore=no
-ac_cv_func_posix_getgrgid_r=yes
-ac_cv_func_posix_getpwuid_r=yes
-EOF
-chmod a-w tomtom.cache
-./configure --prefix=$PREFIX --host=$ARCH --cache-file=tomtom.cache
-sed -i "s|cp xgen-gmc gmarshal.c |cp xgen-gmc gmarshal.c \&\& sed -i \"s\|g_value_get_schar\|g_value_get_char\|g\" gmarshal.c |g" gobject/Makefile
-make -j$JOBS
-make install
-
-
-# tslib
-cd /tmp
-rm -rf tslib-svn
-git clone https://github.com/playya/tslib-svn.git
-cd tslib-svn
-sed -i "s|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|g" configure.ac
-sed -i "119i\#ifdef EVIOCGRAB" plugins/input-raw.c
-sed -i "124i\#endif" plugins/input-raw.c
-sed -i "290i\#ifdef EVIOCGRAB" plugins/input-raw.c
-sed -i "294i\#endif" plugins/input-raw.c
-sed -i "s|# module_raw h3600|module_raw h3600|g" etc/ts.conf # tomtom go 710
-./autogen.sh
-./configure --prefix=$PREFIX --host=$ARCH
-make -j$JOBS
-make install
-
-
-cd /tmp
-wget -nv -c http://www.libsdl.org/release/SDL-1.2.15.tar.gz
-tar xzf SDL-1.2.15.tar.gz
-cd SDL-1.2.15
-wget -nv -c http://tracks.yaina.de/source/sdl-fbcon-notty.patch
-patch -p0 -i sdl-fbcon-notty.patch
-./configure --prefix=$PREFIX --host=$ARCH \
- --disable-esd --disable-cdrom --disable-joystick --disable-video-x11 \
- --disable-x11-vm --disable-dga --disable-video-x11-dgamouse \
- --disable-video-x11-xv --disable-video-x11-xinerama --disable-video-directfb \
- --enable-video-fbcon --disable-audio CFLAGS="$CFLAGS -DFBCON_NOTTY"
-make -j$JOBS
-make install
-
-# to find sdl-config
-export PATH=$PREFIX/bin:$PATH
-
-# sdl image
-cd /tmp
-wget -nv -c http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.12.tar.gz
-tar xzf SDL_image-1.2.12.tar.gz
-cd SDL_image-1.2.12
-./configure --prefix=$PREFIX --host=$ARCH
-make -j$JOBS
-make install
-
-
-# in the end we only want Navit locale
-rm -r $PREFIX/share/locale
+bash setup_tomtom_requirements.sh
# navit
diff --git a/ci/build_tomtom_plugin.sh b/ci/build_tomtom_plugin.sh
index a8820f3a2..0137506c6 100644
--- a/ci/build_tomtom_plugin.sh
+++ b/ci/build_tomtom_plugin.sh
@@ -6,261 +6,7 @@
set -e
-export ARCH=arm-linux
-cp Toolchain/$ARCH.cmake /tmp
-
-# toolchain
-export TOMTOM_SDK_DIR=/opt/tomtom-sdk
-mkdir -p $TOMTOM_SDK_DIR >/dev/null 2>&1 || export TOMTOM_SDK_DIR=$HOME/tomtom-sdk
-export PREFIX=$TOMTOM_SDK_DIR/gcc-3.3.4_glibc-2.3.2/$ARCH/sys-root
-export PATH=$TOMTOM_SDK_DIR/gcc-3.3.4_glibc-2.3.2/bin:$PREFIX/bin/:$PATH
-export CFLAGS="-O2 -I$PREFIX/include -I$PREFIX/usr/include"
-export CPPFLAGS="-I$PREFIX/include -I$PREFIX/usr/include"
-export LDFLAGS="-L$PREFIX/lib -L$PREFIX/usr/lib"
-export CC=$ARCH-gcc
-export CXX=$ARCH-g++
-export LD=$ARCH-ld
-export NM="$ARCH-nm -B"
-export AR=$ARCH-ar
-export RANLIB=$ARCH-ranlib
-export STRIP=$ARCH-strip
-export OBJCOPY=$ARCH-objcopy
-export LN_S="ln -s"
-export PKG_CONFIG_LIBDIR=$PREFIX/lib/pkgconfig
-JOBS=`getconf _NPROCESSORS_ONLN`
-
-echo "Jobs"
-echo $JOBS
-
-mkdir -p ~/tomtom_assets
-
-if ! [ -e "~/tomtom_assets/toolchain_redhat_gcc-3.3.4_glibc-2.3.2-20060131a.tar.gz" ]
- then
- wget -nv -c http://www.tomtom.com/gpl/toolchain_redhat_gcc-3.3.4_glibc-2.3.2-20060131a.tar.gz -P ~/tomtom_assets
-fi
-
-if ! test -f "~/tomtom_assets/libpng-1.6.27.tar.gz"
-then
- wget -nv -c ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng16/libpng-1.6.27.tar.gz -P ~/tomtom_assets
-fi
-
-# toolchain
-cd /tmp
-mkdir -p $TOMTOM_SDK_DIR
-tar xzf ~/tomtom_assets/toolchain_redhat_gcc-3.3.4_glibc-2.3.2-20060131a.tar.gz -C $TOMTOM_SDK_DIR
-
-# espeak
-cd /tmp
-# this one includes the precompiled voices
-wget -nv -c http://freefr.dl.sourceforge.net/project/espeak/espeak/espeak-1.48/espeak-1.48.04-source.zip
-unzip espeak-1.48.04-source.zip
-cd espeak-1.48.04-source
-sed -i "s/PREFIX=\/usr//g" src/Makefile
-sed -i "s/DATADIR=\/usr\/share\/espeak-data/DATADIR=~\/share\/espeak-data/g" src/Makefile
-sed -i "s/AUDIO = portaudio/#AUDIO = portaudio/g" src/Makefile
-sed -i "s/-fvisibility=hidden//g" src/Makefile
-cat src/Makefile
-make -C src
-cd src
-make install
-
-# http://forum.navit-project.org/viewtopic.php?f=17&t=568
-cd /tmp
-cat > /tmp/espeakdsp.c << EOF
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/soundcard.h>
-#include <sys/wait.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-
-#define IBUFFERLEN 1024
-#define MAXARGC 30
-
-
-int main(int argc, char *argv[],char *envp[])
-{
- int pipefd[2];
- pid_t cpid;
- char buf;
- int co,wp,l,fh;
- short bufi[IBUFFERLEN],bufo[IBUFFERLEN*2];
- int rate=22050;
-
- char *newargv[MAXARGC+2];
-
- for(co=0;co<argc;co++)
- {
- if(co>=MAXARGC)break;
- newargv[co]=argv[co];
- }
- newargv[co++]="--stdout";
- newargv[co++]=NULL;
-
- if (pipe(pipefd) == -1)
- {
- perror("pipe");
- exit(EXIT_FAILURE);
- }
-
- if(setpriority(PRIO_PROCESS,0,-10))
- perror ("setpriority");
-
- cpid = fork();
- if (cpid == -1)
- {
- perror("fork");
- exit(EXIT_FAILURE);
- }
-
- if (cpid == 0)
- { /* Child writes to pipe */
-
- close(pipefd[0]); /* Close unused read end */
- dup2(pipefd[1],1);
- execve("/mnt/sdcard/navit/bin/espeak",newargv,envp);
- perror("exec /mnt/sdcard/navit/bin/espeak");
- close(pipefd[1]); /* Reader will see EOF */
- wait(NULL); /* Wait for child */
- exit(EXIT_SUCCESS);
-
- } else { /* Parent read from pipe */
-
- close(pipefd[1]); /* Close unused write end */
-
- l=read(pipefd[0],bufi,64);
- if(memcmp(bufi,"RIFF",4))
- {
- while(l>0)
- {
- write(1,bufi,l);
- l=read(pipefd[0],bufi,IBUFFERLEN);
- }
- exit(EXIT_SUCCESS);
- }
- l=read(pipefd[0],bufi,IBUFFERLEN);
- if(l<500)
- {
- printf("espeakdsp: avoid noise speaking a empty string\n");
- exit(EXIT_SUCCESS);
- }
- usleep (50000);
-
- fh=open("/dev/dsp",O_WRONLY);
- if(fh<0)
- {
- perror("open /dev/dsp");
- exit(EXIT_FAILURE);
- }
- ioctl(fh, SNDCTL_DSP_SPEED , &rate);
- ioctl(fh, SNDCTL_DSP_SYNC, 0);
- while(l)
- {
- for(co=0,wp=0;co<IBUFFERLEN;co++)
- {
- bufo[wp++]=bufi[co]; /* mono->stereo */
- bufo[wp++]=bufi[co];
- }
- write (fh,bufo,wp);
- l=read(pipefd[0],bufi,IBUFFERLEN);
- }
- ioctl(fh, SNDCTL_DSP_SYNC, 0);
- close(pipefd[0]);
- exit(EXIT_SUCCESS);
- }
-}
-EOF
-arm-linux-gcc -O2 -I$PREFIX/include -I$PREFIX/usr/include espeakdsp.c -o espeakdsp
-
-# zlib
-cd /tmp
-wget -nv -c http://zlib.net/zlib-1.2.9.tar.gz
-tar xzf zlib-1.2.9.tar.gz
-cd zlib-1.2.9
-./configure --prefix=$PREFIX
-make -j$JOBS
-make install
-
-# libxml
-cd /tmp/
-wget -nv -c http://xmlsoft.org/sources/libxml2-2.7.8.tar.gz
-tar xzf libxml2-2.7.8.tar.gz
-cd libxml2-2.7.8/
-./configure --prefix=$PREFIX --host=$ARCH --without-python
-make -j$JOBS
-make install
-
-# libpng
-cd /tmp/
-tar xzf ~/tomtom_assets/libpng-1.6.27.tar.gz
-cd libpng-1.6.27/
-./configure --prefix=$PREFIX --host=$ARCH
-make -j$JOBS
-make install
-
-
-cd /tmp
-wget -nv -c http://download.savannah.gnu.org/releases/freetype/freetype-2.5.0.tar.gz
-tar xzf freetype-2.5.0.tar.gz
-cd freetype-2.5.0
-./configure --prefix=$PREFIX --host=$ARCH
-make -j$JOBS
-make install
-
-freetype-config --cflags
-
-# glib
-cd /tmp
-wget -nv -c http://ftp.gnome.org/pub/gnome/sources/glib/2.25/glib-2.25.17.tar.gz
-tar xzf glib-2.25.17.tar.gz
-cd glib-2.25.17
-cat > tomtom.cache << EOF
-glib_cv_long_long_format=ll
-glib_cv_stack_grows=no
-glib_cv_uscore=no
-ac_cv_func_posix_getgrgid_r=yes
-ac_cv_func_posix_getpwuid_r=yes
-EOF
-chmod a-w tomtom.cache
-./configure --prefix=$PREFIX --host=$ARCH --cache-file=tomtom.cache
-sed -i "s|cp xgen-gmc gmarshal.c |cp xgen-gmc gmarshal.c \&\& sed -i \"s\|g_value_get_schar\|g_value_get_char\|g\" gmarshal.c |g" gobject/Makefile
-make -j$JOBS
-make install
-
-
-# tslib
-cd /tmp
-rm -rf tslib-svn
-git clone https://github.com/playya/tslib-svn.git
-cd tslib-svn
-sed -i "s|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|g" configure.ac
-sed -i "119i\#ifdef EVIOCGRAB" plugins/input-raw.c
-sed -i "124i\#endif" plugins/input-raw.c
-sed -i "290i\#ifdef EVIOCGRAB" plugins/input-raw.c
-sed -i "294i\#endif" plugins/input-raw.c
-sed -i "s|# module_raw h3600|module_raw h3600|g" etc/ts.conf # tomtom go 710
-./autogen.sh
-./configure --prefix=$PREFIX --host=$ARCH
-make -j$JOBS
-make install
-
-
-cd /tmp
-wget -nv -c http://www.libsdl.org/release/SDL-1.2.15.tar.gz
-tar xzf SDL-1.2.15.tar.gz
-cd SDL-1.2.15
-wget -nv -c http://tracks.yaina.de/source/sdl-fbcon-notty.patch
-patch -p0 -i sdl-fbcon-notty.patch
-./configure --prefix=$PREFIX --host=$ARCH \
- --disable-esd --disable-cdrom --disable-joystick --disable-video-x11 \
- --disable-x11-vm --disable-dga --disable-video-x11-dgamouse \
- --disable-video-x11-xv --disable-video-x11-xinerama --disable-video-directfb \
- --enable-video-fbcon --disable-audio CFLAGS="$CFLAGS -DFBCON_NOTTY"
-make -j$JOBS
-make install
+bash setup_tomtom_requirements.sh
# sdl test utilities
cd test
@@ -268,22 +14,6 @@ cd test
make testvidinfo
cp testvidinfo $PREFIX/usr/bin/
-# to find sdl-config
-export PATH=$PREFIX/bin:$PATH
-
-# sdl image
-cd /tmp
-wget -nv -c http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.12.tar.gz
-tar xzf SDL_image-1.2.12.tar.gz
-cd SDL_image-1.2.12
-./configure --prefix=$PREFIX --host=$ARCH
-make -j$JOBS
-make install
-
-
-# in the end we only want Navit locale
-rm -r $PREFIX/share/locale
-
cat > ~/navit/navit/xpm/tomtom_minus.svg << EOF
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
@@ -302,6 +32,25 @@ cat > ~/navit/navit/xpm/tomtom_plus.svg << EOF
</svg>
EOF
+# espeak
+cd /tmp
+# this one includes the precompiled voices
+wget -nv -c http://freefr.dl.sourceforge.net/project/espeak/espeak/espeak-1.48/espeak-1.48.04-source.zip
+unzip espeak-1.48.04-source.zip
+cd espeak-1.48.04-source
+sed -i "s/PREFIX=\/usr//g" src/Makefile
+sed -i "s/DATADIR=\/usr\/share\/espeak-data/DATADIR=~\/share\/espeak-data/g" src/Makefile
+sed -i "s/AUDIO = portaudio/#AUDIO = portaudio/g" src/Makefile
+sed -i "s/-fvisibility=hidden//g" src/Makefile
+cat src/Makefile
+make -C src
+cd src
+make install
+
+# http://forum.navit-project.org/viewtopic.php?f=17&t=568
+cd /tmp
+arm-linux-gcc -O2 -I$PREFIX/include -I$PREFIX/usr/include ~/navit/contrib/tomtom/espeakdsp.c -o espeakdsp
+
# navit
cd ~/navit
diff --git a/ci/setup_tomtom_requirements.sh b/ci/setup_tomtom_requirements.sh
new file mode 100644
index 000000000..ea21a7154
--- /dev/null
+++ b/ci/setup_tomtom_requirements.sh
@@ -0,0 +1,154 @@
+#!/bin/sh
+# this builds navit for tomtom
+# in case you want to build a plugin for tomtom use build_tomtom_plugin.sh instead
+# in case you want to build a standalone system
+# https://github.com/george-hopkins/opentom
+# https://github.com/gefin/opentom
+
+set -e
+
+export ARCH=arm-linux
+cp Toolchain/$ARCH.cmake /tmp
+
+# toolchain
+export TOMTOM_SDK_DIR=/opt/tomtom-sdk
+mkdir -p $TOMTOM_SDK_DIR >/dev/null 2>&1 || export TOMTOM_SDK_DIR=$HOME/tomtom-sdk
+export PREFIX=$TOMTOM_SDK_DIR/gcc-3.3.4_glibc-2.3.2/$ARCH/sys-root
+export PATH=$TOMTOM_SDK_DIR/gcc-3.3.4_glibc-2.3.2/bin:$PREFIX/bin/:$PATH
+export CFLAGS="-O2 -I$PREFIX/include -I$PREFIX/usr/include"
+export CPPFLAGS="-I$PREFIX/include -I$PREFIX/usr/include"
+export LDFLAGS="-L$PREFIX/lib -L$PREFIX/usr/lib"
+export CC=$ARCH-gcc
+export CXX=$ARCH-g++
+export LD=$ARCH-ld
+export NM="$ARCH-nm -B"
+export AR=$ARCH-ar
+export RANLIB=$ARCH-ranlib
+export STRIP=$ARCH-strip
+export OBJCOPY=$ARCH-objcopy
+export LN_S="ln -s"
+export PKG_CONFIG_LIBDIR=$PREFIX/lib/pkgconfig
+JOBS=`getconf _NPROCESSORS_ONLN`
+
+echo "Jobs"
+echo $JOBS
+
+mkdir -p ~/assets/tomtom/
+
+if ! [ -e "~/assets/tomtom/toolchain_redhat_gcc-3.3.4_glibc-2.3.2-20060131a.tar.gz" ]
+ then
+ wget -nv -c http://www.tomtom.com/gpl/toolchain_redhat_gcc-3.3.4_glibc-2.3.2-20060131a.tar.gz -P ~/assets/tomtom
+fi
+
+if ! test -f "~/assets/tomtom/libpng-1.6.27.tar.gz"
+then
+ wget -nv -c ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng16/libpng-1.6.27.tar.gz -P ~/assets/tomtom
+fi
+
+# toolchain
+cd /tmp
+mkdir -p $TOMTOM_SDK_DIR
+tar xzf ~/assets/tomtom/toolchain_redhat_gcc-3.3.4_glibc-2.3.2-20060131a.tar.gz -C $TOMTOM_SDK_DIR
+
+# zlib
+cd /tmp
+wget -nv -c http://zlib.net/zlib-1.2.9.tar.gz
+tar xzf zlib-1.2.9.tar.gz
+cd zlib-1.2.9
+./configure --prefix=$PREFIX
+make -j$JOBS
+make install
+
+# libxml
+cd /tmp/
+wget -nv -c http://xmlsoft.org/sources/libxml2-2.7.8.tar.gz
+tar xzf libxml2-2.7.8.tar.gz
+cd libxml2-2.7.8/
+./configure --prefix=$PREFIX --host=$ARCH --without-python
+make -j$JOBS
+make install
+
+# libpng
+cd /tmp/
+tar xzf ~/assets/tomtom/libpng-1.6.27.tar.gz
+cd libpng-1.6.27/
+./configure --prefix=$PREFIX --host=$ARCH
+make -j$JOBS
+make install
+
+
+cd /tmp
+wget -nv -c http://download.savannah.gnu.org/releases/freetype/freetype-2.5.0.tar.gz
+tar xzf freetype-2.5.0.tar.gz
+cd freetype-2.5.0
+./configure --prefix=$PREFIX --host=$ARCH
+make -j$JOBS
+make install
+
+freetype-config --cflags
+
+# glib
+cd /tmp
+wget -nv -c http://ftp.gnome.org/pub/gnome/sources/glib/2.25/glib-2.25.17.tar.gz
+tar xzf glib-2.25.17.tar.gz
+cd glib-2.25.17
+cat > tomtom.cache << EOF
+glib_cv_long_long_format=ll
+glib_cv_stack_grows=no
+glib_cv_uscore=no
+ac_cv_func_posix_getgrgid_r=yes
+ac_cv_func_posix_getpwuid_r=yes
+EOF
+chmod a-w tomtom.cache
+./configure --prefix=$PREFIX --host=$ARCH --cache-file=tomtom.cache
+sed -i "s|cp xgen-gmc gmarshal.c |cp xgen-gmc gmarshal.c \&\& sed -i \"s\|g_value_get_schar\|g_value_get_char\|g\" gmarshal.c |g" gobject/Makefile
+make -j$JOBS
+make install
+
+
+# tslib
+cd /tmp
+rm -rf tslib-svn
+git clone https://github.com/playya/tslib-svn.git
+cd tslib-svn
+sed -i "s|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|g" configure.ac
+sed -i "119i\#ifdef EVIOCGRAB" plugins/input-raw.c
+sed -i "124i\#endif" plugins/input-raw.c
+sed -i "290i\#ifdef EVIOCGRAB" plugins/input-raw.c
+sed -i "294i\#endif" plugins/input-raw.c
+sed -i "s|# module_raw h3600|module_raw h3600|g" etc/ts.conf # tomtom go 710
+./autogen.sh
+./configure --prefix=$PREFIX --host=$ARCH
+make -j$JOBS
+make install
+
+
+cd /tmp
+wget -nv -c http://www.libsdl.org/release/SDL-1.2.15.tar.gz
+tar xzf SDL-1.2.15.tar.gz
+cd SDL-1.2.15
+wget -nv -c http://tracks.yaina.de/source/sdl-fbcon-notty.patch
+patch -p0 -i sdl-fbcon-notty.patch
+./configure --prefix=$PREFIX --host=$ARCH \
+ --disable-esd --disable-cdrom --disable-joystick --disable-video-x11 \
+ --disable-x11-vm --disable-dga --disable-video-x11-dgamouse \
+ --disable-video-x11-xv --disable-video-x11-xinerama --disable-video-directfb \
+ --enable-video-fbcon --disable-audio CFLAGS="$CFLAGS -DFBCON_NOTTY"
+make -j$JOBS
+make install
+
+# to find sdl-config
+export PATH=$PREFIX/bin:$PATH
+
+# sdl image
+cd /tmp
+wget -nv -c http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.12.tar.gz
+tar xzf SDL_image-1.2.12.tar.gz
+cd SDL_image-1.2.12
+./configure --prefix=$PREFIX --host=$ARCH
+make -j$JOBS
+make install
+
+
+# in the end we only want Navit locale
+rm -r $PREFIX/share/locale