[oe] [RFC meta-gnome][PATCH 12/16] mutter: add recipe for mutter window manager

brendank310 brendank310 at gmail.com
Mon Oct 29 16:41:09 UTC 2018


From: Brendan Kerrigan <kerriganb at ainfosec.com>

Signed-off-by: Brendan Kerrigan <kerriganb at ainfosec.com>
---
 .../mutter/0001-disable-zenity-check.patch    | 27 ++++++++
 ...spection-variables-with-correct-path.patch | 63 +++++++++++++++++++
 .../0003-packageconfig-variable-fixup.patch   | 29 +++++++++
 .../mutter/0004-fix-broken-includes.patch     | 37 +++++++++++
 meta-gnome/recipes-gnome/gnome3/mutter_git.bb | 59 +++++++++++++++++
 5 files changed, 215 insertions(+)
 create mode 100644 meta-gnome/recipes-gnome/gnome3/mutter/0001-disable-zenity-check.patch
 create mode 100644 meta-gnome/recipes-gnome/gnome3/mutter/0002-fixup-introspection-variables-with-correct-path.patch
 create mode 100644 meta-gnome/recipes-gnome/gnome3/mutter/0003-packageconfig-variable-fixup.patch
 create mode 100644 meta-gnome/recipes-gnome/gnome3/mutter/0004-fix-broken-includes.patch
 create mode 100644 meta-gnome/recipes-gnome/gnome3/mutter_git.bb

