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.inc84
1 files changed, 73 insertions, 11 deletions
diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc
index fac8875d84..ba7763c841 100644
--- a/meta/recipes-core/glib-2.0/glib.inc
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -28,21 +28,27 @@ 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 32
33GTKDOC_MESON_OPTION = "gtk_doc" 33S = "${UNPACKDIR}/glib-${PV}"
34 34
35S = "${WORKDIR}/glib-${PV}" 35GIDOCGEN_MESON_OPTION = "documentation"
36 36
37PACKAGECONFIG ??= "libmount \ 37PACKAGECONFIG ??= "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)}"
40PACKAGECONFIG:class-native = ""
41
39PACKAGECONFIG[libmount] = "-Dlibmount=enabled,-Dlibmount=disabled,util-linux" 42PACKAGECONFIG[libmount] = "-Dlibmount=enabled,-Dlibmount=disabled,util-linux"
40PACKAGECONFIG[manpages] = "-Dman=true, -Dman=false, libxslt-native xmlto-native" 43PACKAGECONFIG[manpages] = "-Dman-pages=enabled, -Dman-pages=disabled, python3-docutils-native"
41PACKAGECONFIG[libelf] = "-Dlibelf=enabled,-Dlibelf=disabled,elfutils" 44PACKAGECONFIG[libelf] = "-Dlibelf=enabled,-Dlibelf=disabled,elfutils"
42PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false," 45PACKAGECONFIG[tests] = "-Dtests=true -Dinstalled_tests=true,-Dtests=false -Dinstalled_tests=false,"
43PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux" 46PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux"
47PACKAGECONFIG[introspection] = "-Dintrospection=enabled,-Dintrospection=disabled,gobject-introspection-native gobject-introspection glib-2.0-initial"
48
49EXTRA_OEMESON = "-Ddtrace=disabled -Dsystemtap=disabled -Dsysprof=disabled"
44 50
45EXTRA_OEMESON = "-Ddtrace=false -Dsystemtap=false" 51EXTRA_OEMESON:append:class-target = " ${@'-Dgir_dir_prefix=${libdir}' if d.getVar('MULTILIBS') else ''}"
46 52
47do_configure:prepend() { 53do_configure:prepend() {
48 sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in 54 sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in
@@ -53,14 +59,16 @@ FILES:${PN} = "${libdir}/lib*${SOLIBS} \
53 ${libexecdir}/*gio-querymodules \ 59 ${libexecdir}/*gio-querymodules \
54 ${libexecdir}/*gio-launch-desktop \ 60 ${libexecdir}/*gio-launch-desktop \
55 ${datadir}/glib-2.0/dtds \ 61 ${datadir}/glib-2.0/dtds \
56 ${datadir}/glib-2.0/schemas" 62 ${datadir}/glib-2.0/schemas \
57 63 ${libdir}/girepository-*/*.typelib \
64"
58FILES:${PN}-dev += "${libdir}/glib-2.0/include \ 65FILES:${PN}-dev += "${libdir}/glib-2.0/include \
59 ${libdir}/gio/modules/lib*${SOLIBSDEV} \ 66 ${libdir}/gio/modules/lib*${SOLIBSDEV} \
60 ${libdir}/gio/modules/*.la \ 67 ${libdir}/gio/modules/*.la \
61 ${datadir}/glib-2.0/gettext/po/Makefile.in.in \ 68 ${datadir}/glib-2.0/gettext/po/Makefile.in.in \
62 ${datadir}/glib-2.0/schemas/gschema.dtd \ 69 ${datadir}/glib-2.0/schemas/gschema.dtd \
63 ${datadir}/glib-2.0/valgrind/glib.supp \ 70 ${datadir}/glib-2.0/valgrind/glib.supp \
71 ${datadir}/gir-*/*.gir ${libdir}/gir-*/*.gir \
64 ${datadir}/gettext/its" 72 ${datadir}/gettext/its"
65FILES:${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb" 73FILES:${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb"
66FILES:${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py \ 74FILES:${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py \
@@ -149,12 +157,10 @@ CODEGEN_PYTHON_RDEPENDS:mingw32 = ""
149 157
150RDEPENDS:${PN}-codegen += "${CODEGEN_PYTHON_RDEPENDS}" 158RDEPENDS:${PN}-codegen += "${CODEGEN_PYTHON_RDEPENDS}"
151 159
152RDEPENDS:${PN}-ptest += "${PN}-utils"
153
154RDEPENDS:${PN}-ptest += "\ 160RDEPENDS:${PN}-ptest += "\
155 coreutils \ 161 coreutils \
156 libgcc \ 162 libgcc \
157 dbus \ 163 ${VIRTUAL-RUNTIME_dbus} \
158 desktop-file-utils \ 164 desktop-file-utils \
159 gnome-desktop-testing \ 165 gnome-desktop-testing \
160 tzdata \ 166 tzdata \
@@ -163,6 +169,7 @@ RDEPENDS:${PN}-ptest += "\
163 tzdata-europe \ 169 tzdata-europe \
164 tzdata-posix \ 170 tzdata-posix \
165 shared-mime-info \ 171 shared-mime-info \
172 ${PN}-dev \
166 ${PN}-locale-ja \ 173 ${PN}-locale-ja \
167 ${PN}-locale-fr \ 174 ${PN}-locale-fr \
168 ${PN}-locale-el \ 175 ${PN}-locale-el \
@@ -171,6 +178,7 @@ RDEPENDS:${PN}-ptest += "\
171 ${PN}-locale-pl \ 178 ${PN}-locale-pl \
172 ${PN}-locale-ru \ 179 ${PN}-locale-ru \
173 ${PN}-locale-th \ 180 ${PN}-locale-th \
181 ${PN}-utils \
174 python3-core \ 182 python3-core \
175 python3-modules \ 183 python3-modules \
176 ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'python3-dbusmock', '', d)} \ 184 ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'python3-dbusmock', '', d)} \
@@ -182,6 +190,7 @@ RDEPENDS:${PN}-ptest += "\
182 locale-base-fr-fr \ 190 locale-base-fr-fr \
183 locale-base-ru-ru \ 191 locale-base-ru-ru \
184 " 192 "
193INSANE_SKIP:${PN}-ptest = "dev-deps"
185 194
186RDEPENDS:${PN}-ptest:append:libc-glibc = "\ 195RDEPENDS:${PN}-ptest:append:libc-glibc = "\
187 glibc-gconv-utf-16 \ 196 glibc-gconv-utf-16 \
@@ -195,6 +204,7 @@ RDEPENDS:${PN}-ptest:append:libc-glibc = "\
195 glibc-gconv-iso8859-15 \ 204 glibc-gconv-iso8859-15 \
196 glibc-charmap-invariant \ 205 glibc-charmap-invariant \
197 glibc-localedata-translit-cjk-variants \ 206 glibc-localedata-translit-cjk-variants \
207 locale-base-c \
198 locale-base-lt-lt \ 208 locale-base-lt-lt \
199 locale-base-ja-jp.euc-jp \ 209 locale-base-ja-jp.euc-jp \
200 locale-base-fa-ir \ 210 locale-base-fa-ir \
@@ -204,3 +214,55 @@ RDEPENDS:${PN}-ptest:append:libc-glibc = "\
204 locale-base-pl-pl.iso-8859-2 \ 214 locale-base-pl-pl.iso-8859-2 \
205 locale-base-tr-tr \ 215 locale-base-tr-tr \
206 " 216 "
217
218PE = "1"
219
220SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
221
222SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
223 file://run-ptest \
224 file://0001-Fix-DATADIRNAME-on-uclibc-Linux.patch \
225 file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \
226 file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \
227 file://0001-Do-not-write-bindir-into-pkg-config-files.patch \
228 file://0001-meson-Run-atomics-test-on-clang-as-well.patch \
229 file://0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch \
230 file://0010-Do-not-hardcode-python-path-into-various-tools.patch \
231 file://skip-timeout.patch \
232 "
233SRC_URI:append:class-native = " file://relocate-modules.patch \
234 file://0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch \
235 "
236
237SRC_URI[sha256sum] = "88e960dd937057407d61fcb3b45a860704b25923c37ae2478b85f2ecb5a4021f"
238
239# Find any meson cross files in FILESPATH that are relevant for the current
240# build (using siteinfo) and add them to EXTRA_OEMESON.
241inherit siteinfo
242def find_meson_cross_files(d):
243 if bb.data.inherits_class('native', d):
244 return ""
245
246 thisdir = os.path.normpath(d.getVar("THISDIR"))
247 import collections
248 sitedata = siteinfo_data(d)
249 # filename -> found
250 files = collections.OrderedDict()
251 for path in d.getVar("FILESPATH").split(":"):
252 for element in sitedata:
253 filename = os.path.normpath(os.path.join(path, "meson.cross.d", element))
254 sanitized_path = filename.replace(thisdir, "${THISDIR}")
255 if sanitized_path == filename:
256 if os.path.exists(filename):
257 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))
258 continue
259 files[filename.replace(thisdir, "${THISDIR}")] = os.path.exists(filename)
260
261 items = ["--cross-file=" + k for k,v in files.items() if v]
262 d.appendVar("EXTRA_OEMESON", " " + " ".join(items))
263 items = ["%s:%s" % (k, "True" if v else "False") for k,v in files.items()]
264 d.appendVarFlag("do_configure", "file-checksums", " " + " ".join(items))
265
266python () {
267 find_meson_cross_files(d)
268}