03 January 2013

Preparing gentoo for building android

That's right, I see lots of documentation for ubuntu and many other distributions and none exactly for gentoo, and seems I like to work with some crossdev, I'll post instructions for preparing your gentoo for that:

First of all, you need some packages (ok, if you already have some of these, you can skip them):

# emerge -pv git gnupg flex bison gperf libsdl wxGTK squashfs-tools curl ncurses zlib schedtool perl-Switch zip unzip

For 64bits systems, you need a little more

# emerge -pv emul-linux-x86-baselibs emul-linux-x86-compat emul-linux-x86-cpplibs

Note: I don' t know if cpplibs are really necessary, but I'll let here.

Make sure you' re using python 2.x instead of 3.x when you're about to compile

# eselect python list

Available Python interpreters:
  [1]   python2.7
  [2]   python3.2 *
# eselect python set 1

Download the repo utility. I'll install in /usr/local/bin, but you can use in ~/bin if you prefer:

# curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > /usr/local/bin/repo
# chmod 777 /usr/local/bin/repo

Now you're able to start syncing the source:

$ mkdir ~/Devel/Android && cd ~/Devel/Android
$ repo sync

From here you'll know what to do. :)