diff options
Diffstat (limited to 'meta/recipes-core/glib-2.0/glib.inc')
-rw-r--r-- | meta/recipes-core/glib-2.0/glib.inc | 84 |
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 | ||
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 | 32 | ||
33 | GTKDOC_MESON_OPTION = "gtk_doc" | 33 | S = "${UNPACKDIR}/glib-${PV}" |
34 | 34 | ||
35 | S = "${WORKDIR}/glib-${PV}" | 35 | GIDOCGEN_MESON_OPTION = "documentation" |
36 | 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] = "-Dtests=true -Dinstalled_tests=true,-Dtests=false -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" | ||
48 | |||
49 | EXTRA_OEMESON = "-Ddtrace=disabled -Dsystemtap=disabled -Dsysprof=disabled" | ||
44 | 50 | ||
45 | EXTRA_OEMESON = "-Ddtrace=false -Dsystemtap=false" | 51 | EXTRA_OEMESON:append:class-target = " ${@'-Dgir_dir_prefix=${libdir}' if d.getVar('MULTILIBS') else ''}" |
46 | 52 | ||
47 | do_configure:prepend() { | 53 | do_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 | " | ||
58 | FILES:${PN}-dev += "${libdir}/glib-2.0/include \ | 65 | FILES:${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" |
65 | FILES:${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb" | 73 | FILES:${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb" |
66 | FILES:${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py \ | 74 | FILES:${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py \ |
@@ -149,12 +157,10 @@ CODEGEN_PYTHON_RDEPENDS:mingw32 = "" | |||
149 | 157 | ||
150 | RDEPENDS:${PN}-codegen += "${CODEGEN_PYTHON_RDEPENDS}" | 158 | RDEPENDS:${PN}-codegen += "${CODEGEN_PYTHON_RDEPENDS}" |
151 | 159 | ||
152 | RDEPENDS:${PN}-ptest += "${PN}-utils" | ||
153 | |||
154 | RDEPENDS:${PN}-ptest += "\ | 160 | RDEPENDS:${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 | " |
193 | INSANE_SKIP:${PN}-ptest = "dev-deps" | ||
185 | 194 | ||
186 | RDEPENDS:${PN}-ptest:append:libc-glibc = "\ | 195 | RDEPENDS:${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 | |||
218 | PE = "1" | ||
219 | |||
220 | SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}" | ||
221 | |||
222 | SRC_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 | " | ||
233 | SRC_URI:append:class-native = " file://relocate-modules.patch \ | ||
234 | file://0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch \ | ||
235 | " | ||
236 | |||
237 | SRC_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. | ||
241 | inherit siteinfo | ||
242 | def 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 | |||
266 | python () { | ||
267 | find_meson_cross_files(d) | ||
268 | } | ||