diff options
4 files changed, 74 insertions, 54 deletions
diff --git a/meta-oe/recipes-support/appstream/appstream/0001-fix-crosscompile.patch b/meta-oe/recipes-support/appstream/appstream/0001-fix-crosscompile.patch deleted file mode 100644 index fe8dcff910..0000000000 --- a/meta-oe/recipes-support/appstream/appstream/0001-fix-crosscompile.patch +++ /dev/null | |||
| @@ -1,43 +0,0 @@ | |||
| 1 | From 6ab00a4279823829a9b82dc9e4d055da4de88c6e Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Markus Volk <f_l_k@t-online.de> | ||
| 3 | Date: Mon, 12 Dec 2022 15:42:42 +0100 | ||
| 4 | Subject: [PATCH] fix crosscompile | ||
| 5 | |||
| 6 | Signed-off-by: Markus Volk <f_l_k@t-online.de> | ||
| 7 | |||
| 8 | Upstream-Status: Inappropriate [oe-specific] | ||
| 9 | --- | ||
| 10 | data/meson.build | 2 +- | ||
| 11 | meson.build | 2 +- | ||
| 12 | tools/meson.build | 9 +++++++++ | ||
| 13 | 3 files changed, 11 insertions(+), 2 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/data/meson.build b/data/meson.build | ||
| 16 | index aea0cb25..1a085fc9 100644 | ||
| 17 | --- a/data/meson.build | ||
| 18 | +++ b/data/meson.build | ||
| 19 | @@ -14,7 +14,7 @@ install_data('its/metainfo.loc', | ||
| 20 | metainfo_with_relinfo = custom_target('gen-output', | ||
| 21 | input : ['../NEWS', 'org.freedesktop.appstream.cli.metainfo.xml'], | ||
| 22 | output : ['nol10n_withrelinfo_org.freedesktop.appstream.cli.metainfo.xml'], | ||
| 23 | - command : [ascli_exe, 'news-to-metainfo', '--limit=6', '@INPUT0@', '@INPUT1@', '@OUTPUT@'] | ||
| 24 | + command : ['appstreamcli', 'news-to-metainfo', '--limit=6', '@INPUT0@', '@INPUT1@', '@OUTPUT@'] | ||
| 25 | ) | ||
| 26 | |||
| 27 | metainfo_i18n = i18n.itstool_join( | ||
| 28 | diff --git a/meson.build b/meson.build | ||
| 29 | index fd0e3373..2f273ada 100644 | ||
| 30 | --- a/meson.build | ||
| 31 | +++ b/meson.build | ||
| 32 | @@ -124,7 +124,7 @@ if get_option ('gir') | ||
| 33 | dependency('gobject-introspection-1.0', version: '>=1.56') | ||
| 34 | endif | ||
| 35 | |||
| 36 | -stemmer_inc_dirs = include_directories(['/usr/include']) | ||
| 37 | +stemmer_inc_dirs = include_directories(['']) | ||
| 38 | if get_option('stemming') | ||
| 39 | stemmer_lib = cc.find_library('stemmer', required: true) | ||
| 40 | if not cc.has_header('libstemmer.h') | ||
| 41 | -- | ||
| 42 | 2.34.1 | ||
| 43 | |||
diff --git a/meta-oe/recipes-support/appstream/appstream/0001-meson-do-not-rely-on-an-exe-wrapper.patch b/meta-oe/recipes-support/appstream/appstream/0001-meson-do-not-rely-on-an-exe-wrapper.patch new file mode 100644 index 0000000000..6214b6f4d1 --- /dev/null +++ b/meta-oe/recipes-support/appstream/appstream/0001-meson-do-not-rely-on-an-exe-wrapper.patch | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | From 79bf322768990b28c29a9d907edcca52ff48e0b8 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com> | ||
| 3 | Date: Wed, 26 Jul 2023 23:21:10 +0400 | ||
| 4 | Subject: [PATCH 01/60] meson: do not rely on an exe wrapper | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> | ||
| 10 | |||
| 11 | Upstream-Status: Backport [https://github.com/ximion/appstream/commit/79bf322768990b28c29a9d907edcca52ff48e0b8] | ||
| 12 | --- | ||
| 13 | data/meson.build | 7 +++++++ | ||
| 14 | 1 file changed, 7 insertions(+) | ||
| 15 | |||
| 16 | diff --git a/data/meson.build b/data/meson.build | ||
| 17 | index aea0cb25..ec0e434f 100644 | ||
| 18 | --- a/data/meson.build | ||
| 19 | +++ b/data/meson.build | ||
| 20 | @@ -7,6 +7,13 @@ install_data('its/metainfo.its', | ||
| 21 | install_data('its/metainfo.loc', | ||
| 22 | install_dir: join_paths(get_option('datadir'), 'gettext', 'its')) | ||
| 23 | |||
| 24 | +# Do not rely on an exe wrapper for rel-info, use the system one in that case | ||
| 25 | +if meson.is_cross_build() | ||
| 26 | + dependency('appstream', version: '>=' + as_version, native: true, | ||
| 27 | + not_found_message: 'Native appstream required for cross-building') | ||
| 28 | + ascli_exe = find_program('appstreamcli') | ||
| 29 | +endif | ||
| 30 | + | ||
| 31 | # NOTE: We do not translate the release notes on purpose here. | ||
| 32 | # If you do want to give translators a chance to translate them, | ||
| 33 | # ascli news-to-metainfo needs to produce a temporary file to translate | ||
| 34 | -- | ||
| 35 | 2.41.0 | ||
| 36 | |||
diff --git a/meta-oe/recipes-support/appstream/appstream/0001-remove-hardcoded-path.patch b/meta-oe/recipes-support/appstream/appstream/0001-remove-hardcoded-path.patch new file mode 100644 index 0000000000..9cbfaca82f --- /dev/null +++ b/meta-oe/recipes-support/appstream/appstream/0001-remove-hardcoded-path.patch | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | From 6ab00a4279823829a9b82dc9e4d055da4de88c6e Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Markus Volk <f_l_k@t-online.de> | ||
| 3 | Date: Mon, 12 Dec 2022 15:42:42 +0100 | ||
| 4 | Subject: [PATCH] remove hardcoded path | ||
| 5 | |||
| 6 | Signed-off-by: Markus Volk <f_l_k@t-online.de> | ||
| 7 | |||
| 8 | Dont include hardcoded path. This fixes: | ||
| 9 | | cc1: error: include location "/usr/include" is unsafe for cross-compilation [-Werror=poison-system-directories] | ||
| 10 | |||
| 11 | Upstream-Status: Inappropriate [oe-specific] | ||
| 12 | --- | ||
| 13 | meson.build | 2 +- | ||
| 14 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/meson.build b/meson.build | ||
| 17 | index fd0e3373..2f273ada 100644 | ||
| 18 | --- a/meson.build | ||
| 19 | +++ b/meson.build | ||
| 20 | @@ -124,7 +124,7 @@ if get_option ('gir') | ||
| 21 | dependency('gobject-introspection-1.0', version: '>=1.56') | ||
| 22 | endif | ||
| 23 | |||
| 24 | -stemmer_inc_dirs = include_directories(['/usr/include']) | ||
| 25 | +stemmer_inc_dirs = include_directories(['']) | ||
| 26 | if get_option('stemming') | ||
| 27 | stemmer_lib = cc.find_library('stemmer', required: true) | ||
| 28 | if not cc.has_header('libstemmer.h') | ||
| 29 | -- | ||
| 30 | 2.34.1 | ||
| 31 | |||
diff --git a/meta-oe/recipes-support/appstream/appstream_0.16.3.bb b/meta-oe/recipes-support/appstream/appstream_0.16.3.bb index 222cd80be1..1d466ad184 100644 --- a/meta-oe/recipes-support/appstream/appstream_0.16.3.bb +++ b/meta-oe/recipes-support/appstream/appstream_0.16.3.bb | |||
| @@ -22,9 +22,13 @@ DEPENDS = " \ | |||
| 22 | inherit meson gobject-introspection gettext gtk-doc pkgconfig vala | 22 | inherit meson gobject-introspection gettext gtk-doc pkgconfig vala |
| 23 | 23 | ||
| 24 | GIR_MESON_OPTION = "gir" | 24 | GIR_MESON_OPTION = "gir" |
| 25 | GTKDOC_MESON_OPTION = "apidocs" | ||
| 25 | 26 | ||
| 26 | SRC_URI = "https://www.freedesktop.org/software/appstream/releases/AppStream-${PV}.tar.xz" | 27 | SRC_URI = " \ |
| 27 | SRC_URI:append:class-target = " file://0001-fix-crosscompile.patch" | 28 | https://www.freedesktop.org/software/appstream/releases/AppStream-${PV}.tar.xz \ |
| 29 | file://0001-remove-hardcoded-path.patch \ | ||
| 30 | file://0001-meson-do-not-rely-on-an-exe-wrapper.patch \ | ||
| 31 | " | ||
| 28 | SRC_URI[sha256sum] = "081c917646e94d7221c9e4aae54dacda95a27c607fa93cd8e6344a2b318b98b1" | 32 | SRC_URI[sha256sum] = "081c917646e94d7221c9e4aae54dacda95a27c607fa93cd8e6344a2b318b98b1" |
| 29 | 33 | ||
| 30 | S = "${WORKDIR}/AppStream-${PV}" | 34 | S = "${WORKDIR}/AppStream-${PV}" |
| @@ -36,14 +40,6 @@ PACKAGECONFIG[stemming] = "-Dstemming=true,-Dstemming=false,libstemmer" | |||
| 36 | 40 | ||
| 37 | FILES:${PN} += "${datadir}" | 41 | FILES:${PN} += "${datadir}" |
| 38 | 42 | ||
| 39 | EXTRA_OEMESON:append = " -Ddocs=false" | 43 | EXTRA_OEMESON += "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-Dvapi=true', '-Dvapi=false', d)}" |
| 40 | EXTRA_OEMESON:class-target += "--cross-file=${WORKDIR}/meson-${PN}.cross" | ||
| 41 | |||
| 42 | do_write_config:append:class-target() { | ||
| 43 | cat >${WORKDIR}/meson-${PN}.cross <<EOF | ||
| 44 | [binaries] | ||
| 45 | appstreamcli = '${STAGING_BINDIR_NATIVE}/appstreamcli' | ||
| 46 | EOF | ||
| 47 | } | ||
| 48 | 44 | ||
| 49 | BBCLASSEXTEND = "native" | 45 | BBCLASSEXTEND = "native" |
