All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gobject-introspection: split tools and giscanner into a separate package
@ 2024-06-24 20:32 Guðni Már Gilbert
  2024-06-24 20:38 ` Guðni Már Gilbert
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Guðni Már Gilbert @ 2024-06-24 20:32 UTC (permalink / raw)
  To: openembedded-core; +Cc: Guðni Már Gilbert

The tools and giscanner require python3-setuptools at runtime. This increases
the image size quite a bit (on my end ~1.7MB compressed). Most users don't need
these tools in the final image so make them optional.

This commit introduces a new packcage gobject-introspection-tools

Signed-off-by: Guðni Már Gilbert <gudni.m.g@gmail.com>
---
 .../gobject-introspection_1.80.1.bb           | 21 +++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.80.1.bb b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.80.1.bb
index 582ac248fd..9c1945d639 100644
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.80.1.bb
+++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.80.1.bb
@@ -26,7 +26,8 @@ GTKDOC_MESON_OPTION = "gtk_doc"
 
 MULTILIB_SCRIPTS = "${PN}:${bindir}/g-ir-annotation-tool ${PN}:${bindir}/g-ir-scanner"
 
-DEPENDS += " libffi zlib python3 flex-native bison-native"
+# setuptools are required to provide distutils to build the tools
+DEPENDS += " libffi zlib python3 python3-setuptools flex-native bison-native"
 DEPENDS:append:class-native = " glib-2.0"
 DEPENDS:append:class-target = " glib-2.0-initial"
 
@@ -169,6 +170,20 @@ gi_package_preprocess() {
 
 SSTATE_SCAN_FILES += "g-ir-scanner-qemuwrapper g-ir-scanner-wrapper g-ir-compiler-wrapper g-ir-scanner-lddwrapper Gio-2.0.gir postinst-ldsoconf-${PN}"
 
+PACKAGES =+ "\
+        ${PN}-tools \
+"
+
+FILES:${PN}-tools = "\
+        ${bindir}/g-ir-annotation-tool \
+        ${bindir}/g-ir-compiler \
+        ${bindir}/g-ir-generate \
+        ${bindir}/g-ir-generate \
+        ${bindir}/g-ir-inspect \
+        ${bindir}/g-ir-scanner \
+        ${libdir}/gobject-introspection/giscanner \
+"
+
 # .typelib files are needed at runtime and so they go to the main package
 FILES:${PN}:append = " ${libdir}/girepository-*/*.typelib"
 
@@ -190,7 +205,9 @@ FILES:${PN}-dev:append = " ${datadir}/gobject-introspection-1.0/tests/*.c \
 FILES:${PN}-dbg += "${libdir}/gobject-introspection/giscanner/.debug/"
 FILES:${PN}-staticdev += "${libdir}/gobject-introspection/giscanner/*.a"
 
+RDEPENDS:${PN} = "python3-pickle python3-xml glib-2.0"
+
 # setuptools can be removed when upstream removes all uses of distutils
-RDEPENDS:${PN} = "python3-pickle python3-xml python3-setuptools glib-2.0"
+RDEPENDS:${PN}-tools = "${PN} python3-setuptools"
 
 BBCLASSEXTEND = "native"
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-06-25 18:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-24 20:32 [PATCH] gobject-introspection: split tools and giscanner into a separate package Guðni Már Gilbert
2024-06-24 20:38 ` Guðni Már Gilbert
2024-06-25  9:02 ` [OE-core] " Alexander Kanavin
2024-06-25 10:38   ` Guðni Már Gilbert
2024-06-25 18:41   ` Guðni Már Gilbert
2024-06-25 13:24 ` [OE-core] " Alexandre Belloni
2024-06-25 18:29   ` Guðni Már Gilbert

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.