diff -Nru octave-mpi-1.2.0/debian/changelog octave-mpi-1.2.0/debian/changelog
--- octave-mpi-1.2.0/debian/changelog	2014-03-17 17:51:50.000000000 +0000
+++ octave-mpi-1.2.0/debian/changelog	2015-07-30 22:57:40.000000000 +0000
@@ -1,3 +1,9 @@
+octave-mpi (1.2.0-1+rpi1) stretch-staging; urgency=medium
+
+  * Apply patch by Carlo de Falco <cdf> to fix build with octave 4.0
+
+ -- Peter Michael Green <plugwash@raspbian.org>  Thu, 30 Jul 2015 22:57:11 +0000
+
 octave-mpi (1.2.0-1) unstable; urgency=medium
 
   * Imported Upstream version 1.2.0
diff -Nru octave-mpi-1.2.0/debian/patches/octave4.0.patch octave-mpi-1.2.0/debian/patches/octave4.0.patch
--- octave-mpi-1.2.0/debian/patches/octave4.0.patch	1970-01-01 00:00:00.000000000 +0000
+++ octave-mpi-1.2.0/debian/patches/octave4.0.patch	2015-07-30 22:56:11.000000000 +0000
@@ -0,0 +1,40 @@
+Patch by Carlo de Falco <cdf> posted to upstream bugreport to fix build with
+octave 4.0
+https://savannah.gnu.org/bugs/?func=detailitem&item_id=45258
+https://savannah.gnu.org/bugs/download.php?file_id=34167
+
+diff --git a/src/simple.h b/src/simple.h
+--- a/src/simple.h
++++ b/src/simple.h
+@@ -39,12 +39,12 @@
+   
+   const std::string name;
+   MPI_Comm Comm_Value;
+-  DECLARE_OCTAVE_ALLOCATOR;
++  //DECLARE_OCTAVE_ALLOCATOR;
+   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA;
+   
+ };
+ 
+-DEFINE_OCTAVE_ALLOCATOR (simple);
++//DEFINE_OCTAVE_ALLOCATOR (simple);
+ DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (simple, "simple", "simple");
+ 
+ static bool simple_type_loaded = false;
+diff --git a/src/simpleop.h b/src/simpleop.h
+--- a/src/simpleop.h
++++ b/src/simpleop.h
+@@ -56,11 +56,11 @@
+ private:
+   const std::string name;
+   MPI_Op Op_Value;
+-  DECLARE_OCTAVE_ALLOCATOR
++  //DECLARE_OCTAVE_ALLOCATOR
+   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
+ };
+ 
+-DEFINE_OCTAVE_ALLOCATOR (simpleop);
++//DEFINE_OCTAVE_ALLOCATOR (simpleop);
+ DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (simpleop, "simpleop", "simpleop");
+ 
+ static bool simpleop_type_loaded = false;
diff -Nru octave-mpi-1.2.0/debian/patches/series octave-mpi-1.2.0/debian/patches/series
--- octave-mpi-1.2.0/debian/patches/series	2014-03-17 17:34:46.000000000 +0000
+++ octave-mpi-1.2.0/debian/patches/series	2015-07-30 22:56:53.000000000 +0000
@@ -1 +1,2 @@
 autoload-yes.patch
+octave4.0.patch
