Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1 | require glib.inc |
| 2 | |
| 3 | PE = "1" |
| 4 | |
| 5 | SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}" |
| 6 | |
| 7 | SRC_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 \ |
| 17 | file://0001-gio-tests-g-file-info-don-t-assume-million-in-one-ev.patch \ |
| 18 | file://0001-gio-tests-meson.build-do-not-use-can_run_host_binari.patch \ |
| 19 | file://cpp-null.patch \ |
| 20 | file://cpp-null2.patch \ |
| 21 | file://fix-errno.patch \ |
| 22 | " |
| 23 | SRC_URI:append:class-native = " file://relocate-modules.patch" |
| 24 | |
| 25 | SRC_URI[sha256sum] = "0e82da5ea129b4444227c7e4a9e598f7288d1994bf63f129c44b90cfd2432172" |
| 26 | |
| 27 | # Find any meson cross files in FILESPATH that are relevant for the current |
| 28 | # build (using siteinfo) and add them to EXTRA_OEMESON. |
| 29 | inherit siteinfo |
| 30 | def find_meson_cross_files(d): |
| 31 | if bb.data.inherits_class('native', d): |
| 32 | return "" |
| 33 | |
| 34 | thisdir = os.path.normpath(d.getVar("THISDIR")) |
| 35 | import collections |
| 36 | sitedata = siteinfo_data(d) |
| 37 | # filename -> found |
| 38 | files = collections.OrderedDict() |
| 39 | for path in d.getVar("FILESPATH").split(":"): |
| 40 | for element in sitedata: |
| 41 | filename = os.path.normpath(os.path.join(path, "meson.cross.d", element)) |
| 42 | sanitized_path = filename.replace(thisdir, "${THISDIR}") |
| 43 | if sanitized_path == filename: |
| 44 | if os.path.exists(filename): |
| 45 | 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)) |
| 46 | continue |
| 47 | files[filename.replace(thisdir, "${THISDIR}")] = os.path.exists(filename) |
| 48 | |
| 49 | items = ["--cross-file=" + k for k,v in files.items() if v] |
| 50 | d.appendVar("EXTRA_OEMESON", " " + " ".join(items)) |
| 51 | items = ["%s:%s" % (k, "True" if v else "False") for k,v in files.items()] |
| 52 | d.appendVarFlag("do_configure", "file-checksums", " " + " ".join(items)) |
| 53 | |
| 54 | python () { |
| 55 | find_meson_cross_files(d) |
| 56 | } |