Skip to contentSkip to conversation

meta-gnome: add Cogl/Clutter from oe-core

PATCH In review Ross Burton 2 participants 3 messages May 26, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meta-gnome: add Cogl/Clutter from oe-core

Nothing in openembedded-core needs Clutter now, and Clutter is abandoned upstream. Move it to meta-gnome as there are still a few users of Clutter in Gnome.

---
 meta-gnome/classes/clutter.bbclass            |  18 +++
 .../recipes-graphics/clutter/clutter-1.0.inc  |  49 ++++++
 ...ypes-as-it-is-build-configuration-sp.patch | 143 ++++++++++++++++++
 .../clutter-1.0/install-examples.patch        |  19 +++
 .../run-installed-tests-with-tap-output.patch |  30 ++++
 .../clutter/clutter-1.0/run-ptest             |   3 +
 .../clutter/clutter-1.0_1.26.4.bb             |  10 ++
 .../clutter/clutter-gst-3.0.inc               |  23 +++
 ...binary-needed-for-core-image-clutter.patch |  33 ++++
 .../clutter/clutter-gst-3.0_3.0.27.bb         |   7 +
 .../clutter/clutter-gtk-1.0.inc               |  23 +++
 ...iable-for-enabling-disabling-introsp.patch |  37 +++++
 .../clutter/clutter-gtk-1.0_1.8.4.bb          |   7 +
 meta-gnome/recipes-graphics/cogl/cogl-1.0.inc |  84 ++++++++++
 ...figure.ac-don-t-require-eglmesaext.h.patch |  92 +++++++++++
 .../recipes-graphics/cogl/cogl-1.0_1.22.8.bb  |   6 +
 .../packagegroup-core-clutter.bb              |  22 +++
 17 files changed, 606 insertions(+)
 create mode 100644 meta-gnome/classes/clutter.bbclass
 create mode 100644 meta-gnome/recipes-graphics/clutter/clutter-1.0.inc
 create mode 100644 meta-gnome/recipes-graphics/clutter/clutter-1.0/0001-Remove-clutter.types-as-it-is-build-configuration-sp.patch
 create mode 100644 meta-gnome/recipes-graphics/clutter/clutter-1.0/install-examples.patch
 create mode 100644 meta-gnome/recipes-graphics/clutter/clutter-1.0/run-installed-tests-with-tap-output.patch
 create mode 100644 meta-gnome/recipes-graphics/clutter/clutter-1.0/run-ptest
 create mode 100644 meta-gnome/recipes-graphics/clutter/clutter-1.0_1.26.4.bb
 create mode 100644 meta-gnome/recipes-graphics/clutter/clutter-gst-3.0.inc
 create mode 100644 meta-gnome/recipes-graphics/clutter/clutter-gst-3.0/0001-Install-example-binary-needed-for-core-image-clutter.patch
 create mode 100644 meta-gnome/recipes-graphics/clutter/clutter-gst-3.0_3.0.27.bb
 create mode 100644 meta-gnome/recipes-graphics/clutter/clutter-gtk-1.0.inc
 create mode 100644 meta-gnome/recipes-graphics/clutter/clutter-gtk-1.0/0001-Add-a-config-variable-for-enabling-disabling-introsp.patch
 create mode 100644 meta-gnome/recipes-graphics/clutter/clutter-gtk-1.0_1.8.4.bb
 create mode 100644 meta-gnome/recipes-graphics/cogl/cogl-1.0.inc
 create mode 100644 meta-gnome/recipes-graphics/cogl/cogl-1.0/0001-configure.ac-don-t-require-eglmesaext.h.patch
 create mode 100644 meta-gnome/recipes-graphics/cogl/cogl-1.0_1.22.8.bb
 create mode 100644 meta-gnome/recipes-graphics/packagegroups/packagegroup-core-clutter.bb
