forked from mattadams/build-android-couch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Tweak or fix paths where appropriate; add old notes and patches for…
… posterity. - Use port 5984 so as not to collide with other things (this should be dynamic) - Place variable state data in /sdcard/Android/data/namespace/db for easy upgrading
- Loading branch information
Showing
15 changed files
with
2,046 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
Taken from https://github.com/apage43/couch-android-launcher/wiki/CouchDB-Build-Notes-Dump. | ||
These were used by Matt Adams to update the Couch on Android port but | ||
are probably of little significance at this point. | ||
|
||
---- | ||
|
||
warn: These are notes I was personally taking. Will clean them up | ||
later, but may be of use if you are trying to build couchdb on android | ||
yourself. | ||
|
||
Curl | ||
======================================================================= | ||
|
||
./configure \ | ||
CC=arm-eabi-gcc \ | ||
--host=arm-linux | ||
--disable-tftp \ | ||
--disable-sspi \ | ||
--disable-ipv6 \ | ||
--disable-ldaps \ | ||
--disable-ldap \ | ||
--disable-telnet \ | ||
--disable-pop3 \ | ||
--disable-ftp \ | ||
--with-ssl=$ANDROID_ROOT/external/openssl/ \ | ||
--disable-imap \ | ||
--disable-smtp \ | ||
--disable-pop3 \ | ||
--disable-rtsp \ | ||
--disable-ares \ | ||
--without-ca-bundle \ | ||
--disable-warnings \ | ||
--disable-manual \ | ||
--without-nss \ | ||
--enable-shared \ | ||
--with-zlib=$ANDROID_ROOT/external/zlib \ | ||
--without-random | ||
|
||
|
||
SpiderMonkey | ||
======================================================================= | ||
|
||
There is cross-compile support for spidermonkey 1.8. Should work well | ||
enough. | ||
|
||
Hey, wait, Android Fennec has spidermonkey, let’s try building it | ||
according to the JS only build instructions at | ||
https://wiki.mozilla.org/Android | ||
|
||
^-- Bleh, requires NSPR etc, isn’t really smaller. Also tough to build | ||
against: | ||
|
||
hg spidermonkey configure: | ||
|
||
../configure \ | ||
--target=arm-android-eabi \ | ||
--with-android-ndk=/home/apage43/android-ndk-r3 \ | ||
--with-endian=little \ | ||
--with-arm-kuser \ | ||
--disable-tests | ||
|
||
Don’t do this. Spidermonkey hg trunk doesn’t like evalcx in couchjs. | ||
|
||
tests use STL so are disabled for android | ||
|
||
|
||
Android CouchDB Notes | ||
======================================================================= | ||
|
||
Set ANDROID_SYS_ROOT before building erlang or crypto, ssl, etc will not build. | ||
|
||
Build system libs live in android_build/out/target/product/generic | ||
Headers live in android_build/external or in opencore | ||
|
||
./configure \ | ||
--prefix=/sdcard/couch \ | ||
--with-js-include=/home/apage43/mcdb/js/src/build-rel/dist/include/ \ | ||
--with-js-lib=/home/apage43/mcdb/js/src/build-rel/dist/lib/ \ | ||
--host=arm-eabi \ | ||
CC=agcc \ | ||
--with-android=/home/apage43/android_build \ | ||
--with-erlang=/home/apage43/mcdb/otp_rel/usr/include/ \ | ||
--with-android-curl=/home/apage43/mcdb/curl | ||
|
||
|
||
collation driver: | ||
|
||
agcc -shared -o couch_icu_driver.so libcouch_icu_driver.a | ||
-L/home/apage43/android_build/out/target/product/generic/system/lib | ||
-licuuc -licudata -licui18n | ||
-L/home/apage43/mcdb/otp_rel/erts-5.7.5/bin/ -lbeam |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
These notes pertain to building openssl without building the entire | ||
Android ecosystem. Since we don't do this anymore these notes are for | ||
hysterical raisins only. | ||
|
||
---- | ||
|
||
# Get the source. | ||
git clone git://android.git.kernel.org/platform/external/openssl.git | ||
|
||
# Go into the directory. | ||
cd openssl | ||
|
||
# Trick the NDK into thinking this is the project dir. This is the easiest and only way I could find to do it. | ||
touch AndroidManifest.xml | ||
|
||
# Give the NDK build system the Application.mk it needs. I couldn't find a way to specify this manually, and it seems the jni bit is hardcoded. | ||
mkdir jni | ||
echo "APP_PROJECT_PATH := $(pwd)" >> jni/Application.mk | ||
echo "APP_BUILD_SCRIPT := $(APP_PROJECT_PATH)/Android.mk" >> jni/Application.mk | ||
|
||
# Edit all the Android.mk's. | ||
nano crypto/Android.mk | ||
nano apps/Android.mk | ||
nano ssl/Android.mk | ||
|
||
# In all of them you need to replace "external/openssl" with "$(NDK_PROJECT_PATH)". Also in crypto/Android.mk you need to comment out the assembly stuff so that it always uses aes/aes_core.c | ||
# Obviously you won't have any assembly optimisations then, but I couldn't get them to work. :-/ | ||
|
||
# Finally run: | ||
path/to/android-ndk-r4b/ndk-build -j2 | ||
|
||
# libcrypto.so and libssl.so are in | ||
cd libs/armeabi |
Oops, something went wrong.