blob: b1669ead75e3e1a4349cc60fdfc12c80e2e54b1c [file] [log] [blame]
Patrick Williamsac13d5f2023-11-24 18:59:46 -06001require 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 \
10 file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \
11 file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \
12 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 Williams39653562024-03-01 08:54:02 -060017 file://0001-Switch-from-the-deprecated-distutils-module-to-the-p.patch \
Patrick Williams73bd93f2024-02-20 08:07:48 -060018 file://memory-monitor.patch \
Patrick Williamsb58112e2024-03-07 11:16:36 -060019 file://fix-regex.patch \
Patrick Williams03514f12024-04-05 07:04:11 -050020 file://skip-timeout.patch \
Patrick Williamsac13d5f2023-11-24 18:59:46 -060021 "
22SRC_URI:append:class-native = " file://relocate-modules.patch \
23 file://0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch \
24 "
25
Patrick Williamsb58112e2024-03-07 11:16:36 -060026SRC_URI[sha256sum] = "24b8e0672dca120cc32d394bccb85844e732e04fe75d18bb0573b2dbc7548f63"
Patrick Williamsac13d5f2023-11-24 18:59:46 -060027
28# Find any meson cross files in FILESPATH that are relevant for the current
29# build (using siteinfo) and add them to EXTRA_OEMESON.
30inherit siteinfo
31def find_meson_cross_files(d):
32 if bb.data.inherits_class('native', d):
33 return ""
34
35 thisdir = os.path.normpath(d.getVar("THISDIR"))
36 import collections
37 sitedata = siteinfo_data(d)
38 # filename -> found
39 files = collections.OrderedDict()
40 for path in d.getVar("FILESPATH").split(":"):
41 for element in sitedata:
42 filename = os.path.normpath(os.path.join(path, "meson.cross.d", element))
43 sanitized_path = filename.replace(thisdir, "${THISDIR}")
44 if sanitized_path == filename:
45 if os.path.exists(filename):
46 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))
47 continue
48 files[filename.replace(thisdir, "${THISDIR}")] = os.path.exists(filename)
49
50 items = ["--cross-file=" + k for k,v in files.items() if v]
51 d.appendVar("EXTRA_OEMESON", " " + " ".join(items))
52 items = ["%s:%s" % (k, "True" if v else "False") for k,v in files.items()]
53 d.appendVarFlag("do_configure", "file-checksums", " " + " ".join(items))
54
55python () {
56 find_meson_cross_files(d)
57}