#!/usr/bin/env bash
# Build Path: /app/.heroku/vendor/

OUT_PREFIX=$1

# Use new path, containing autoconf.
export PATH="/app/.heroku/python/bin/:$PATH"
hash -r


echo "Building geos..."

SOURCE_TARBALL='http://download.osgeo.org/geos/geos-3.4.2.tar.bz2'

curl -L $SOURCE_TARBALL | tar xj

cd geos-3.4.2
./configure --prefix=$OUT_PREFIX  &&
make
make install

# Cleanup
cd ..
