diff mbox series

[2/4] appstream: import recipe from meta-oe

Message ID 20230917182829.2153680-2-f_l_k@t-online.de
State Accepted, archived
Commit 913f1b0f17374bb20cc3e2bc80c47a1548faa202
Headers show
Series [1/4] libxmlb: import recipe from meta-oe | expand

Commit Message

Markus Volk Sept. 17, 2023, 6:28 p.m. UTC
libadwaita 1.4.0 has a dependency on it

Signed-off-by: Markus Volk <f_l_k@t-online.de>
---
 ...-meson-do-not-rely-on-an-exe-wrapper.patch | 36 +++++++++++++++
 .../0001-remove-hardcoded-path.patch          | 31 +++++++++++++
 .../appstream/appstream_0.16.3.bb             | 45 +++++++++++++++++++
 3 files changed, 112 insertions(+)
 create mode 100644 meta/recipes-support/appstream/appstream/0001-meson-do-not-rely-on-an-exe-wrapper.patch
 create mode 100644 meta/recipes-support/appstream/appstream/0001-remove-hardcoded-path.patch
 create mode 100644 meta/recipes-support/appstream/appstream_0.16.3.bb
diff mbox series

Patch

diff --git a/meta/recipes-support/appstream/appstream/0001-meson-do-not-rely-on-an-exe-wrapper.patch b/meta/recipes-support/appstream/appstream/0001-meson-do-not-rely-on-an-exe-wrapper.patch
new file mode 100644
index 0000000000..d4f2951e7a
--- /dev/null
+++ b/meta/recipes-support/appstream/appstream/0001-meson-do-not-rely-on-an-exe-wrapper.patch
@@ -0,0 +1,36 @@ 
+From 79bf322768990b28c29a9d907edcca52ff48e0b8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
+Date: Wed, 26 Jul 2023 23:21:10 +0400
+Subject: meson: do not rely on an exe wrapper
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
+
+Upstream-Status: Backport [https://github.com/ximion/appstream/commit/79bf322768990b28c29a9d907edcca52ff48e0b8]
+---
+ data/meson.build | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/data/meson.build b/data/meson.build
+index aea0cb25..ec0e434f 100644
+--- a/data/meson.build
++++ b/data/meson.build
+@@ -7,6 +7,13 @@ install_data('its/metainfo.its',
+ install_data('its/metainfo.loc',
+               install_dir: join_paths(get_option('datadir'), 'gettext', 'its'))
+ 
++# Do not rely on an exe wrapper for rel-info, use the system one in that case
++if meson.is_cross_build()
++    dependency('appstream', version: '>=' + as_version, native: true,
++               not_found_message: 'Native appstream required for cross-building')
++    ascli_exe = find_program('appstreamcli')
++endif
++
+ # NOTE: We do not translate the release notes on purpose here.
+ # If you do want to give translators a chance to translate them,
+ # ascli news-to-metainfo needs to produce a temporary file to translate
+-- 
+2.41.0
+
diff --git a/meta/recipes-support/appstream/appstream/0001-remove-hardcoded-path.patch b/meta/recipes-support/appstream/appstream/0001-remove-hardcoded-path.patch
new file mode 100644
index 0000000000..9cbfaca82f
--- /dev/null
+++ b/meta/recipes-support/appstream/appstream/0001-remove-hardcoded-path.patch
@@ -0,0 +1,31 @@ 
+From 6ab00a4279823829a9b82dc9e4d055da4de88c6e Mon Sep 17 00:00:00 2001
+From: Markus Volk <f_l_k@t-online.de>
+Date: Mon, 12 Dec 2022 15:42:42 +0100
+Subject: [PATCH] remove hardcoded path
+
+Signed-off-by: Markus Volk <f_l_k@t-online.de>
+
+Dont include hardcoded path. This fixes:
+| cc1: error: include location "/usr/include" is unsafe for cross-compilation [-Werror=poison-system-directories]
+
+Upstream-Status: Inappropriate [oe-specific]
+---
+ meson.build       | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index fd0e3373..2f273ada 100644
+--- a/meson.build
++++ b/meson.build
+@@ -124,7 +124,7 @@ if get_option ('gir')
+     dependency('gobject-introspection-1.0', version: '>=1.56')
+ endif
+ 
+-stemmer_inc_dirs = include_directories(['/usr/include'])
++stemmer_inc_dirs = include_directories([''])
+ if get_option('stemming')
+     stemmer_lib = cc.find_library('stemmer', required: true)
+     if not cc.has_header('libstemmer.h')
+-- 
+2.34.1
+
diff --git a/meta/recipes-support/appstream/appstream_0.16.3.bb b/meta/recipes-support/appstream/appstream_0.16.3.bb
new file mode 100644
index 0000000000..bde679e256
--- /dev/null
+++ b/meta/recipes-support/appstream/appstream_0.16.3.bb
@@ -0,0 +1,45 @@ 
+SUMMARY = "AppStream is a collaborative effort for making machine-readable software metadata easily available."
+HOMEPAGE = "https://github.com/ximion/appstream"
+LICENSE = "LGPL-2.1-only"
+LIC_FILES_CHKSUM = "file://COPYING;md5=435ed639f84d4585d93824e7da3d85da"
+
+DEPENDS = " \
+    appstream-native \
+    curl-native \
+    curl \
+    docbook-xml-dtd4-native \
+    gperf-native \
+    glib-2.0 \
+    libyaml \
+    libxml2 \
+    libxmlb \
+    libxslt-native \
+    itstool-native \
+    docbook-xsl-stylesheets-native \
+    python3-pygments-native \
+"
+
+inherit meson gobject-introspection gettext gtk-doc pkgconfig vala
+
+GIR_MESON_OPTION = "gir"
+GTKDOC_MESON_OPTION = "apidocs"
+
+SRC_URI = " \
+	https://www.freedesktop.org/software/appstream/releases/AppStream-${PV}.tar.xz \
+	file://0001-remove-hardcoded-path.patch \
+	file://0001-meson-do-not-rely-on-an-exe-wrapper.patch \
+"
+SRC_URI[sha256sum] = "081c917646e94d7221c9e4aae54dacda95a27c607fa93cd8e6344a2b318b98b1"
+
+S = "${WORKDIR}/AppStream-${PV}"
+
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+
+PACKAGECONFIG[systemd] = "-Dsystemd=true,-Dsystemd=false,systemd"
+PACKAGECONFIG[stemming] = "-Dstemming=true,-Dstemming=false,libstemmer"
+
+FILES:${PN} += "${datadir}"
+
+EXTRA_OEMESON += "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-Dvapi=true', '-Dvapi=false', d)}"
+
+BBCLASSEXTEND = "native"