From 9b9c12268bf9365101da4a985f70c06740dfeb8f Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Mon, 18 Feb 2019 13:41:01 +0100 Subject: 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 Signed-off-by: Richard Purdie --- meta/recipes-graphics/clutter/clutter-gtk-1.0.inc | 20 ++++++++++-- ...g-variable-for-enabling-disabling-introsp.patch | 37 ++++++++++++++++++++++ .../clutter/clutter-gtk-1.0_1.8.4.bb | 1 + 3 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-graphics/clutter/clutter-gtk-1.0/0001-Add-a-config-variable-for-enabling-disabling-introsp.patch (limited to 'meta/recipes-graphics') diff --git a/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc b/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc index 05c4e5f5ca..4e82f56605 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 0000000000..e21c6fd903 --- /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 f0300c7164..53948c8944 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 = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34" +SRC_URI += " file://0001-Add-a-config-variable-for-enabling-disabling-introsp.patch" SRC_URI[archive.md5sum] = "b363ac9878e2337be887b8ee9e1da00e" SRC_URI[archive.sha256sum] = "521493ec038973c77edcb8bc5eac23eed41645117894aaee7300b2487cb42b06" -- cgit 1.2.3-korg