diff -pruN 3.0.2+dfsg-4.1/debian/changelog 3.0.2+dfsg-4.2/debian/changelog
--- 3.0.2+dfsg-4.1/debian/changelog	2013-09-06 06:14:40.000000000 +0000
+++ 3.0.2+dfsg-4.2/debian/changelog	2014-09-26 10:30:52.000000000 +0000
@@ -1,3 +1,10 @@
+player (3.0.2+dfsg-4.2) unstable; urgency=medium
+
+  * Fix for API changes of libstatgrab version 0.90 (Closes: #735572)
+    - Update build dependency accordingly to "libstatgrab-dev (>= 0.90)"
+
+ -- Peter Michael Green <plugwash@raspbian.org>  Wed, 19 Mar 2014 01:30:56 +0000
+
 player (3.0.2+dfsg-4.1) unstable; urgency=low
 
   * Non-maintainer upload.
diff -pruN 3.0.2+dfsg-4.1/debian/control 3.0.2+dfsg-4.2/debian/control
--- 3.0.2+dfsg-4.1/debian/control	2012-03-25 23:17:30.000000000 +0000
+++ 3.0.2+dfsg-4.2/debian/control	2014-09-26 10:30:08.000000000 +0000
@@ -2,7 +2,7 @@ Source: player
 Section: science
 Priority: extra
 Maintainer: Michael Janssen <jamuraa@debian.org>
-Build-Depends: debhelper (>= 7.0.50~), autotools-dev, libgsl0-dev, libcv-dev, libhighgui-dev, libcvaux-dev, libgtk2.0-dev, libdc1394-22-dev, libboost-signals-dev, libboost-thread-dev, swig, libjpeg-dev, python-support, doxygen, linux-libc-dev | linux-kernel-headers, libgnomecanvas2-dev, python-dev, freeglut3-dev, graphviz, ruby, ruby-dev, libtheora-dev, libgeos-dev, libpqxx3-dev, libxmu-dev, libcvaux-dev, libasound2-dev, libstatgrab-dev, cmake, libusb-dev, libv4l-dev
+Build-Depends: debhelper (>= 7.0.50~), autotools-dev, libgsl0-dev, libcv-dev, libhighgui-dev, libcvaux-dev, libgtk2.0-dev, libdc1394-22-dev, libboost-signals-dev, libboost-thread-dev, swig, libjpeg-dev, python-support, doxygen, linux-libc-dev | linux-kernel-headers, libgnomecanvas2-dev, python-dev, freeglut3-dev, graphviz, ruby, ruby-dev, libtheora-dev, libgeos-dev, libpqxx3-dev, libxmu-dev, libcvaux-dev, libasound2-dev, libstatgrab-dev (>= 0.90), cmake, libusb-dev, libv4l-dev
 XS-Python-Version: all
 Standards-Version: 3.9.3
 Homepage: http://playerstage.sourceforge.net/
diff -pruN 3.0.2+dfsg-4.1/debian/liblodo3.0-dev.install 3.0.2+dfsg-4.2/debian/liblodo3.0-dev.install
--- 3.0.2+dfsg-4.1/debian/liblodo3.0-dev.install	2012-03-25 23:17:30.000000000 +0000
+++ 3.0.2+dfsg-4.2/debian/liblodo3.0-dev.install	2014-09-26 12:31:39.000000000 +0000
@@ -1,2 +1,2 @@
-usr/lib/liblodo.so
+usr/lib//liblodo.so
 usr/include/player-3.0/libpmap/lodo.h
diff -pruN 3.0.2+dfsg-4.1/debian/liblodo3.0.install 3.0.2+dfsg-4.2/debian/liblodo3.0.install
--- 3.0.2+dfsg-4.1/debian/liblodo3.0.install	2012-03-25 23:17:30.000000000 +0000
+++ 3.0.2+dfsg-4.2/debian/liblodo3.0.install	2014-09-26 12:31:39.000000000 +0000
@@ -1 +1 @@
-usr/lib/liblodo.so.*
+usr/lib//liblodo.so.*
diff -pruN 3.0.2+dfsg-4.1/debian/libplayerc++3.0-dev.install 3.0.2+dfsg-4.2/debian/libplayerc++3.0-dev.install
--- 3.0.2+dfsg-4.1/debian/libplayerc++3.0-dev.install	2012-03-25 23:17:30.000000000 +0000
+++ 3.0.2+dfsg-4.2/debian/libplayerc++3.0-dev.install	2014-09-26 12:31:39.000000000 +0000
@@ -1,4 +1,4 @@
-usr/lib/libplayerc++.so
+usr/lib//libplayerc++.so
 usr/include/player-3.0/libplayerc++
-usr/lib/pkgconfig/playerc++.pc
+usr/lib//pkgconfig/playerc++.pc
 usr/share/cmake/Modules/UsePlayerC++.cmake usr/lib/player-3.0
diff -pruN 3.0.2+dfsg-4.1/debian/libplayerc3.0-dev.install 3.0.2+dfsg-4.2/debian/libplayerc3.0-dev.install
--- 3.0.2+dfsg-4.1/debian/libplayerc3.0-dev.install	2012-03-25 23:17:30.000000000 +0000
+++ 3.0.2+dfsg-4.2/debian/libplayerc3.0-dev.install	2014-09-26 12:31:39.000000000 +0000
@@ -1,4 +1,4 @@
-usr/lib/libplayerc.so
+usr/lib//libplayerc.so
 usr/include/player-3.0/libplayerc
-usr/lib/pkgconfig/playerc.pc
+usr/lib//pkgconfig/playerc.pc
 usr/share/cmake/Modules/UsePlayerC.cmake usr/lib/player-3.0
diff -pruN 3.0.2+dfsg-4.1/debian/libplayerc++3.0.install 3.0.2+dfsg-4.2/debian/libplayerc++3.0.install
--- 3.0.2+dfsg-4.1/debian/libplayerc++3.0.install	2012-03-25 23:17:30.000000000 +0000
+++ 3.0.2+dfsg-4.2/debian/libplayerc++3.0.install	2014-09-26 12:31:39.000000000 +0000
@@ -1 +1 @@
-usr/lib/libplayerc++.so.*
+usr/lib//libplayerc++.so.*
diff -pruN 3.0.2+dfsg-4.1/debian/libplayerc3.0.install 3.0.2+dfsg-4.2/debian/libplayerc3.0.install
--- 3.0.2+dfsg-4.1/debian/libplayerc3.0.install	2012-03-25 23:17:30.000000000 +0000
+++ 3.0.2+dfsg-4.2/debian/libplayerc3.0.install	2014-09-26 12:31:39.000000000 +0000
@@ -1 +1 @@
-usr/lib/libplayerc.so.*
+usr/lib//libplayerc.so.*
diff -pruN 3.0.2+dfsg-4.1/debian/libplayercommon3.0-dev.install 3.0.2+dfsg-4.2/debian/libplayercommon3.0-dev.install
--- 3.0.2+dfsg-4.1/debian/libplayercommon3.0-dev.install	2012-03-25 23:17:30.000000000 +0000
+++ 3.0.2+dfsg-4.2/debian/libplayercommon3.0-dev.install	2014-09-26 12:31:39.000000000 +0000
@@ -1,5 +1,5 @@
 usr/include/player-3.0/playerconfig.h
 usr/include/player-3.0/libplayercommon
-usr/lib/libplayercommon.so
-usr/lib/pkgconfig/playercommon.pc
+usr/lib//libplayercommon.so
+usr/lib//pkgconfig/playercommon.pc
 usr/share/cmake/Modules/PlayerUtils.cmake usr/lib/player-3.0
diff -pruN 3.0.2+dfsg-4.1/debian/libplayercommon3.0.install 3.0.2+dfsg-4.2/debian/libplayercommon3.0.install
--- 3.0.2+dfsg-4.1/debian/libplayercommon3.0.install	2012-03-25 23:17:30.000000000 +0000
+++ 3.0.2+dfsg-4.2/debian/libplayercommon3.0.install	2014-09-26 12:31:39.000000000 +0000
@@ -1 +1 @@
-usr/lib/libplayercommon.so.*
+usr/lib//libplayercommon.so.*
diff -pruN 3.0.2+dfsg-4.1/debian/libplayercore3.0-dev.install 3.0.2+dfsg-4.2/debian/libplayercore3.0-dev.install
--- 3.0.2+dfsg-4.1/debian/libplayercore3.0-dev.install	2012-03-25 23:17:30.000000000 +0000
+++ 3.0.2+dfsg-4.2/debian/libplayercore3.0-dev.install	2014-09-26 12:31:39.000000000 +0000
@@ -1,3 +1,3 @@
-usr/lib/libplayercore.so
+usr/lib//libplayercore.so
 usr/include/player-3.0/libplayercore
-usr/lib/pkgconfig/playercore.pc
+usr/lib//pkgconfig/playercore.pc
diff -pruN 3.0.2+dfsg-4.1/debian/libplayercore3.0.install 3.0.2+dfsg-4.2/debian/libplayercore3.0.install
--- 3.0.2+dfsg-4.1/debian/libplayercore3.0.install	2012-03-25 23:17:30.000000000 +0000
+++ 3.0.2+dfsg-4.2/debian/libplayercore3.0.install	2014-09-26 12:31:39.000000000 +0000
@@ -1 +1 @@
-usr/lib/libplayercore.so.*
+usr/lib//libplayercore.so.*
diff -pruN 3.0.2+dfsg-4.1/debian/libplayerdrivers3.0-dev.install 3.0.2+dfsg-4.2/debian/libplayerdrivers3.0-dev.install
--- 3.0.2+dfsg-4.1/debian/libplayerdrivers3.0-dev.install	2012-03-25 23:17:30.000000000 +0000
+++ 3.0.2+dfsg-4.2/debian/libplayerdrivers3.0-dev.install	2014-09-26 12:31:39.000000000 +0000
@@ -1,3 +1,3 @@
-usr/lib/libplayerdrivers.so
-usr/lib/pkgconfig/playerdrivers.pc
+usr/lib//libplayerdrivers.so
+usr/lib//pkgconfig/playerdrivers.pc
 usr/include/player-3.0/libplayerdrivers
diff -pruN 3.0.2+dfsg-4.1/debian/libplayerdrivers3.0.install 3.0.2+dfsg-4.2/debian/libplayerdrivers3.0.install
--- 3.0.2+dfsg-4.1/debian/libplayerdrivers3.0.install	2012-03-25 23:17:30.000000000 +0000
+++ 3.0.2+dfsg-4.2/debian/libplayerdrivers3.0.install	2014-09-26 12:31:39.000000000 +0000
@@ -1 +1 @@
-usr/lib/libplayerdrivers.so.*
+usr/lib//libplayerdrivers.so.*
diff -pruN 3.0.2+dfsg-4.1/debian/libplayerinterface3.0-dev.install 3.0.2+dfsg-4.2/debian/libplayerinterface3.0-dev.install
--- 3.0.2+dfsg-4.1/debian/libplayerinterface3.0-dev.install	2012-03-25 23:17:30.000000000 +0000
+++ 3.0.2+dfsg-4.2/debian/libplayerinterface3.0-dev.install	2014-09-26 12:31:39.000000000 +0000
@@ -1,5 +1,5 @@
-usr/lib/libplayerinterface.so
-usr/lib/pkgconfig/playerinterface.pc
+usr/lib//libplayerinterface.so
+usr/lib//pkgconfig/playerinterface.pc
 usr/share/cmake/Modules/UsePlayerPlugin.cmake usr/lib/player-3.0
 usr/include/player-3.0/libplayerinterface
 usr/bin/playerxdrgen
diff -pruN 3.0.2+dfsg-4.1/debian/libplayerinterface3.0.install 3.0.2+dfsg-4.2/debian/libplayerinterface3.0.install
--- 3.0.2+dfsg-4.1/debian/libplayerinterface3.0.install	2012-03-25 23:17:30.000000000 +0000
+++ 3.0.2+dfsg-4.2/debian/libplayerinterface3.0.install	2014-09-26 12:31:39.000000000 +0000
@@ -1 +1 @@
-usr/lib/libplayerinterface.so.*
+usr/lib//libplayerinterface.so.*
diff -pruN 3.0.2+dfsg-4.1/debian/libplayerjpeg3.0-dev.install 3.0.2+dfsg-4.2/debian/libplayerjpeg3.0-dev.install
--- 3.0.2+dfsg-4.1/debian/libplayerjpeg3.0-dev.install	2012-03-25 23:17:30.000000000 +0000
+++ 3.0.2+dfsg-4.2/debian/libplayerjpeg3.0-dev.install	2014-09-26 12:31:39.000000000 +0000
@@ -1,2 +1,2 @@
-usr/lib/libplayerjpeg.so
+usr/lib//libplayerjpeg.so
 usr/include/player-3.0/libplayerjpeg
diff -pruN 3.0.2+dfsg-4.1/debian/libplayerjpeg3.0.install 3.0.2+dfsg-4.2/debian/libplayerjpeg3.0.install
--- 3.0.2+dfsg-4.1/debian/libplayerjpeg3.0.install	2012-03-25 23:17:30.000000000 +0000
+++ 3.0.2+dfsg-4.2/debian/libplayerjpeg3.0.install	2014-09-26 12:31:39.000000000 +0000
@@ -1 +1 @@
-usr/lib/libplayerjpeg.so.*
+usr/lib//libplayerjpeg.so.*
diff -pruN 3.0.2+dfsg-4.1/debian/libplayertcp3.0-dev.install 3.0.2+dfsg-4.2/debian/libplayertcp3.0-dev.install
--- 3.0.2+dfsg-4.1/debian/libplayertcp3.0-dev.install	2012-03-25 23:17:30.000000000 +0000
+++ 3.0.2+dfsg-4.2/debian/libplayertcp3.0-dev.install	2014-09-26 12:31:39.000000000 +0000
@@ -1,5 +1,5 @@
-usr/lib/libplayertcp.so
-usr/lib/libplayerudp.so
-usr/lib/pkgconfig/playertcp.pc
-usr/lib/pkgconfig/playerudp.pc
+usr/lib//libplayertcp.so
+usr/lib//libplayerudp.so
+usr/lib//pkgconfig/playertcp.pc
+usr/lib//pkgconfig/playerudp.pc
 usr/include/player-3.0/libplayertcp
diff -pruN 3.0.2+dfsg-4.1/debian/libplayertcp3.0.install 3.0.2+dfsg-4.2/debian/libplayertcp3.0.install
--- 3.0.2+dfsg-4.1/debian/libplayertcp3.0.install	2012-03-25 23:17:30.000000000 +0000
+++ 3.0.2+dfsg-4.2/debian/libplayertcp3.0.install	2014-09-26 12:31:39.000000000 +0000
@@ -1,2 +1,2 @@
-usr/lib/libplayertcp.so.*
-usr/lib/libplayerudp.so.*
+usr/lib//libplayertcp.so.*
+usr/lib//libplayerudp.so.*
diff -pruN 3.0.2+dfsg-4.1/debian/libplayerwkb3.0-dev.install 3.0.2+dfsg-4.2/debian/libplayerwkb3.0-dev.install
--- 3.0.2+dfsg-4.1/debian/libplayerwkb3.0-dev.install	2012-03-25 23:17:30.000000000 +0000
+++ 3.0.2+dfsg-4.2/debian/libplayerwkb3.0-dev.install	2014-09-26 12:31:39.000000000 +0000
@@ -1,3 +1,3 @@
-usr/lib/libplayerwkb.so
-usr/lib/pkgconfig/playerwkb.pc
+usr/lib//libplayerwkb.so
+usr/lib//pkgconfig/playerwkb.pc
 usr/include/player-3.0/libplayerwkb
diff -pruN 3.0.2+dfsg-4.1/debian/libplayerwkb3.0.install 3.0.2+dfsg-4.2/debian/libplayerwkb3.0.install
--- 3.0.2+dfsg-4.1/debian/libplayerwkb3.0.install	2012-03-25 23:17:30.000000000 +0000
+++ 3.0.2+dfsg-4.2/debian/libplayerwkb3.0.install	2014-09-26 12:31:39.000000000 +0000
@@ -1 +1 @@
-usr/lib/libplayerwkb.so.*
+usr/lib//libplayerwkb.so.*
diff -pruN 3.0.2+dfsg-4.1/debian/libpmap3.0-dev.install 3.0.2+dfsg-4.2/debian/libpmap3.0-dev.install
--- 3.0.2+dfsg-4.1/debian/libpmap3.0-dev.install	2012-03-25 23:17:30.000000000 +0000
+++ 3.0.2+dfsg-4.2/debian/libpmap3.0-dev.install	2014-09-26 12:31:39.000000000 +0000
@@ -1,4 +1,4 @@
-usr/lib/libpmap.so
+usr/lib//libpmap.so
 usr/include/player-3.0/libpmap/omap.h
 usr/include/player-3.0/libpmap/pmap.h
 usr/include/player-3.0/libpmap/rmap.h
diff -pruN 3.0.2+dfsg-4.1/debian/libpmap3.0.install 3.0.2+dfsg-4.2/debian/libpmap3.0.install
--- 3.0.2+dfsg-4.1/debian/libpmap3.0.install	2012-03-25 23:17:30.000000000 +0000
+++ 3.0.2+dfsg-4.2/debian/libpmap3.0.install	2014-09-26 12:31:39.000000000 +0000
@@ -1 +1 @@
-usr/lib/libpmap.so.*
+usr/lib//libpmap.so.*
diff -pruN 3.0.2+dfsg-4.1/debian/libwavefront-standalone3.0.install 3.0.2+dfsg-4.2/debian/libwavefront-standalone3.0.install
--- 3.0.2+dfsg-4.1/debian/libwavefront-standalone3.0.install	2012-03-25 23:17:30.000000000 +0000
+++ 3.0.2+dfsg-4.2/debian/libwavefront-standalone3.0.install	2014-09-26 12:31:39.000000000 +0000
@@ -1 +1 @@
-usr/lib/libwavefront_standalone.so.*
+usr/lib//libwavefront_standalone.so.*
diff -pruN 3.0.2+dfsg-4.1/debian/patches/0010-fix-ftbfs-libstatgrab0.90.patch 3.0.2+dfsg-4.2/debian/patches/0010-fix-ftbfs-libstatgrab0.90.patch
--- 3.0.2+dfsg-4.1/debian/patches/0010-fix-ftbfs-libstatgrab0.90.patch	1970-01-01 00:00:00.000000000 +0000
+++ 3.0.2+dfsg-4.2/debian/patches/0010-fix-ftbfs-libstatgrab0.90.patch	2014-09-26 10:30:08.000000000 +0000
@@ -0,0 +1,48 @@
+Description: Fix for API changes of libstatgrab version 0.90
+Author: Peter Michael Green <plugwash@raspbian.org>
+Bug-Debian: http://bugs.debian.org/735572
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: http://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+--- player-3.0.2+dfsg.orig/server/drivers/health/statgrab/statgrab_health.cpp
++++ player-3.0.2+dfsg/server/drivers/health/statgrab/statgrab_health.cpp
+@@ -130,7 +130,7 @@ StatGrabDriver::StatGrabDriver(ConfigFil
+ int StatGrabDriver::MainSetup()
+ {
+   // Initialise statgrab
+-  sg_init();
++  sg_init(1);
+   /* Drop setuid/setgid privileges. */
+   if (sg_drop_privileges() != 0)
+   {
+@@ -171,7 +171,7 @@ void StatGrabDriver::RefreshData()
+   //double receivedCpu;
+   float cpuIdle, cpuServer, cpuUser ;
+ 	//CPU
+-	cpu_percent = sg_get_cpu_percents();
++	cpu_percent = sg_get_cpu_percents(NULL);
+ 
+ 	cpuIdle =  cpu_percent->idle;
+ 	mHealth.cpu_usage.idle = cpuIdle;
+@@ -183,8 +183,8 @@ void StatGrabDriver::RefreshData()
+ 
+ 
+ 	//Virtual Memory
+-	mem_data     = sg_get_mem_stats();
+-	swap_stats   = sg_get_swap_stats();
++	mem_data     = sg_get_mem_stats(NULL);
++	swap_stats   = sg_get_swap_stats(NULL);
+ 
+ 	mHealth.mem.total = mem_data->total;
+ 	mHealth.mem.used =  mem_data->used;
diff -pruN 3.0.2+dfsg-4.1/debian/patches/series 3.0.2+dfsg-4.2/debian/patches/series
--- 3.0.2+dfsg-4.1/debian/patches/series	2013-09-06 06:15:16.000000000 +0000
+++ 3.0.2+dfsg-4.2/debian/patches/series	2014-09-26 10:30:08.000000000 +0000
@@ -8,3 +8,4 @@
 0008-Update-for-new-libgeos-FTBFS.patch
 0009-Fix-zlib-1.2.6-FTBFS.patch
 boost1.54
+0010-fix-ftbfs-libstatgrab0.90.patch
diff -pruN 3.0.2+dfsg-4.1/debian/ruby-playerc.install 3.0.2+dfsg-4.2/debian/ruby-playerc.install
--- 3.0.2+dfsg-4.1/debian/ruby-playerc.install	2012-03-25 23:17:30.000000000 +0000
+++ 3.0.2+dfsg-4.2/debian/ruby-playerc.install	2014-09-26 12:32:08.000000000 +0000
@@ -1 +1 @@
-usr/lib/site_ruby
+usr/lib/*/site_ruby
diff -pruN 3.0.2+dfsg-4.1/.pc/0010-fix-ftbfs-libstatgrab0.90.patch/server/drivers/health/statgrab/statgrab_health.cpp 3.0.2+dfsg-4.2/.pc/0010-fix-ftbfs-libstatgrab0.90.patch/server/drivers/health/statgrab/statgrab_health.cpp
--- 3.0.2+dfsg-4.1/.pc/0010-fix-ftbfs-libstatgrab0.90.patch/server/drivers/health/statgrab/statgrab_health.cpp	1970-01-01 00:00:00.000000000 +0000
+++ 3.0.2+dfsg-4.2/.pc/0010-fix-ftbfs-libstatgrab0.90.patch/server/drivers/health/statgrab/statgrab_health.cpp	2010-12-04 05:43:46.000000000 +0000
@@ -0,0 +1,219 @@
+/*
+ *  Player - One Hell of a Robot Server
+ *  Copyright (C) 2005-2006
+ *     Raphael Sznitman, Brad Kratochvil
+ *
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+/** Player driver for the health of a robot.
+  *
+  * @author Raphael Sznitman
+  * @date 23.06.2005*/
+
+/** @ingroup drivers */
+/** @{ */
+/**
+  * @defgroup driver_statgrab statgrab
+
+The @p health driver allows for a user to get general systems data concerning a specific robot.
+Allows a user to look at cpu and memory usage of the robot.
+
+@par Provides
+- @ref player_interface_health : Interface to the health
+
+
+@par Configuration file options:
+- frequency (int)
+  - Default: 100
+
+@par Notes
+
+@par libstatgrab:
+The driver uses the library libstatgrab in order to fetch data concerning the cpu and the
+memory usage. Documentation on this library can be found at: http://www.i-scream.org/libstatgrab/.
+
+@par Example: The following configuration file should demonstrate the use of this
+driver.
+
+@include health.cfg
+
+@todo
+- Test this code more!
+- Allow for the driver to return the temperature of the system in multiple location of the robot.
+- Also allow for the battery voltage to be monitored.
+*/
+
+/** @} */
+
+#include "statgrab_health.h"
+
+#include <unistd.h>
+#include <string.h>
+#include <netinet/in.h>
+#include <libplayercore/playercore.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <iostream>
+#include <stdint.h>
+
+using namespace std;
+
+////////////////////////////////////////////////////////////////////////////////
+// Now the driver
+
+// A factory creation function, declared outside of the class so that it
+// can be invoked without any object context (alternatively, you can
+// declare it static in the class).  In this function, we create and return
+// (as a generic Driver*) a pointer to a new instance of this driver.
+Driver*
+StatGrabDriver_Init(ConfigFile* cf, int section)
+{
+  // Create and return a new instance of this driver
+  return((Driver*)(new StatGrabDriver(cf, section)));
+
+}
+
+// A driver registration function, again declared outside of the class so
+// that it can be invoked without object context.  In this function, we add
+// the driver into the given driver table, indicating which interface the
+// driver can support and how to create a driver instance.
+void statgrab_Register(DriverTable* table)
+{
+  table->AddDriver("statgrabdriver", StatGrabDriver_Init);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Constructor.  Retrieve options from the configuration file and do any
+// pre-Setup() setup.
+StatGrabDriver::StatGrabDriver(ConfigFile* cf, int section)
+    : ThreadedDriver(cf, section)
+{
+
+  // For Health Interface
+  if(cf->ReadDeviceAddr(&mHealthId, section, "provides",
+                        PLAYER_HEALTH_CODE, -1, NULL) == 0)
+  {
+    if(this->AddInterface(mHealthId))
+    {
+      this->SetError(-1);
+      return;
+    }
+  }
+
+
+  // Allow to just have to change the config file if you want to adjust the sleep
+  // duration.
+  mSleep = static_cast<int32_t>((1e6/cf->ReadInt(section, "frequency", 100)));
+
+  return;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Set up the device.  Return 0 if things go well, and -1 otherwise.
+int StatGrabDriver::MainSetup()
+{
+  // Initialise statgrab
+  sg_init();
+  /* Drop setuid/setgid privileges. */
+  if (sg_drop_privileges() != 0)
+  {
+    perror("Error. Failed to drop privileges");
+   return 1;
+  }
+
+  puts("Health driver ready");
+  return(0);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Main function for device thread
+void StatGrabDriver::Main()
+{
+
+  // The main loop; interact with the device here
+  for(;;)
+  {
+    // test if we are supposed to cancel
+    pthread_testcancel();
+
+    usleep(mSleep);
+
+    ProcessMessages();
+
+    // Write outgoing data
+    RefreshData();
+
+
+  }
+  return;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void StatGrabDriver::RefreshData()
+{
+  //double receivedCpu;
+  float cpuIdle, cpuServer, cpuUser ;
+	//CPU
+	cpu_percent = sg_get_cpu_percents();
+
+	cpuIdle =  cpu_percent->idle;
+	mHealth.cpu_usage.idle = cpuIdle;
+	cpuServer = cpu_percent->kernel + cpu_percent->iowait + cpu_percent->swap;
+	mHealth.cpu_usage.system = cpuServer;
+	cpuUser = cpu_percent->nice+ cpu_percent->user;
+	mHealth.cpu_usage.user = cpuUser;
+
+
+
+	//Virtual Memory
+	mem_data     = sg_get_mem_stats();
+	swap_stats   = sg_get_swap_stats();
+
+	mHealth.mem.total = mem_data->total;
+	mHealth.mem.used =  mem_data->used;
+	mHealth.mem.free = mem_data->free;
+
+	mHealth.swap.total = swap_stats->total;
+	mHealth.swap.used = swap_stats->used;
+	mHealth.swap.free = swap_stats->free;
+
+   // Other data which should be retrieved here!
+
+    Publish(device_addr, PLAYER_MSGTYPE_DATA, PLAYER_HEALTH_DATA_STATE  ,
+            reinterpret_cast<void*>(&mHealth));
+
+
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Extra stuff for building a shared object.
+
+// leftover from when this was a standalone plugin
+
+/* need the extern to avoid C++ name-mangling  */
+//extern "C" {
+//  int player_driver_init(DriverTable* table)
+//  {
+//    puts("StatGrab driver initializing");
+//    StatGrabDriver_Register(table);
+//    puts("StatGrab driver done");
+//    return(0);
+//  }
+//}
diff -pruN 3.0.2+dfsg-4.1/.pc/applied-patches 3.0.2+dfsg-4.2/.pc/applied-patches
--- 3.0.2+dfsg-4.1/.pc/applied-patches	2014-10-01 22:11:15.340006735 +0000
+++ 3.0.2+dfsg-4.2/.pc/applied-patches	2014-10-01 22:11:15.768018264 +0000
@@ -8,3 +8,4 @@
 0008-Update-for-new-libgeos-FTBFS.patch
 0009-Fix-zlib-1.2.6-FTBFS.patch
 boost1.54
+0010-fix-ftbfs-libstatgrab0.90.patch
diff -pruN 3.0.2+dfsg-4.1/server/drivers/health/statgrab/statgrab_health.cpp 3.0.2+dfsg-4.2/server/drivers/health/statgrab/statgrab_health.cpp
--- 3.0.2+dfsg-4.1/server/drivers/health/statgrab/statgrab_health.cpp	2010-12-04 05:43:46.000000000 +0000
+++ 3.0.2+dfsg-4.2/server/drivers/health/statgrab/statgrab_health.cpp	2014-10-01 22:11:15.000000000 +0000
@@ -130,7 +130,7 @@ StatGrabDriver::StatGrabDriver(ConfigFil
 int StatGrabDriver::MainSetup()
 {
   // Initialise statgrab
-  sg_init();
+  sg_init(1);
   /* Drop setuid/setgid privileges. */
   if (sg_drop_privileges() != 0)
   {
@@ -171,7 +171,7 @@ void StatGrabDriver::RefreshData()
   //double receivedCpu;
   float cpuIdle, cpuServer, cpuUser ;
 	//CPU
-	cpu_percent = sg_get_cpu_percents();
+	cpu_percent = sg_get_cpu_percents(NULL);
 
 	cpuIdle =  cpu_percent->idle;
 	mHealth.cpu_usage.idle = cpuIdle;
@@ -183,8 +183,8 @@ void StatGrabDriver::RefreshData()
 
 
 	//Virtual Memory
-	mem_data     = sg_get_mem_stats();
-	swap_stats   = sg_get_swap_stats();
+	mem_data     = sg_get_mem_stats(NULL);
+	swap_stats   = sg_get_swap_stats(NULL);
 
 	mHealth.mem.total = mem_data->total;
 	mHealth.mem.used =  mem_data->used;
