diff options
Diffstat (limited to 'meta/recipes-core/glib-2.0/glib.inc')
-rw-r--r-- | meta/recipes-core/glib-2.0/glib.inc | 72 |
1 files changed, 66 insertions, 6 deletions
diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc index fac8875d84..690d1c162c 100644 --- a/meta/recipes-core/glib-2.0/glib.inc +++ b/meta/recipes-core/glib-2.0/glib.inc | |||
@@ -28,21 +28,26 @@ PACKAGES += "${PN}-codegen ${PN}-utils" | |||
28 | 28 | ||
29 | LEAD_SONAME = "libglib-2.0.*" | 29 | LEAD_SONAME = "libglib-2.0.*" |
30 | 30 | ||
31 | inherit meson gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages gobject-introspection-data | 31 | inherit meson gettext gi-docgen pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages gobject-introspection-data |
32 | |||
33 | GTKDOC_MESON_OPTION = "gtk_doc" | ||
34 | 32 | ||
35 | S = "${WORKDIR}/glib-${PV}" | 33 | S = "${WORKDIR}/glib-${PV}" |
36 | 34 | ||
35 | GIDOCGEN_MESON_OPTION = "documentation" | ||
36 | |||
37 | PACKAGECONFIG ??= "libmount \ | 37 | PACKAGECONFIG ??= "libmount \ |
38 | ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'introspection', '', d)} \ | ||
38 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" | 39 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" |
40 | PACKAGECONFIG:class-native = "" | ||
41 | |||
39 | PACKAGECONFIG[libmount] = "-Dlibmount=enabled,-Dlibmount=disabled,util-linux" | 42 | PACKAGECONFIG[libmount] = "-Dlibmount=enabled,-Dlibmount=disabled,util-linux" |
40 | PACKAGECONFIG[manpages] = "-Dman=true, -Dman=false, libxslt-native xmlto-native" | 43 | PACKAGECONFIG[manpages] = "-Dman-pages=enabled, -Dman-pages=disabled, python3-docutils-native" |
41 | PACKAGECONFIG[libelf] = "-Dlibelf=enabled,-Dlibelf=disabled,elfutils" | 44 | PACKAGECONFIG[libelf] = "-Dlibelf=enabled,-Dlibelf=disabled,elfutils" |
42 | PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false," | 45 | PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false," |
43 | PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux" | 46 | PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux" |
47 | PACKAGECONFIG[introspection] = "-Dintrospection=enabled,-Dintrospection=disabled,gobject-introspection-native gobject-introspection glib-2.0-initial" | ||
44 | 48 | ||
45 | EXTRA_OEMESON = "-Ddtrace=false -Dsystemtap=false" | 49 | EXTRA_OEMESON = "-Ddtrace=false -Dsystemtap=false" |
50 | EXTRA_OEMESON:append:class-target = " ${@'-Dgir_dir_prefix=${libdir}' if d.getVar('MULTILIBS') else ''}" | ||
46 | 51 | ||
47 | do_configure:prepend() { | 52 | do_configure:prepend() { |
48 | sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in | 53 | sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in |
@@ -53,14 +58,16 @@ FILES:${PN} = "${libdir}/lib*${SOLIBS} \ | |||
53 | ${libexecdir}/*gio-querymodules \ | 58 | ${libexecdir}/*gio-querymodules \ |
54 | ${libexecdir}/*gio-launch-desktop \ | 59 | ${libexecdir}/*gio-launch-desktop \ |
55 | ${datadir}/glib-2.0/dtds \ | 60 | ${datadir}/glib-2.0/dtds \ |
56 | ${datadir}/glib-2.0/schemas" | 61 | ${datadir}/glib-2.0/schemas \ |
57 | 62 | ${libdir}/girepository-*/*.typelib \ | |
63 | " | ||
58 | FILES:${PN}-dev += "${libdir}/glib-2.0/include \ | 64 | FILES:${PN}-dev += "${libdir}/glib-2.0/include \ |
59 | ${libdir}/gio/modules/lib*${SOLIBSDEV} \ | 65 | ${libdir}/gio/modules/lib*${SOLIBSDEV} \ |
60 | ${libdir}/gio/modules/*.la \ | 66 | ${libdir}/gio/modules/*.la \ |
61 | ${datadir}/glib-2.0/gettext/po/Makefile.in.in \ | 67 | ${datadir}/glib-2.0/gettext/po/Makefile.in.in \ |
62 | ${datadir}/glib-2.0/schemas/gschema.dtd \ | 68 | ${datadir}/glib-2.0/schemas/gschema.dtd \ |
63 | ${datadir}/glib-2.0/valgrind/glib.supp \ | 69 | ${datadir}/glib-2.0/valgrind/glib.supp \ |
70 | ${datadir}/gir-*/*.gir ${libdir}/gir-*/*.gir \ | ||
64 | ${datadir}/gettext/its" | 71 | ${datadir}/gettext/its" |
65 | FILES:${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb" | 72 | FILES:${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb" |
66 | FILES:${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py \ | 73 | FILES:${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py \ |
@@ -204,3 +211,56 @@ RDEPENDS:${PN}-ptest:append:libc-glibc = "\ | |||
204 | locale-base-pl-pl.iso-8859-2 \ | 211 | locale-base-pl-pl.iso-8859-2 \ |
205 | locale-base-tr-tr \ | 212 | locale-base-tr-tr \ |
206 | " | 213 | " |
214 | |||
215 | PE = "1" | ||
216 | |||
217 | SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}" | ||
218 | |||
219 | SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ | ||
220 | file://run-ptest \ | ||
221 | file://0001-Fix-DATADIRNAME-on-uclibc-Linux.patch \ | ||
222 | file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \ | ||
223 | file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \ | ||
224 | file://0010-Do-not-hardcode-python-path-into-various-tools.patch \ | ||
225 | file://0001-Do-not-write-bindir-into-pkg-config-files.patch \ | ||
226 | file://0001-meson-Run-atomics-test-on-clang-as-well.patch \ | ||
227 | file://0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch \ | ||
228 | file://skip-timeout.patch \ | ||
229 | file://0001-girepository-introspection-correctly-install-.gir-fi.patch \ | ||
230 | " | ||
231 | SRC_URI:append:class-native = " file://relocate-modules.patch \ | ||
232 | file://0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch \ | ||
233 | " | ||
234 | |||
235 | SRC_URI[sha256sum] = "b9cfb6f7a5bd5b31238fd5d56df226b2dda5ea37611475bf89f6a0f9400fe8bd" | ||
236 | |||
237 | # Find any meson cross files in FILESPATH that are relevant for the current | ||
238 | # build (using siteinfo) and add them to EXTRA_OEMESON. | ||
239 | inherit siteinfo | ||
240 | def find_meson_cross_files(d): | ||
241 | if bb.data.inherits_class('native', d): | ||
242 | return "" | ||
243 | |||
244 | thisdir = os.path.normpath(d.getVar("THISDIR")) | ||
245 | import collections | ||
246 | sitedata = siteinfo_data(d) | ||
247 | # filename -> found | ||
248 | files = collections.OrderedDict() | ||
249 | for path in d.getVar("FILESPATH").split(":"): | ||
250 | for element in sitedata: | ||
251 | filename = os.path.normpath(os.path.join(path, "meson.cross.d", element)) | ||
252 | sanitized_path = filename.replace(thisdir, "${THISDIR}") | ||
253 | if sanitized_path == filename: | ||
254 | if os.path.exists(filename): | ||
255 | 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)) | ||
256 | continue | ||
257 | files[filename.replace(thisdir, "${THISDIR}")] = os.path.exists(filename) | ||
258 | |||
259 | items = ["--cross-file=" + k for k,v in files.items() if v] | ||
260 | d.appendVar("EXTRA_OEMESON", " " + " ".join(items)) | ||
261 | items = ["%s:%s" % (k, "True" if v else "False") for k,v in files.items()] | ||
262 | d.appendVarFlag("do_configure", "file-checksums", " " + " ".join(items)) | ||
263 | |||
264 | python () { | ||
265 | find_meson_cross_files(d) | ||
266 | } | ||