diff options
Diffstat (limited to 'meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb')
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb index 7bf8648cad..953fba501a 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb +++ b/meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb @@ -18,7 +18,31 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ " SRC_URI_append_class-native = " file://relocate-modules.patch" -SRC_URI_append_class-target = " file://glib-meson.cross" SRC_URI[md5sum] = "d52234ecba128932bed90bbc3553bfe5" SRC_URI[sha256sum] = "4c84030d77fa9712135dfa8036ad663925655ae95b1d19399b6200e869925bbc" + +# Find any meson cross files in FILESPATH that are relevant for the current +# build (using siteinfo) and add them to EXTRA_OEMESON. +inherit siteinfo +def find_meson_cross_files(d): + if bb.data.inherits_class('native', d): + return "" + + import collections + sitedata = siteinfo_data(d) + # filename -> found + files = collections.OrderedDict() + for path in d.getVar("FILESPATH").split(":"): + for element in sitedata: + filename = os.path.join(path, "meson.cross.d", element) + files[filename] = os.path.exists(filename) + + items = ["--cross-file=" + k for k,v in files.items() if v] + d.appendVar("EXTRA_OEMESON", " " + " ".join(items)) + items = ["%s:%s" % (k, "True" if v else "False") for k,v in files.items()] + d.appendVarFlag("do_configure", "file-checksums", " " + " ".join(items)) + +python () { + find_meson_cross_files(d) +} |