On Mon, 28 Feb 2011 07:21:58 +1000
Steve Dalton <[email protected]> wrote:
> Hi Mike
> Would like care to share what you did to get it working (ie. LDFLAGS
> etc) - I wouldn't mind having a try myself just to see what the
> process is.
> Thanks
> Steve
Sure.
Note that setting TCC in makemake.tcl doesn't work for builds on
Linux. I believe this is a bug in makemake.tcl, as the value of TCC
gets copied into win/Makefile.mingw properly.
You need to install Googles ndk (that's the Native Developers Kit) for
your platform if you don't have it already. Assuming that's extracted
into $NDK (i.e. $NDK ends in something like android-ndk-r5b), do the
following:
In Makefile in the top level, set:
TCC = arm-eabi-gcc -I$NDK/platforms/android-5/arch-arm/usr/include
LDFLAGS=-Wl,-rpath-link=$NDK/platforms/android-5/arch-arm/usr/lib,-dynamic-linker=/system/bin/linker
-L$NDK/platforms/android-5/arch-arm/usr/lib
-L$NDK/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86/lib/gcc/arm-eabi/4.4.0
$NDK/platforms/android-5/arch-arm/usr/lib/crtbegin_dynamic.o -nostdlib -lc
You'll also want to comment out the setting of -DFOSSIL_ENABLE_SSL
and the addition of -lcrypto -lssl to the link line (the ssl libraries
aren't in the ndk).
Two source file tweaks to cover for functionality that isn't included
in the NDK:
Index: src/config.h
===================================================================
--- src/config.h
+++ src/config.h
@@ -126,11 +126,11 @@
#endif
/* Unset the following to disable internationalization code. */
#ifndef FOSSIL_I18N
-# define FOSSIL_I18N 1
+// # define FOSSIL_I18N 1
#endif
#if FOSSIL_I18N
# include <locale.h>
# include <langinfo.h>
Index: src/user.c
===================================================================
--- src/user.c
+++ src/user.c
@@ -86,12 +86,12 @@
/*
** Do a single prompt for a passphrase. Store the results in the blob.
*/
static void prompt_for_passphrase(const char *zPrompt, Blob *pPassphrase){
- char *z = getpass(zPrompt);
- strip_string(pPassphrase, z);
+ //char *z = getpass(zPrompt);
+ //strip_string(pPassphrase, z);
}
/*
** Prompt the user for a password. Store the result in the pPassphrase
** blob.
Given that the NDK is meant to let you write native-mode methods for
Java, but not interact with the user, these being missing make
sense. Obviously, don't do things that might make it prompt for a
password with this fix.
The resulting binary will correctly spit out help text and version
info, but quietly exits or just hang if asked to do any real
work. That might be because I used android-5 instead of whichever
platform was correct for my tablet, but I spent more time getting this
far than I should have (noticed the TCC setting, and just had to see
if it would work out of the box).
<mike
--
Mike Meyer <[email protected]> http://www.mired.org/consulting.html
Independent Software developer/SCM consultant, email for more information.
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users