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.

(From OE-Core rev: 9b9c12268bf9365101da4a985f70c06740dfeb8f)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alexander Kanavin
2019-02-18 13:41:01 +01:00
committed by Richard Purdie
parent 4972d5dbd9
commit 85a4d9f53b
4 changed files with 58 additions and 3 deletions

View File

@@ -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

View File

@@ -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)} "

View File

@@ -0,0 +1,37 @@
From 7233883c6bd4e80c0e91b29b5c76fe798023e9fe Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
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 <alex.kanavin@gmail.com>
---
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')

View File

@@ -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"