diff --git a/dynamic-graph-tutorial/Makefile b/dynamic-graph-tutorial/Makefile
index fe15f7c9a27822ca58673c464da0f2ced19f1988..b3f30b43c1629c52136e43a5b80f216f09cfd472 100644
--- a/dynamic-graph-tutorial/Makefile
+++ b/dynamic-graph-tutorial/Makefile
@@ -18,6 +18,7 @@ LICENSE=		2-clause-bsd
 MAINTAINER=		gepetto-soft@laas.fr
 
 CMAKE_ARGS+=		-DBUILD_PYTHON_INTERFACE=OFF
+CMAKE_ARGS+=		-DCMAKE_INSTALL_LIBDIR=lib
 
 DYNAMIC_PLIST_DIRS+=	share/doc/${NAME}
 
diff --git a/dynamic-graph-tutorial/distinfo b/dynamic-graph-tutorial/distinfo
index 70c503cd019ab7747cfed4255cee490051b9c7c1..c420d1396a04dc13f04e3dbd1d38ef6b9f3a1d95 100644
--- a/dynamic-graph-tutorial/distinfo
+++ b/dynamic-graph-tutorial/distinfo
@@ -1,3 +1,4 @@
 SHA1 (dynamic-graph-tutorial-1.1.1.tar.gz) = 45b23da4ad9fbac1e3eb5fe097c145b7d5079794
 RMD160 (dynamic-graph-tutorial-1.1.1.tar.gz) = 50c7accf6656b54162f642398ce76f886cefcf98
 Size (dynamic-graph-tutorial-1.1.1.tar.gz) = 773815 bytes
+SHA1 (patch-aa) = c64971cf8d1c18b3e0224dd58b40f97c1cd24e6f
diff --git a/dynamic-graph-tutorial/patches/patch-aa b/dynamic-graph-tutorial/patches/patch-aa
new file mode 100644
index 0000000000000000000000000000000000000000..da32773bb6bd564d3d103a073c8a4becdf544c81
--- /dev/null
+++ b/dynamic-graph-tutorial/patches/patch-aa
@@ -0,0 +1,22 @@
+[Doc][Sphinx] Use imgmath with sphinx >= 1.4, as pngmath has been removed in 1.8
+
+--- doc/sphinx/conf.py.in
++++ doc/sphinx/conf.py.in
+@@ -19,13 +19,14 @@ import sys, os
+ sys.path = [os.path.abspath('@CMAKE_BINARY_DIR@/src')]+sys.path
+ sys.path = [os.path.abspath('@CMAKE_SOURCE_DIR@/src')]+sys.path
+ 
+-import dynamic_graph.tutorial as dgt
++from sphinx import version_info as sphinx_version
+ 
+ # -- General configuration -----------------------------------------------------
+ 
+ # Add any Sphinx extension module names here, as strings. They can be extensions
+ # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+-extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.pngmath']
++extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.todo']
++extensions.append('sphinx.ext.pngmath' if sphinx_version < (1, 4) else 'sphinx.ext.imgmath')
+ 
+ # Add any paths that contain templates here, relative to this directory.
+ templates_path = ['_templates']
+