diff -Nru cogl-1.22.2/debian/changelog cogl-1.22.2/debian/changelog
--- cogl-1.22.2/debian/changelog	2016-08-30 10:40:22.000000000 +0000
+++ cogl-1.22.2/debian/changelog	2016-09-29 15:26:58.000000000 +0000
@@ -1,3 +1,15 @@
+cogl (1.22.2-2+rpi1) stretch-staging; urgency=medium
+
+  [changes brought forward from 1.18.2-3+rpi1 by Peter Michael Green <plugwash@raspbian.org> at Wed, 07 Jan 2015 02:29:18 +0000]
+  * Switch to regular opengl and disable egl/gles to avoid conflicting with
+    raspberry pi foundation libraries.
+
+  [changes brought forward from 1.22.0-1+rpi2 by Peter Michael Green <plugwash@raspbian.org> at Fri, 25 Sep 2015 01:24:58 +0000]
+  * Move libwayland-dev from Depends and Build-depends to build-conflicts.
+    Wayland without EGL seems to be a problem combination.
+
+ -- Peter Michael Green <plugwash@raspbian.org>  Thu, 29 Sep 2016 15:26:58 +0000
+
 cogl (1.22.2-2) unstable; urgency=medium
 
   * Disable test suite as the tests need a working GL/GLES environment which
diff -Nru cogl-1.22.2/debian/control cogl-1.22.2/debian/control
--- cogl-1.22.2/debian/control	2016-08-30 10:40:22.000000000 +0000
+++ cogl-1.22.2/debian/control	2016-09-29 15:26:58.000000000 +0000
@@ -13,12 +13,10 @@
                gtk-doc-tools (>= 1.13),
                libgbm-dev [linux-any],
                libgl1-mesa-dev (>= 7.1~rc3-1~),
-               libgles2-mesa-dev (>= 7.1~rc3-1~) | libgles2-dev,
                libcairo2-dev (>= 1.10),
                libpango1.0-dev (>= 1.28.3-5),
                libgdk-pixbuf2.0-dev (>= 2.0),
                libglib2.0-dev (>= 2.32.0),
-               libwayland-dev (>= 1.1.90) [linux-any],
                libxfixes-dev (>= 1:3),
                libxdamage-dev,
                libxcomposite-dev (>= 1:0.4),
@@ -26,6 +24,8 @@
                gobject-introspection (>= 1.33.4-1~),
                libgirepository1.0-dev (>= 0.9.12),
                libgstreamer-plugins-base1.0-dev
+Build-Conflicts:
+               libwayland-dev (>= 1.1.90)
 Standards-Version: 3.9.8
 Vcs-Svn: svn://anonscm.debian.org/pkg-gnome/desktop/unstable/cogl
 Vcs-Browser: https://anonscm.debian.org/viewvc/pkg-gnome/desktop/unstable/cogl/
@@ -34,8 +34,7 @@
 Architecture: any
 Depends: ${shlibs:Depends},
          ${misc:Depends},
-         libgl1-mesa-glx [!armel !armhf ],
-         libgles2-mesa [armel armhf] | libgles2 [armel armhf]
+         libgl1-mesa-glx
 Recommends: libcogl-common
 Suggests: libgles2-mesa | libgles2, libgl1-mesa-glx
 Pre-Depends: ${misc:Pre-Depends}
@@ -71,10 +70,8 @@
          gir1.2-cogl-1.0 (= ${binary:Version}),
          libcairo2-dev,
          libgl1-mesa-dev (>= 7.1~rc3-1~),
-         libgles2-mesa-dev (>= 7.1~rc3-1~) | libgles2-dev,
          libglib2.0-dev (>= 2.28.0),
          libdrm-dev [!hurd-any],
-         libwayland-dev [linux-any],
          libgbm-dev [linux-any],
          libgdk-pixbuf2.0-dev (>= 2.0),
          libx11-dev,
@@ -207,7 +204,7 @@
  dynamic bindings for libcogl-pango.
 
 Package: libcogl-gles2-20
-Architecture: any
+Architecture: kfreebsd-any
 Depends: ${shlibs:Depends},
          ${misc:Depends},
          libgl1-mesa-glx [!armel !armhf ],