meta-gnome/classes/clutter.bbclass new file +18 -0
new file mode 100644
index 0000000000..24b53a13e4
@@ -0,0 +1,18 @@
+def get_minor_dir(v):
+    import re
+    m = re.match(r"^([0-9]+)\.([0-9]+)", v)
+    return "%s.%s" % (m.group(1), m.group(2))
+
+def get_real_name(n):
+    import re
+    m = re.match(r"^([a-z]+(-[a-z]+)?)(-[0-9]+\.[0-9]+)?", n)
+    return "%s" % (m.group(1))
+
+VERMINOR = "${@get_minor_dir("${PV}")}"
+REALNAME = "${@get_real_name("${BPN}")}"
+
+SRC_URI = "${GNOME_MIRROR}/${REALNAME}/${VERMINOR}/${REALNAME}-${PV}.tar.xz;name=archive"
+S = "${WORKDIR}/${REALNAME}-${PV}"
+
+CLUTTERBASEBUILDCLASS ??= "autotools"
+inherit ${CLUTTERBASEBUILDCLASS} pkgconfig gtk-doc gettext
meta-gnome/recipes-graphics/clutter/clutter-1.0.inc new file +49 -0

49 lines not on this page · raw message

meta-gnome/recipes-graphics/clutter/clutter-1.0/0001-Remove-clutter.types-as-it-is-build-configuration-sp.patch new file +143 -0

143 lines not on this page · raw message

