Hi Dane,
here is what I did to build the dependencies. All of the dependencies
will be built using Android-NDK script ndk-build. Before you start you
might need to have standalone toolchain (optional). You can create it
having NDK downloaded with the script make-standalone-toolchain.sh.
You will also find attached Android.mk files.
# setup the environment
export LDLAGS="--sysroot=$ANDROID_SYSROOT"
export CPPFLAGS="--sysroot=$ANDROID_SYSROOT"
export CC="$ANDROID_NDK/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc"
libpng-1.6.3:
# first method:
1. cmake -DCMAKE_BUILD_TYPE=Release
-DCMAKE_TOOLCHAIN_FILE=$ANDTOOLCHAIN -DANDROID_ABI=armeabi-v7a ..
2. make
# second method:
1. ./configure --host=arm-linux-androideabi
--prefix=libpng-1.6.3/android (prefix should be absolute path)
2. make (this is needed only to create the file pnglibconf.h)
3. ndk-build
libxml2-2.9.1:
1. ./configure --host=arm-linux-androideabi
--prefix=libxml2-2.9.1/android (prefix should be absolute path)
2. ndk-build
libfreetype-2.5.0.1:
Compiler complained about mismatch of types in the header and sources for
freetype-2.5.0.1/src/gzip/infutil.h:89
local const uInt inflate_mask[17];
Just redeclare inflate_mask[17] in the source file as "local const
uInt" instead of "local uInt" and you can proceed:
1. CFLAGS="-std=gnu99" ./configure --host=arm-linux-androideabi
--prefix=freetype-2.5.0.1/android --without-zlib (prefix should be
absolute path)
2. ndk-build
For some reason, creating dynamic libraries doesn't work for these
libraries, the linker is complaining about undefined references but
creating static libraries worked. I have little experience with
building libraries for android, but this could mean that the linker is
expecting those references to be satisfied later and actually the
static libraries are missing something (?).
boost_1_54_0:
You will find attached a .jam file for building boost. Replace the
contents of boost_1_54_0/tools/build/v2/user-config.jam with the one I
sent you.
1 . patch the file boost_1_54_0/libs/filesystem/src/operations.cpp:77
to look like:
(this fixes missing header include <sys/statvfs.h> for android,
there is also a discussion thread on this at stackoverflow)
# include <sys/types.h>
# include <sys/stat.h>
# if !defined(__APPLE__) && !defined(__OpenBSD__)
# ifndef ANDROID
# include <sys/statvfs.h>
# else
# include <sys/vfs.h>
# define statvfs statfs
# endif
# define BOOST_STATVFS statvfs
# define BOOST_STATVFS_F_FRSIZE vfs.f_frsize
2. export PATH=$PATH:$ANDROID_NDK/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86/bin/
3. cd boost_1_54_0/tools/build/v2
4. ./bootstrap
5. cd - (go back to boost root)
7. ./bootstrap
8. bjam --without-python toolset=gcc-androidR8d link=static
runtime-link=static target-os=linux --stagedir=android (or depending
on your ndk you can choose gcc-androidR8e)
libicu:
I followed the following post to compile libicu:
http://thebugfreeblog.blogspot.de/2013/05/cross-building-icu-for-applications-on.html
Please let me know if you had any problems with this. I was thinking
to create Android.mk files for all the parts of mapnik, instead of
changing SConstruct. To me this approach seemed slightly easier.
-Igor
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "mapnik" group.
> To unsubscribe from this topic, visit
>
https://groups.google.com/d/topic/mapnik/SOQs3hp8BL0/unsubscribe.
> To unsubscribe from this group and all of its topics, send an email to