summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glib-2.0/glib.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/glib-2.0/glib.inc')
-rw-r--r--meta/recipes-core/glib-2.0/glib.inc74
1 files changed, 67 insertions, 7 deletions
diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc
index fac8875d84..692857892f 100644
--- a/meta/recipes-core/glib-2.0/glib.inc
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -28,21 +28,25 @@ PACKAGES += "${PN}-codegen ${PN}-utils"
28 28
29LEAD_SONAME = "libglib-2.0.*" 29LEAD_SONAME = "libglib-2.0.*"
30 30
31inherit meson gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages gobject-introspection-data 31inherit meson gettext gi-docgen pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages gobject-introspection-data
32
33GTKDOC_MESON_OPTION = "gtk_doc"
34 32
35S = "${WORKDIR}/glib-${PV}" 33S = "${WORKDIR}/glib-${PV}"
36 34
37PACKAGECONFIG ??= "libmount \ 35PACKAGECONFIG ??= "libmount \
36 ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'introspection', '', d)} \
38 ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" 37 ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}"
38PACKAGECONFIG:class-native = ""
39
39PACKAGECONFIG[libmount] = "-Dlibmount=enabled,-Dlibmount=disabled,util-linux" 40PACKAGECONFIG[libmount] = "-Dlibmount=enabled,-Dlibmount=disabled,util-linux"
40PACKAGECONFIG[manpages] = "-Dman=true, -Dman=false, libxslt-native xmlto-native" 41PACKAGECONFIG[manpages] = "-Dman=true, -Dman=false, python3-docutils-native"
41PACKAGECONFIG[libelf] = "-Dlibelf=enabled,-Dlibelf=disabled,elfutils" 42PACKAGECONFIG[libelf] = "-Dlibelf=enabled,-Dlibelf=disabled,elfutils"
42PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false," 43PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false,"
43PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux" 44PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux"
45PACKAGECONFIG[introspection] = "-Dintrospection=enabled,-Dintrospection=disabled,gobject-introspection-native gobject-introspection glib-2.0-initial"
44 46
45EXTRA_OEMESON = "-Ddtrace=false -Dsystemtap=false" 47EXTRA_OEMESON = "-Ddtrace=false -Dsystemtap=false \
48 ${@'-Dgir_dir_prefix=${libdir}' if d.getVar('MULTILIBS') else ''} \
49"
46 50
47do_configure:prepend() { 51do_configure:prepend() {
48 sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in 52 sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in
@@ -53,14 +57,16 @@ FILES:${PN} = "${libdir}/lib*${SOLIBS} \
53 ${libexecdir}/*gio-querymodules \ 57 ${libexecdir}/*gio-querymodules \
54 ${libexecdir}/*gio-launch-desktop \ 58 ${libexecdir}/*gio-launch-desktop \
55 ${datadir}/glib-2.0/dtds \ 59 ${datadir}/glib-2.0/dtds \
56 ${datadir}/glib-2.0/schemas" 60 ${datadir}/glib-2.0/schemas \
57 61 ${libdir}/girepository-*/*.typelib \
62"
58FILES:${PN}-dev += "${libdir}/glib-2.0/include \ 63FILES:${PN}-dev += "${libdir}/glib-2.0/include \
59 ${libdir}/gio/modules/lib*${SOLIBSDEV} \ 64 ${libdir}/gio/modules/lib*${SOLIBSDEV} \
60 ${libdir}/gio/modules/*.la \ 65 ${libdir}/gio/modules/*.la \
61 ${datadir}/glib-2.0/gettext/po/Makefile.in.in \ 66 ${datadir}/glib-2.0/gettext/po/Makefile.in.in \
62 ${datadir}/glib-2.0/schemas/gschema.dtd \ 67 ${datadir}/glib-2.0/schemas/gschema.dtd \
63 ${datadir}/glib-2.0/valgrind/glib.supp \ 68 ${datadir}/glib-2.0/valgrind/glib.supp \
69 ${datadir}/gir-*/*.gir ${libdir}/gir-*/*.gir \
64 ${datadir}/gettext/its" 70 ${datadir}/gettext/its"
65FILES:${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb" 71FILES:${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb"
66FILES:${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py \ 72FILES:${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py \
@@ -204,3 +210,57 @@ RDEPENDS:${PN}-ptest:append:libc-glibc = "\
204 locale-base-pl-pl.iso-8859-2 \ 210 locale-base-pl-pl.iso-8859-2 \
205 locale-base-tr-tr \ 211 locale-base-tr-tr \
206 " 212 "
213
214PE = "1"
215
216SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
217
218SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
219 file://run-ptest \
220 file://0001-Fix-DATADIRNAME-on-uclibc-Linux.patch \
221 file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \
222 file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \
223 file://0010-Do-not-hardcode-python-path-into-various-tools.patch \
224 file://0001-Set-host_machine-correctly-when-building-with-mingw3.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 "
231SRC_URI:append:class-native = " file://relocate-modules.patch \
232 file://0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch \
233 "
234
235SRC_URI[sha256sum] = "8228a92f92a412160b139ae68b6345bd28f24434a7b5af150ebe21ff587a561d"
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.
239inherit siteinfo
240def 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
264python () {
265 find_meson_cross_files(d)
266}