libgit2 compiles and links for newlib, with glibc-compat changes.

libgit2:
* Make some test global variables static. Interestingly, this succeeds on
  gcc/clang, but fails on PNaCl. Normally, it is OK to define the same symbol
  multiple times, as long as it is uninitialized. The nm documentation describes
  this as a "common" symbol. PNaCl doesn't allow this, and instead produces a
  multiple definition linker error.
* Add <limits.h> for PATH_MAX on newlib.
* newlib defines _SC_PAGESIZE, but not _SC_PAGE_SIZE. glibc defines both.

glibc-compat:
* added qsort_r (with implementation copied from qsort)
* added getaddrinfo, freeaddrinfo, gai_strerror (unimplemented)

BUG=none
R=sbc@chromium.org

Review URL: https://codereview.chromium.org/236253002

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@1225 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Shard mac builds now that we have more builders.

BUG=https://code.google.com/p/chromium/issues/detail?id=359625
TEST=None
R=sbc@chromium.org

Review URL: https://codereview.chromium.org/233433007

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@1226 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Switch python download code to use curl rather than wget.

This matches the code in common.sh which switched
to curl since it is available on mac by default.

Also, fix a bug where GetMirrorURL() contained two '/'
characters in row.

R=binji@chromium.org

Review URL: https://codereview.chromium.org/236073003

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@1227 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Build system for statically-linked Python.

This adds a new subdirectory, python_modules/ , and a mechanism for
creating a statically linked Python build.  It is designed primarily for
PNaCl, where a lack of shared library support and the cost of
translation mean that a large Python stack requires a complex,
multi-step build process.  This process can be summarized as such:

 * Build a host python containing all necessary build-time dependencies
   for the stack
 * Build each individual module
 * Collect object files and construct unified libpython2.7.a and
   python.pexe
 * Add a dynload module for statically linked modules

When not automated, this is prone to error and difficult to add or
remove additional modules.  The system included here, while not perfect,
addresses this by enabling individual modules to be selected and built
ala carte, with a reubilding of python_static necessary to create the
unified python.pexe and libpython2.7.a.  The libpython2.7.a output by
this can then be used as a link target for a python_ppapi-like module.

As examples, and as components of a scientific python stack, this
changelist includes:

 * numpy (host and destination builds)
 * cython (host-only build)
 * setuptools (host-only build)
 * matplotlib (dest-only build)
 * sympy (dest-only build)
 * ipython (dest-only build)
 * pyzmq (dest-only build)
 * h5py (dest-only build; requires hdf5, under separate CL review)
 * jinja2 (dest-only build)
 * pyppapi (dest-only build)
 * six (dest-only build)
 * distribute (dest-only build)
 * nose (dest-only build)
 * pyparsing (dest-only build)
 * dateutil (dest-only build)
 * markupsafe (dest-only build)
 * yt (dest-only build)

This CL includes a port for the pyppapi module, which was developed in
support of this and which provides a Python API to communicate between
running Native Client modules and Chrome.  This includes serialization
of NumPy arrays into typed arrays as well as other Python/JS
translations.

Python module ports act very similarly to standard naclports modules,
with two exceptions.  The installation of the .py files has been moved
into the building phase and the collection of .o files occurs during
installation.  Additionally, they utilize modules.libs and modules.list
files.  The first of these files should append to the variable
PY_MOD_LINK to add on additional libraries for building the module, and
the second is a list of compiled modules (not object files) produced by
the python module which should be included in the symbol table in
libpython2.7.a.  For instance, if the compiled C module "fastcode"
exists in a Python module and it requires linking against cfast, these
files would look like:

modules.list:

fastcode

 modules.libs:

PY_MOD_LINK+=" -lcfast"

At present, this has been tested on PNaCl.  To construct a Python build
with a number of modules, a command like this can be issues:

NACL_ARCH=pnacl make numpy sympy matplotlib python_static

The resultant installed libpython2.7.a will contain all of those
modules.  Note that any pure-python modules auto-installed by setuptools
will be functional in the resultant python destination, but any
C-compiled python modules that have been auto-installed will simply
fail.

R=sbc@chromium.org, hamaji@chromium.org, kestert@google.com
BUG=

Review URL: https://codereview.chromium.org/138913004

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@1230 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Make "NACL_ARCH=pnacl make <foo>" work again.

BUG=none
R=sbc@chromium.org

Review URL: https://codereview.chromium.org/239263009

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@1231 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Add glibc support to snes9x.

BUG= http://code.google.com/p/naclports/issues/detail?id=116
R=sbc@chromium.org
TEST=make_all