@@ -227,7 +224,7 @@
 
 Package: libcogl-gles2-dev
 Section: libdevel
-Architecture: any
+Architecture: kfreebsd-any
 Depends: libcogl-gles2-20 (= ${binary:Version}),
          libcogl-dev (= ${binary:Version}),
          ${misc:Depends},
diff -Nru cogl-1.22.2/debian/control.in cogl-1.22.2/debian/control.in
--- cogl-1.22.2/debian/control.in	2016-08-29 22:55:58.000000000 +0000
+++ cogl-1.22.2/debian/control.in	2016-09-29 15:25:27.000000000 +0000
@@ -9,12 +9,10 @@
                gtk-doc-tools (>= 1.13),
                libgbm-dev [linux-any],
                libgl1-mesa-dev (>= 7.1~rc3-1~),
-               libgles2-mesa-dev (>= 7.1~rc3-1~) | libgles2-dev,
                libcairo2-dev (>= 1.10),
                libpango1.0-dev (>= 1.28.3-5),
                libgdk-pixbuf2.0-dev (>= 2.0),
                libglib2.0-dev (>= 2.32.0),
-               libwayland-dev (>= 1.1.90) [linux-any],
                libxfixes-dev (>= 1:3),
                libxdamage-dev,
                libxcomposite-dev (>= 1:0.4),
@@ -22,6 +20,8 @@
                gobject-introspection (>= 1.33.4-1~),
                libgirepository1.0-dev (>= 0.9.12),
                libgstreamer-plugins-base1.0-dev
+Build-Conflicts:
+               libwayland-dev (>= 1.1.90)
 Standards-Version: 3.9.8
 Vcs-Svn: svn://anonscm.debian.org/pkg-gnome/desktop/unstable/cogl
 Vcs-Browser: https://anonscm.debian.org/viewvc/pkg-gnome/desktop/unstable/cogl/
@@ -30,8 +30,7 @@
 Architecture: any
 Depends: ${shlibs:Depends},
          ${misc:Depends},
-         libgl1-mesa-glx [!armel !armhf ],
-         libgles2-mesa [armel armhf] | libgles2 [armel armhf]
+         libgl1-mesa-glx
 Recommends: libcogl-common
 Suggests: libgles2-mesa | libgles2, libgl1-mesa-glx
 Pre-Depends: ${misc:Pre-Depends}
@@ -67,10 +66,8 @@
          gir1.2-cogl-1.0 (= ${binary:Version}),
          libcairo2-dev,
          libgl1-mesa-dev (>= 7.1~rc3-1~),
-         libgles2-mesa-dev (>= 7.1~rc3-1~) | libgles2-dev,
          libglib2.0-dev (>= 2.28.0),
          libdrm-dev [!hurd-any],
-         libwayland-dev [linux-any],
          libgbm-dev [linux-any],
          libgdk-pixbuf2.0-dev (>= 2.0),
          libx11-dev,
@@ -203,7 +200,7 @@
  dynamic bindings for libcogl-pango.
 
 Package: libcogl-gles2-20
-Architecture: any
+Architecture: kfreebsd-any
 Depends: ${shlibs:Depends},
          ${misc:Depends},
          libgl1-mesa-glx [!armel !armhf ],
@@ -223,7 +220,7 @@
 
 Package: libcogl-gles2-dev
 Section: libdevel
-Architecture: any
+Architecture: kfreebsd-any
 Depends: libcogl-gles2-20 (= ${binary:Version}),
          libcogl-dev (= ${binary:Version}),
          ${misc:Depends},
diff -Nru cogl-1.22.2/debian/libcogl20.symbols cogl-1.22.2/debian/libcogl20.symbols
--- cogl-1.22.2/debian/libcogl20.symbols	2015-09-24 14:33:10.000000000 +0000
+++ cogl-1.22.2/debian/libcogl20.symbols	2016-09-29 15:21:47.000000000 +0000
@@ -158,8 +158,6 @@
  cogl_double_to_fixed@Base 1.17.4
  cogl_double_to_int@Base 1.17.4
  cogl_double_to_uint@Base 1.17.4
