[OE-core] [PATCH 1/8] clutter-gtk-1.0: convert to meson
This required adding an option to control gobject introspection via a custom patch, and tweaking clutter.bbclass to not enforce autotools. Signed-off-by: Alexander Kanavin --- meta/classes/clutter.bbclass | 3 +- .../clutter/clutter-gtk-1.0.inc | 20 +- ...iable-for-enabling-disabling-introsp.patch | 37 +++ .../clutter/clutter-gtk-1.0_1.8.4.bb | 1 + 4 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 meta/recipes-graphics/clutter/clutter-gtk-1.0/0001-Add-a-config-variable-for-enabling-disabling-introsp.patch diff --git a/meta/classes/clutter.bbclass b/meta/classes/clutter.bbclass index 5edab0e55d6..24b53a13e40 100644 --- a/meta/classes/clutter.bbclass +++ b/meta/classes/clutter.bbclass @@ -14,4 +14,5 @@ REALNAME = "${@get_real_name("${BPN}")}" SRC_URI = "${GNOME_MIRROR}/${REALNAME}/${VERMINOR}/${REALNAME}-${PV}.tar.xz;name=archive" S = "${WORKDIR}/${REALNAME}-${PV}" -inherit autotools pkgconfig gtk-doc gettext +CLUTTERBASEBUILDCLASS ??= "autotools" +inherit ${CLUTTERBASEBUILDCLASS} pkgconfig gtk-doc gettext diff --git a/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc b/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc index 05c4e5f5caa..4e82f566057 100644 --- a/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc +++ b/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc @@ -2,7 +2,9 @@ SUMMARY = "Library for embedding a Clutter canvas in a GTK+ application" HOMEPAGE = "http://www.clutter-project.org/"; LICENSE = "LGPLv2+" -inherit clutter distro_features_check upstream-version-is-even gobject-introspection +CLUTTERBASEBUILDCLASS = "meson" +inherit clutter distro_features_check upstream-version-is-even gobject-introspection gtk-doc + # depends on clutter-1.0 which depends on cogl-1.0 REQUIRED_DISTRO_FEATURES ?= "opengl" # depends on gtk+3 @@ -10,6 +12,20 @@ ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" DEPENDS = "clutter-1.0 gtk+3" PACKAGES =+ "${PN}-examples" -AUTOTOOLS_AUXDIR = "${S}/build" + +GTKDOC_ENABLE_FLAG = "-Denable_docs=true" +GTKDOC_DISABLE_FLAG = "-Denable_docs=false" + +GI_ENABLE_FLAG = "-Denable_gi=true" +GI_DISABLE_FLAG = "-Denable_gi=false" + +EXTRA_OEMESON_append_class-nativesdk = " ${GI_DISABLE_FLAG}" + +EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '${GI_ENABLE_FLAG}', \ + '${GI_DISABLE_FLAG}', d)} " + +EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_ENABLE_FLAG}', \ + '${GTKDOC_DISABLE_FLAG}', d)} " + diff --git a/meta/recipes-graphics/clutter/clutter-gtk-1.0/0001-Add-a-config-variable-for-enabling-disabling-introsp.patch b/meta/recipes-graphics/clutter/clutter-gtk-1.0/0001-Add-a-config-variable-for-enabling-disabling-introsp.patch new file mode 100644 index 000..e21c6fd9036 --- /dev/null +++ b/meta/recipes-graphics/clutter/clutter-gtk-1.0/0001-Add-a-config-variable-for-enabling-disabling-introsp.patch @@ -0,0 +1,37 @@ +From 7233883c6bd4e80c0e91b29b5c76fe798023e9fe Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Mon, 11 Feb 2019 16:41:13 +0100 +Subject: [PATCH] Add a config variable for enabling/disabling introspection + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin +--- + clutter-gtk/meson.build | 2 +- + meson_options.txt | 4 + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/clutter-gtk/meson.build b/clutter-gtk/meson.build +index 5d6847d..5d934b6 100644 +--- a/clutter-gtk/meson.build b/clutter-gtk/meson.build +@@ -49,7 +49,7 @@ clutter_gtk_dep = declare_dependency(link_with: clutter_gtk, + dependencies: [ mathlib_dep, clutter_dep, gtk_dep ], + include_directories: include_directories('.')) + +-if not meson.is_cross_build() ++if get_option('enable_gi') + gnome.generate_gir(clutter_gtk, + sources: clutter_gtk_headers + clutter_gtk_sources, + namespace: 'GtkClutter', +diff --git a/meson_options.txt b/meson_options.txt +index aaf59f1..b7e51c3 100644 +--- a/meson_options.txt b/meson_options.txt +@@ -2,3 +2,7 @@ option('enable_docs', +type: 'boolean', +value: false, +description: 'Enable generating the API reference (depends on GTK-Doc)') ++option('enable_gi', ++ type: 'boolean', ++ value: false, ++ description: 'Enable gobject introspection') diff --git a/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.4.bb b/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.4.bb index f0300c7164c..53948c89442 100644 --- a/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.4.bb +++ b/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.4.bb @@ -2,5 +2,6 @@ require clutter-gtk-1.0.inc LIC_FILES_CHKSUM
[OE-core] [PATCH 1/8] clutter-gtk-1.0: convert to meson
This required adding an option to control gobject introspection via a custom patch, and tweaking clutter.bbclass to not enforce autotools. Signed-off-by: Alexander Kanavin --- meta/classes/clutter.bbclass | 3 +- .../clutter/clutter-gtk-1.0.inc | 20 +- ...iable-for-enabling-disabling-introsp.patch | 37 +++ .../clutter/clutter-gtk-1.0_1.8.4.bb | 1 + 4 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 meta/recipes-graphics/clutter/clutter-gtk-1.0/0001-Add-a-config-variable-for-enabling-disabling-introsp.patch diff --git a/meta/classes/clutter.bbclass b/meta/classes/clutter.bbclass index 5edab0e55d6..24b53a13e40 100644 --- a/meta/classes/clutter.bbclass +++ b/meta/classes/clutter.bbclass @@ -14,4 +14,5 @@ REALNAME = "${@get_real_name("${BPN}")}" SRC_URI = "${GNOME_MIRROR}/${REALNAME}/${VERMINOR}/${REALNAME}-${PV}.tar.xz;name=archive" S = "${WORKDIR}/${REALNAME}-${PV}" -inherit autotools pkgconfig gtk-doc gettext +CLUTTERBASEBUILDCLASS ??= "autotools" +inherit ${CLUTTERBASEBUILDCLASS} pkgconfig gtk-doc gettext diff --git a/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc b/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc index 05c4e5f5caa..4e82f566057 100644 --- a/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc +++ b/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc @@ -2,7 +2,9 @@ SUMMARY = "Library for embedding a Clutter canvas in a GTK+ application" HOMEPAGE = "http://www.clutter-project.org/"; LICENSE = "LGPLv2+" -inherit clutter distro_features_check upstream-version-is-even gobject-introspection +CLUTTERBASEBUILDCLASS = "meson" +inherit clutter distro_features_check upstream-version-is-even gobject-introspection gtk-doc + # depends on clutter-1.0 which depends on cogl-1.0 REQUIRED_DISTRO_FEATURES ?= "opengl" # depends on gtk+3 @@ -10,6 +12,20 @@ ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" DEPENDS = "clutter-1.0 gtk+3" PACKAGES =+ "${PN}-examples" -AUTOTOOLS_AUXDIR = "${S}/build" + +GTKDOC_ENABLE_FLAG = "-Denable_docs=true" +GTKDOC_DISABLE_FLAG = "-Denable_docs=false" + +GI_ENABLE_FLAG = "-Denable_gi=true" +GI_DISABLE_FLAG = "-Denable_gi=false" + +EXTRA_OEMESON_append_class-nativesdk = " ${GI_DISABLE_FLAG}" + +EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '${GI_ENABLE_FLAG}', \ + '${GI_DISABLE_FLAG}', d)} " + +EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_ENABLE_FLAG}', \ + '${GTKDOC_DISABLE_FLAG}', d)} " + diff --git a/meta/recipes-graphics/clutter/clutter-gtk-1.0/0001-Add-a-config-variable-for-enabling-disabling-introsp.patch b/meta/recipes-graphics/clutter/clutter-gtk-1.0/0001-Add-a-config-variable-for-enabling-disabling-introsp.patch new file mode 100644 index 000..e21c6fd9036 --- /dev/null +++ b/meta/recipes-graphics/clutter/clutter-gtk-1.0/0001-Add-a-config-variable-for-enabling-disabling-introsp.patch @@ -0,0 +1,37 @@ +From 7233883c6bd4e80c0e91b29b5c76fe798023e9fe Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Mon, 11 Feb 2019 16:41:13 +0100 +Subject: [PATCH] Add a config variable for enabling/disabling introspection + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin +--- + clutter-gtk/meson.build | 2 +- + meson_options.txt | 4 + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/clutter-gtk/meson.build b/clutter-gtk/meson.build +index 5d6847d..5d934b6 100644 +--- a/clutter-gtk/meson.build b/clutter-gtk/meson.build +@@ -49,7 +49,7 @@ clutter_gtk_dep = declare_dependency(link_with: clutter_gtk, + dependencies: [ mathlib_dep, clutter_dep, gtk_dep ], + include_directories: include_directories('.')) + +-if not meson.is_cross_build() ++if get_option('enable_gi') + gnome.generate_gir(clutter_gtk, + sources: clutter_gtk_headers + clutter_gtk_sources, + namespace: 'GtkClutter', +diff --git a/meson_options.txt b/meson_options.txt +index aaf59f1..b7e51c3 100644 +--- a/meson_options.txt b/meson_options.txt +@@ -2,3 +2,7 @@ option('enable_docs', +type: 'boolean', +value: false, +description: 'Enable generating the API reference (depends on GTK-Doc)') ++option('enable_gi', ++ type: 'boolean', ++ value: false, ++ description: 'Enable gobject introspection') diff --git a/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.4.bb b/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.4.bb index f0300c7164c..53948c89442 100644 --- a/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.4.bb +++ b/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.4.bb @@ -2,5 +2,6 @@ require clutter-gtk-1.0.inc LIC_FILES_CHKSUM