meta-gnome/recipes-graphics/clutter/clutter-1.0/install-examples.patch new file +19 -0
new file mode 100644
index 0000000000..ce9ab3a248
@@ -0,0 +1,19 @@
+Install the examples to $libdir/clutter/.
+
+Signed-off-by: Ross Burton <[email protected]>
+Upstream-Status: Inappropriate
+
+Index: clutter-1.26.2/examples/Makefile.am
+===================================================================
+--- clutter-1.26.2.orig/examples/Makefile.am
++++ clutter-1.26.2/examples/Makefile.am
+@@ -33,7 +33,8 @@ AM_CPPFLAGS = \
+ 	-I$(top_srcdir)/clutter \
+ 	-I$(top_builddir)/clutter
+ 
+-noinst_PROGRAMS = $(all_examples)
++exampledir = $(pkglibdir)/examples
++example_PROGRAMS = $(all_examples)
+ 
+ EXTRA_DIST = redhand.png
+ 
meta-gnome/recipes-graphics/clutter/clutter-1.0/run-installed-tests-with-tap-output.patch new file +30 -0
new file mode 100644
index 0000000000..fef82eaf92
@@ -0,0 +1,30 @@
+From d6ceb5a44b28e0e50ede22b84984d8516897de4b Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <[email protected]>
+Date: Mon, 27 Apr 2015 20:12:33 +0300
+Subject: [PATCH] Run installed tests with tap output
+
+Configure output from installed-tests to be TAP compliant such that
+gnome-desktop-testing-runner properly interprets the results.
+
+Upstream-Status: Pending
+
+Signed-off-by: Tim Orling <[email protected]>
+
+---
+ build-aux/autotools/glib-tap.mk | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/build-aux/autotools/glib-tap.mk b/build-aux/autotools/glib-tap.mk
+index a4f0dad..51cfa31 100644
+--- a/build-aux/autotools/glib-tap.mk
++++ b/build-aux/autotools/glib-tap.mk
+@@ -127,7 +127,8 @@ installed_test_meta_DATA = $(installed_testcases:=.test)
+ %.test: %$(EXEEXT) Makefile
+ 	$(AM_V_GEN) (echo '[Test]' > [email protected]; \
+ 	echo 'Type=session' >> [email protected]; \
+-	echo 'Exec=env G_ENABLE_DIAGNOSTIC=0 CLUTTER_ENABLE_DIAGNOSTIC=0 $(installed_testdir)/$<' >> [email protected]; \
++	echo 'Exec=env G_ENABLE_DIAGNOSTIC=0 CLUTTER_ENABLE_DIAGNOSTIC=0 $(installed_testdir)/$< --tap' >> [email protected]; \
++	echo 'Output=TAP' >> [email protected]; \
+ 	mv [email protected] $@)
+ 
+ CLEANFILES += $(installed_test_meta_DATA)
meta-gnome/recipes-graphics/clutter/clutter-1.0/run-ptest new file +3 -0
new file mode 100644
index 0000000000..98877e5226
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+gnome-desktop-testing-runner clutter
meta-gnome/recipes-graphics/clutter/clutter-1.0_1.26.4.bb new file +10 -0
new file mode 100644
index 0000000000..ee549fbdd5
@@ -0,0 +1,10 @@
+require clutter-1.0.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+SRC_URI[archive.md5sum] = "624dd776a5159de0267587b1df6b97b2"
+SRC_URI[archive.sha256sum] = "8b48fac159843f556d0a6be3dbfc6b083fc6d9c58a20a49a6b4919ab4263c4e6"
+SRC_URI += "file://install-examples.patch \
+            file://run-installed-tests-with-tap-output.patch \
+            file://0001-Remove-clutter.types-as-it-is-build-configuration-sp.patch \
+            file://run-ptest"
meta-gnome/recipes-graphics/clutter/clutter-gst-3.0.inc new file +23 -0
new file mode 100644
index 0000000000..73315c97ec
@@ -0,0 +1,23 @@
+SUMMARY = "GStreamer integration library for Clutter"
+DESCRIPTION = "Clutter-Gst is an integration library for using GStreamer with Clutter. \
+It provides a GStreamer sink to upload frames to GL and an actor that \
+implements the ClutterGstPlayer interface using playbin."
+HOMEPAGE = "http://www.clutter-project.org/"
+BUGTRACKER = "https://gitlab.gnome.org/GNOME/clutter-gst/-/issues"
+LICENSE = "LGPLv2+"
+
+inherit clutter features_check upstream-version-is-even gobject-introspection
+# depends on clutter-1.0 which depends on cogl-1.0
+REQUIRED_DISTRO_FEATURES ?= "opengl"
+
+export GST_PLUGIN_SCANNER_1_0="${S}/gst-plugin-scanner-dummy"
+
+SRC_URI += "file://0001-Install-example-binary-needed-for-core-image-clutter.patch"
+
+DEPENDS = "gstreamer1.0-plugins-base gstreamer1.0-plugins-bad clutter-1.0 libgudev"
+RDEPENDS_${PN} += "gstreamer1.0-meta-base"
+PACKAGES  =+ "${PN}-examples"
+
+FILES_${PN}          += "${libdir}/gstreamer-1.0/lib*.so"
+FILES_${PN}-dev      += "${libdir}/gstreamer-1.0/*.la"
+FILES_${PN}-examples  = "${bindir}/video-player ${bindir}/video-sink"
meta-gnome/recipes-graphics/clutter/clutter-gst-3.0/0001-Install-example-binary-needed-for-core-image-clutter.patch new file +33 -0
new file mode 100644
index 0000000000..0b26b990d7
@@ -0,0 +1,33 @@
+From d77c711277bf075ce0545c19b322f040c49c778a Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <[email protected]>
+Date: Thu, 30 Apr 2015 12:19:13 +0300
+Subject: [PATCH] Install example binary needed for core-image-clutter
+
+Signed-off-by: Zhai Edwin <[email protected]>
+
+Upstream-Status: Inappropriate [configuration]
+
+Imported from clutter-gst-1.8 package, git://git.openembedded.org/openembedded,
+commit ae28ee3f7a060b9e0d13154a84f2444a98490b5b, updated for clutter-gst 3.0
+
+Signed-off-by: Tomas Frydrych <[email protected]>
+Signed-off-by: Alexander Kanavin <[email protected]>
+---
+ examples/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/examples/Makefile.am b/examples/Makefile.am
+index bfbc1b5..09655e3 100644
+--- a/examples/Makefile.am
++++ b/examples/Makefile.am
+@@ -1,6 +1,6 @@
+ NULL = #
+ 
+-noinst_PROGRAMS = camera-player video-player video-sink video-sink-navigation video-content
++bin_PROGRAMS = camera-player video-player video-sink video-sink-navigation video-content
+ 
+ AM_CPPFLAGS = -I$(top_srcdir) \
+ 		$(MAINTAINER_CFLAGS) \
+-- 
+2.1.4
+
meta-gnome/recipes-graphics/clutter/clutter-gst-3.0_3.0.27.bb new file +7 -0
new file mode 100644
index 0000000000..35382453c2
@@ -0,0 +1,7 @@
+require clutter-gst-3.0.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
+                    file://clutter-gst/clutter-gst.h;beginline=1;endline=24;md5=95baacba194e814c110ea3bdf25ddbf4"
+
+SRC_URI[archive.md5sum] = "2bf9d7ca146c9d71e86c45cd00e9a28e"
+SRC_URI[archive.sha256sum] = "fe69bd6c659d24ab30da3f091eb91cd1970026d431179b0724f13791e8ad9f9d"
meta-gnome/recipes-graphics/clutter/clutter-gtk-1.0.inc new file +23 -0
new file mode 100644
index 0000000000..9a28b5219b
@@ -0,0 +1,23 @@
+SUMMARY = "Library for embedding a Clutter canvas in a GTK+ application"
+DESCRIPTION = "Clutter-GTK is a library providing facilities to integrate Clutter into GTK+ \
+applications and vice versa. It provides a GTK+ widget, GtkClutterEmbed, for embedding the \
+a Clutter stage into any GtkContainer; and GtkClutterActor, a Clutter \
+actor for embedding any GtkWidget inside a Clutter stage."
+HOMEPAGE = "http://www.clutter-project.org/"
+BUGTRACKER = "https://gitlab.gnome.org/GNOME/clutter/-/issues"
+LICENSE = "LGPLv2+"
+
+CLUTTERBASEBUILDCLASS = "meson"
+inherit clutter 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
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
+
+DEPENDS = "clutter-1.0 gtk+3"
+PACKAGES  =+ "${PN}-examples"
+
+GTKDOC_MESON_OPTION = "enable_docs"
+
+GIR_MESON_OPTION = 'enable_gi'
meta-gnome/recipes-graphics/clutter/clutter-gtk-1.0/0001-Add-a-config-variable-for-enabling-disabling-introsp.patch new file +37 -0
new file mode 100644
index 0000000000..e21c6fd903
@@ -0,0 +1,37 @@
+From 7233883c6bd4e80c0e91b29b5c76fe798023e9fe Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <[email protected]>
+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 <[email protected]>
+---
+ 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')
meta-gnome/recipes-graphics/clutter/clutter-gtk-1.0_1.8.4.bb new file +7 -0
new file mode 100644
index 0000000000..53948c8944
@@ -0,0 +1,7 @@
+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"
meta-gnome/recipes-graphics/cogl/cogl-1.0.inc new file +84 -0

