1config BR2_PACKAGE_GOBJECT_INTROSPECTION_ARCH_SUPPORTS
2	bool
3	default y
4	depends on BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS
5
6config BR2_PACKAGE_GOBJECT_INTROSPECTION
7	bool "gobject-introspection"
8	depends on BR2_USE_MMU # python3, libglib2
9	depends on BR2_PACKAGE_GOBJECT_INTROSPECTION_ARCH_SUPPORTS
10	# While gcc 4.8 might be compatible with gobject-introspection,
11	# The autobuilders use some toolchains from codesourcery which
12	# have gcc 4.8 and a very old version of glibc, which will cause
13	# compile errors with locale.c. As such, require 4.9 until this
14	# can be verified.
15	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
16	depends on BR2_HOST_GCC_AT_LEAST_8 # host-qemu
17	depends on BR2_TOOLCHAIN_USES_GLIBC
18	# gobject-introspection does not require python3 to run on the
19	# target; however, because the tools run in a qemu wrapper, a
20	# cross-compiled python3 must be installed to staging. As there
21	# is no current mechanism to tell Buildroot only to install
22	# python to staging, then python must also be installed
23	# unconditionally to the target when building
24	# gobject-introspection.
25	depends on BR2_PACKAGE_PYTHON3
26	select BR2_PACKAGE_HOST_QEMU
27	select BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE
28	select BR2_PACKAGE_LIBFFI
29	select BR2_PACKAGE_LIBGLIB2
30	select BR2_PACKAGE_ZLIB
31	help
32	  GObject introspection is a middleware layer between C
33	  libraries (using GObject) and language bindings. The C library
34	  can be scanned at compile time and generate a metadata file,
35	  in addition to the actual native C library. Then at runtime,
36	  language bindings can read this metadata and automatically
37	  provide bindings to call into the C library.
38
39	  https://wiki.gnome.org/action/show/Projects/GObjectIntrospection
40
41comment "gobject-introspection needs python3"
42	depends on !BR2_PACKAGE_PYTHON3
43	depends on BR2_PACKAGE_GOBJECT_INTROSPECTION_ARCH_SUPPORTS
44
45comment "gobject-introspection needs a glibc toolchain, gcc >= 4.9, host gcc >= 8"
46	depends on BR2_USE_MMU
47	depends on BR2_PACKAGE_GOBJECT_INTROSPECTION_ARCH_SUPPORTS
48	depends on !BR2_TOOLCHAIN_USES_GLIBC || \
49		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \
50		!BR2_HOST_GCC_AT_LEAST_8
51