Review URL: https://codereview.chromium.org/239343004

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@1232 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Add more detailed information on prerequisites for building naclports.

The 32-bit zlib on is especially hard to track down..

R=binji@chromium.org

Review URL: https://codereview.chromium.org/241173003

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@1233 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Use sf.net rather than sourceforge.net in download URLs.

This is for consistency but it also makes them a little
shorter and less likely to be over 80 chars in the
pkg_info files.

R=binji@chromium.org

Review URL: https://codereview.chromium.org/241223003

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@1234 7dad1e8b-422e-d2af-fbf5-8013b78bd812
This CL updates the nacl.patch file for python-static
to match the nacl.patch in the current python build.
It should fix the build for case-insensitive filesystems.

R=sbc@chromium.org

Review URL: https://codereview.chromium.org/241683002

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@1235 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Enabling glibc build for openal-ogg-demo.

This seems to work with no changes.

BUG=None
TEST=builds
R=sbc@chromium.org

Review URL: https://codereview.chromium.org/242203004

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@1236 7dad1e8b-422e-d2af-fbf5-8013b78bd812
The libpython2.7.a that should be generated from the
python-static build was being placed in the wrong
location.

BUG=
R=kestert@google.com

Review URL: https://codereview.chromium.org/243883004

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@1237 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Remove __attribute__((section (".bss"))) that doesn't work for PNaCl

It seems that __attribute__((section (".bss"))) has no sense for us anyway and PNaCl doesn't support it.

BUG=chromuim:302044
TEST=manual
R=eugenis@chromium.org, mseaborn@chromium.org

Review URL: https://codereview.chromium.org/27220005

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@1238 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Adding in curl and git to mingn.

Converting mingn to a v2 app.
Modifying git to use nacl-spawn.
Enabling sockets access for mingn.

Works for git init, add, commit. Clone falls over due to lack of pipes.
curl seems to have regressed, fixing so that it runs.
(It seems to be failing at connect, will debug separately).

Repartitioning to appease presubmit.

BUG=None
TEST=local/manual
R=binji@chromium.org, sbc@chromium.org

Review URL: https://codereview.chromium.org/247443003

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@1239 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Split platform specific parts in gdb app.

To reduce the installed size / download size of the gdb app,
split out the platform specific parts.

BUG=None
TEST=gdb_test
R=binji@chromium.org

Review URL: https://codereview.chromium.org/253393007

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@1240 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Automatically set the gdb + debugger version based on svn revision.

In order to facilitate shipping builds from our buildbots,
generate the manifest.json file for gdb + debugger on based on a template + the svn revision.

Zip the two apps to make upload easier.

BUG=None
TEST=local
R=binji@chromium.org

Review URL: https://codereview.chromium.org/259723002

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@1241 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Make the debugging app/extension externally connectable for web install.

In order to allow a page at nacltools.storage.googleapis.com to check for
debugger install, allow external connections from that host.

BUG=None
TEST=None
R=binji@chromium.org

Review URL: https://codereview.chromium.org/250703004

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@1242 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Build package arches together, clean first.

Clean first then build each package for each architecure before moving on to the next package.

This will allow us to ship multi-arch extensions (like gdb) from the bots.

Skip setting CHROME_DEVEL_SANDBOX when TEST_BUILDBOT is on,
to allow local testing of the buildbot config.

Do a CleanAll for the sdk build (which currently does only make clean which is actually insufficient).

BUG=None
TEST=local
R=binji@chromium.org

Review URL: https://codereview.chromium.org/258743003

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@1243 7dad1e8b-422e-d2af-fbf5-8013b78bd812
thttpd: Remove reference to nacl_io/dbgprint.h

This was renamed to nacl_io/log.h in the latest SDK, but it isn't needed anyway.

BUG=none
R=bradnelson@google.com, bradnelson@chromium.org

Review URL: https://codereview.chromium.org/251833003

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@1244 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Fix typo in condition and isolate arch + toolchain in clean.

Fix typo in condition on CHROME_DEVEL_SANDBOX.
Change CleanAll so that it doesn't clobber TOOLCHAIN + NACL_ARCH.

BUG=None
TEST=None
R=binji@chromium.org

Review URL: https://codereview.chromium.org/252793002

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@1245 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Invert the sandbox chrome sandbox TEST_BUILDBOT check.

BUG=None
TEST=None
R=binji@chromium.org

Review URL: https://codereview.chromium.org/259763005

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@1246 7dad1e8b-422e-d2af-fbf5-8013b78bd812