diff --git a/meta-gnome/recipes-gnome/gnome3/mutter/0001-disable-zenity-check.patch b/meta-gnome/recipes-gnome/gnome3/mutter/0001-disable-zenity-check.patch
new file mode 100644
index 000000000..a37aec276
--- /dev/null
+++ b/meta-gnome/recipes-gnome/gnome3/mutter/0001-disable-zenity-check.patch
@@ -0,0 +1,27 @@
+mutter: Disable check for zenity
+
+  Disable autoconf check for zenity, no need graphical dialog boxes.
+
+  Upstream-status: Inappropriate [disable-feature]
+
+  Signed-off-by: Brendan Kerrigan <kerriganb at ainfosec.com>
+
+diff --git a/configure.ac b/configure.ac
+index ef92f5ecb..5eede9e63 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -427,11 +427,6 @@ fi
+ 
+ AM_CONDITIONAL(HAVE_SM, test "$found_sm" = "yes")
+ 
+-AC_PATH_PROG(ZENITY, zenity, no)
+-if test x"$ZENITY" = xno; then
+-  AC_MSG_ERROR([zenity not found in your path - needed for dialogs])
+-fi
+-
+ AC_ARG_ENABLE(debug,
+ 	[  --enable-debug		enable debugging],,
+ 	enable_debug=no)
+-- 
+2.17.1
+
diff --git a/meta-gnome/recipes-gnome/gnome3/mutter/0002-fixup-introspection-variables-with-correct-path.patch b/meta-gnome/recipes-gnome/gnome3/mutter/0002-fixup-introspection-variables-with-correct-path.patch
new file mode 100644
index 000000000..07c1f371a
--- /dev/null
+++ b/meta-gnome/recipes-gnome/gnome3/mutter/0002-fixup-introspection-variables-with-correct-path.patch
@@ -0,0 +1,63 @@
+mutter: Fixup introspection paths
+
+  Fixup the introspection paths to enable correct results with
+  gobject-introspection.
+
+  Upstream-status: Innappropriate [embedded specific]
+
+  Signed-off-by: Brendan Kerrigan <kerriganb at ainfosec.com>
+
+diff --git a/clutter/build/autotools/introspection.m4 b/clutter/build/autotools/introspection.m4
+index d89c3d907..d2c60de4d 100644
+--- a/clutter/build/autotools/introspection.m4
++++ b/clutter/build/autotools/introspection.m4
+@@ -56,14 +56,14 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
+     INTROSPECTION_GIRDIR=
+     INTROSPECTION_TYPELIBDIR=
+     if test "x$found_introspection" = "xyes"; then
+-       INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
+-       INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
+-       INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
+-       INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
+-       INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
++       INTROSPECTION_SCANNER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
++       INTROSPECTION_COMPILER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
++       INTROSPECTION_GENERATE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
++       INTROSPECTION_GIRDIR=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
++       INTROSPECTION_TYPELIBDIR=$PKG_CONFIG_SYSROOT_DIR"$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
+        INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
+        INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
+-       INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
++       INTROSPECTION_MAKEFILE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
+     fi
+     AC_SUBST(INTROSPECTION_SCANNER)
+     AC_SUBST(INTROSPECTION_COMPILER)
+diff --git a/cogl/build/autotools/introspection.m4 b/cogl/build/autotools/introspection.m4
+index 589721c5a..683ebdcc6 100644
+--- a/cogl/build/autotools/introspection.m4
++++ b/cogl/build/autotools/introspection.m4
+@@ -54,14 +54,14 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
+     INTROSPECTION_GIRDIR=
+     INTROSPECTION_TYPELIBDIR=
+     if test "x$found_introspection" = "xyes"; then
+-       INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
+-       INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
+-       INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
+-       INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
+-       INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
++       INTROSPECTION_SCANNER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
++       INTROSPECTION_COMPILER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
++       INTROSPECTION_GENERATE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
++       INTROSPECTION_GIRDIR=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
++       INTROSPECTION_TYPELIBDIR=$PKG_CONFIG_SYSROOT_DIR"$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
+        INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
+-       INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
+-       INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
++       INTROSPECTION_LIBS=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --libs gobject-introspection-1.0`
++       INTROSPECTION_MAKEFILE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
+     fi
+     AC_SUBST(INTROSPECTION_SCANNER)
+     AC_SUBST(INTROSPECTION_COMPILER)
+-- 
+2.17.1
+
diff --git a/meta-gnome/recipes-gnome/gnome3/mutter/0003-packageconfig-variable-fixup.patch b/meta-gnome/recipes-gnome/gnome3/mutter/0003-packageconfig-variable-fixup.patch
new file mode 100644
index 000000000..1e44218a6
--- /dev/null
+++ b/meta-gnome/recipes-gnome/gnome3/mutter/0003-packageconfig-variable-fixup.patch
@@ -0,0 +1,29 @@
+mutter: Fixup pkgconfig variables
+
+  Pkgconfig variables relating to the paths of datadirs, and
+  gir, typelib.
+
+  Upstream-status: Innappropriate [embedded-specific]
+
+  Signed-off-by: Brendan Kerrigan <kerriganb at ainfosec.com>
+
+diff --git a/src/libmutter.pc.in b/src/libmutter.pc.in
+index d2e837f4a..0c8db1a66 100644
+--- a/src/libmutter.pc.in
++++ b/src/libmutter.pc.in
+@@ -2,8 +2,10 @@ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+ libdir=@libdir@
+ includedir=@includedir@
+-girdir=@libdir@/mutter
+-typelibdir=@libdir@/mutter
++datarootdir=${prefix}/share
++datadir=${datarootdir}
++girdir=${datadir}/gir-1.0
++typelibdir=${libdir}/mutter
+ apiversion=@LIBMUTTER_API_VERSION@
+ 
+ Name: libmutter
+-- 
+2.17.1
+
diff --git a/meta-gnome/recipes-gnome/gnome3/mutter/0004-fix-broken-includes.patch b/meta-gnome/recipes-gnome/gnome3/mutter/0004-fix-broken-includes.patch
new file mode 100644
index 000000000..2a7580653
--- /dev/null
+++ b/meta-gnome/recipes-gnome/gnome3/mutter/0004-fix-broken-includes.patch
@@ -0,0 +1,37 @@
+mutter: Fix broken includes for xcursor
+
+  Add missing include for the xcursor header to required
+  files.
+
+  Upstream-status: Pending
+
+  Signed-off-by: Brendan Kerrigan <kerriganb at ainfosec.com>
+
+diff --git a/src/core/display.c b/src/core/display.c
+index f6b4d5b9f..3930f1c32 100644
+--- a/src/core/display.c
++++ b/src/core/display.c
+@@ -54,6 +54,7 @@
+ #include <meta/meta-backend.h>
+ #include "backends/meta-cursor-sprite-xcursor.h"
+ #include "backends/meta-logical-monitor.h"
++#include "backends/meta-cursor-sprite-xcursor.h"
+ #include "backends/native/meta-backend-native.h"
+ #include "backends/x11/meta-backend-x11.h"
+ #include "backends/meta-stage-private.h"
+diff --git a/src/x11/meta-x11-display.c b/src/x11/meta-x11-display.c
+index 83f7dfbae..36ea95b91 100644
+--- a/src/x11/meta-x11-display.c
++++ b/src/x11/meta-x11-display.c
+@@ -55,6 +55,8 @@
+ #include "backends/meta-logical-monitor.h"
+ #include "backends/meta-settings-private.h"
+ #include "backends/x11/meta-backend-x11.h"
++#include "backends/meta-cursor-sprite-xcursor.h"
++
+ #include "core/frame.h"
+ #include "core/meta-workspace-manager-private.h"
+ #include "core/util-private.h"
+-- 
+2.17.1
+
diff --git a/meta-gnome/recipes-gnome/gnome3/mutter_git.bb b/meta-gnome/recipes-gnome/gnome3/mutter_git.bb
new file mode 100644
index 000000000..b2065f224
--- /dev/null
+++ b/meta-gnome/recipes-gnome/gnome3/mutter_git.bb
@@ -0,0 +1,59 @@
+DESCRIPTION = "Mutter (Gnome 3 window manager)"
+LICENSE = "GPLv2"
+DEPENDS = " \
+           glib-2.0 \
+           gsettings-desktop-schemas \
+           wayland-native \
+           wayland-protocols \
+           libxinerama \
+           libinput \
+           gtk+3 \
+           gnome-desktop3 \
+           libxcursor \
+           libxkbfile \
+           cogl-1.0 \
+           clutter-1.0 \
+          "
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = " \
+           git://gitlab.gnome.org/GNOME/mutter.git;protocol=http;branch=master \
+           file://0001-disable-zenity-check.patch \
+           file://0002-fixup-introspection-variables-with-correct-path.patch \
+           file://0003-packageconfig-variable-fixup.patch \
+           file://0004-fix-broken-includes.patch \
+          "
+
+SRCREV="${AUTOREV}"
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig distro_features_check gobject-introspection gettext
+
+FILES_${PN} += "${datadir}"
+
+do_configure_prepend() {
+	# Autotools expects config.rpath to be with in the source tree
+	install -d ${S}/build-aux
+	cp ${STAGING_DIR_NATIVE}${datadir}/gettext/config.rpath ${S}/build-aux/config.rpath
+
+        # There are several Werrors that trip when building with Wayland enabled:
+	# -Wno-error=implicit-function-declaration -Wno-error=nested-externs -Wno-error=int-conversion
+	# and setting those as no-error does not seem to get picked up (it does appear in the compilation
+	# command
+	sed -i 's^-Werror -Wno-error=deprecated-declarations^-Wno-error=deprecated-declarations^g' ${S}/configure.ac
+}
+
+do_compile_prepend() {
+	export GIR_EXTRA_LIBS_PATH="${B}/cogl/cogl/.libs:${B}/cogl/cogl-pango/.libs:${B}/cogl/cogl-path/.libs:${B}/clutter/clutter/.libs"
+}
+
+do_install_append() {
+	install -d ${D}/${datadir}/gir-1.0
+	install ${B}/src/Meta-3.gir ${D}/${datadir}/gir-1.0
+	install ${B}/cogl/cogl/Cogl-3.gir ${D}/${datadir}/gir-1.0
+	install ${B}/cogl/cogl-pango/CoglPango-3.gir ${D}/${datadir}/gir-1.0
+	install ${B}/clutter/clutter/Cally-3.gir ${D}/${datadir}/gir-1.0
+	install ${B}/clutter/clutter/ClutterX11-3.gir ${D}/${datadir}/gir-1.0
+	install ${B}/clutter/clutter/Clutter-3.gir ${D}/${datadir}/gir-1.0
+}
-- 
2.17.1




More information about the Openembedded-devel mailing list