blob: 8fd785a7fd2c1a47be0aec4ba1e92ab01fd51fe8 [file] [log] [blame]
Andrew Geissler9aee5002022-03-30 16:27:02 +00001require glib.inc
2
3PE = "1"
4
5SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
6
7SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
8 file://run-ptest \
9 file://0001-Fix-DATADIRNAME-on-uclibc-Linux.patch \
Andrew Geissler9aee5002022-03-30 16:27:02 +000010 file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \
11 file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \
Andrew Geissler9aee5002022-03-30 16:27:02 +000012 file://0010-Do-not-hardcode-python-path-into-various-tools.patch \
13 file://0001-Set-host_machine-correctly-when-building-with-mingw3.patch \
14 file://0001-Do-not-write-bindir-into-pkg-config-files.patch \
15 file://0001-meson-Run-atomics-test-on-clang-as-well.patch \
16 file://0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch \
Patrick Williams2390b1b2022-11-03 13:47:49 -050017 file://0001-gio-tests-g-file-info-don-t-assume-million-in-one-ev.patch \
Patrick Williams7784c422022-11-17 07:29:11 -060018 file://0001-gio-tests-meson.build-do-not-use-can_run_host_binari.patch \
19 file://cpp-null.patch \
20 file://cpp-null2.patch \
Andrew Geissler9aee5002022-03-30 16:27:02 +000021 "
22SRC_URI:append:class-native = " file://relocate-modules.patch"
23
Patrick Williams7784c422022-11-17 07:29:11 -060024SRC_URI[sha256sum] = "0ab981618d1db47845e56417b0d7c123f81a3427b2b9c93f5a46ff5bbb964964"
Andrew Geissler9aee5002022-03-30 16:27:02 +000025
26# Find any meson cross files in FILESPATH that are relevant for the current
27# build (using siteinfo) and add them to EXTRA_OEMESON.
28inherit siteinfo
29def find_meson_cross_files(d):
30 if bb.data.inherits_class('native', d):
31 return ""
32
33 thisdir = os.path.normpath(d.getVar("THISDIR"))
34 import collections
35 sitedata = siteinfo_data(d)
36 # filename -> found
37 files = collections.OrderedDict()
38 for path in d.getVar("FILESPATH").split(":"):
39 for element in sitedata:
40 filename = os.path.normpath(os.path.join(path, "meson.cross.d", element))
41 sanitized_path = filename.replace(thisdir, "${THISDIR}")
42 if sanitized_path == filename:
43 if os.path.exists(filename):
44 bb.error("Cannot add '%s' to --cross-file, because it's not relative to THISDIR '%s' and sstate signature would contain this full path" % (filename, thisdir))
45 continue
46 files[filename.replace(thisdir, "${THISDIR}")] = os.path.exists(filename)
47
48 items = ["--cross-file=" + k for k,v in files.items() if v]
49 d.appendVar("EXTRA_OEMESON", " " + " ".join(items))
50 items = ["%s:%s" % (k, "True" if v else "False") for k,v in files.items()]
51 d.appendVarFlag("do_configure", "file-checksums", " " + " ".join(items))
52
53python () {
54 find_meson_cross_files(d)
55}