84 lines not on this page · raw message

meta-gnome/recipes-graphics/cogl/cogl-1.0/0001-configure.ac-don-t-require-eglmesaext.h.patch new file +92 -0

92 lines not on this page · raw message

meta-gnome/recipes-graphics/cogl/cogl-1.0_1.22.8.bb new file +6 -0
new file mode 100644
index 0000000000..b9446fab38
@@ -0,0 +1,6 @@
+require cogl-1.0.inc
+
+SRC_URI += "file://0001-configure.ac-don-t-require-eglmesaext.h.patch"
+SRC_URI[archive.sha256sum] = "a805b2b019184710ff53d0496f9f0ce6dcca420c141a0f4f6fcc02131581d759"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=1b1a508d91d25ca607c83f92f3e31c84"
meta-gnome/recipes-graphics/packagegroups/packagegroup-core-clutter.bb new file +22 -0
new file mode 100644
index 0000000000..2e7b47dd40
@@ -0,0 +1,22 @@
+#
+# Copyright (C) 2007 OpenedHand Ltd.
+#
+
+SUMMARY = "Clutter package groups"
+
+PR = "r6"
+
+inherit packagegroup features_check
+# rdepends on clutter-*
+REQUIRED_DISTRO_FEATURES = "opengl"
+
+PACKAGES = "\
+    ${PN}-core \
+    "
+
+SUMMARY_${PN}-core = "Clutter graphics library"
+RDEPENDS_${PN}-core = "\
+    clutter-1.0 \
+    clutter-gst-3.0 \
+    clutter-gtk-1.0 \
+    "
Signature · 1 line
2.25.1
#1 lore raw
Quoted 4 lines · Ross Burton

Nothing in openembedded-core needs Clutter now, and Clutter is abandoned upstream. Move it to meta-gnome as there are still a few users of Clutter in Gnome.

Just out of curiosity: What needs cogl & clutter these days? I thought that both were more or less merged into mutter.

Or in other words: Who/what would miss them?

Cheers

Anreas

#2 lore raw
Quoted 10 lines · Andreas Müller
Quoted 4 lines · Ross Burton

Nothing in openembedded-core needs Clutter now, and Clutter is abandoned upstream. Move it to meta-gnome as there are still a few users of Clutter in Gnome.

Just out of curiosity: What needs cogl & clutter these days? I thought that both were more or less merged into mutter.

Or in other words: Who/what would miss them?

In meta-gnome, libchamplain needs it. Totem is also using it still.

As those projects migrate to GTK 4 I entirely expect Clutter to disappear entirely, but as of right now it is used by a few GNOME components.

Ross