Thrift-2136:Vagrant build not compiling java, ruby, php, go libs due to missing dependencies
Client: build
Patch: jfarrell

Updates vagrantfile script to add missing dependencies for java, ruby, php and go libs.
diff --git a/contrib/Vagrantfile b/contrib/Vagrantfile
index 9a0ba94..ef518bf 100644
--- a/contrib/Vagrantfile
+++ b/contrib/Vagrantfile
@@ -20,21 +20,57 @@
 # under the License.
 #
 
-$script = <<SCRIPT
-echo I am provisioning for Apache Thrift ...
+$build_and_test = <<SCRIPT
+echo "Provisioning system to compile and test Apache Thrift."
 sudo apt-get update -qq -y
 sudo apt-get upgrade -qq -y
-sudo apt-get install -qq libboost-dev libboost-test-dev libboost-program-options-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-dev make libqt4-dev
+
+# Install Dependencies
+# ---
+# General dependencies
+sudo apt-get install -qq libboost-dev libboost-test-dev libboost-program-options-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-dev make libqt4-dev git
+
+# Java dependencies
 sudo apt-get install -qq ant openjdk-7-jdk
-sudo apt-get install -qq python-all python-all-dev python-all-dbg
+
+# Python dependencies
+sudo apt-get install -qq python-all python-all-dev python-all-dbg python-setuptools
+
+# Ruby dependencies
+sudo apt-get install -qq ruby rubygems
+sudo gem install bundler rake
+
+# Perl dependencies
 sudo apt-get install -qq libbit-vector-perl
-sudo apt-get install -qq php5-dev php5-cli 
+
+# Php dependencies
+sudo apt-get install -qq php5-dev php5-cli php-pear
+
+# GlibC dependencies
 sudo apt-get install -qq libglib2.0-dev
-sudo apt-get install -qq git erlang-base erlang-eunit erlang-dev
+
+# Erlang dependencies
+sudo apt-get install -qq erlang-base erlang-eunit erlang-dev
+
+# GO dependencies
+echo "golang-go golang-go/dashboard boolean false" | debconf-set-selections
+sudo apt-get -y install -qq golang golang-go
+
+# Haskell dependencies
+sudo apt-get install -qq ghc6 cabal-install libghc6-binary-dev libghc6-network-dev libghc6-http-dev libghc-hashable-dev libghc-unordered-containers-dev libghc-vector-dev
+
+# Node.js dependencies
+sudo apt-get install -qq npm
+
+# CSharp
 sudo apt-get install -qq mono-gmcs mono-devel libmono-system-web2.0-cil
-#sudo apt-get install -qq ghc6 cabal-install libghc6-binary-dev libghc6-network-dev libghc6-http-dev
 sudo apt-get install -qq mingw32 mingw32-binutils mingw32-runtime
 
+# Customize the system
+# ---
+# Default java to latest 1.7 version
+update-java-alternatives -s java-1.7.0-openjdk-amd64 
+
 # PHPUnit package broken in ubuntu. see https://bugs.launchpad.net/ubuntu/+source/phpunit/+bug/701544
 sudo apt-get upgrade pear
 sudo pear channel-discover pear.phpunit.de
@@ -44,15 +80,19 @@
 sudo pear upgrade-all
 sudo pear install --alldeps phpunit/PHPUnit
 
-echo I am building Apache Thrift ...
+date > /etc/vagrant.provisioned
+
+# Start the source build
+# ---
+echo "Starting Apache Thrift build..."
 cd /thrift
 sh bootstrap.sh
 sh configure --without-erlang
 make
 make dist
 make check
-#sh test/test.sh
-date > /etc/vagrant_provisioned_at
+echo "Finished building Apache Thrift."
+
 SCRIPT
 
 Vagrant.configure("2") do |config|
@@ -70,5 +110,6 @@
   end
 
   # call the script
-  config.vm.provision :shell, :inline => $script
+  config.vm.provision :shell, :inline => $build_and_test
+
 end