- cogl_egl_context_get_egl_context@Base 1.18.0
- cogl_egl_context_get_egl_display@Base 1.17.4
  cogl_end_gl@Base 1.17.4
  cogl_error_copy@Base 1.17.4
  cogl_error_free@Base 1.17.4
@@ -344,12 +342,6 @@
  cogl_is_texture_rectangle@Base 1.17.4
  cogl_is_vertex_buffer@Base 1.17.4
  cogl_is_vertex_buffer_indices@Base 1.17.4
- (arch=linux-any)cogl_kms_display_queue_modes_reset@Base 1.17.4
- (arch=linux-any)cogl_kms_display_set_ignore_crtc@Base 1.18.2
- (arch=linux-any)cogl_kms_display_set_layout@Base 1.17.4
- (arch=linux-any)cogl_kms_renderer_get_gbm@Base 1.18.2
- (arch=linux-any)cogl_kms_renderer_get_kms_fd@Base 1.17.4
- (arch=linux-any)cogl_kms_renderer_set_kms_fd@Base 1.18.0
  cogl_material_alpha_func_get_type@Base 1.17.4
  cogl_material_copy@Base 1.17.4
  cogl_material_filter_get_type@Base 1.17.4
@@ -816,16 +808,6 @@
  cogl_vertex_buffer_unref@Base 1.17.4
  cogl_vertices_mode_get_type@Base 1.17.4
  cogl_viewport@Base 1.17.4
- (arch=linux-any)cogl_wayland_display_set_compositor_display@Base 1.17.4
- (arch=linux-any)cogl_wayland_onscreen_get_shell_surface@Base 1.17.4
- (arch=linux-any)cogl_wayland_onscreen_get_surface@Base 1.17.4
- (arch=linux-any)cogl_wayland_onscreen_resize@Base 1.17.4
- (arch=linux-any)cogl_wayland_onscreen_set_foreign_surface@Base 1.17.4
- (arch=linux-any)cogl_wayland_renderer_get_display@Base 1.17.4
- (arch=linux-any)cogl_wayland_renderer_set_event_dispatch_enabled@Base 1.17.4
- (arch=linux-any)cogl_wayland_renderer_set_foreign_display@Base 1.17.4
- (arch=linux-any)cogl_wayland_texture_2d_new_from_buffer@Base 1.17.4
- (arch=linux-any)cogl_wayland_texture_set_region_from_shm_buffer@Base 1.17.4
  cogl_winding_get_type@Base 1.17.4
  cogl_winsys_feature_get_type@Base 1.17.4
  cogl_x11_onscreen_get_visual_xid@Base 1.17.4
diff -Nru cogl-1.22.2/debian/rules cogl-1.22.2/debian/rules
--- cogl-1.22.2/debian/rules	2016-08-30 10:39:58.000000000 +0000
+++ cogl-1.22.2/debian/rules	2016-09-29 15:24:04.000000000 +0000
@@ -5,20 +5,20 @@
 %:
 	dh $@ --with autoreconf,gir,gnome
 
-ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH),armel armhf))
-CONFFLAGS += \
-	--with-default-driver=gles2
-else
+#ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH),armel armhf))
+#CONFFLAGS += \
+#	--with-default-driver=gles2
+#else
 CONFFLAGS += \
 	--with-default-driver=gl
-endif
+#endif
 
-ifeq ($(DEB_HOST_ARCH_OS),linux)
-CONFFLAGS += \
-	--enable-wayland-egl-platform \
-	--enable-wayland-egl-server \
-	--enable-kms-egl-platform
-endif
+#ifeq ($(DEB_HOST_ARCH_OS),linux)
+#CONFFLAGS += \
+#	--enable-wayland-egl-platform \
+#	--enable-wayland-egl-server \
+#	--enable-kms-egl-platform
+#endif
 
 override_dh_auto_configure:
 	dh_auto_configure -- \
@@ -28,10 +28,6 @@
 		--enable-introspection \
 		--enable-gl \
 		--enable-cogl-gst \
-		--enable-xlib-egl-platform \
-		--enable-cogl-gles2 \
-		--enable-gles2 \
-		--with-gles2-libname=libGLESv2.so.2 \
 		$(CONFFLAGS)
 
 override_dh_makeshlibs: