Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] flatpak-builder: update to 1.4.2.
@ 2024-03-05 12:13 oreo639
  2024-03-05 12:27 ` [PR PATCH] [Updated] " oreo639
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: oreo639 @ 2024-03-05 12:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1253 bytes --]

There is a new pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages flatpak-builder
https://github.com/void-linux/void-packages/pull/49126

flatpak-builder: update to 1.4.2.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/49126.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-flatpak-builder-49126.patch --]
[-- Type: text/x-diff, Size: 30711 bytes --]

From 9e28c8601d5cae913eab4f452fc27dd570aa9a10 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:09:50 -0800
Subject: [PATCH 1/5] AppStream: update to 1.0.2.

---
 common/shlibs                               |  3 +-
 srcpkgs/{AppStream-qt => AppStream-compose} |  0
 srcpkgs/AppStream-qt6                       |  1 +
 srcpkgs/AppStream/template                  | 33 ++++++++++++++-------
 4 files changed, 26 insertions(+), 11 deletions(-)
 rename srcpkgs/{AppStream-qt => AppStream-compose} (100%)
 create mode 120000 srcpkgs/AppStream-qt6

diff --git a/common/shlibs b/common/shlibs
index 8958c92d7fe196..f1e55e437bae2f 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2992,7 +2992,8 @@ libliveMedia.so.81 live555-2020.08.11_2
 libgroupsock.so.8 live555-2020.08.11_2
 libUsageEnvironment.so.3 live555-2020.08.11_2
 libBasicUsageEnvironment.so.1 live555-2020.08.11_2
-libappstream.so.4 AppStream-0.12.2_1
+libappstream.so.5 AppStream-1.0.2_1
+libAppStreamQt.so.3 AppStream-qt6-1.0.2_1
 libappstream-glib.so.8 appstream-glib-0.6.13_1
 libappstream-builder.so.8 appstream-glib-0.6.13_1
 libflatpak.so.0 flatpak-0.9.3_2
diff --git a/srcpkgs/AppStream-qt b/srcpkgs/AppStream-compose
similarity index 100%
rename from srcpkgs/AppStream-qt
rename to srcpkgs/AppStream-compose
diff --git a/srcpkgs/AppStream-qt6 b/srcpkgs/AppStream-qt6
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-qt6
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream/template b/srcpkgs/AppStream/template
index 87fbb76d2c9c66..e3ace178acf67c 100644
--- a/srcpkgs/AppStream/template
+++ b/srcpkgs/AppStream/template
@@ -1,30 +1,43 @@
 # Template file for 'AppStream'
 pkgname=AppStream
-version=0.16.4
+version=1.0.2
 revision=1
 build_style=meson
 build_helper="gir qemu"
 configure_args="$(vopt_bool gir gir) $(vopt_bool vala vapi)
- -Dstemming=false -Dapidocs=false -Dqt=true -Dsystemd=false"
+ -Dstemming=false -Dapidocs=false -Dqt=true -Dsystemd=false
+ -Dcompose=true"
 hostmakedepends="docbook-xsl gettext glib-devel gperf libxslt pkg-config
- qt5-host-tools $(vopt_if vala vala) itstool"
-makedepends="libglib-devel libxml2-devel libyaml-devel qt5-devel libxmlb-devel
- libcurl-devel"
+ qt6-tools $(vopt_if vala vala) itstool"
+makedepends="libglib-devel libxml2-devel libyaml-devel qt6-base-devel libxmlb-devel
+ libcurl-devel librsvg-devel"
 short_desc="Tools and libraries to work with AppStream metadata"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://github.com/ximion/appstream"
 changelog="https://raw.githubusercontent.com/ximion/appstream/master/NEWS"
 distfiles="https://github.com/ximion/appstream/archive/v${version}.tar.gz"
-checksum=95d5cf451d1945182a9bc4d597c13e713451a3dba1a5759f45b6b3279ff3774c
-conf_files="/etc/appstream.conf"
+checksum=77e271f47167ae37a68111b951c3c07e4261579e69047747044f7924c8219d14
 triggers="appstream-cache"
 
 build_options="gir vala"
 build_options_default="gir vala"
 
+AppStream-compose_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - compose libraries and tools"
+	pkg_install() {
+		vmove usr/libexec/appstreamcli-compose
+		vmove usr/share/man/man1/appstreamcli-compose.1*
+		vmove usr/lib/libappstream-compose.so.*
+		vmove usr/lib/girepository-1.0/AppStreamCompose-1.0.typelib
+		vmove usr/share/metainfo/org.freedesktop.appstream.compose.metainfo.xml
+	}
+}
+
 AppStream-devel_package() {
-	depends="${sourcepkg}>=${version}_${revision} AppStream-qt>=${version}_${revision}"
+	depends="${sourcepkg}>=${version}_${revision} AppStream-qt6>=${version}_${revision}
+	 AppStream-compose>=${version}_${revision}"
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
@@ -40,8 +53,8 @@ AppStream-devel_package() {
 	}
 }
 
-AppStream-qt_package() {
-	short_desc+=" - qt5 interface library"
+AppStream-qt6_package() {
+	short_desc+=" - qt6 interface library"
 	pkg_install() {
 		vmove "usr/lib/libAppStreamQt.so.*"
 	}

From 55da9c400eb2a6e6d5b15fa535accfd12431071f Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:10:35 -0800
Subject: [PATCH 2/5] flatpak: rebuild for AppStream 1.0

---
 srcpkgs/flatpak/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/flatpak/template b/srcpkgs/flatpak/template
index 819686057ac9bc..066c3021a335fc 100644
--- a/srcpkgs/flatpak/template
+++ b/srcpkgs/flatpak/template
@@ -1,7 +1,7 @@
 # Template file for 'flatpak'
 pkgname=flatpak
 version=1.15.6
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="

From f60a132be2794f3467762c7d2dc869cc8fcb2bbc Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:11:53 -0800
Subject: [PATCH 3/5] libadwaita: rebuild for AppStream 1.0

---
 srcpkgs/libadwaita/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libadwaita/template b/srcpkgs/libadwaita/template
index 63e643d8fdd70d..fca2b2a5d5a25e 100644
--- a/srcpkgs/libadwaita/template
+++ b/srcpkgs/libadwaita/template
@@ -1,7 +1,7 @@
 # Template file for 'libadwaita'
 pkgname=libadwaita
 version=1.4.4
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="-Dexamples=true -Dtests=true $(vopt_bool gtk_doc)

From 820128b05e5c5c5691ad7bfbd0461135ba513616 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:11:59 -0800
Subject: [PATCH 4/5] gnome-software: update to 45.3.

---
 .../patches/0001-port-to-appstream1.patch     | 504 ++++++++++++++++++
 srcpkgs/gnome-software/template               |   6 +-
 2 files changed, 507 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch

diff --git a/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch b/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch
new file mode 100644
index 00000000000000..256a8509231e5f
--- /dev/null
+++ b/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch
@@ -0,0 +1,504 @@
+See: https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2393
+
+From e6f7e28bdd50a63586ba6a82b936d54db19a311b Mon Sep 17 00:00:00 2001
+From: Matthias Klumpp <matthias@tenstral.net>
+Date: Sun, 8 Oct 2023 20:22:44 +0200
+Subject: [PATCH] Adjust to build with AppStream 1.0 as well as 0.16.x
+
+---
+ lib/gs-app.c                             |  4 ++
+ lib/gs-appstream.c                       | 58 ++++++++++++++++++++----
+ lib/gs-utils.c                           |  8 ++--
+ meson.build                              | 22 +--------
+ plugins/core/gs-plugin-appstream.c       |  8 ----
+ plugins/fwupd/gs-fwupd-app.c             |  8 ++++
+ plugins/fwupd/gs-plugin-fwupd.c          |  4 ++
+ src/gs-hardware-support-context-dialog.c |  6 +++
+ src/gs-repos-dialog.c                    |  4 ++
+ src/gs-screenshot-carousel.c             |  4 +-
+ src/gs-screenshot-image.c                | 41 +++++++++++++----
+ src/gs-screenshot-image.h                |  7 +++
+ subprojects/appstream.wrap               |  2 +-
+ 13 files changed, 120 insertions(+), 56 deletions(-)
+
+diff --git a/lib/gs-app.c b/lib/gs-app.c
+index 048a061225..e2694057cd 100644
+--- a/lib/gs-app.c
++++ b/lib/gs-app.c
+@@ -609,7 +609,11 @@ gs_app_to_string_append (GsApp *app, GString *str)
+ 		AsScreenshot *ss = g_ptr_array_index (priv->screenshots, i);
+ 		g_autofree gchar *key = NULL;
+ 		tmp = as_screenshot_get_caption (ss);
++#if AS_CHECK_VERSION(1, 0, 0)
++		im = as_screenshot_get_image (ss, 0, 0, 1);
++#else
+ 		im = as_screenshot_get_image (ss, 0, 0);
++#endif
+ 		if (im == NULL)
+ 			continue;
+ 		key = g_strdup_printf ("screenshot-%02u", i);
+diff --git a/lib/gs-appstream.c b/lib/gs-appstream.c
+index deca176dcf..2cc2427a19 100644
+--- a/lib/gs-appstream.c
++++ b/lib/gs-appstream.c
+@@ -587,8 +587,6 @@ gs_appstream_refine_add_provides (GsApp *app, XbNode *component, GError **error)
+ 					kind = AS_PROVIDED_KIND_FIRMWARE_RUNTIME;
+ 				else if (g_strcmp0 (fw_type, "flashed") == 0)
+ 					kind = AS_PROVIDED_KIND_FIRMWARE_FLASHED;
+-			} else if (g_strcmp0 (element_name, "python2") == 0) {
+-				kind = AS_PROVIDED_KIND_PYTHON_2;
+ 			} else if (g_strcmp0 (element_name, "python3") == 0) {
+ 				kind = AS_PROVIDED_KIND_PYTHON;
+ 			} else if (g_strcmp0 (element_name, "dbus") == 0) {
+@@ -1011,8 +1011,11 @@ gs_appstream_refine_app_relation (GsApp           *app,
+ 			as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_CONTROL);
+ 			as_relation_set_value_control_kind (relation, as_control_kind_from_string (xb_node_get_text (child)));
+ 		} else if (g_str_equal (item_kind, "display_length")) {
+-			AsDisplayLengthKind display_length_kind;
+ 			const gchar *compare;
++			const gchar *side;
++#if !AS_CHECK_VERSION(1, 0, 0)
++			AsDisplayLengthKind display_length_kind;
++#endif
+ 
+ 			/* https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-relations-display_length */
+ 			as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_DISPLAY_LENGTH);
+@@ -1020,15 +1023,21 @@ gs_appstream_refine_app_relation (GsApp           *app,
+ 			compare = xb_node_get_attr (child, "compare");
+ 			as_relation_set_compare (relation, (compare != NULL) ? as_relation_compare_from_string (compare) : AS_RELATION_COMPARE_GE);
+ 
++#if AS_CHECK_VERSION(1, 0, 0)
++			side = xb_node_get_attr (child, "side");
++			as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
++			as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
++#else
+ 			display_length_kind = as_display_length_kind_from_string (xb_node_get_text (child));
+ 			if (display_length_kind != AS_DISPLAY_LENGTH_KIND_UNKNOWN) {
+ 				/* Ignore the `side` attribute */
+ 				as_relation_set_value_display_length_kind (relation, display_length_kind);
+ 			} else {
+-				const gchar *side = xb_node_get_attr (child, "side");
++				side = xb_node_get_attr (child, "side");
+ 				as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
+ 				as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
+ 			}
++#endif
+ 		} else {
+ 			g_debug ("Relation type ‘%s’ not currently supported for %s; ignoring",
+ 				 item_kind, gs_app_get_id (app));
+@@ -1472,7 +1481,7 @@ gs_appstream_refine_app (GsPlugin *plugin,
+ }
+ 
+ typedef struct {
+-	AsSearchTokenMatch	 match_value;
++	guint16			 match_value;
+ 	XbQuery			*query;
+ } GsAppstreamSearchHelper;
+ 
+@@ -1522,7 +1531,7 @@ gs_appstream_silo_search_component (GPtrArray *array, XbNode *component, const g
+ }
+ 
+ typedef struct {
+-	AsSearchTokenMatch	match_value;
++	guint16			match_value;
+ 	const gchar		*xpath;
+ } Query;
+ 
+@@ -1585,7 +1594,11 @@ gs_appstream_do_search (GsPlugin *plugin,
+ 			 * Drop the ID token from it as it’s the highest
+ 			 * numeric value but isn’t visible to the user in the
+ 			 * UI, which leads to confusing results ordering. */
++#if AS_CHECK_VERSION(1, 0, 0)
++			gs_app_set_match_value (app, match_value & (~as_utils_get_tag_search_weight ("id")));
++#else
+ 			gs_app_set_match_value (app, match_value & (~AS_SEARCH_TOKEN_MATCH_ID));
++#endif
+ 			gs_app_list_add (list, app);
+ 
+ 			if (gs_app_get_kind (app) == AS_COMPONENT_KIND_ADDON) {
+@@ -1624,18 +1637,32 @@ gs_appstream_search (GsPlugin *plugin,
+ 		     GCancellable *cancellable,
+ 		     GError **error)
+ {
++#if AS_CHECK_VERSION(1, 0, 0)
++	guint16 pkgname_weight = as_utils_get_tag_search_weight ("pkgname");
++	guint16 name_weight = as_utils_get_tag_search_weight ("name");
++	guint16 id_weight = as_utils_get_tag_search_weight ("id");
+ 	const Query queries[] = {
+-		#ifdef HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE
+-		{ AS_SEARCH_TOKEN_MATCH_MEDIATYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+-		#else
+-		{ AS_SEARCH_TOKEN_MATCH_MIMETYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+-		#endif
++		{ as_utils_get_tag_search_weight ("mediatype"),	"provides/mediatype[text()~=stem(?)]" },
+ 		/* Search once with a tokenize-and-casefold operator (`~=`) to support casefolded
+ 		 * full-text search, then again using substring matching (`contains()`), to
+ 		 * support prefix matching. Only do the prefix matches on a few fields, and at a
+ 		 * lower priority, otherwise things will get confusing.
+-		 * 
++		 *
+ 		 * See https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2277 */
++		{ pkgname_weight,				"pkgname[text()~=stem(?)]" },
++		{ pkgname_weight / 2,				"pkgname[contains(text(),stem(?))]" },
++		{ as_utils_get_tag_search_weight ("summary"),	"summary[text()~=stem(?)]" },
++		{ name_weight,					"name[text()~=stem(?)]" },
++		{ name_weight / 2,				"name[contains(text(),stem(?))]" },
++		{ as_utils_get_tag_search_weight ("keyword"),	"keywords/keyword[text()~=stem(?)]" },
++		{ id_weight,					"id[text()~=stem(?)]" },
++		{ id_weight,					"launchable[text()~=stem(?)]" },
++		{ as_utils_get_tag_search_weight ("origin"),	"../components[@origin~=stem(?)]" },
++		{ 0,						NULL }
++	};
++#else
++	const Query queries[] = {
++		{ AS_SEARCH_TOKEN_MATCH_MEDIATYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME,	"pkgname[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME / 2,	"pkgname[contains(text(),stem(?))]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_SUMMARY,	"summary[text()~=stem(?)]" },
+@@ -1647,6 +1674,7 @@ gs_appstream_search (GsPlugin *plugin,
+ 		{ AS_SEARCH_TOKEN_MATCH_ORIGIN,		"../components[@origin~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_NONE,		NULL }
+ 	};
++#endif
+ 
+ 	return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
+ }
+@@ -1659,11 +1687,21 @@ gs_appstream_search_developer_apps (GsPlugin *plugin,
+ 				    GCancellable *cancellable,
+ 				    GError **error)
+ {
++#if AS_CHECK_VERSION(1, 0, 0)
++	const Query queries[] = {
++		{ as_utils_get_tag_search_weight ("pkgname"), "developer/name[text()~=stem(?)]" },
++		{ as_utils_get_tag_search_weight ("summary"), "project_group[text()~=stem(?)]" },
++		/* for legacy support */
++		{ as_utils_get_tag_search_weight ("pkgname"), "developer_name[text()~=stem(?)]" },
++		{ 0,					      NULL }
++	};
++#else
+ 	const Query queries[] = {
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME,	"developer_name[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_SUMMARY,	"project_group[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_NONE,		NULL }
+ 	};
++#endif
+ 
+ 	return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
+ }
+diff --git a/lib/gs-utils.c b/lib/gs-utils.c
+index cf9073025f..19e6ebd046 100644
+--- a/lib/gs-utils.c
++++ b/lib/gs-utils.c
+@@ -1694,9 +1694,9 @@ gs_utils_gstring_replace (GString *str,
+ 			  const gchar *find,
+ 			  const gchar *replace)
+ {
+-	#ifdef HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS
++#if AS_CHECK_VERSION(1, 0, 0)
+ 	as_gstring_replace (str, find, replace, 0);
+-	#else
+-	as_gstring_replace (str, find, replace);
+-	#endif
++#else
++	as_gstring_replace2 (str, find, replace, 0);
++#endif
+ }
+diff --git a/meson.build b/meson.build
+index 09c39df180..ad105869e5 100644
+--- a/meson.build
++++ b/meson.build
+@@ -113,7 +113,7 @@ add_project_arguments('-D_GNU_SOURCE', language : 'c')
+ conf.set('HAVE_LINUX_UNISTD_H', cc.has_header('linux/unistd.h'))
+ 
+ appstream = dependency('appstream',
+-  version : '>= 0.14.0',
++  version : '>= 0.16.2',
+   fallback : ['appstream', 'appstream_dep'],
+   default_options : [
+     'docs=false',
+@@ -121,26 +121,6 @@ appstream = dependency('appstream',
+     'install-docs=false'
+   ]
+ )
+-if appstream.type_name() == 'internal'
+-else
+-  if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_SEARCH_TOKEN_MATCH_MEDIATYPE', dependencies: appstream)
+-    conf.set('HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE', '1')
+-  endif
+-  if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_FORMAT_STYLE_CATALOG', dependencies: appstream)
+-    conf.set('HAVE_AS_FORMAT_STYLE_CATALOG', '1')
+-  endif
+-  if meson.get_compiler('c').has_function('as_metadata_components_to_catalog', prefix: '#include <appstream.h>', dependencies: appstream)
+-    conf.set('HAVE_AS_METADATA_COMPONENTS_TO_CATALOG', '1')
+-  endif
+-  if meson.get_compiler('c').links('''#include <appstream.h>
+-      int main (void)
+-      {
+-         as_gstring_replace (NULL, "a", "b", 0);
+-         return 0;
+-      }''', name: 'as_gstring_replace() has four arguments', dependencies: appstream)
+-    conf.set('HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS', '1')
+-  endif
+-endif
+ 
+ gdk_pixbuf = dependency('gdk-pixbuf-2.0', version : '>= 2.32.0')
+ libxmlb = dependency('xmlb', version : '>= 0.1.7', fallback : ['libxmlb', 'libxmlb_dep'])
+diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c
+index cf9f3022b1..ef3226a591 100644
+--- a/plugins/core/gs-plugin-appstream.c
++++ b/plugins/core/gs-plugin-appstream.c
+@@ -414,11 +414,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
+ 	if (bytes == NULL)
+ 		return NULL;
+ 
+-	#ifdef HAVE_AS_FORMAT_STYLE_CATALOG
+ 	as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_CATALOG);
+-	#else
+-	as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_COLLECTION);
+-	#endif
+ 	as_metadata_parse_bytes (mdata,
+ 				 bytes,
+ 				 AS_FORMAT_KIND_YAML,
+@@ -428,11 +424,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
+ 		return NULL;
+ 	}
+ 
+-	#ifdef HAVE_AS_METADATA_COMPONENTS_TO_CATALOG
+ 	xml = as_metadata_components_to_catalog (mdata, AS_FORMAT_KIND_XML, &tmp_error);
+-	#else
+-	xml = as_metadata_components_to_collection (mdata, AS_FORMAT_KIND_XML, &tmp_error);
+-	#endif
+ 	if (xml == NULL) {
+ 		// This API currently returns NULL if there is nothing to serialize, so we
+ 		// have to test if this is an error or not.
+diff --git a/plugins/fwupd/gs-fwupd-app.c b/plugins/fwupd/gs-fwupd-app.c
+index 6dcda6ee92..5d3254da59 100644
+--- a/plugins/fwupd/gs-fwupd-app.c
++++ b/plugins/fwupd/gs-fwupd-app.c
+@@ -164,7 +164,11 @@ gs_fwupd_app_set_from_device (GsApp *app,
+ 		gs_app_set_install_date (app, fwupd_device_get_created (dev));
+ 	if (fwupd_device_get_description (dev) != NULL) {
+ 		g_autofree gchar *tmp = NULL;
++#if AS_CHECK_VERSION(1, 0, 0)
++		tmp = as_markup_convert (fwupd_device_get_description (dev), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 		tmp = as_markup_convert_simple (fwupd_device_get_description (dev), NULL);
++#endif
+ 		if (tmp != NULL)
+ 			gs_app_set_description (app, GS_APP_QUALITY_NORMAL, tmp);
+ 	}
+@@ -402,7 +406,11 @@ gs_fwupd_app_set_from_release (GsApp *app, FwupdRelease *rel)
+ 	}
+ 	if (fwupd_release_get_description (rel) != NULL) {
+ 		g_autofree gchar *tmp = NULL;
++#if AS_CHECK_VERSION(1, 0, 0)
++		tmp = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 		tmp = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
++#endif
+ 		if (tmp != NULL)
+ 			gs_app_set_update_details_text (app, tmp);
+ 	}
+diff --git a/plugins/fwupd/gs-plugin-fwupd.c b/plugins/fwupd/gs-plugin-fwupd.c
+index e931b2b6db..0747d6e250 100644
+--- a/plugins/fwupd/gs-plugin-fwupd.c
++++ b/plugins/fwupd/gs-plugin-fwupd.c
+@@ -726,7 +726,11 @@ gs_plugin_add_updates (GsPlugin *plugin,
+ 				g_autofree gchar *desc = NULL;
+ 				if (fwupd_release_get_description (rel) == NULL)
+ 					continue;
++#if AS_CHECK_VERSION(1, 0, 0)
++				desc = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 				desc = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
++#endif
+ 				if (desc == NULL)
+ 					continue;
+ 				g_string_append_printf (update_desc,
+diff --git a/src/gs-hardware-support-context-dialog.c b/src/gs-hardware-support-context-dialog.c
+index 0e48c8c266..14653401de 100644
+--- a/src/gs-hardware-support-context-dialog.c
++++ b/src/gs-hardware-support-context-dialog.c
+@@ -461,6 +461,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 			AsRelationCompare comparator = as_relation_get_compare (relation);
+ 			Range current_display_comparand, relation_comparand;
+ 
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 			/* From https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-requires-recommends-display_length */
+ 			Range display_lengths[] = {
+ 				[AS_DISPLAY_LENGTH_KIND_XSMALL] = { 0, 360 },
+@@ -469,6 +470,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 				[AS_DISPLAY_LENGTH_KIND_LARGE] = { 1024, 3840 },
+ 				[AS_DISPLAY_LENGTH_KIND_XLARGE] = { 3840, G_MAXUINT },
+ 			};
++#endif
+ 
+ 			any_display_relations_set = TRUE;
+ 
+@@ -485,11 +487,14 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 			case AS_DISPLAY_SIDE_KIND_LAST:
+ 			default:
+ 				current_display_comparand.min = current_display_comparand.max = MAX (current_screen_size.width, current_screen_size.height);
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 				relation_comparand.min = display_lengths[as_relation_get_value_display_length_kind (relation)].min;
+ 				relation_comparand.max = display_lengths[as_relation_get_value_display_length_kind (relation)].max;
++#endif
+ 				break;
+ 			}
+ 
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 			if (evaluate_display_comparison (display_lengths[AS_DISPLAY_LENGTH_KIND_SMALL], comparator, relation_comparand)) {
+ 				*mobile_relation_kind_out = max_relation_kind (*mobile_relation_kind_out, as_relation_get_kind (relation));
+ 				*mobile_match_out = TRUE;
+@@ -499,6 +504,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 				*desktop_relation_kind_out = max_relation_kind (*desktop_relation_kind_out, as_relation_get_kind (relation));
+ 				*desktop_match_out = TRUE;
+ 			}
++#endif
+ 
+ 			if (evaluate_display_comparison (current_display_comparand, comparator, relation_comparand)) {
+ 				*current_relation_kind_out = max_relation_kind (*current_relation_kind_out, as_relation_get_kind (relation));
+diff --git a/src/gs-repos-dialog.c b/src/gs-repos-dialog.c
+index c41c4944a1..7dac0416d9 100644
+--- a/src/gs-repos-dialog.c
++++ b/src/gs-repos-dialog.c
+@@ -154,7 +154,11 @@ enable_repo (GsReposDialog *dialog,
+ 		g_autoptr(GError) error = NULL;
+ 
+ 		/* convert from AppStream markup */
++#if AS_CHECK_VERSION(1, 0, 0)
++		message = as_markup_convert (gs_app_get_agreement (repo), AS_MARKUP_KIND_TEXT, &error);
++#else
+ 		message = as_markup_convert_simple (gs_app_get_agreement (repo), &error);
++#endif
+ 		if (message == NULL) {
+ 			/* failed, so just try and show the original markup */
+ 			message = g_strdup (gs_app_get_agreement (repo));
+diff --git a/src/gs-screenshot-carousel.c b/src/gs-screenshot-carousel.c
+index 04bbf86a1e..d269af6605 100644
+--- a/src/gs-screenshot-carousel.c
++++ b/src/gs-screenshot-carousel.c
+@@ -141,8 +141,8 @@ gs_screenshot_carousel_load_screenshots (GsScreenshotCarousel *self, GsApp *app,
+ 		gtk_widget_set_can_focus (gtk_widget_get_first_child (ssimg), FALSE);
+ 		gs_screenshot_image_set_screenshot (GS_SCREENSHOT_IMAGE (ssimg), ss);
+ 		gs_screenshot_image_set_size (GS_SCREENSHOT_IMAGE (ssimg),
+-					      AS_IMAGE_NORMAL_WIDTH,
+-					      AS_IMAGE_NORMAL_HEIGHT);
++					      GS_IMAGE_NORMAL_WIDTH,
++					      GS_IMAGE_NORMAL_HEIGHT);
+ 		gtk_widget_add_css_class (ssimg, "screenshot-image-main");
+ 		gs_screenshot_image_load_async (GS_SCREENSHOT_IMAGE (ssimg), cancellable);
+ 
+diff --git a/src/gs-screenshot-image.c b/src/gs-screenshot-image.c
+index c313a2589f..b24083b387 100644
+--- a/src/gs-screenshot-image.c
++++ b/src/gs-screenshot-image.c
+@@ -284,13 +284,13 @@ gs_screenshot_image_save_downloaded_img (GsScreenshotImage *ssimg,
+ 	if (images->len > 1)
+ 		return TRUE;
+ 
+-	if (width == AS_IMAGE_THUMBNAIL_WIDTH &&
+-	    height == AS_IMAGE_THUMBNAIL_HEIGHT) {
+-		width = AS_IMAGE_NORMAL_WIDTH;
+-		height = AS_IMAGE_NORMAL_HEIGHT;
++	if (width == GS_IMAGE_THUMBNAIL_WIDTH &&
++	    height == GS_IMAGE_THUMBNAIL_HEIGHT) {
++		width = GS_IMAGE_NORMAL_WIDTH;
++		height = GS_IMAGE_NORMAL_HEIGHT;
+ 	} else {
+-		width = AS_IMAGE_THUMBNAIL_WIDTH;
+-		height = AS_IMAGE_THUMBNAIL_HEIGHT;
++		width = GS_IMAGE_THUMBNAIL_WIDTH;
++		height = GS_IMAGE_THUMBNAIL_HEIGHT;
+ 	}
+ 
+ 	width *= ssimg->scale;
+@@ -582,16 +582,30 @@ gs_screenshot_image_get_url (GsScreenshotImage *ssimg)
+ 	} else if (as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE) {
+ 		AsImage *im;
+ 
++#if AS_CHECK_VERSION(1, 0, 0)
++		im = as_screenshot_get_image (ssimg->screenshot,
++					      ssimg->width,
++					      ssimg->height,
++					      ssimg->scale);
++#else
+ 		im = as_screenshot_get_image (ssimg->screenshot,
+ 					      ssimg->width * ssimg->scale,
+ 					      ssimg->height * ssimg->scale);
++#endif
+ 
+ 		/* if we've failed to load a HiDPI image, fallback to LoDPI */
+ 		if (im == NULL && ssimg->scale > 1) {
+ 			ssimg->scale = 1;
++#if AS_CHECK_VERSION(1, 0, 0)
++			im = as_screenshot_get_image (ssimg->screenshot,
++						      ssimg->width,
++						      ssimg->height,
++						      1);
++#else
+ 			im = as_screenshot_get_image (ssimg->screenshot,
+ 						      ssimg->width,
+ 						      ssimg->height);
++#endif
+ 		}
+ 
+ 		if (im)
+@@ -698,15 +712,22 @@ gs_screenshot_image_load_async (GsScreenshotImage *ssimg,
+ 	 * smaller version of it straight away */
+ 	if (!ssimg->showing_image &&
+ 	    as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE &&
+-	    ssimg->width > AS_IMAGE_THUMBNAIL_WIDTH &&
+-	    ssimg->height > AS_IMAGE_THUMBNAIL_HEIGHT) {
++	    ssimg->width > GS_IMAGE_THUMBNAIL_WIDTH &&
++	    ssimg->height > GS_IMAGE_THUMBNAIL_HEIGHT) {
+ 		const gchar *url_thumb;
+ 		g_autofree gchar *basename_thumb = NULL;
+ 		g_autofree gchar *cache_kind_thumb = NULL;
+ 		AsImage *im;
++#if AS_CHECK_VERSION(1, 0, 0)
+ 		im = as_screenshot_get_image (ssimg->screenshot,
+-					      AS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
+-					      AS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
++					      GS_IMAGE_THUMBNAIL_WIDTH,
++					      GS_IMAGE_THUMBNAIL_HEIGHT,
++					      ssimg->scale);
++#else
++		im = as_screenshot_get_image (ssimg->screenshot,
++					      GS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
++					      GS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
++#endif
+ 		url_thumb = as_image_get_url (im);
+ 		basename_thumb = gs_screenshot_get_cachefn_for_url (url_thumb);
+ 		cache_kind_thumb = g_build_filename ("screenshots", "112x63", NULL);
+diff --git a/src/gs-screenshot-image.h b/src/gs-screenshot-image.h
+index 1f6cf81ce6..6e45f5d20a 100644
+--- a/src/gs-screenshot-image.h
++++ b/src/gs-screenshot-image.h
+@@ -21,6 +21,13 @@ G_BEGIN_DECLS
+ 
+ G_DECLARE_FINAL_TYPE (GsScreenshotImage, gs_screenshot_image, GS, SCREENSHOT_IMAGE, GtkWidget)
+ 
++#define GS_IMAGE_LARGE_HEIGHT		423
++#define GS_IMAGE_LARGE_WIDTH		752
++#define GS_IMAGE_NORMAL_HEIGHT		351
++#define GS_IMAGE_NORMAL_WIDTH		624
++#define GS_IMAGE_THUMBNAIL_HEIGHT	63
++#define GS_IMAGE_THUMBNAIL_WIDTH 	112
++
+ GtkWidget	*gs_screenshot_image_new		(SoupSession		*session);
+ 
+ AsScreenshot	*gs_screenshot_image_get_screenshot	(GsScreenshotImage	*ssimg);
+diff --git a/subprojects/appstream.wrap b/subprojects/appstream.wrap
+index 6f0beb0cbc..5763a32c64 100644
+--- a/subprojects/appstream.wrap
++++ b/subprojects/appstream.wrap
+@@ -1,5 +1,5 @@
+ [wrap-git]
+ directory = appstream
+ url = https://github.com/ximion/appstream.git
+-revision = v0.14.1
++revision = v0.16.3
+ depth = 1
+-- 
+GitLab
diff --git a/srcpkgs/gnome-software/template b/srcpkgs/gnome-software/template
index c5394ce2105091..70a2dfb664394d 100644
--- a/srcpkgs/gnome-software/template
+++ b/srcpkgs/gnome-software/template
@@ -1,6 +1,6 @@
 # Template file for 'gnome-software'
 pkgname=gnome-software
-version=44.2
+version=45.3
 revision=1
 build_style=meson
 configure_args="-Dpackagekit=false -Dfwupd=false
@@ -18,8 +18,8 @@ license="GPL-3.0-or-later"
 homepage="https://gitlab.gnome.org/GNOME/gnome-software"
 changelog="https://gitlab.gnome.org/GNOME/gnome-software/-/raw/main/NEWS"
 distfiles="https://gitlab.gnome.org/GNOME/gnome-software/-/archive/${version}/gnome-software-${version}.tar.gz"
-checksum=bedfe8652d2ceaf17eccc57d6befe6d95f09d15e486a58f0bb7a9a868d0bacc0
-make_check=no # FIXME
+checksum=be2f64e894e653924411981d952fb694559687010985b53ccd325dee0d6a6b83
+make_check=no # Requires system dbus
 
 build_options="gtk_doc"
 

From 076cc9b8834422c18b85e7b34a54b3ba7fba4825 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:12:25 -0800
Subject: [PATCH 5/5] flatpak-builder: update to 1.4.2.

---
 srcpkgs/flatpak-builder/template | 23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)

diff --git a/srcpkgs/flatpak-builder/template b/srcpkgs/flatpak-builder/template
index fe3485b0d89568..434a316316e77b 100644
--- a/srcpkgs/flatpak-builder/template
+++ b/srcpkgs/flatpak-builder/template
@@ -1,25 +1,22 @@
 # Template file for 'flatpak-builder'
 pkgname=flatpak-builder
-version=1.2.3
+version=1.4.2
 revision=1
-build_style=gnu-configure
-hostmakedepends="pkg-config xmlto"
-makedepends="flatpak-devel json-glib-devel libcap-devel libsoup-devel
- libyaml-devel libcurl-devel"
-depends="elfutils"
+build_style=meson
+hostmakedepends="pkg-config xmlto debugedit AppStream-compose"
+makedepends="flatpak-devel json-glib-devel libcap-devel
+ libyaml-devel libcurl-devel libxml2-devel"
+depends="elfutils debugedit AppStream-compose"
 short_desc="Tool to build flatpaks from source"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://github.com/flatpak/flatpak-builder"
 changelog="https://github.com/flatpak/flatpak-builder/raw/main/NEWS"
-distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}.tar.xz"
-checksum=e257825a47f7a3e71e30fb0f80f2d9ac6e4801f746f552dfaf0e564e3ee351c8
-# Tests expects a Debian derivate hosts to build a flatpak container from.
-make_check=no
+#distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}.tar.xz"
+distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}-fixed-libglnx.tar.xz"
+checksum=c041b974e03a2c2d3cda88a0efe1ecf69f9adf42a1758eac341d555e779d0596
+make_check=no # Can't run bubblewrap inside the container
 
-if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" flatpak-devel"
-fi
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	makedepends+=" musl-legacy-compat"
 fi

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] flatpak-builder: update to 1.4.2.
  2024-03-05 12:13 [PR PATCH] flatpak-builder: update to 1.4.2 oreo639
@ 2024-03-05 12:27 ` oreo639
  2024-03-05 12:41 ` oreo639
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: oreo639 @ 2024-03-05 12:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1258 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages flatpak-builder
https://github.com/void-linux/void-packages/pull/49126

flatpak-builder: update to 1.4.2.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/49126.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-flatpak-builder-49126.patch --]
[-- Type: text/x-diff, Size: 30803 bytes --]

From eb57268be62ebfdf37fa5d08de6cae6f222b9ded Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:09:50 -0800
Subject: [PATCH 1/5] AppStream: update to 1.0.2.

---
 common/shlibs                               |  3 +-
 srcpkgs/{AppStream-qt => AppStream-compose} |  0
 srcpkgs/AppStream-qt6                       |  1 +
 srcpkgs/AppStream/template                  | 38 +++++++++++++++------
 4 files changed, 31 insertions(+), 11 deletions(-)
 rename srcpkgs/{AppStream-qt => AppStream-compose} (100%)
 create mode 120000 srcpkgs/AppStream-qt6

diff --git a/common/shlibs b/common/shlibs
index 8958c92d7fe196..f1e55e437bae2f 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2992,7 +2992,8 @@ libliveMedia.so.81 live555-2020.08.11_2
 libgroupsock.so.8 live555-2020.08.11_2
 libUsageEnvironment.so.3 live555-2020.08.11_2
 libBasicUsageEnvironment.so.1 live555-2020.08.11_2
-libappstream.so.4 AppStream-0.12.2_1
+libappstream.so.5 AppStream-1.0.2_1
+libAppStreamQt.so.3 AppStream-qt6-1.0.2_1
 libappstream-glib.so.8 appstream-glib-0.6.13_1
 libappstream-builder.so.8 appstream-glib-0.6.13_1
 libflatpak.so.0 flatpak-0.9.3_2
diff --git a/srcpkgs/AppStream-qt b/srcpkgs/AppStream-compose
similarity index 100%
rename from srcpkgs/AppStream-qt
rename to srcpkgs/AppStream-compose
diff --git a/srcpkgs/AppStream-qt6 b/srcpkgs/AppStream-qt6
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-qt6
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream/template b/srcpkgs/AppStream/template
index 87fbb76d2c9c66..912091c8b193f2 100644
--- a/srcpkgs/AppStream/template
+++ b/srcpkgs/AppStream/template
@@ -1,30 +1,48 @@
 # Template file for 'AppStream'
 pkgname=AppStream
-version=0.16.4
+version=1.0.2
 revision=1
 build_style=meson
 build_helper="gir qemu"
 configure_args="$(vopt_bool gir gir) $(vopt_bool vala vapi)
- -Dstemming=false -Dapidocs=false -Dqt=true -Dsystemd=false"
+ -Dstemming=false -Dapidocs=false -Dqt=true -Dsystemd=false
+ -Dcompose=true"
 hostmakedepends="docbook-xsl gettext glib-devel gperf libxslt pkg-config
- qt5-host-tools $(vopt_if vala vala) itstool"
-makedepends="libglib-devel libxml2-devel libyaml-devel qt5-devel libxmlb-devel
- libcurl-devel"
+ qt6-base $(vopt_if vala vala) itstool"
+makedepends="libglib-devel libxml2-devel libyaml-devel qt6-base-devel libxmlb-devel
+ libcurl-devel librsvg-devel"
+checkdepends="tar"
 short_desc="Tools and libraries to work with AppStream metadata"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://github.com/ximion/appstream"
 changelog="https://raw.githubusercontent.com/ximion/appstream/master/NEWS"
 distfiles="https://github.com/ximion/appstream/archive/v${version}.tar.gz"
-checksum=95d5cf451d1945182a9bc4d597c13e713451a3dba1a5759f45b6b3279ff3774c
-conf_files="/etc/appstream.conf"
+checksum=77e271f47167ae37a68111b951c3c07e4261579e69047747044f7924c8219d14
 triggers="appstream-cache"
 
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" AppStream-devel"
+fi
+
 build_options="gir vala"
 build_options_default="gir vala"
 
+AppStream-compose_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - compose libraries and tools"
+	pkg_install() {
+		vmove usr/libexec/appstreamcli-compose
+		vmove usr/share/man/man1/appstreamcli-compose.1*
+		vmove usr/lib/libappstream-compose.so.*
+		vmove usr/lib/girepository-1.0/AppStreamCompose-1.0.typelib
+		vmove usr/share/metainfo/org.freedesktop.appstream.compose.metainfo.xml
+	}
+}
+
 AppStream-devel_package() {
-	depends="${sourcepkg}>=${version}_${revision} AppStream-qt>=${version}_${revision}"
+	depends="${sourcepkg}>=${version}_${revision} AppStream-qt6>=${version}_${revision}
+	 AppStream-compose>=${version}_${revision}"
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
@@ -40,8 +58,8 @@ AppStream-devel_package() {
 	}
 }
 
-AppStream-qt_package() {
-	short_desc+=" - qt5 interface library"
+AppStream-qt6_package() {
+	short_desc+=" - qt6 interface library"
 	pkg_install() {
 		vmove "usr/lib/libAppStreamQt.so.*"
 	}

From 9e6af18cd2a1b0ee39db061b9aa5046efc120eef Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:10:35 -0800
Subject: [PATCH 2/5] flatpak: rebuild for AppStream 1.0

---
 srcpkgs/flatpak/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/flatpak/template b/srcpkgs/flatpak/template
index 819686057ac9bc..066c3021a335fc 100644
--- a/srcpkgs/flatpak/template
+++ b/srcpkgs/flatpak/template
@@ -1,7 +1,7 @@
 # Template file for 'flatpak'
 pkgname=flatpak
 version=1.15.6
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="

From a3bc11bbf128420f57809447454e941c26b2f361 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:11:53 -0800
Subject: [PATCH 3/5] libadwaita: rebuild for AppStream 1.0

---
 srcpkgs/libadwaita/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libadwaita/template b/srcpkgs/libadwaita/template
index 63e643d8fdd70d..fca2b2a5d5a25e 100644
--- a/srcpkgs/libadwaita/template
+++ b/srcpkgs/libadwaita/template
@@ -1,7 +1,7 @@
 # Template file for 'libadwaita'
 pkgname=libadwaita
 version=1.4.4
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="-Dexamples=true -Dtests=true $(vopt_bool gtk_doc)

From 9ae2f0c42e7de525f548e0ac2083c91ff3780757 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:11:59 -0800
Subject: [PATCH 4/5] gnome-software: update to 45.3.

---
 .../patches/0001-port-to-appstream1.patch     | 504 ++++++++++++++++++
 srcpkgs/gnome-software/template               |   6 +-
 2 files changed, 507 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch

diff --git a/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch b/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch
new file mode 100644
index 00000000000000..256a8509231e5f
--- /dev/null
+++ b/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch
@@ -0,0 +1,504 @@
+See: https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2393
+
+From e6f7e28bdd50a63586ba6a82b936d54db19a311b Mon Sep 17 00:00:00 2001
+From: Matthias Klumpp <matthias@tenstral.net>
+Date: Sun, 8 Oct 2023 20:22:44 +0200
+Subject: [PATCH] Adjust to build with AppStream 1.0 as well as 0.16.x
+
+---
+ lib/gs-app.c                             |  4 ++
+ lib/gs-appstream.c                       | 58 ++++++++++++++++++++----
+ lib/gs-utils.c                           |  8 ++--
+ meson.build                              | 22 +--------
+ plugins/core/gs-plugin-appstream.c       |  8 ----
+ plugins/fwupd/gs-fwupd-app.c             |  8 ++++
+ plugins/fwupd/gs-plugin-fwupd.c          |  4 ++
+ src/gs-hardware-support-context-dialog.c |  6 +++
+ src/gs-repos-dialog.c                    |  4 ++
+ src/gs-screenshot-carousel.c             |  4 +-
+ src/gs-screenshot-image.c                | 41 +++++++++++++----
+ src/gs-screenshot-image.h                |  7 +++
+ subprojects/appstream.wrap               |  2 +-
+ 13 files changed, 120 insertions(+), 56 deletions(-)
+
+diff --git a/lib/gs-app.c b/lib/gs-app.c
+index 048a061225..e2694057cd 100644
+--- a/lib/gs-app.c
++++ b/lib/gs-app.c
+@@ -609,7 +609,11 @@ gs_app_to_string_append (GsApp *app, GString *str)
+ 		AsScreenshot *ss = g_ptr_array_index (priv->screenshots, i);
+ 		g_autofree gchar *key = NULL;
+ 		tmp = as_screenshot_get_caption (ss);
++#if AS_CHECK_VERSION(1, 0, 0)
++		im = as_screenshot_get_image (ss, 0, 0, 1);
++#else
+ 		im = as_screenshot_get_image (ss, 0, 0);
++#endif
+ 		if (im == NULL)
+ 			continue;
+ 		key = g_strdup_printf ("screenshot-%02u", i);
+diff --git a/lib/gs-appstream.c b/lib/gs-appstream.c
+index deca176dcf..2cc2427a19 100644
+--- a/lib/gs-appstream.c
++++ b/lib/gs-appstream.c
+@@ -587,8 +587,6 @@ gs_appstream_refine_add_provides (GsApp *app, XbNode *component, GError **error)
+ 					kind = AS_PROVIDED_KIND_FIRMWARE_RUNTIME;
+ 				else if (g_strcmp0 (fw_type, "flashed") == 0)
+ 					kind = AS_PROVIDED_KIND_FIRMWARE_FLASHED;
+-			} else if (g_strcmp0 (element_name, "python2") == 0) {
+-				kind = AS_PROVIDED_KIND_PYTHON_2;
+ 			} else if (g_strcmp0 (element_name, "python3") == 0) {
+ 				kind = AS_PROVIDED_KIND_PYTHON;
+ 			} else if (g_strcmp0 (element_name, "dbus") == 0) {
+@@ -1011,8 +1011,11 @@ gs_appstream_refine_app_relation (GsApp           *app,
+ 			as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_CONTROL);
+ 			as_relation_set_value_control_kind (relation, as_control_kind_from_string (xb_node_get_text (child)));
+ 		} else if (g_str_equal (item_kind, "display_length")) {
+-			AsDisplayLengthKind display_length_kind;
+ 			const gchar *compare;
++			const gchar *side;
++#if !AS_CHECK_VERSION(1, 0, 0)
++			AsDisplayLengthKind display_length_kind;
++#endif
+ 
+ 			/* https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-relations-display_length */
+ 			as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_DISPLAY_LENGTH);
+@@ -1020,15 +1023,21 @@ gs_appstream_refine_app_relation (GsApp           *app,
+ 			compare = xb_node_get_attr (child, "compare");
+ 			as_relation_set_compare (relation, (compare != NULL) ? as_relation_compare_from_string (compare) : AS_RELATION_COMPARE_GE);
+ 
++#if AS_CHECK_VERSION(1, 0, 0)
++			side = xb_node_get_attr (child, "side");
++			as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
++			as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
++#else
+ 			display_length_kind = as_display_length_kind_from_string (xb_node_get_text (child));
+ 			if (display_length_kind != AS_DISPLAY_LENGTH_KIND_UNKNOWN) {
+ 				/* Ignore the `side` attribute */
+ 				as_relation_set_value_display_length_kind (relation, display_length_kind);
+ 			} else {
+-				const gchar *side = xb_node_get_attr (child, "side");
++				side = xb_node_get_attr (child, "side");
+ 				as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
+ 				as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
+ 			}
++#endif
+ 		} else {
+ 			g_debug ("Relation type ‘%s’ not currently supported for %s; ignoring",
+ 				 item_kind, gs_app_get_id (app));
+@@ -1472,7 +1481,7 @@ gs_appstream_refine_app (GsPlugin *plugin,
+ }
+ 
+ typedef struct {
+-	AsSearchTokenMatch	 match_value;
++	guint16			 match_value;
+ 	XbQuery			*query;
+ } GsAppstreamSearchHelper;
+ 
+@@ -1522,7 +1531,7 @@ gs_appstream_silo_search_component (GPtrArray *array, XbNode *component, const g
+ }
+ 
+ typedef struct {
+-	AsSearchTokenMatch	match_value;
++	guint16			match_value;
+ 	const gchar		*xpath;
+ } Query;
+ 
+@@ -1585,7 +1594,11 @@ gs_appstream_do_search (GsPlugin *plugin,
+ 			 * Drop the ID token from it as it’s the highest
+ 			 * numeric value but isn’t visible to the user in the
+ 			 * UI, which leads to confusing results ordering. */
++#if AS_CHECK_VERSION(1, 0, 0)
++			gs_app_set_match_value (app, match_value & (~as_utils_get_tag_search_weight ("id")));
++#else
+ 			gs_app_set_match_value (app, match_value & (~AS_SEARCH_TOKEN_MATCH_ID));
++#endif
+ 			gs_app_list_add (list, app);
+ 
+ 			if (gs_app_get_kind (app) == AS_COMPONENT_KIND_ADDON) {
+@@ -1624,18 +1637,32 @@ gs_appstream_search (GsPlugin *plugin,
+ 		     GCancellable *cancellable,
+ 		     GError **error)
+ {
++#if AS_CHECK_VERSION(1, 0, 0)
++	guint16 pkgname_weight = as_utils_get_tag_search_weight ("pkgname");
++	guint16 name_weight = as_utils_get_tag_search_weight ("name");
++	guint16 id_weight = as_utils_get_tag_search_weight ("id");
+ 	const Query queries[] = {
+-		#ifdef HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE
+-		{ AS_SEARCH_TOKEN_MATCH_MEDIATYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+-		#else
+-		{ AS_SEARCH_TOKEN_MATCH_MIMETYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+-		#endif
++		{ as_utils_get_tag_search_weight ("mediatype"),	"provides/mediatype[text()~=stem(?)]" },
+ 		/* Search once with a tokenize-and-casefold operator (`~=`) to support casefolded
+ 		 * full-text search, then again using substring matching (`contains()`), to
+ 		 * support prefix matching. Only do the prefix matches on a few fields, and at a
+ 		 * lower priority, otherwise things will get confusing.
+-		 * 
++		 *
+ 		 * See https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2277 */
++		{ pkgname_weight,				"pkgname[text()~=stem(?)]" },
++		{ pkgname_weight / 2,				"pkgname[contains(text(),stem(?))]" },
++		{ as_utils_get_tag_search_weight ("summary"),	"summary[text()~=stem(?)]" },
++		{ name_weight,					"name[text()~=stem(?)]" },
++		{ name_weight / 2,				"name[contains(text(),stem(?))]" },
++		{ as_utils_get_tag_search_weight ("keyword"),	"keywords/keyword[text()~=stem(?)]" },
++		{ id_weight,					"id[text()~=stem(?)]" },
++		{ id_weight,					"launchable[text()~=stem(?)]" },
++		{ as_utils_get_tag_search_weight ("origin"),	"../components[@origin~=stem(?)]" },
++		{ 0,						NULL }
++	};
++#else
++	const Query queries[] = {
++		{ AS_SEARCH_TOKEN_MATCH_MEDIATYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME,	"pkgname[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME / 2,	"pkgname[contains(text(),stem(?))]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_SUMMARY,	"summary[text()~=stem(?)]" },
+@@ -1647,6 +1674,7 @@ gs_appstream_search (GsPlugin *plugin,
+ 		{ AS_SEARCH_TOKEN_MATCH_ORIGIN,		"../components[@origin~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_NONE,		NULL }
+ 	};
++#endif
+ 
+ 	return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
+ }
+@@ -1659,11 +1687,21 @@ gs_appstream_search_developer_apps (GsPlugin *plugin,
+ 				    GCancellable *cancellable,
+ 				    GError **error)
+ {
++#if AS_CHECK_VERSION(1, 0, 0)
++	const Query queries[] = {
++		{ as_utils_get_tag_search_weight ("pkgname"), "developer/name[text()~=stem(?)]" },
++		{ as_utils_get_tag_search_weight ("summary"), "project_group[text()~=stem(?)]" },
++		/* for legacy support */
++		{ as_utils_get_tag_search_weight ("pkgname"), "developer_name[text()~=stem(?)]" },
++		{ 0,					      NULL }
++	};
++#else
+ 	const Query queries[] = {
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME,	"developer_name[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_SUMMARY,	"project_group[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_NONE,		NULL }
+ 	};
++#endif
+ 
+ 	return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
+ }
+diff --git a/lib/gs-utils.c b/lib/gs-utils.c
+index cf9073025f..19e6ebd046 100644
+--- a/lib/gs-utils.c
++++ b/lib/gs-utils.c
+@@ -1694,9 +1694,9 @@ gs_utils_gstring_replace (GString *str,
+ 			  const gchar *find,
+ 			  const gchar *replace)
+ {
+-	#ifdef HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS
++#if AS_CHECK_VERSION(1, 0, 0)
+ 	as_gstring_replace (str, find, replace, 0);
+-	#else
+-	as_gstring_replace (str, find, replace);
+-	#endif
++#else
++	as_gstring_replace2 (str, find, replace, 0);
++#endif
+ }
+diff --git a/meson.build b/meson.build
+index 09c39df180..ad105869e5 100644
+--- a/meson.build
++++ b/meson.build
+@@ -113,7 +113,7 @@ add_project_arguments('-D_GNU_SOURCE', language : 'c')
+ conf.set('HAVE_LINUX_UNISTD_H', cc.has_header('linux/unistd.h'))
+ 
+ appstream = dependency('appstream',
+-  version : '>= 0.14.0',
++  version : '>= 0.16.2',
+   fallback : ['appstream', 'appstream_dep'],
+   default_options : [
+     'docs=false',
+@@ -121,26 +121,6 @@ appstream = dependency('appstream',
+     'install-docs=false'
+   ]
+ )
+-if appstream.type_name() == 'internal'
+-else
+-  if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_SEARCH_TOKEN_MATCH_MEDIATYPE', dependencies: appstream)
+-    conf.set('HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE', '1')
+-  endif
+-  if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_FORMAT_STYLE_CATALOG', dependencies: appstream)
+-    conf.set('HAVE_AS_FORMAT_STYLE_CATALOG', '1')
+-  endif
+-  if meson.get_compiler('c').has_function('as_metadata_components_to_catalog', prefix: '#include <appstream.h>', dependencies: appstream)
+-    conf.set('HAVE_AS_METADATA_COMPONENTS_TO_CATALOG', '1')
+-  endif
+-  if meson.get_compiler('c').links('''#include <appstream.h>
+-      int main (void)
+-      {
+-         as_gstring_replace (NULL, "a", "b", 0);
+-         return 0;
+-      }''', name: 'as_gstring_replace() has four arguments', dependencies: appstream)
+-    conf.set('HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS', '1')
+-  endif
+-endif
+ 
+ gdk_pixbuf = dependency('gdk-pixbuf-2.0', version : '>= 2.32.0')
+ libxmlb = dependency('xmlb', version : '>= 0.1.7', fallback : ['libxmlb', 'libxmlb_dep'])
+diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c
+index cf9f3022b1..ef3226a591 100644
+--- a/plugins/core/gs-plugin-appstream.c
++++ b/plugins/core/gs-plugin-appstream.c
+@@ -414,11 +414,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
+ 	if (bytes == NULL)
+ 		return NULL;
+ 
+-	#ifdef HAVE_AS_FORMAT_STYLE_CATALOG
+ 	as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_CATALOG);
+-	#else
+-	as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_COLLECTION);
+-	#endif
+ 	as_metadata_parse_bytes (mdata,
+ 				 bytes,
+ 				 AS_FORMAT_KIND_YAML,
+@@ -428,11 +424,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
+ 		return NULL;
+ 	}
+ 
+-	#ifdef HAVE_AS_METADATA_COMPONENTS_TO_CATALOG
+ 	xml = as_metadata_components_to_catalog (mdata, AS_FORMAT_KIND_XML, &tmp_error);
+-	#else
+-	xml = as_metadata_components_to_collection (mdata, AS_FORMAT_KIND_XML, &tmp_error);
+-	#endif
+ 	if (xml == NULL) {
+ 		// This API currently returns NULL if there is nothing to serialize, so we
+ 		// have to test if this is an error or not.
+diff --git a/plugins/fwupd/gs-fwupd-app.c b/plugins/fwupd/gs-fwupd-app.c
+index 6dcda6ee92..5d3254da59 100644
+--- a/plugins/fwupd/gs-fwupd-app.c
++++ b/plugins/fwupd/gs-fwupd-app.c
+@@ -164,7 +164,11 @@ gs_fwupd_app_set_from_device (GsApp *app,
+ 		gs_app_set_install_date (app, fwupd_device_get_created (dev));
+ 	if (fwupd_device_get_description (dev) != NULL) {
+ 		g_autofree gchar *tmp = NULL;
++#if AS_CHECK_VERSION(1, 0, 0)
++		tmp = as_markup_convert (fwupd_device_get_description (dev), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 		tmp = as_markup_convert_simple (fwupd_device_get_description (dev), NULL);
++#endif
+ 		if (tmp != NULL)
+ 			gs_app_set_description (app, GS_APP_QUALITY_NORMAL, tmp);
+ 	}
+@@ -402,7 +406,11 @@ gs_fwupd_app_set_from_release (GsApp *app, FwupdRelease *rel)
+ 	}
+ 	if (fwupd_release_get_description (rel) != NULL) {
+ 		g_autofree gchar *tmp = NULL;
++#if AS_CHECK_VERSION(1, 0, 0)
++		tmp = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 		tmp = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
++#endif
+ 		if (tmp != NULL)
+ 			gs_app_set_update_details_text (app, tmp);
+ 	}
+diff --git a/plugins/fwupd/gs-plugin-fwupd.c b/plugins/fwupd/gs-plugin-fwupd.c
+index e931b2b6db..0747d6e250 100644
+--- a/plugins/fwupd/gs-plugin-fwupd.c
++++ b/plugins/fwupd/gs-plugin-fwupd.c
+@@ -726,7 +726,11 @@ gs_plugin_add_updates (GsPlugin *plugin,
+ 				g_autofree gchar *desc = NULL;
+ 				if (fwupd_release_get_description (rel) == NULL)
+ 					continue;
++#if AS_CHECK_VERSION(1, 0, 0)
++				desc = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 				desc = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
++#endif
+ 				if (desc == NULL)
+ 					continue;
+ 				g_string_append_printf (update_desc,
+diff --git a/src/gs-hardware-support-context-dialog.c b/src/gs-hardware-support-context-dialog.c
+index 0e48c8c266..14653401de 100644
+--- a/src/gs-hardware-support-context-dialog.c
++++ b/src/gs-hardware-support-context-dialog.c
+@@ -461,6 +461,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 			AsRelationCompare comparator = as_relation_get_compare (relation);
+ 			Range current_display_comparand, relation_comparand;
+ 
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 			/* From https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-requires-recommends-display_length */
+ 			Range display_lengths[] = {
+ 				[AS_DISPLAY_LENGTH_KIND_XSMALL] = { 0, 360 },
+@@ -469,6 +470,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 				[AS_DISPLAY_LENGTH_KIND_LARGE] = { 1024, 3840 },
+ 				[AS_DISPLAY_LENGTH_KIND_XLARGE] = { 3840, G_MAXUINT },
+ 			};
++#endif
+ 
+ 			any_display_relations_set = TRUE;
+ 
+@@ -485,11 +487,14 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 			case AS_DISPLAY_SIDE_KIND_LAST:
+ 			default:
+ 				current_display_comparand.min = current_display_comparand.max = MAX (current_screen_size.width, current_screen_size.height);
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 				relation_comparand.min = display_lengths[as_relation_get_value_display_length_kind (relation)].min;
+ 				relation_comparand.max = display_lengths[as_relation_get_value_display_length_kind (relation)].max;
++#endif
+ 				break;
+ 			}
+ 
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 			if (evaluate_display_comparison (display_lengths[AS_DISPLAY_LENGTH_KIND_SMALL], comparator, relation_comparand)) {
+ 				*mobile_relation_kind_out = max_relation_kind (*mobile_relation_kind_out, as_relation_get_kind (relation));
+ 				*mobile_match_out = TRUE;
+@@ -499,6 +504,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 				*desktop_relation_kind_out = max_relation_kind (*desktop_relation_kind_out, as_relation_get_kind (relation));
+ 				*desktop_match_out = TRUE;
+ 			}
++#endif
+ 
+ 			if (evaluate_display_comparison (current_display_comparand, comparator, relation_comparand)) {
+ 				*current_relation_kind_out = max_relation_kind (*current_relation_kind_out, as_relation_get_kind (relation));
+diff --git a/src/gs-repos-dialog.c b/src/gs-repos-dialog.c
+index c41c4944a1..7dac0416d9 100644
+--- a/src/gs-repos-dialog.c
++++ b/src/gs-repos-dialog.c
+@@ -154,7 +154,11 @@ enable_repo (GsReposDialog *dialog,
+ 		g_autoptr(GError) error = NULL;
+ 
+ 		/* convert from AppStream markup */
++#if AS_CHECK_VERSION(1, 0, 0)
++		message = as_markup_convert (gs_app_get_agreement (repo), AS_MARKUP_KIND_TEXT, &error);
++#else
+ 		message = as_markup_convert_simple (gs_app_get_agreement (repo), &error);
++#endif
+ 		if (message == NULL) {
+ 			/* failed, so just try and show the original markup */
+ 			message = g_strdup (gs_app_get_agreement (repo));
+diff --git a/src/gs-screenshot-carousel.c b/src/gs-screenshot-carousel.c
+index 04bbf86a1e..d269af6605 100644
+--- a/src/gs-screenshot-carousel.c
++++ b/src/gs-screenshot-carousel.c
+@@ -141,8 +141,8 @@ gs_screenshot_carousel_load_screenshots (GsScreenshotCarousel *self, GsApp *app,
+ 		gtk_widget_set_can_focus (gtk_widget_get_first_child (ssimg), FALSE);
+ 		gs_screenshot_image_set_screenshot (GS_SCREENSHOT_IMAGE (ssimg), ss);
+ 		gs_screenshot_image_set_size (GS_SCREENSHOT_IMAGE (ssimg),
+-					      AS_IMAGE_NORMAL_WIDTH,
+-					      AS_IMAGE_NORMAL_HEIGHT);
++					      GS_IMAGE_NORMAL_WIDTH,
++					      GS_IMAGE_NORMAL_HEIGHT);
+ 		gtk_widget_add_css_class (ssimg, "screenshot-image-main");
+ 		gs_screenshot_image_load_async (GS_SCREENSHOT_IMAGE (ssimg), cancellable);
+ 
+diff --git a/src/gs-screenshot-image.c b/src/gs-screenshot-image.c
+index c313a2589f..b24083b387 100644
+--- a/src/gs-screenshot-image.c
++++ b/src/gs-screenshot-image.c
+@@ -284,13 +284,13 @@ gs_screenshot_image_save_downloaded_img (GsScreenshotImage *ssimg,
+ 	if (images->len > 1)
+ 		return TRUE;
+ 
+-	if (width == AS_IMAGE_THUMBNAIL_WIDTH &&
+-	    height == AS_IMAGE_THUMBNAIL_HEIGHT) {
+-		width = AS_IMAGE_NORMAL_WIDTH;
+-		height = AS_IMAGE_NORMAL_HEIGHT;
++	if (width == GS_IMAGE_THUMBNAIL_WIDTH &&
++	    height == GS_IMAGE_THUMBNAIL_HEIGHT) {
++		width = GS_IMAGE_NORMAL_WIDTH;
++		height = GS_IMAGE_NORMAL_HEIGHT;
+ 	} else {
+-		width = AS_IMAGE_THUMBNAIL_WIDTH;
+-		height = AS_IMAGE_THUMBNAIL_HEIGHT;
++		width = GS_IMAGE_THUMBNAIL_WIDTH;
++		height = GS_IMAGE_THUMBNAIL_HEIGHT;
+ 	}
+ 
+ 	width *= ssimg->scale;
+@@ -582,16 +582,30 @@ gs_screenshot_image_get_url (GsScreenshotImage *ssimg)
+ 	} else if (as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE) {
+ 		AsImage *im;
+ 
++#if AS_CHECK_VERSION(1, 0, 0)
++		im = as_screenshot_get_image (ssimg->screenshot,
++					      ssimg->width,
++					      ssimg->height,
++					      ssimg->scale);
++#else
+ 		im = as_screenshot_get_image (ssimg->screenshot,
+ 					      ssimg->width * ssimg->scale,
+ 					      ssimg->height * ssimg->scale);
++#endif
+ 
+ 		/* if we've failed to load a HiDPI image, fallback to LoDPI */
+ 		if (im == NULL && ssimg->scale > 1) {
+ 			ssimg->scale = 1;
++#if AS_CHECK_VERSION(1, 0, 0)
++			im = as_screenshot_get_image (ssimg->screenshot,
++						      ssimg->width,
++						      ssimg->height,
++						      1);
++#else
+ 			im = as_screenshot_get_image (ssimg->screenshot,
+ 						      ssimg->width,
+ 						      ssimg->height);
++#endif
+ 		}
+ 
+ 		if (im)
+@@ -698,15 +712,22 @@ gs_screenshot_image_load_async (GsScreenshotImage *ssimg,
+ 	 * smaller version of it straight away */
+ 	if (!ssimg->showing_image &&
+ 	    as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE &&
+-	    ssimg->width > AS_IMAGE_THUMBNAIL_WIDTH &&
+-	    ssimg->height > AS_IMAGE_THUMBNAIL_HEIGHT) {
++	    ssimg->width > GS_IMAGE_THUMBNAIL_WIDTH &&
++	    ssimg->height > GS_IMAGE_THUMBNAIL_HEIGHT) {
+ 		const gchar *url_thumb;
+ 		g_autofree gchar *basename_thumb = NULL;
+ 		g_autofree gchar *cache_kind_thumb = NULL;
+ 		AsImage *im;
++#if AS_CHECK_VERSION(1, 0, 0)
+ 		im = as_screenshot_get_image (ssimg->screenshot,
+-					      AS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
+-					      AS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
++					      GS_IMAGE_THUMBNAIL_WIDTH,
++					      GS_IMAGE_THUMBNAIL_HEIGHT,
++					      ssimg->scale);
++#else
++		im = as_screenshot_get_image (ssimg->screenshot,
++					      GS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
++					      GS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
++#endif
+ 		url_thumb = as_image_get_url (im);
+ 		basename_thumb = gs_screenshot_get_cachefn_for_url (url_thumb);
+ 		cache_kind_thumb = g_build_filename ("screenshots", "112x63", NULL);
+diff --git a/src/gs-screenshot-image.h b/src/gs-screenshot-image.h
+index 1f6cf81ce6..6e45f5d20a 100644
+--- a/src/gs-screenshot-image.h
++++ b/src/gs-screenshot-image.h
+@@ -21,6 +21,13 @@ G_BEGIN_DECLS
+ 
+ G_DECLARE_FINAL_TYPE (GsScreenshotImage, gs_screenshot_image, GS, SCREENSHOT_IMAGE, GtkWidget)
+ 
++#define GS_IMAGE_LARGE_HEIGHT		423
++#define GS_IMAGE_LARGE_WIDTH		752
++#define GS_IMAGE_NORMAL_HEIGHT		351
++#define GS_IMAGE_NORMAL_WIDTH		624
++#define GS_IMAGE_THUMBNAIL_HEIGHT	63
++#define GS_IMAGE_THUMBNAIL_WIDTH 	112
++
+ GtkWidget	*gs_screenshot_image_new		(SoupSession		*session);
+ 
+ AsScreenshot	*gs_screenshot_image_get_screenshot	(GsScreenshotImage	*ssimg);
+diff --git a/subprojects/appstream.wrap b/subprojects/appstream.wrap
+index 6f0beb0cbc..5763a32c64 100644
+--- a/subprojects/appstream.wrap
++++ b/subprojects/appstream.wrap
+@@ -1,5 +1,5 @@
+ [wrap-git]
+ directory = appstream
+ url = https://github.com/ximion/appstream.git
+-revision = v0.14.1
++revision = v0.16.3
+ depth = 1
+-- 
+GitLab
diff --git a/srcpkgs/gnome-software/template b/srcpkgs/gnome-software/template
index c5394ce2105091..70a2dfb664394d 100644
--- a/srcpkgs/gnome-software/template
+++ b/srcpkgs/gnome-software/template
@@ -1,6 +1,6 @@
 # Template file for 'gnome-software'
 pkgname=gnome-software
-version=44.2
+version=45.3
 revision=1
 build_style=meson
 configure_args="-Dpackagekit=false -Dfwupd=false
@@ -18,8 +18,8 @@ license="GPL-3.0-or-later"
 homepage="https://gitlab.gnome.org/GNOME/gnome-software"
 changelog="https://gitlab.gnome.org/GNOME/gnome-software/-/raw/main/NEWS"
 distfiles="https://gitlab.gnome.org/GNOME/gnome-software/-/archive/${version}/gnome-software-${version}.tar.gz"
-checksum=bedfe8652d2ceaf17eccc57d6befe6d95f09d15e486a58f0bb7a9a868d0bacc0
-make_check=no # FIXME
+checksum=be2f64e894e653924411981d952fb694559687010985b53ccd325dee0d6a6b83
+make_check=no # Requires system dbus
 
 build_options="gtk_doc"
 

From 6fb8131db61be153b92c8bdb7b29dee3c47379c8 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:12:25 -0800
Subject: [PATCH 5/5] flatpak-builder: update to 1.4.2.

---
 srcpkgs/flatpak-builder/template | 23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)

diff --git a/srcpkgs/flatpak-builder/template b/srcpkgs/flatpak-builder/template
index fe3485b0d89568..434a316316e77b 100644
--- a/srcpkgs/flatpak-builder/template
+++ b/srcpkgs/flatpak-builder/template
@@ -1,25 +1,22 @@
 # Template file for 'flatpak-builder'
 pkgname=flatpak-builder
-version=1.2.3
+version=1.4.2
 revision=1
-build_style=gnu-configure
-hostmakedepends="pkg-config xmlto"
-makedepends="flatpak-devel json-glib-devel libcap-devel libsoup-devel
- libyaml-devel libcurl-devel"
-depends="elfutils"
+build_style=meson
+hostmakedepends="pkg-config xmlto debugedit AppStream-compose"
+makedepends="flatpak-devel json-glib-devel libcap-devel
+ libyaml-devel libcurl-devel libxml2-devel"
+depends="elfutils debugedit AppStream-compose"
 short_desc="Tool to build flatpaks from source"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://github.com/flatpak/flatpak-builder"
 changelog="https://github.com/flatpak/flatpak-builder/raw/main/NEWS"
-distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}.tar.xz"
-checksum=e257825a47f7a3e71e30fb0f80f2d9ac6e4801f746f552dfaf0e564e3ee351c8
-# Tests expects a Debian derivate hosts to build a flatpak container from.
-make_check=no
+#distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}.tar.xz"
+distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}-fixed-libglnx.tar.xz"
+checksum=c041b974e03a2c2d3cda88a0efe1ecf69f9adf42a1758eac341d555e779d0596
+make_check=no # Can't run bubblewrap inside the container
 
-if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" flatpak-devel"
-fi
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	makedepends+=" musl-legacy-compat"
 fi

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] flatpak-builder: update to 1.4.2.
  2024-03-05 12:13 [PR PATCH] flatpak-builder: update to 1.4.2 oreo639
  2024-03-05 12:27 ` [PR PATCH] [Updated] " oreo639
@ 2024-03-05 12:41 ` oreo639
  2024-03-05 12:57 ` oreo639
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: oreo639 @ 2024-03-05 12:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1258 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages flatpak-builder
https://github.com/void-linux/void-packages/pull/49126

flatpak-builder: update to 1.4.2.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/49126.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-flatpak-builder-49126.patch --]
[-- Type: text/x-diff, Size: 31814 bytes --]

From eb57268be62ebfdf37fa5d08de6cae6f222b9ded Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:09:50 -0800
Subject: [PATCH 1/6] AppStream: update to 1.0.2.

---
 common/shlibs                               |  3 +-
 srcpkgs/{AppStream-qt => AppStream-compose} |  0
 srcpkgs/AppStream-qt6                       |  1 +
 srcpkgs/AppStream/template                  | 38 +++++++++++++++------
 4 files changed, 31 insertions(+), 11 deletions(-)
 rename srcpkgs/{AppStream-qt => AppStream-compose} (100%)
 create mode 120000 srcpkgs/AppStream-qt6

diff --git a/common/shlibs b/common/shlibs
index 8958c92d7fe196..f1e55e437bae2f 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2992,7 +2992,8 @@ libliveMedia.so.81 live555-2020.08.11_2
 libgroupsock.so.8 live555-2020.08.11_2
 libUsageEnvironment.so.3 live555-2020.08.11_2
 libBasicUsageEnvironment.so.1 live555-2020.08.11_2
-libappstream.so.4 AppStream-0.12.2_1
+libappstream.so.5 AppStream-1.0.2_1
+libAppStreamQt.so.3 AppStream-qt6-1.0.2_1
 libappstream-glib.so.8 appstream-glib-0.6.13_1
 libappstream-builder.so.8 appstream-glib-0.6.13_1
 libflatpak.so.0 flatpak-0.9.3_2
diff --git a/srcpkgs/AppStream-qt b/srcpkgs/AppStream-compose
similarity index 100%
rename from srcpkgs/AppStream-qt
rename to srcpkgs/AppStream-compose
diff --git a/srcpkgs/AppStream-qt6 b/srcpkgs/AppStream-qt6
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-qt6
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream/template b/srcpkgs/AppStream/template
index 87fbb76d2c9c66..912091c8b193f2 100644
--- a/srcpkgs/AppStream/template
+++ b/srcpkgs/AppStream/template
@@ -1,30 +1,48 @@
 # Template file for 'AppStream'
 pkgname=AppStream
-version=0.16.4
+version=1.0.2
 revision=1
 build_style=meson
 build_helper="gir qemu"
 configure_args="$(vopt_bool gir gir) $(vopt_bool vala vapi)
- -Dstemming=false -Dapidocs=false -Dqt=true -Dsystemd=false"
+ -Dstemming=false -Dapidocs=false -Dqt=true -Dsystemd=false
+ -Dcompose=true"
 hostmakedepends="docbook-xsl gettext glib-devel gperf libxslt pkg-config
- qt5-host-tools $(vopt_if vala vala) itstool"
-makedepends="libglib-devel libxml2-devel libyaml-devel qt5-devel libxmlb-devel
- libcurl-devel"
+ qt6-base $(vopt_if vala vala) itstool"
+makedepends="libglib-devel libxml2-devel libyaml-devel qt6-base-devel libxmlb-devel
+ libcurl-devel librsvg-devel"
+checkdepends="tar"
 short_desc="Tools and libraries to work with AppStream metadata"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://github.com/ximion/appstream"
 changelog="https://raw.githubusercontent.com/ximion/appstream/master/NEWS"
 distfiles="https://github.com/ximion/appstream/archive/v${version}.tar.gz"
-checksum=95d5cf451d1945182a9bc4d597c13e713451a3dba1a5759f45b6b3279ff3774c
-conf_files="/etc/appstream.conf"
+checksum=77e271f47167ae37a68111b951c3c07e4261579e69047747044f7924c8219d14
 triggers="appstream-cache"
 
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" AppStream-devel"
+fi
+
 build_options="gir vala"
 build_options_default="gir vala"
 
+AppStream-compose_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - compose libraries and tools"
+	pkg_install() {
+		vmove usr/libexec/appstreamcli-compose
+		vmove usr/share/man/man1/appstreamcli-compose.1*
+		vmove usr/lib/libappstream-compose.so.*
+		vmove usr/lib/girepository-1.0/AppStreamCompose-1.0.typelib
+		vmove usr/share/metainfo/org.freedesktop.appstream.compose.metainfo.xml
+	}
+}
+
 AppStream-devel_package() {
-	depends="${sourcepkg}>=${version}_${revision} AppStream-qt>=${version}_${revision}"
+	depends="${sourcepkg}>=${version}_${revision} AppStream-qt6>=${version}_${revision}
+	 AppStream-compose>=${version}_${revision}"
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
@@ -40,8 +58,8 @@ AppStream-devel_package() {
 	}
 }
 
-AppStream-qt_package() {
-	short_desc+=" - qt5 interface library"
+AppStream-qt6_package() {
+	short_desc+=" - qt6 interface library"
 	pkg_install() {
 		vmove "usr/lib/libAppStreamQt.so.*"
 	}

From 9e6af18cd2a1b0ee39db061b9aa5046efc120eef Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:10:35 -0800
Subject: [PATCH 2/6] flatpak: rebuild for AppStream 1.0

---
 srcpkgs/flatpak/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/flatpak/template b/srcpkgs/flatpak/template
index 819686057ac9bc..066c3021a335fc 100644
--- a/srcpkgs/flatpak/template
+++ b/srcpkgs/flatpak/template
@@ -1,7 +1,7 @@
 # Template file for 'flatpak'
 pkgname=flatpak
 version=1.15.6
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="

From a3bc11bbf128420f57809447454e941c26b2f361 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:11:53 -0800
Subject: [PATCH 3/6] libadwaita: rebuild for AppStream 1.0

---
 srcpkgs/libadwaita/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libadwaita/template b/srcpkgs/libadwaita/template
index 63e643d8fdd70d..fca2b2a5d5a25e 100644
--- a/srcpkgs/libadwaita/template
+++ b/srcpkgs/libadwaita/template
@@ -1,7 +1,7 @@
 # Template file for 'libadwaita'
 pkgname=libadwaita
 version=1.4.4
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="-Dexamples=true -Dtests=true $(vopt_bool gtk_doc)

From 9ae2f0c42e7de525f548e0ac2083c91ff3780757 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:11:59 -0800
Subject: [PATCH 4/6] gnome-software: update to 45.3.

---
 .../patches/0001-port-to-appstream1.patch     | 504 ++++++++++++++++++
 srcpkgs/gnome-software/template               |   6 +-
 2 files changed, 507 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch

diff --git a/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch b/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch
new file mode 100644
index 00000000000000..256a8509231e5f
--- /dev/null
+++ b/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch
@@ -0,0 +1,504 @@
+See: https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2393
+
+From e6f7e28bdd50a63586ba6a82b936d54db19a311b Mon Sep 17 00:00:00 2001
+From: Matthias Klumpp <matthias@tenstral.net>
+Date: Sun, 8 Oct 2023 20:22:44 +0200
+Subject: [PATCH] Adjust to build with AppStream 1.0 as well as 0.16.x
+
+---
+ lib/gs-app.c                             |  4 ++
+ lib/gs-appstream.c                       | 58 ++++++++++++++++++++----
+ lib/gs-utils.c                           |  8 ++--
+ meson.build                              | 22 +--------
+ plugins/core/gs-plugin-appstream.c       |  8 ----
+ plugins/fwupd/gs-fwupd-app.c             |  8 ++++
+ plugins/fwupd/gs-plugin-fwupd.c          |  4 ++
+ src/gs-hardware-support-context-dialog.c |  6 +++
+ src/gs-repos-dialog.c                    |  4 ++
+ src/gs-screenshot-carousel.c             |  4 +-
+ src/gs-screenshot-image.c                | 41 +++++++++++++----
+ src/gs-screenshot-image.h                |  7 +++
+ subprojects/appstream.wrap               |  2 +-
+ 13 files changed, 120 insertions(+), 56 deletions(-)
+
+diff --git a/lib/gs-app.c b/lib/gs-app.c
+index 048a061225..e2694057cd 100644
+--- a/lib/gs-app.c
++++ b/lib/gs-app.c
+@@ -609,7 +609,11 @@ gs_app_to_string_append (GsApp *app, GString *str)
+ 		AsScreenshot *ss = g_ptr_array_index (priv->screenshots, i);
+ 		g_autofree gchar *key = NULL;
+ 		tmp = as_screenshot_get_caption (ss);
++#if AS_CHECK_VERSION(1, 0, 0)
++		im = as_screenshot_get_image (ss, 0, 0, 1);
++#else
+ 		im = as_screenshot_get_image (ss, 0, 0);
++#endif
+ 		if (im == NULL)
+ 			continue;
+ 		key = g_strdup_printf ("screenshot-%02u", i);
+diff --git a/lib/gs-appstream.c b/lib/gs-appstream.c
+index deca176dcf..2cc2427a19 100644
+--- a/lib/gs-appstream.c
++++ b/lib/gs-appstream.c
+@@ -587,8 +587,6 @@ gs_appstream_refine_add_provides (GsApp *app, XbNode *component, GError **error)
+ 					kind = AS_PROVIDED_KIND_FIRMWARE_RUNTIME;
+ 				else if (g_strcmp0 (fw_type, "flashed") == 0)
+ 					kind = AS_PROVIDED_KIND_FIRMWARE_FLASHED;
+-			} else if (g_strcmp0 (element_name, "python2") == 0) {
+-				kind = AS_PROVIDED_KIND_PYTHON_2;
+ 			} else if (g_strcmp0 (element_name, "python3") == 0) {
+ 				kind = AS_PROVIDED_KIND_PYTHON;
+ 			} else if (g_strcmp0 (element_name, "dbus") == 0) {
+@@ -1011,8 +1011,11 @@ gs_appstream_refine_app_relation (GsApp           *app,
+ 			as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_CONTROL);
+ 			as_relation_set_value_control_kind (relation, as_control_kind_from_string (xb_node_get_text (child)));
+ 		} else if (g_str_equal (item_kind, "display_length")) {
+-			AsDisplayLengthKind display_length_kind;
+ 			const gchar *compare;
++			const gchar *side;
++#if !AS_CHECK_VERSION(1, 0, 0)
++			AsDisplayLengthKind display_length_kind;
++#endif
+ 
+ 			/* https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-relations-display_length */
+ 			as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_DISPLAY_LENGTH);
+@@ -1020,15 +1023,21 @@ gs_appstream_refine_app_relation (GsApp           *app,
+ 			compare = xb_node_get_attr (child, "compare");
+ 			as_relation_set_compare (relation, (compare != NULL) ? as_relation_compare_from_string (compare) : AS_RELATION_COMPARE_GE);
+ 
++#if AS_CHECK_VERSION(1, 0, 0)
++			side = xb_node_get_attr (child, "side");
++			as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
++			as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
++#else
+ 			display_length_kind = as_display_length_kind_from_string (xb_node_get_text (child));
+ 			if (display_length_kind != AS_DISPLAY_LENGTH_KIND_UNKNOWN) {
+ 				/* Ignore the `side` attribute */
+ 				as_relation_set_value_display_length_kind (relation, display_length_kind);
+ 			} else {
+-				const gchar *side = xb_node_get_attr (child, "side");
++				side = xb_node_get_attr (child, "side");
+ 				as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
+ 				as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
+ 			}
++#endif
+ 		} else {
+ 			g_debug ("Relation type ‘%s’ not currently supported for %s; ignoring",
+ 				 item_kind, gs_app_get_id (app));
+@@ -1472,7 +1481,7 @@ gs_appstream_refine_app (GsPlugin *plugin,
+ }
+ 
+ typedef struct {
+-	AsSearchTokenMatch	 match_value;
++	guint16			 match_value;
+ 	XbQuery			*query;
+ } GsAppstreamSearchHelper;
+ 
+@@ -1522,7 +1531,7 @@ gs_appstream_silo_search_component (GPtrArray *array, XbNode *component, const g
+ }
+ 
+ typedef struct {
+-	AsSearchTokenMatch	match_value;
++	guint16			match_value;
+ 	const gchar		*xpath;
+ } Query;
+ 
+@@ -1585,7 +1594,11 @@ gs_appstream_do_search (GsPlugin *plugin,
+ 			 * Drop the ID token from it as it’s the highest
+ 			 * numeric value but isn’t visible to the user in the
+ 			 * UI, which leads to confusing results ordering. */
++#if AS_CHECK_VERSION(1, 0, 0)
++			gs_app_set_match_value (app, match_value & (~as_utils_get_tag_search_weight ("id")));
++#else
+ 			gs_app_set_match_value (app, match_value & (~AS_SEARCH_TOKEN_MATCH_ID));
++#endif
+ 			gs_app_list_add (list, app);
+ 
+ 			if (gs_app_get_kind (app) == AS_COMPONENT_KIND_ADDON) {
+@@ -1624,18 +1637,32 @@ gs_appstream_search (GsPlugin *plugin,
+ 		     GCancellable *cancellable,
+ 		     GError **error)
+ {
++#if AS_CHECK_VERSION(1, 0, 0)
++	guint16 pkgname_weight = as_utils_get_tag_search_weight ("pkgname");
++	guint16 name_weight = as_utils_get_tag_search_weight ("name");
++	guint16 id_weight = as_utils_get_tag_search_weight ("id");
+ 	const Query queries[] = {
+-		#ifdef HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE
+-		{ AS_SEARCH_TOKEN_MATCH_MEDIATYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+-		#else
+-		{ AS_SEARCH_TOKEN_MATCH_MIMETYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+-		#endif
++		{ as_utils_get_tag_search_weight ("mediatype"),	"provides/mediatype[text()~=stem(?)]" },
+ 		/* Search once with a tokenize-and-casefold operator (`~=`) to support casefolded
+ 		 * full-text search, then again using substring matching (`contains()`), to
+ 		 * support prefix matching. Only do the prefix matches on a few fields, and at a
+ 		 * lower priority, otherwise things will get confusing.
+-		 * 
++		 *
+ 		 * See https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2277 */
++		{ pkgname_weight,				"pkgname[text()~=stem(?)]" },
++		{ pkgname_weight / 2,				"pkgname[contains(text(),stem(?))]" },
++		{ as_utils_get_tag_search_weight ("summary"),	"summary[text()~=stem(?)]" },
++		{ name_weight,					"name[text()~=stem(?)]" },
++		{ name_weight / 2,				"name[contains(text(),stem(?))]" },
++		{ as_utils_get_tag_search_weight ("keyword"),	"keywords/keyword[text()~=stem(?)]" },
++		{ id_weight,					"id[text()~=stem(?)]" },
++		{ id_weight,					"launchable[text()~=stem(?)]" },
++		{ as_utils_get_tag_search_weight ("origin"),	"../components[@origin~=stem(?)]" },
++		{ 0,						NULL }
++	};
++#else
++	const Query queries[] = {
++		{ AS_SEARCH_TOKEN_MATCH_MEDIATYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME,	"pkgname[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME / 2,	"pkgname[contains(text(),stem(?))]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_SUMMARY,	"summary[text()~=stem(?)]" },
+@@ -1647,6 +1674,7 @@ gs_appstream_search (GsPlugin *plugin,
+ 		{ AS_SEARCH_TOKEN_MATCH_ORIGIN,		"../components[@origin~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_NONE,		NULL }
+ 	};
++#endif
+ 
+ 	return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
+ }
+@@ -1659,11 +1687,21 @@ gs_appstream_search_developer_apps (GsPlugin *plugin,
+ 				    GCancellable *cancellable,
+ 				    GError **error)
+ {
++#if AS_CHECK_VERSION(1, 0, 0)
++	const Query queries[] = {
++		{ as_utils_get_tag_search_weight ("pkgname"), "developer/name[text()~=stem(?)]" },
++		{ as_utils_get_tag_search_weight ("summary"), "project_group[text()~=stem(?)]" },
++		/* for legacy support */
++		{ as_utils_get_tag_search_weight ("pkgname"), "developer_name[text()~=stem(?)]" },
++		{ 0,					      NULL }
++	};
++#else
+ 	const Query queries[] = {
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME,	"developer_name[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_SUMMARY,	"project_group[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_NONE,		NULL }
+ 	};
++#endif
+ 
+ 	return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
+ }
+diff --git a/lib/gs-utils.c b/lib/gs-utils.c
+index cf9073025f..19e6ebd046 100644
+--- a/lib/gs-utils.c
++++ b/lib/gs-utils.c
+@@ -1694,9 +1694,9 @@ gs_utils_gstring_replace (GString *str,
+ 			  const gchar *find,
+ 			  const gchar *replace)
+ {
+-	#ifdef HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS
++#if AS_CHECK_VERSION(1, 0, 0)
+ 	as_gstring_replace (str, find, replace, 0);
+-	#else
+-	as_gstring_replace (str, find, replace);
+-	#endif
++#else
++	as_gstring_replace2 (str, find, replace, 0);
++#endif
+ }
+diff --git a/meson.build b/meson.build
+index 09c39df180..ad105869e5 100644
+--- a/meson.build
++++ b/meson.build
+@@ -113,7 +113,7 @@ add_project_arguments('-D_GNU_SOURCE', language : 'c')
+ conf.set('HAVE_LINUX_UNISTD_H', cc.has_header('linux/unistd.h'))
+ 
+ appstream = dependency('appstream',
+-  version : '>= 0.14.0',
++  version : '>= 0.16.2',
+   fallback : ['appstream', 'appstream_dep'],
+   default_options : [
+     'docs=false',
+@@ -121,26 +121,6 @@ appstream = dependency('appstream',
+     'install-docs=false'
+   ]
+ )
+-if appstream.type_name() == 'internal'
+-else
+-  if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_SEARCH_TOKEN_MATCH_MEDIATYPE', dependencies: appstream)
+-    conf.set('HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE', '1')
+-  endif
+-  if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_FORMAT_STYLE_CATALOG', dependencies: appstream)
+-    conf.set('HAVE_AS_FORMAT_STYLE_CATALOG', '1')
+-  endif
+-  if meson.get_compiler('c').has_function('as_metadata_components_to_catalog', prefix: '#include <appstream.h>', dependencies: appstream)
+-    conf.set('HAVE_AS_METADATA_COMPONENTS_TO_CATALOG', '1')
+-  endif
+-  if meson.get_compiler('c').links('''#include <appstream.h>
+-      int main (void)
+-      {
+-         as_gstring_replace (NULL, "a", "b", 0);
+-         return 0;
+-      }''', name: 'as_gstring_replace() has four arguments', dependencies: appstream)
+-    conf.set('HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS', '1')
+-  endif
+-endif
+ 
+ gdk_pixbuf = dependency('gdk-pixbuf-2.0', version : '>= 2.32.0')
+ libxmlb = dependency('xmlb', version : '>= 0.1.7', fallback : ['libxmlb', 'libxmlb_dep'])
+diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c
+index cf9f3022b1..ef3226a591 100644
+--- a/plugins/core/gs-plugin-appstream.c
++++ b/plugins/core/gs-plugin-appstream.c
+@@ -414,11 +414,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
+ 	if (bytes == NULL)
+ 		return NULL;
+ 
+-	#ifdef HAVE_AS_FORMAT_STYLE_CATALOG
+ 	as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_CATALOG);
+-	#else
+-	as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_COLLECTION);
+-	#endif
+ 	as_metadata_parse_bytes (mdata,
+ 				 bytes,
+ 				 AS_FORMAT_KIND_YAML,
+@@ -428,11 +424,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
+ 		return NULL;
+ 	}
+ 
+-	#ifdef HAVE_AS_METADATA_COMPONENTS_TO_CATALOG
+ 	xml = as_metadata_components_to_catalog (mdata, AS_FORMAT_KIND_XML, &tmp_error);
+-	#else
+-	xml = as_metadata_components_to_collection (mdata, AS_FORMAT_KIND_XML, &tmp_error);
+-	#endif
+ 	if (xml == NULL) {
+ 		// This API currently returns NULL if there is nothing to serialize, so we
+ 		// have to test if this is an error or not.
+diff --git a/plugins/fwupd/gs-fwupd-app.c b/plugins/fwupd/gs-fwupd-app.c
+index 6dcda6ee92..5d3254da59 100644
+--- a/plugins/fwupd/gs-fwupd-app.c
++++ b/plugins/fwupd/gs-fwupd-app.c
+@@ -164,7 +164,11 @@ gs_fwupd_app_set_from_device (GsApp *app,
+ 		gs_app_set_install_date (app, fwupd_device_get_created (dev));
+ 	if (fwupd_device_get_description (dev) != NULL) {
+ 		g_autofree gchar *tmp = NULL;
++#if AS_CHECK_VERSION(1, 0, 0)
++		tmp = as_markup_convert (fwupd_device_get_description (dev), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 		tmp = as_markup_convert_simple (fwupd_device_get_description (dev), NULL);
++#endif
+ 		if (tmp != NULL)
+ 			gs_app_set_description (app, GS_APP_QUALITY_NORMAL, tmp);
+ 	}
+@@ -402,7 +406,11 @@ gs_fwupd_app_set_from_release (GsApp *app, FwupdRelease *rel)
+ 	}
+ 	if (fwupd_release_get_description (rel) != NULL) {
+ 		g_autofree gchar *tmp = NULL;
++#if AS_CHECK_VERSION(1, 0, 0)
++		tmp = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 		tmp = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
++#endif
+ 		if (tmp != NULL)
+ 			gs_app_set_update_details_text (app, tmp);
+ 	}
+diff --git a/plugins/fwupd/gs-plugin-fwupd.c b/plugins/fwupd/gs-plugin-fwupd.c
+index e931b2b6db..0747d6e250 100644
+--- a/plugins/fwupd/gs-plugin-fwupd.c
++++ b/plugins/fwupd/gs-plugin-fwupd.c
+@@ -726,7 +726,11 @@ gs_plugin_add_updates (GsPlugin *plugin,
+ 				g_autofree gchar *desc = NULL;
+ 				if (fwupd_release_get_description (rel) == NULL)
+ 					continue;
++#if AS_CHECK_VERSION(1, 0, 0)
++				desc = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 				desc = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
++#endif
+ 				if (desc == NULL)
+ 					continue;
+ 				g_string_append_printf (update_desc,
+diff --git a/src/gs-hardware-support-context-dialog.c b/src/gs-hardware-support-context-dialog.c
+index 0e48c8c266..14653401de 100644
+--- a/src/gs-hardware-support-context-dialog.c
++++ b/src/gs-hardware-support-context-dialog.c
+@@ -461,6 +461,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 			AsRelationCompare comparator = as_relation_get_compare (relation);
+ 			Range current_display_comparand, relation_comparand;
+ 
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 			/* From https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-requires-recommends-display_length */
+ 			Range display_lengths[] = {
+ 				[AS_DISPLAY_LENGTH_KIND_XSMALL] = { 0, 360 },
+@@ -469,6 +470,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 				[AS_DISPLAY_LENGTH_KIND_LARGE] = { 1024, 3840 },
+ 				[AS_DISPLAY_LENGTH_KIND_XLARGE] = { 3840, G_MAXUINT },
+ 			};
++#endif
+ 
+ 			any_display_relations_set = TRUE;
+ 
+@@ -485,11 +487,14 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 			case AS_DISPLAY_SIDE_KIND_LAST:
+ 			default:
+ 				current_display_comparand.min = current_display_comparand.max = MAX (current_screen_size.width, current_screen_size.height);
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 				relation_comparand.min = display_lengths[as_relation_get_value_display_length_kind (relation)].min;
+ 				relation_comparand.max = display_lengths[as_relation_get_value_display_length_kind (relation)].max;
++#endif
+ 				break;
+ 			}
+ 
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 			if (evaluate_display_comparison (display_lengths[AS_DISPLAY_LENGTH_KIND_SMALL], comparator, relation_comparand)) {
+ 				*mobile_relation_kind_out = max_relation_kind (*mobile_relation_kind_out, as_relation_get_kind (relation));
+ 				*mobile_match_out = TRUE;
+@@ -499,6 +504,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 				*desktop_relation_kind_out = max_relation_kind (*desktop_relation_kind_out, as_relation_get_kind (relation));
+ 				*desktop_match_out = TRUE;
+ 			}
++#endif
+ 
+ 			if (evaluate_display_comparison (current_display_comparand, comparator, relation_comparand)) {
+ 				*current_relation_kind_out = max_relation_kind (*current_relation_kind_out, as_relation_get_kind (relation));
+diff --git a/src/gs-repos-dialog.c b/src/gs-repos-dialog.c
+index c41c4944a1..7dac0416d9 100644
+--- a/src/gs-repos-dialog.c
++++ b/src/gs-repos-dialog.c
+@@ -154,7 +154,11 @@ enable_repo (GsReposDialog *dialog,
+ 		g_autoptr(GError) error = NULL;
+ 
+ 		/* convert from AppStream markup */
++#if AS_CHECK_VERSION(1, 0, 0)
++		message = as_markup_convert (gs_app_get_agreement (repo), AS_MARKUP_KIND_TEXT, &error);
++#else
+ 		message = as_markup_convert_simple (gs_app_get_agreement (repo), &error);
++#endif
+ 		if (message == NULL) {
+ 			/* failed, so just try and show the original markup */
+ 			message = g_strdup (gs_app_get_agreement (repo));
+diff --git a/src/gs-screenshot-carousel.c b/src/gs-screenshot-carousel.c
+index 04bbf86a1e..d269af6605 100644
+--- a/src/gs-screenshot-carousel.c
++++ b/src/gs-screenshot-carousel.c
+@@ -141,8 +141,8 @@ gs_screenshot_carousel_load_screenshots (GsScreenshotCarousel *self, GsApp *app,
+ 		gtk_widget_set_can_focus (gtk_widget_get_first_child (ssimg), FALSE);
+ 		gs_screenshot_image_set_screenshot (GS_SCREENSHOT_IMAGE (ssimg), ss);
+ 		gs_screenshot_image_set_size (GS_SCREENSHOT_IMAGE (ssimg),
+-					      AS_IMAGE_NORMAL_WIDTH,
+-					      AS_IMAGE_NORMAL_HEIGHT);
++					      GS_IMAGE_NORMAL_WIDTH,
++					      GS_IMAGE_NORMAL_HEIGHT);
+ 		gtk_widget_add_css_class (ssimg, "screenshot-image-main");
+ 		gs_screenshot_image_load_async (GS_SCREENSHOT_IMAGE (ssimg), cancellable);
+ 
+diff --git a/src/gs-screenshot-image.c b/src/gs-screenshot-image.c
+index c313a2589f..b24083b387 100644
+--- a/src/gs-screenshot-image.c
++++ b/src/gs-screenshot-image.c
+@@ -284,13 +284,13 @@ gs_screenshot_image_save_downloaded_img (GsScreenshotImage *ssimg,
+ 	if (images->len > 1)
+ 		return TRUE;
+ 
+-	if (width == AS_IMAGE_THUMBNAIL_WIDTH &&
+-	    height == AS_IMAGE_THUMBNAIL_HEIGHT) {
+-		width = AS_IMAGE_NORMAL_WIDTH;
+-		height = AS_IMAGE_NORMAL_HEIGHT;
++	if (width == GS_IMAGE_THUMBNAIL_WIDTH &&
++	    height == GS_IMAGE_THUMBNAIL_HEIGHT) {
++		width = GS_IMAGE_NORMAL_WIDTH;
++		height = GS_IMAGE_NORMAL_HEIGHT;
+ 	} else {
+-		width = AS_IMAGE_THUMBNAIL_WIDTH;
+-		height = AS_IMAGE_THUMBNAIL_HEIGHT;
++		width = GS_IMAGE_THUMBNAIL_WIDTH;
++		height = GS_IMAGE_THUMBNAIL_HEIGHT;
+ 	}
+ 
+ 	width *= ssimg->scale;
+@@ -582,16 +582,30 @@ gs_screenshot_image_get_url (GsScreenshotImage *ssimg)
+ 	} else if (as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE) {
+ 		AsImage *im;
+ 
++#if AS_CHECK_VERSION(1, 0, 0)
++		im = as_screenshot_get_image (ssimg->screenshot,
++					      ssimg->width,
++					      ssimg->height,
++					      ssimg->scale);
++#else
+ 		im = as_screenshot_get_image (ssimg->screenshot,
+ 					      ssimg->width * ssimg->scale,
+ 					      ssimg->height * ssimg->scale);
++#endif
+ 
+ 		/* if we've failed to load a HiDPI image, fallback to LoDPI */
+ 		if (im == NULL && ssimg->scale > 1) {
+ 			ssimg->scale = 1;
++#if AS_CHECK_VERSION(1, 0, 0)
++			im = as_screenshot_get_image (ssimg->screenshot,
++						      ssimg->width,
++						      ssimg->height,
++						      1);
++#else
+ 			im = as_screenshot_get_image (ssimg->screenshot,
+ 						      ssimg->width,
+ 						      ssimg->height);
++#endif
+ 		}
+ 
+ 		if (im)
+@@ -698,15 +712,22 @@ gs_screenshot_image_load_async (GsScreenshotImage *ssimg,
+ 	 * smaller version of it straight away */
+ 	if (!ssimg->showing_image &&
+ 	    as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE &&
+-	    ssimg->width > AS_IMAGE_THUMBNAIL_WIDTH &&
+-	    ssimg->height > AS_IMAGE_THUMBNAIL_HEIGHT) {
++	    ssimg->width > GS_IMAGE_THUMBNAIL_WIDTH &&
++	    ssimg->height > GS_IMAGE_THUMBNAIL_HEIGHT) {
+ 		const gchar *url_thumb;
+ 		g_autofree gchar *basename_thumb = NULL;
+ 		g_autofree gchar *cache_kind_thumb = NULL;
+ 		AsImage *im;
++#if AS_CHECK_VERSION(1, 0, 0)
+ 		im = as_screenshot_get_image (ssimg->screenshot,
+-					      AS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
+-					      AS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
++					      GS_IMAGE_THUMBNAIL_WIDTH,
++					      GS_IMAGE_THUMBNAIL_HEIGHT,
++					      ssimg->scale);
++#else
++		im = as_screenshot_get_image (ssimg->screenshot,
++					      GS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
++					      GS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
++#endif
+ 		url_thumb = as_image_get_url (im);
+ 		basename_thumb = gs_screenshot_get_cachefn_for_url (url_thumb);
+ 		cache_kind_thumb = g_build_filename ("screenshots", "112x63", NULL);
+diff --git a/src/gs-screenshot-image.h b/src/gs-screenshot-image.h
+index 1f6cf81ce6..6e45f5d20a 100644
+--- a/src/gs-screenshot-image.h
++++ b/src/gs-screenshot-image.h
+@@ -21,6 +21,13 @@ G_BEGIN_DECLS
+ 
+ G_DECLARE_FINAL_TYPE (GsScreenshotImage, gs_screenshot_image, GS, SCREENSHOT_IMAGE, GtkWidget)
+ 
++#define GS_IMAGE_LARGE_HEIGHT		423
++#define GS_IMAGE_LARGE_WIDTH		752
++#define GS_IMAGE_NORMAL_HEIGHT		351
++#define GS_IMAGE_NORMAL_WIDTH		624
++#define GS_IMAGE_THUMBNAIL_HEIGHT	63
++#define GS_IMAGE_THUMBNAIL_WIDTH 	112
++
+ GtkWidget	*gs_screenshot_image_new		(SoupSession		*session);
+ 
+ AsScreenshot	*gs_screenshot_image_get_screenshot	(GsScreenshotImage	*ssimg);
+diff --git a/subprojects/appstream.wrap b/subprojects/appstream.wrap
+index 6f0beb0cbc..5763a32c64 100644
+--- a/subprojects/appstream.wrap
++++ b/subprojects/appstream.wrap
+@@ -1,5 +1,5 @@
+ [wrap-git]
+ directory = appstream
+ url = https://github.com/ximion/appstream.git
+-revision = v0.14.1
++revision = v0.16.3
+ depth = 1
+-- 
+GitLab
diff --git a/srcpkgs/gnome-software/template b/srcpkgs/gnome-software/template
index c5394ce2105091..70a2dfb664394d 100644
--- a/srcpkgs/gnome-software/template
+++ b/srcpkgs/gnome-software/template
@@ -1,6 +1,6 @@
 # Template file for 'gnome-software'
 pkgname=gnome-software
-version=44.2
+version=45.3
 revision=1
 build_style=meson
 configure_args="-Dpackagekit=false -Dfwupd=false
@@ -18,8 +18,8 @@ license="GPL-3.0-or-later"
 homepage="https://gitlab.gnome.org/GNOME/gnome-software"
 changelog="https://gitlab.gnome.org/GNOME/gnome-software/-/raw/main/NEWS"
 distfiles="https://gitlab.gnome.org/GNOME/gnome-software/-/archive/${version}/gnome-software-${version}.tar.gz"
-checksum=bedfe8652d2ceaf17eccc57d6befe6d95f09d15e486a58f0bb7a9a868d0bacc0
-make_check=no # FIXME
+checksum=be2f64e894e653924411981d952fb694559687010985b53ccd325dee0d6a6b83
+make_check=no # Requires system dbus
 
 build_options="gtk_doc"
 

From 31c4c5f6512d2100b3541b8e8e04bc215a86b184 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 04:41:38 -0800
Subject: [PATCH 5/6] New package: debugedit-5.0

---
 srcpkgs/debugedit/template | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 srcpkgs/debugedit/template

diff --git a/srcpkgs/debugedit/template b/srcpkgs/debugedit/template
new file mode 100644
index 00000000000000..af0210d6a448c6
--- /dev/null
+++ b/srcpkgs/debugedit/template
@@ -0,0 +1,13 @@
+# Template file for 'debugedit'
+pkgname=debugedit
+version=5.0
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config"
+makedepends="elfutils-devel"
+short_desc="Tools for debuginfo creation"
+maintainer="oreo639 <oreo6391@gmail.com>"
+license="GPL-2.0-or-later"
+homepage="https://sourceware.org/debugedit/"
+distfiles="https://sourceware.org/pub/debugedit/${version%%.*}.0/debugedit-${version}.tar.xz"
+checksum=e9ecd7d350bebae1f178ce6776ca19a648b6fe8fa22f5b3044b38d7899aa553e

From 043272463d428536e6fa959a5481e5dce331dd7d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:12:25 -0800
Subject: [PATCH 6/6] flatpak-builder: update to 1.4.2.

---
 srcpkgs/flatpak-builder/template | 23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)

diff --git a/srcpkgs/flatpak-builder/template b/srcpkgs/flatpak-builder/template
index fe3485b0d89568..434a316316e77b 100644
--- a/srcpkgs/flatpak-builder/template
+++ b/srcpkgs/flatpak-builder/template
@@ -1,25 +1,22 @@
 # Template file for 'flatpak-builder'
 pkgname=flatpak-builder
-version=1.2.3
+version=1.4.2
 revision=1
-build_style=gnu-configure
-hostmakedepends="pkg-config xmlto"
-makedepends="flatpak-devel json-glib-devel libcap-devel libsoup-devel
- libyaml-devel libcurl-devel"
-depends="elfutils"
+build_style=meson
+hostmakedepends="pkg-config xmlto debugedit AppStream-compose"
+makedepends="flatpak-devel json-glib-devel libcap-devel
+ libyaml-devel libcurl-devel libxml2-devel"
+depends="elfutils debugedit AppStream-compose"
 short_desc="Tool to build flatpaks from source"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://github.com/flatpak/flatpak-builder"
 changelog="https://github.com/flatpak/flatpak-builder/raw/main/NEWS"
-distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}.tar.xz"
-checksum=e257825a47f7a3e71e30fb0f80f2d9ac6e4801f746f552dfaf0e564e3ee351c8
-# Tests expects a Debian derivate hosts to build a flatpak container from.
-make_check=no
+#distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}.tar.xz"
+distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}-fixed-libglnx.tar.xz"
+checksum=c041b974e03a2c2d3cda88a0efe1ecf69f9adf42a1758eac341d555e779d0596
+make_check=no # Can't run bubblewrap inside the container
 
-if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" flatpak-devel"
-fi
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	makedepends+=" musl-legacy-compat"
 fi

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] flatpak-builder: update to 1.4.2.
  2024-03-05 12:13 [PR PATCH] flatpak-builder: update to 1.4.2 oreo639
  2024-03-05 12:27 ` [PR PATCH] [Updated] " oreo639
  2024-03-05 12:41 ` oreo639
@ 2024-03-05 12:57 ` oreo639
  2024-03-05 12:59 ` oreo639
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: oreo639 @ 2024-03-05 12:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1258 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages flatpak-builder
https://github.com/void-linux/void-packages/pull/49126

flatpak-builder: update to 1.4.2.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/49126.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-flatpak-builder-49126.patch --]
[-- Type: text/x-diff, Size: 31880 bytes --]

From eb57268be62ebfdf37fa5d08de6cae6f222b9ded Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:09:50 -0800
Subject: [PATCH 1/6] AppStream: update to 1.0.2.

---
 common/shlibs                               |  3 +-
 srcpkgs/{AppStream-qt => AppStream-compose} |  0
 srcpkgs/AppStream-qt6                       |  1 +
 srcpkgs/AppStream/template                  | 38 +++++++++++++++------
 4 files changed, 31 insertions(+), 11 deletions(-)
 rename srcpkgs/{AppStream-qt => AppStream-compose} (100%)
 create mode 120000 srcpkgs/AppStream-qt6

diff --git a/common/shlibs b/common/shlibs
index 8958c92d7fe196..f1e55e437bae2f 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2992,7 +2992,8 @@ libliveMedia.so.81 live555-2020.08.11_2
 libgroupsock.so.8 live555-2020.08.11_2
 libUsageEnvironment.so.3 live555-2020.08.11_2
 libBasicUsageEnvironment.so.1 live555-2020.08.11_2
-libappstream.so.4 AppStream-0.12.2_1
+libappstream.so.5 AppStream-1.0.2_1
+libAppStreamQt.so.3 AppStream-qt6-1.0.2_1
 libappstream-glib.so.8 appstream-glib-0.6.13_1
 libappstream-builder.so.8 appstream-glib-0.6.13_1
 libflatpak.so.0 flatpak-0.9.3_2
diff --git a/srcpkgs/AppStream-qt b/srcpkgs/AppStream-compose
similarity index 100%
rename from srcpkgs/AppStream-qt
rename to srcpkgs/AppStream-compose
diff --git a/srcpkgs/AppStream-qt6 b/srcpkgs/AppStream-qt6
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-qt6
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream/template b/srcpkgs/AppStream/template
index 87fbb76d2c9c66..912091c8b193f2 100644
--- a/srcpkgs/AppStream/template
+++ b/srcpkgs/AppStream/template
@@ -1,30 +1,48 @@
 # Template file for 'AppStream'
 pkgname=AppStream
-version=0.16.4
+version=1.0.2
 revision=1
 build_style=meson
 build_helper="gir qemu"
 configure_args="$(vopt_bool gir gir) $(vopt_bool vala vapi)
- -Dstemming=false -Dapidocs=false -Dqt=true -Dsystemd=false"
+ -Dstemming=false -Dapidocs=false -Dqt=true -Dsystemd=false
+ -Dcompose=true"
 hostmakedepends="docbook-xsl gettext glib-devel gperf libxslt pkg-config
- qt5-host-tools $(vopt_if vala vala) itstool"
-makedepends="libglib-devel libxml2-devel libyaml-devel qt5-devel libxmlb-devel
- libcurl-devel"
+ qt6-base $(vopt_if vala vala) itstool"
+makedepends="libglib-devel libxml2-devel libyaml-devel qt6-base-devel libxmlb-devel
+ libcurl-devel librsvg-devel"
+checkdepends="tar"
 short_desc="Tools and libraries to work with AppStream metadata"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://github.com/ximion/appstream"
 changelog="https://raw.githubusercontent.com/ximion/appstream/master/NEWS"
 distfiles="https://github.com/ximion/appstream/archive/v${version}.tar.gz"
-checksum=95d5cf451d1945182a9bc4d597c13e713451a3dba1a5759f45b6b3279ff3774c
-conf_files="/etc/appstream.conf"
+checksum=77e271f47167ae37a68111b951c3c07e4261579e69047747044f7924c8219d14
 triggers="appstream-cache"
 
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" AppStream-devel"
+fi
+
 build_options="gir vala"
 build_options_default="gir vala"
 
+AppStream-compose_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - compose libraries and tools"
+	pkg_install() {
+		vmove usr/libexec/appstreamcli-compose
+		vmove usr/share/man/man1/appstreamcli-compose.1*
+		vmove usr/lib/libappstream-compose.so.*
+		vmove usr/lib/girepository-1.0/AppStreamCompose-1.0.typelib
+		vmove usr/share/metainfo/org.freedesktop.appstream.compose.metainfo.xml
+	}
+}
+
 AppStream-devel_package() {
-	depends="${sourcepkg}>=${version}_${revision} AppStream-qt>=${version}_${revision}"
+	depends="${sourcepkg}>=${version}_${revision} AppStream-qt6>=${version}_${revision}
+	 AppStream-compose>=${version}_${revision}"
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
@@ -40,8 +58,8 @@ AppStream-devel_package() {
 	}
 }
 
-AppStream-qt_package() {
-	short_desc+=" - qt5 interface library"
+AppStream-qt6_package() {
+	short_desc+=" - qt6 interface library"
 	pkg_install() {
 		vmove "usr/lib/libAppStreamQt.so.*"
 	}

From 9e6af18cd2a1b0ee39db061b9aa5046efc120eef Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:10:35 -0800
Subject: [PATCH 2/6] flatpak: rebuild for AppStream 1.0

---
 srcpkgs/flatpak/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/flatpak/template b/srcpkgs/flatpak/template
index 819686057ac9bc..066c3021a335fc 100644
--- a/srcpkgs/flatpak/template
+++ b/srcpkgs/flatpak/template
@@ -1,7 +1,7 @@
 # Template file for 'flatpak'
 pkgname=flatpak
 version=1.15.6
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="

From a3bc11bbf128420f57809447454e941c26b2f361 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:11:53 -0800
Subject: [PATCH 3/6] libadwaita: rebuild for AppStream 1.0

---
 srcpkgs/libadwaita/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libadwaita/template b/srcpkgs/libadwaita/template
index 63e643d8fdd70d..fca2b2a5d5a25e 100644
--- a/srcpkgs/libadwaita/template
+++ b/srcpkgs/libadwaita/template
@@ -1,7 +1,7 @@
 # Template file for 'libadwaita'
 pkgname=libadwaita
 version=1.4.4
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="-Dexamples=true -Dtests=true $(vopt_bool gtk_doc)

From 9ae2f0c42e7de525f548e0ac2083c91ff3780757 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:11:59 -0800
Subject: [PATCH 4/6] gnome-software: update to 45.3.

---
 .../patches/0001-port-to-appstream1.patch     | 504 ++++++++++++++++++
 srcpkgs/gnome-software/template               |   6 +-
 2 files changed, 507 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch

diff --git a/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch b/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch
new file mode 100644
index 00000000000000..256a8509231e5f
--- /dev/null
+++ b/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch
@@ -0,0 +1,504 @@
+See: https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2393
+
+From e6f7e28bdd50a63586ba6a82b936d54db19a311b Mon Sep 17 00:00:00 2001
+From: Matthias Klumpp <matthias@tenstral.net>
+Date: Sun, 8 Oct 2023 20:22:44 +0200
+Subject: [PATCH] Adjust to build with AppStream 1.0 as well as 0.16.x
+
+---
+ lib/gs-app.c                             |  4 ++
+ lib/gs-appstream.c                       | 58 ++++++++++++++++++++----
+ lib/gs-utils.c                           |  8 ++--
+ meson.build                              | 22 +--------
+ plugins/core/gs-plugin-appstream.c       |  8 ----
+ plugins/fwupd/gs-fwupd-app.c             |  8 ++++
+ plugins/fwupd/gs-plugin-fwupd.c          |  4 ++
+ src/gs-hardware-support-context-dialog.c |  6 +++
+ src/gs-repos-dialog.c                    |  4 ++
+ src/gs-screenshot-carousel.c             |  4 +-
+ src/gs-screenshot-image.c                | 41 +++++++++++++----
+ src/gs-screenshot-image.h                |  7 +++
+ subprojects/appstream.wrap               |  2 +-
+ 13 files changed, 120 insertions(+), 56 deletions(-)
+
+diff --git a/lib/gs-app.c b/lib/gs-app.c
+index 048a061225..e2694057cd 100644
+--- a/lib/gs-app.c
++++ b/lib/gs-app.c
+@@ -609,7 +609,11 @@ gs_app_to_string_append (GsApp *app, GString *str)
+ 		AsScreenshot *ss = g_ptr_array_index (priv->screenshots, i);
+ 		g_autofree gchar *key = NULL;
+ 		tmp = as_screenshot_get_caption (ss);
++#if AS_CHECK_VERSION(1, 0, 0)
++		im = as_screenshot_get_image (ss, 0, 0, 1);
++#else
+ 		im = as_screenshot_get_image (ss, 0, 0);
++#endif
+ 		if (im == NULL)
+ 			continue;
+ 		key = g_strdup_printf ("screenshot-%02u", i);
+diff --git a/lib/gs-appstream.c b/lib/gs-appstream.c
+index deca176dcf..2cc2427a19 100644
+--- a/lib/gs-appstream.c
++++ b/lib/gs-appstream.c
+@@ -587,8 +587,6 @@ gs_appstream_refine_add_provides (GsApp *app, XbNode *component, GError **error)
+ 					kind = AS_PROVIDED_KIND_FIRMWARE_RUNTIME;
+ 				else if (g_strcmp0 (fw_type, "flashed") == 0)
+ 					kind = AS_PROVIDED_KIND_FIRMWARE_FLASHED;
+-			} else if (g_strcmp0 (element_name, "python2") == 0) {
+-				kind = AS_PROVIDED_KIND_PYTHON_2;
+ 			} else if (g_strcmp0 (element_name, "python3") == 0) {
+ 				kind = AS_PROVIDED_KIND_PYTHON;
+ 			} else if (g_strcmp0 (element_name, "dbus") == 0) {
+@@ -1011,8 +1011,11 @@ gs_appstream_refine_app_relation (GsApp           *app,
+ 			as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_CONTROL);
+ 			as_relation_set_value_control_kind (relation, as_control_kind_from_string (xb_node_get_text (child)));
+ 		} else if (g_str_equal (item_kind, "display_length")) {
+-			AsDisplayLengthKind display_length_kind;
+ 			const gchar *compare;
++			const gchar *side;
++#if !AS_CHECK_VERSION(1, 0, 0)
++			AsDisplayLengthKind display_length_kind;
++#endif
+ 
+ 			/* https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-relations-display_length */
+ 			as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_DISPLAY_LENGTH);
+@@ -1020,15 +1023,21 @@ gs_appstream_refine_app_relation (GsApp           *app,
+ 			compare = xb_node_get_attr (child, "compare");
+ 			as_relation_set_compare (relation, (compare != NULL) ? as_relation_compare_from_string (compare) : AS_RELATION_COMPARE_GE);
+ 
++#if AS_CHECK_VERSION(1, 0, 0)
++			side = xb_node_get_attr (child, "side");
++			as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
++			as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
++#else
+ 			display_length_kind = as_display_length_kind_from_string (xb_node_get_text (child));
+ 			if (display_length_kind != AS_DISPLAY_LENGTH_KIND_UNKNOWN) {
+ 				/* Ignore the `side` attribute */
+ 				as_relation_set_value_display_length_kind (relation, display_length_kind);
+ 			} else {
+-				const gchar *side = xb_node_get_attr (child, "side");
++				side = xb_node_get_attr (child, "side");
+ 				as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
+ 				as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
+ 			}
++#endif
+ 		} else {
+ 			g_debug ("Relation type ‘%s’ not currently supported for %s; ignoring",
+ 				 item_kind, gs_app_get_id (app));
+@@ -1472,7 +1481,7 @@ gs_appstream_refine_app (GsPlugin *plugin,
+ }
+ 
+ typedef struct {
+-	AsSearchTokenMatch	 match_value;
++	guint16			 match_value;
+ 	XbQuery			*query;
+ } GsAppstreamSearchHelper;
+ 
+@@ -1522,7 +1531,7 @@ gs_appstream_silo_search_component (GPtrArray *array, XbNode *component, const g
+ }
+ 
+ typedef struct {
+-	AsSearchTokenMatch	match_value;
++	guint16			match_value;
+ 	const gchar		*xpath;
+ } Query;
+ 
+@@ -1585,7 +1594,11 @@ gs_appstream_do_search (GsPlugin *plugin,
+ 			 * Drop the ID token from it as it’s the highest
+ 			 * numeric value but isn’t visible to the user in the
+ 			 * UI, which leads to confusing results ordering. */
++#if AS_CHECK_VERSION(1, 0, 0)
++			gs_app_set_match_value (app, match_value & (~as_utils_get_tag_search_weight ("id")));
++#else
+ 			gs_app_set_match_value (app, match_value & (~AS_SEARCH_TOKEN_MATCH_ID));
++#endif
+ 			gs_app_list_add (list, app);
+ 
+ 			if (gs_app_get_kind (app) == AS_COMPONENT_KIND_ADDON) {
+@@ -1624,18 +1637,32 @@ gs_appstream_search (GsPlugin *plugin,
+ 		     GCancellable *cancellable,
+ 		     GError **error)
+ {
++#if AS_CHECK_VERSION(1, 0, 0)
++	guint16 pkgname_weight = as_utils_get_tag_search_weight ("pkgname");
++	guint16 name_weight = as_utils_get_tag_search_weight ("name");
++	guint16 id_weight = as_utils_get_tag_search_weight ("id");
+ 	const Query queries[] = {
+-		#ifdef HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE
+-		{ AS_SEARCH_TOKEN_MATCH_MEDIATYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+-		#else
+-		{ AS_SEARCH_TOKEN_MATCH_MIMETYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+-		#endif
++		{ as_utils_get_tag_search_weight ("mediatype"),	"provides/mediatype[text()~=stem(?)]" },
+ 		/* Search once with a tokenize-and-casefold operator (`~=`) to support casefolded
+ 		 * full-text search, then again using substring matching (`contains()`), to
+ 		 * support prefix matching. Only do the prefix matches on a few fields, and at a
+ 		 * lower priority, otherwise things will get confusing.
+-		 * 
++		 *
+ 		 * See https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2277 */
++		{ pkgname_weight,				"pkgname[text()~=stem(?)]" },
++		{ pkgname_weight / 2,				"pkgname[contains(text(),stem(?))]" },
++		{ as_utils_get_tag_search_weight ("summary"),	"summary[text()~=stem(?)]" },
++		{ name_weight,					"name[text()~=stem(?)]" },
++		{ name_weight / 2,				"name[contains(text(),stem(?))]" },
++		{ as_utils_get_tag_search_weight ("keyword"),	"keywords/keyword[text()~=stem(?)]" },
++		{ id_weight,					"id[text()~=stem(?)]" },
++		{ id_weight,					"launchable[text()~=stem(?)]" },
++		{ as_utils_get_tag_search_weight ("origin"),	"../components[@origin~=stem(?)]" },
++		{ 0,						NULL }
++	};
++#else
++	const Query queries[] = {
++		{ AS_SEARCH_TOKEN_MATCH_MEDIATYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME,	"pkgname[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME / 2,	"pkgname[contains(text(),stem(?))]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_SUMMARY,	"summary[text()~=stem(?)]" },
+@@ -1647,6 +1674,7 @@ gs_appstream_search (GsPlugin *plugin,
+ 		{ AS_SEARCH_TOKEN_MATCH_ORIGIN,		"../components[@origin~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_NONE,		NULL }
+ 	};
++#endif
+ 
+ 	return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
+ }
+@@ -1659,11 +1687,21 @@ gs_appstream_search_developer_apps (GsPlugin *plugin,
+ 				    GCancellable *cancellable,
+ 				    GError **error)
+ {
++#if AS_CHECK_VERSION(1, 0, 0)
++	const Query queries[] = {
++		{ as_utils_get_tag_search_weight ("pkgname"), "developer/name[text()~=stem(?)]" },
++		{ as_utils_get_tag_search_weight ("summary"), "project_group[text()~=stem(?)]" },
++		/* for legacy support */
++		{ as_utils_get_tag_search_weight ("pkgname"), "developer_name[text()~=stem(?)]" },
++		{ 0,					      NULL }
++	};
++#else
+ 	const Query queries[] = {
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME,	"developer_name[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_SUMMARY,	"project_group[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_NONE,		NULL }
+ 	};
++#endif
+ 
+ 	return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
+ }
+diff --git a/lib/gs-utils.c b/lib/gs-utils.c
+index cf9073025f..19e6ebd046 100644
+--- a/lib/gs-utils.c
++++ b/lib/gs-utils.c
+@@ -1694,9 +1694,9 @@ gs_utils_gstring_replace (GString *str,
+ 			  const gchar *find,
+ 			  const gchar *replace)
+ {
+-	#ifdef HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS
++#if AS_CHECK_VERSION(1, 0, 0)
+ 	as_gstring_replace (str, find, replace, 0);
+-	#else
+-	as_gstring_replace (str, find, replace);
+-	#endif
++#else
++	as_gstring_replace2 (str, find, replace, 0);
++#endif
+ }
+diff --git a/meson.build b/meson.build
+index 09c39df180..ad105869e5 100644
+--- a/meson.build
++++ b/meson.build
+@@ -113,7 +113,7 @@ add_project_arguments('-D_GNU_SOURCE', language : 'c')
+ conf.set('HAVE_LINUX_UNISTD_H', cc.has_header('linux/unistd.h'))
+ 
+ appstream = dependency('appstream',
+-  version : '>= 0.14.0',
++  version : '>= 0.16.2',
+   fallback : ['appstream', 'appstream_dep'],
+   default_options : [
+     'docs=false',
+@@ -121,26 +121,6 @@ appstream = dependency('appstream',
+     'install-docs=false'
+   ]
+ )
+-if appstream.type_name() == 'internal'
+-else
+-  if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_SEARCH_TOKEN_MATCH_MEDIATYPE', dependencies: appstream)
+-    conf.set('HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE', '1')
+-  endif
+-  if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_FORMAT_STYLE_CATALOG', dependencies: appstream)
+-    conf.set('HAVE_AS_FORMAT_STYLE_CATALOG', '1')
+-  endif
+-  if meson.get_compiler('c').has_function('as_metadata_components_to_catalog', prefix: '#include <appstream.h>', dependencies: appstream)
+-    conf.set('HAVE_AS_METADATA_COMPONENTS_TO_CATALOG', '1')
+-  endif
+-  if meson.get_compiler('c').links('''#include <appstream.h>
+-      int main (void)
+-      {
+-         as_gstring_replace (NULL, "a", "b", 0);
+-         return 0;
+-      }''', name: 'as_gstring_replace() has four arguments', dependencies: appstream)
+-    conf.set('HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS', '1')
+-  endif
+-endif
+ 
+ gdk_pixbuf = dependency('gdk-pixbuf-2.0', version : '>= 2.32.0')
+ libxmlb = dependency('xmlb', version : '>= 0.1.7', fallback : ['libxmlb', 'libxmlb_dep'])
+diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c
+index cf9f3022b1..ef3226a591 100644
+--- a/plugins/core/gs-plugin-appstream.c
++++ b/plugins/core/gs-plugin-appstream.c
+@@ -414,11 +414,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
+ 	if (bytes == NULL)
+ 		return NULL;
+ 
+-	#ifdef HAVE_AS_FORMAT_STYLE_CATALOG
+ 	as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_CATALOG);
+-	#else
+-	as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_COLLECTION);
+-	#endif
+ 	as_metadata_parse_bytes (mdata,
+ 				 bytes,
+ 				 AS_FORMAT_KIND_YAML,
+@@ -428,11 +424,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
+ 		return NULL;
+ 	}
+ 
+-	#ifdef HAVE_AS_METADATA_COMPONENTS_TO_CATALOG
+ 	xml = as_metadata_components_to_catalog (mdata, AS_FORMAT_KIND_XML, &tmp_error);
+-	#else
+-	xml = as_metadata_components_to_collection (mdata, AS_FORMAT_KIND_XML, &tmp_error);
+-	#endif
+ 	if (xml == NULL) {
+ 		// This API currently returns NULL if there is nothing to serialize, so we
+ 		// have to test if this is an error or not.
+diff --git a/plugins/fwupd/gs-fwupd-app.c b/plugins/fwupd/gs-fwupd-app.c
+index 6dcda6ee92..5d3254da59 100644
+--- a/plugins/fwupd/gs-fwupd-app.c
++++ b/plugins/fwupd/gs-fwupd-app.c
+@@ -164,7 +164,11 @@ gs_fwupd_app_set_from_device (GsApp *app,
+ 		gs_app_set_install_date (app, fwupd_device_get_created (dev));
+ 	if (fwupd_device_get_description (dev) != NULL) {
+ 		g_autofree gchar *tmp = NULL;
++#if AS_CHECK_VERSION(1, 0, 0)
++		tmp = as_markup_convert (fwupd_device_get_description (dev), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 		tmp = as_markup_convert_simple (fwupd_device_get_description (dev), NULL);
++#endif
+ 		if (tmp != NULL)
+ 			gs_app_set_description (app, GS_APP_QUALITY_NORMAL, tmp);
+ 	}
+@@ -402,7 +406,11 @@ gs_fwupd_app_set_from_release (GsApp *app, FwupdRelease *rel)
+ 	}
+ 	if (fwupd_release_get_description (rel) != NULL) {
+ 		g_autofree gchar *tmp = NULL;
++#if AS_CHECK_VERSION(1, 0, 0)
++		tmp = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 		tmp = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
++#endif
+ 		if (tmp != NULL)
+ 			gs_app_set_update_details_text (app, tmp);
+ 	}
+diff --git a/plugins/fwupd/gs-plugin-fwupd.c b/plugins/fwupd/gs-plugin-fwupd.c
+index e931b2b6db..0747d6e250 100644
+--- a/plugins/fwupd/gs-plugin-fwupd.c
++++ b/plugins/fwupd/gs-plugin-fwupd.c
+@@ -726,7 +726,11 @@ gs_plugin_add_updates (GsPlugin *plugin,
+ 				g_autofree gchar *desc = NULL;
+ 				if (fwupd_release_get_description (rel) == NULL)
+ 					continue;
++#if AS_CHECK_VERSION(1, 0, 0)
++				desc = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 				desc = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
++#endif
+ 				if (desc == NULL)
+ 					continue;
+ 				g_string_append_printf (update_desc,
+diff --git a/src/gs-hardware-support-context-dialog.c b/src/gs-hardware-support-context-dialog.c
+index 0e48c8c266..14653401de 100644
+--- a/src/gs-hardware-support-context-dialog.c
++++ b/src/gs-hardware-support-context-dialog.c
+@@ -461,6 +461,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 			AsRelationCompare comparator = as_relation_get_compare (relation);
+ 			Range current_display_comparand, relation_comparand;
+ 
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 			/* From https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-requires-recommends-display_length */
+ 			Range display_lengths[] = {
+ 				[AS_DISPLAY_LENGTH_KIND_XSMALL] = { 0, 360 },
+@@ -469,6 +470,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 				[AS_DISPLAY_LENGTH_KIND_LARGE] = { 1024, 3840 },
+ 				[AS_DISPLAY_LENGTH_KIND_XLARGE] = { 3840, G_MAXUINT },
+ 			};
++#endif
+ 
+ 			any_display_relations_set = TRUE;
+ 
+@@ -485,11 +487,14 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 			case AS_DISPLAY_SIDE_KIND_LAST:
+ 			default:
+ 				current_display_comparand.min = current_display_comparand.max = MAX (current_screen_size.width, current_screen_size.height);
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 				relation_comparand.min = display_lengths[as_relation_get_value_display_length_kind (relation)].min;
+ 				relation_comparand.max = display_lengths[as_relation_get_value_display_length_kind (relation)].max;
++#endif
+ 				break;
+ 			}
+ 
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 			if (evaluate_display_comparison (display_lengths[AS_DISPLAY_LENGTH_KIND_SMALL], comparator, relation_comparand)) {
+ 				*mobile_relation_kind_out = max_relation_kind (*mobile_relation_kind_out, as_relation_get_kind (relation));
+ 				*mobile_match_out = TRUE;
+@@ -499,6 +504,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 				*desktop_relation_kind_out = max_relation_kind (*desktop_relation_kind_out, as_relation_get_kind (relation));
+ 				*desktop_match_out = TRUE;
+ 			}
++#endif
+ 
+ 			if (evaluate_display_comparison (current_display_comparand, comparator, relation_comparand)) {
+ 				*current_relation_kind_out = max_relation_kind (*current_relation_kind_out, as_relation_get_kind (relation));
+diff --git a/src/gs-repos-dialog.c b/src/gs-repos-dialog.c
+index c41c4944a1..7dac0416d9 100644
+--- a/src/gs-repos-dialog.c
++++ b/src/gs-repos-dialog.c
+@@ -154,7 +154,11 @@ enable_repo (GsReposDialog *dialog,
+ 		g_autoptr(GError) error = NULL;
+ 
+ 		/* convert from AppStream markup */
++#if AS_CHECK_VERSION(1, 0, 0)
++		message = as_markup_convert (gs_app_get_agreement (repo), AS_MARKUP_KIND_TEXT, &error);
++#else
+ 		message = as_markup_convert_simple (gs_app_get_agreement (repo), &error);
++#endif
+ 		if (message == NULL) {
+ 			/* failed, so just try and show the original markup */
+ 			message = g_strdup (gs_app_get_agreement (repo));
+diff --git a/src/gs-screenshot-carousel.c b/src/gs-screenshot-carousel.c
+index 04bbf86a1e..d269af6605 100644
+--- a/src/gs-screenshot-carousel.c
++++ b/src/gs-screenshot-carousel.c
+@@ -141,8 +141,8 @@ gs_screenshot_carousel_load_screenshots (GsScreenshotCarousel *self, GsApp *app,
+ 		gtk_widget_set_can_focus (gtk_widget_get_first_child (ssimg), FALSE);
+ 		gs_screenshot_image_set_screenshot (GS_SCREENSHOT_IMAGE (ssimg), ss);
+ 		gs_screenshot_image_set_size (GS_SCREENSHOT_IMAGE (ssimg),
+-					      AS_IMAGE_NORMAL_WIDTH,
+-					      AS_IMAGE_NORMAL_HEIGHT);
++					      GS_IMAGE_NORMAL_WIDTH,
++					      GS_IMAGE_NORMAL_HEIGHT);
+ 		gtk_widget_add_css_class (ssimg, "screenshot-image-main");
+ 		gs_screenshot_image_load_async (GS_SCREENSHOT_IMAGE (ssimg), cancellable);
+ 
+diff --git a/src/gs-screenshot-image.c b/src/gs-screenshot-image.c
+index c313a2589f..b24083b387 100644
+--- a/src/gs-screenshot-image.c
++++ b/src/gs-screenshot-image.c
+@@ -284,13 +284,13 @@ gs_screenshot_image_save_downloaded_img (GsScreenshotImage *ssimg,
+ 	if (images->len > 1)
+ 		return TRUE;
+ 
+-	if (width == AS_IMAGE_THUMBNAIL_WIDTH &&
+-	    height == AS_IMAGE_THUMBNAIL_HEIGHT) {
+-		width = AS_IMAGE_NORMAL_WIDTH;
+-		height = AS_IMAGE_NORMAL_HEIGHT;
++	if (width == GS_IMAGE_THUMBNAIL_WIDTH &&
++	    height == GS_IMAGE_THUMBNAIL_HEIGHT) {
++		width = GS_IMAGE_NORMAL_WIDTH;
++		height = GS_IMAGE_NORMAL_HEIGHT;
+ 	} else {
+-		width = AS_IMAGE_THUMBNAIL_WIDTH;
+-		height = AS_IMAGE_THUMBNAIL_HEIGHT;
++		width = GS_IMAGE_THUMBNAIL_WIDTH;
++		height = GS_IMAGE_THUMBNAIL_HEIGHT;
+ 	}
+ 
+ 	width *= ssimg->scale;
+@@ -582,16 +582,30 @@ gs_screenshot_image_get_url (GsScreenshotImage *ssimg)
+ 	} else if (as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE) {
+ 		AsImage *im;
+ 
++#if AS_CHECK_VERSION(1, 0, 0)
++		im = as_screenshot_get_image (ssimg->screenshot,
++					      ssimg->width,
++					      ssimg->height,
++					      ssimg->scale);
++#else
+ 		im = as_screenshot_get_image (ssimg->screenshot,
+ 					      ssimg->width * ssimg->scale,
+ 					      ssimg->height * ssimg->scale);
++#endif
+ 
+ 		/* if we've failed to load a HiDPI image, fallback to LoDPI */
+ 		if (im == NULL && ssimg->scale > 1) {
+ 			ssimg->scale = 1;
++#if AS_CHECK_VERSION(1, 0, 0)
++			im = as_screenshot_get_image (ssimg->screenshot,
++						      ssimg->width,
++						      ssimg->height,
++						      1);
++#else
+ 			im = as_screenshot_get_image (ssimg->screenshot,
+ 						      ssimg->width,
+ 						      ssimg->height);
++#endif
+ 		}
+ 
+ 		if (im)
+@@ -698,15 +712,22 @@ gs_screenshot_image_load_async (GsScreenshotImage *ssimg,
+ 	 * smaller version of it straight away */
+ 	if (!ssimg->showing_image &&
+ 	    as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE &&
+-	    ssimg->width > AS_IMAGE_THUMBNAIL_WIDTH &&
+-	    ssimg->height > AS_IMAGE_THUMBNAIL_HEIGHT) {
++	    ssimg->width > GS_IMAGE_THUMBNAIL_WIDTH &&
++	    ssimg->height > GS_IMAGE_THUMBNAIL_HEIGHT) {
+ 		const gchar *url_thumb;
+ 		g_autofree gchar *basename_thumb = NULL;
+ 		g_autofree gchar *cache_kind_thumb = NULL;
+ 		AsImage *im;
++#if AS_CHECK_VERSION(1, 0, 0)
+ 		im = as_screenshot_get_image (ssimg->screenshot,
+-					      AS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
+-					      AS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
++					      GS_IMAGE_THUMBNAIL_WIDTH,
++					      GS_IMAGE_THUMBNAIL_HEIGHT,
++					      ssimg->scale);
++#else
++		im = as_screenshot_get_image (ssimg->screenshot,
++					      GS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
++					      GS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
++#endif
+ 		url_thumb = as_image_get_url (im);
+ 		basename_thumb = gs_screenshot_get_cachefn_for_url (url_thumb);
+ 		cache_kind_thumb = g_build_filename ("screenshots", "112x63", NULL);
+diff --git a/src/gs-screenshot-image.h b/src/gs-screenshot-image.h
+index 1f6cf81ce6..6e45f5d20a 100644
+--- a/src/gs-screenshot-image.h
++++ b/src/gs-screenshot-image.h
+@@ -21,6 +21,13 @@ G_BEGIN_DECLS
+ 
+ G_DECLARE_FINAL_TYPE (GsScreenshotImage, gs_screenshot_image, GS, SCREENSHOT_IMAGE, GtkWidget)
+ 
++#define GS_IMAGE_LARGE_HEIGHT		423
++#define GS_IMAGE_LARGE_WIDTH		752
++#define GS_IMAGE_NORMAL_HEIGHT		351
++#define GS_IMAGE_NORMAL_WIDTH		624
++#define GS_IMAGE_THUMBNAIL_HEIGHT	63
++#define GS_IMAGE_THUMBNAIL_WIDTH 	112
++
+ GtkWidget	*gs_screenshot_image_new		(SoupSession		*session);
+ 
+ AsScreenshot	*gs_screenshot_image_get_screenshot	(GsScreenshotImage	*ssimg);
+diff --git a/subprojects/appstream.wrap b/subprojects/appstream.wrap
+index 6f0beb0cbc..5763a32c64 100644
+--- a/subprojects/appstream.wrap
++++ b/subprojects/appstream.wrap
+@@ -1,5 +1,5 @@
+ [wrap-git]
+ directory = appstream
+ url = https://github.com/ximion/appstream.git
+-revision = v0.14.1
++revision = v0.16.3
+ depth = 1
+-- 
+GitLab
diff --git a/srcpkgs/gnome-software/template b/srcpkgs/gnome-software/template
index c5394ce2105091..70a2dfb664394d 100644
--- a/srcpkgs/gnome-software/template
+++ b/srcpkgs/gnome-software/template
@@ -1,6 +1,6 @@
 # Template file for 'gnome-software'
 pkgname=gnome-software
-version=44.2
+version=45.3
 revision=1
 build_style=meson
 configure_args="-Dpackagekit=false -Dfwupd=false
@@ -18,8 +18,8 @@ license="GPL-3.0-or-later"
 homepage="https://gitlab.gnome.org/GNOME/gnome-software"
 changelog="https://gitlab.gnome.org/GNOME/gnome-software/-/raw/main/NEWS"
 distfiles="https://gitlab.gnome.org/GNOME/gnome-software/-/archive/${version}/gnome-software-${version}.tar.gz"
-checksum=bedfe8652d2ceaf17eccc57d6befe6d95f09d15e486a58f0bb7a9a868d0bacc0
-make_check=no # FIXME
+checksum=be2f64e894e653924411981d952fb694559687010985b53ccd325dee0d6a6b83
+make_check=no # Requires system dbus
 
 build_options="gtk_doc"
 

From 31c4c5f6512d2100b3541b8e8e04bc215a86b184 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 04:41:38 -0800
Subject: [PATCH 5/6] New package: debugedit-5.0

---
 srcpkgs/debugedit/template | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 srcpkgs/debugedit/template

diff --git a/srcpkgs/debugedit/template b/srcpkgs/debugedit/template
new file mode 100644
index 00000000000000..af0210d6a448c6
--- /dev/null
+++ b/srcpkgs/debugedit/template
@@ -0,0 +1,13 @@
+# Template file for 'debugedit'
+pkgname=debugedit
+version=5.0
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config"
+makedepends="elfutils-devel"
+short_desc="Tools for debuginfo creation"
+maintainer="oreo639 <oreo6391@gmail.com>"
+license="GPL-2.0-or-later"
+homepage="https://sourceware.org/debugedit/"
+distfiles="https://sourceware.org/pub/debugedit/${version%%.*}.0/debugedit-${version}.tar.xz"
+checksum=e9ecd7d350bebae1f178ce6776ca19a648b6fe8fa22f5b3044b38d7899aa553e

From a5dcb76c1f3328e639cad46329ffaf2ab1441475 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:12:25 -0800
Subject: [PATCH 6/6] flatpak-builder: update to 1.4.2.

---
 srcpkgs/flatpak-builder/template | 27 ++++++++++-----------------
 1 file changed, 10 insertions(+), 17 deletions(-)

diff --git a/srcpkgs/flatpak-builder/template b/srcpkgs/flatpak-builder/template
index fe3485b0d89568..15ee79c9a082b4 100644
--- a/srcpkgs/flatpak-builder/template
+++ b/srcpkgs/flatpak-builder/template
@@ -1,28 +1,21 @@
 # Template file for 'flatpak-builder'
 pkgname=flatpak-builder
-version=1.2.3
+version=1.4.2
 revision=1
-build_style=gnu-configure
-hostmakedepends="pkg-config xmlto"
-makedepends="flatpak-devel json-glib-devel libcap-devel libsoup-devel
- libyaml-devel libcurl-devel"
-depends="elfutils"
+build_style=meson
+hostmakedepends="pkg-config xmlto debugedit AppStream-compose"
+makedepends="flatpak-devel json-glib-devel libcap-devel
+ libyaml-devel libcurl-devel libxml2-devel"
+depends="elfutils debugedit AppStream-compose"
 short_desc="Tool to build flatpaks from source"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://github.com/flatpak/flatpak-builder"
 changelog="https://github.com/flatpak/flatpak-builder/raw/main/NEWS"
-distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}.tar.xz"
-checksum=e257825a47f7a3e71e30fb0f80f2d9ac6e4801f746f552dfaf0e564e3ee351c8
-# Tests expects a Debian derivate hosts to build a flatpak container from.
-make_check=no
-
-if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" flatpak-devel"
-fi
-if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
-	makedepends+=" musl-legacy-compat"
-fi
+#distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}.tar.xz"
+distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}-fixed-libglnx.tar.xz"
+checksum=c041b974e03a2c2d3cda88a0efe1ecf69f9adf42a1758eac341d555e779d0596
+make_check=no # Can't run bubblewrap inside the container
 
 post_patch() {
 	if [ "$XBPS_TARGET_LIBC" = "musl" ]; then

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] flatpak-builder: update to 1.4.2.
  2024-03-05 12:13 [PR PATCH] flatpak-builder: update to 1.4.2 oreo639
                   ` (2 preceding siblings ...)
  2024-03-05 12:57 ` oreo639
@ 2024-03-05 12:59 ` oreo639
  2024-03-05 13:32 ` oreo639
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: oreo639 @ 2024-03-05 12:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1258 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages flatpak-builder
https://github.com/void-linux/void-packages/pull/49126

flatpak-builder: update to 1.4.2.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/49126.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-flatpak-builder-49126.patch --]
[-- Type: text/x-diff, Size: 31970 bytes --]

From eb57268be62ebfdf37fa5d08de6cae6f222b9ded Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:09:50 -0800
Subject: [PATCH 1/6] AppStream: update to 1.0.2.

---
 common/shlibs                               |  3 +-
 srcpkgs/{AppStream-qt => AppStream-compose} |  0
 srcpkgs/AppStream-qt6                       |  1 +
 srcpkgs/AppStream/template                  | 38 +++++++++++++++------
 4 files changed, 31 insertions(+), 11 deletions(-)
 rename srcpkgs/{AppStream-qt => AppStream-compose} (100%)
 create mode 120000 srcpkgs/AppStream-qt6

diff --git a/common/shlibs b/common/shlibs
index 8958c92d7fe196..f1e55e437bae2f 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2992,7 +2992,8 @@ libliveMedia.so.81 live555-2020.08.11_2
 libgroupsock.so.8 live555-2020.08.11_2
 libUsageEnvironment.so.3 live555-2020.08.11_2
 libBasicUsageEnvironment.so.1 live555-2020.08.11_2
-libappstream.so.4 AppStream-0.12.2_1
+libappstream.so.5 AppStream-1.0.2_1
+libAppStreamQt.so.3 AppStream-qt6-1.0.2_1
 libappstream-glib.so.8 appstream-glib-0.6.13_1
 libappstream-builder.so.8 appstream-glib-0.6.13_1
 libflatpak.so.0 flatpak-0.9.3_2
diff --git a/srcpkgs/AppStream-qt b/srcpkgs/AppStream-compose
similarity index 100%
rename from srcpkgs/AppStream-qt
rename to srcpkgs/AppStream-compose
diff --git a/srcpkgs/AppStream-qt6 b/srcpkgs/AppStream-qt6
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-qt6
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream/template b/srcpkgs/AppStream/template
index 87fbb76d2c9c66..912091c8b193f2 100644
--- a/srcpkgs/AppStream/template
+++ b/srcpkgs/AppStream/template
@@ -1,30 +1,48 @@
 # Template file for 'AppStream'
 pkgname=AppStream
-version=0.16.4
+version=1.0.2
 revision=1
 build_style=meson
 build_helper="gir qemu"
 configure_args="$(vopt_bool gir gir) $(vopt_bool vala vapi)
- -Dstemming=false -Dapidocs=false -Dqt=true -Dsystemd=false"
+ -Dstemming=false -Dapidocs=false -Dqt=true -Dsystemd=false
+ -Dcompose=true"
 hostmakedepends="docbook-xsl gettext glib-devel gperf libxslt pkg-config
- qt5-host-tools $(vopt_if vala vala) itstool"
-makedepends="libglib-devel libxml2-devel libyaml-devel qt5-devel libxmlb-devel
- libcurl-devel"
+ qt6-base $(vopt_if vala vala) itstool"
+makedepends="libglib-devel libxml2-devel libyaml-devel qt6-base-devel libxmlb-devel
+ libcurl-devel librsvg-devel"
+checkdepends="tar"
 short_desc="Tools and libraries to work with AppStream metadata"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://github.com/ximion/appstream"
 changelog="https://raw.githubusercontent.com/ximion/appstream/master/NEWS"
 distfiles="https://github.com/ximion/appstream/archive/v${version}.tar.gz"
-checksum=95d5cf451d1945182a9bc4d597c13e713451a3dba1a5759f45b6b3279ff3774c
-conf_files="/etc/appstream.conf"
+checksum=77e271f47167ae37a68111b951c3c07e4261579e69047747044f7924c8219d14
 triggers="appstream-cache"
 
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" AppStream-devel"
+fi
+
 build_options="gir vala"
 build_options_default="gir vala"
 
+AppStream-compose_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - compose libraries and tools"
+	pkg_install() {
+		vmove usr/libexec/appstreamcli-compose
+		vmove usr/share/man/man1/appstreamcli-compose.1*
+		vmove usr/lib/libappstream-compose.so.*
+		vmove usr/lib/girepository-1.0/AppStreamCompose-1.0.typelib
+		vmove usr/share/metainfo/org.freedesktop.appstream.compose.metainfo.xml
+	}
+}
+
 AppStream-devel_package() {
-	depends="${sourcepkg}>=${version}_${revision} AppStream-qt>=${version}_${revision}"
+	depends="${sourcepkg}>=${version}_${revision} AppStream-qt6>=${version}_${revision}
+	 AppStream-compose>=${version}_${revision}"
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
@@ -40,8 +58,8 @@ AppStream-devel_package() {
 	}
 }
 
-AppStream-qt_package() {
-	short_desc+=" - qt5 interface library"
+AppStream-qt6_package() {
+	short_desc+=" - qt6 interface library"
 	pkg_install() {
 		vmove "usr/lib/libAppStreamQt.so.*"
 	}

From 9e6af18cd2a1b0ee39db061b9aa5046efc120eef Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:10:35 -0800
Subject: [PATCH 2/6] flatpak: rebuild for AppStream 1.0

---
 srcpkgs/flatpak/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/flatpak/template b/srcpkgs/flatpak/template
index 819686057ac9bc..066c3021a335fc 100644
--- a/srcpkgs/flatpak/template
+++ b/srcpkgs/flatpak/template
@@ -1,7 +1,7 @@
 # Template file for 'flatpak'
 pkgname=flatpak
 version=1.15.6
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="

From a3bc11bbf128420f57809447454e941c26b2f361 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:11:53 -0800
Subject: [PATCH 3/6] libadwaita: rebuild for AppStream 1.0

---
 srcpkgs/libadwaita/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libadwaita/template b/srcpkgs/libadwaita/template
index 63e643d8fdd70d..fca2b2a5d5a25e 100644
--- a/srcpkgs/libadwaita/template
+++ b/srcpkgs/libadwaita/template
@@ -1,7 +1,7 @@
 # Template file for 'libadwaita'
 pkgname=libadwaita
 version=1.4.4
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="-Dexamples=true -Dtests=true $(vopt_bool gtk_doc)

From 9ae2f0c42e7de525f548e0ac2083c91ff3780757 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:11:59 -0800
Subject: [PATCH 4/6] gnome-software: update to 45.3.

---
 .../patches/0001-port-to-appstream1.patch     | 504 ++++++++++++++++++
 srcpkgs/gnome-software/template               |   6 +-
 2 files changed, 507 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch

diff --git a/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch b/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch
new file mode 100644
index 00000000000000..256a8509231e5f
--- /dev/null
+++ b/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch
@@ -0,0 +1,504 @@
+See: https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2393
+
+From e6f7e28bdd50a63586ba6a82b936d54db19a311b Mon Sep 17 00:00:00 2001
+From: Matthias Klumpp <matthias@tenstral.net>
+Date: Sun, 8 Oct 2023 20:22:44 +0200
+Subject: [PATCH] Adjust to build with AppStream 1.0 as well as 0.16.x
+
+---
+ lib/gs-app.c                             |  4 ++
+ lib/gs-appstream.c                       | 58 ++++++++++++++++++++----
+ lib/gs-utils.c                           |  8 ++--
+ meson.build                              | 22 +--------
+ plugins/core/gs-plugin-appstream.c       |  8 ----
+ plugins/fwupd/gs-fwupd-app.c             |  8 ++++
+ plugins/fwupd/gs-plugin-fwupd.c          |  4 ++
+ src/gs-hardware-support-context-dialog.c |  6 +++
+ src/gs-repos-dialog.c                    |  4 ++
+ src/gs-screenshot-carousel.c             |  4 +-
+ src/gs-screenshot-image.c                | 41 +++++++++++++----
+ src/gs-screenshot-image.h                |  7 +++
+ subprojects/appstream.wrap               |  2 +-
+ 13 files changed, 120 insertions(+), 56 deletions(-)
+
+diff --git a/lib/gs-app.c b/lib/gs-app.c
+index 048a061225..e2694057cd 100644
+--- a/lib/gs-app.c
++++ b/lib/gs-app.c
+@@ -609,7 +609,11 @@ gs_app_to_string_append (GsApp *app, GString *str)
+ 		AsScreenshot *ss = g_ptr_array_index (priv->screenshots, i);
+ 		g_autofree gchar *key = NULL;
+ 		tmp = as_screenshot_get_caption (ss);
++#if AS_CHECK_VERSION(1, 0, 0)
++		im = as_screenshot_get_image (ss, 0, 0, 1);
++#else
+ 		im = as_screenshot_get_image (ss, 0, 0);
++#endif
+ 		if (im == NULL)
+ 			continue;
+ 		key = g_strdup_printf ("screenshot-%02u", i);
+diff --git a/lib/gs-appstream.c b/lib/gs-appstream.c
+index deca176dcf..2cc2427a19 100644
+--- a/lib/gs-appstream.c
++++ b/lib/gs-appstream.c
+@@ -587,8 +587,6 @@ gs_appstream_refine_add_provides (GsApp *app, XbNode *component, GError **error)
+ 					kind = AS_PROVIDED_KIND_FIRMWARE_RUNTIME;
+ 				else if (g_strcmp0 (fw_type, "flashed") == 0)
+ 					kind = AS_PROVIDED_KIND_FIRMWARE_FLASHED;
+-			} else if (g_strcmp0 (element_name, "python2") == 0) {
+-				kind = AS_PROVIDED_KIND_PYTHON_2;
+ 			} else if (g_strcmp0 (element_name, "python3") == 0) {
+ 				kind = AS_PROVIDED_KIND_PYTHON;
+ 			} else if (g_strcmp0 (element_name, "dbus") == 0) {
+@@ -1011,8 +1011,11 @@ gs_appstream_refine_app_relation (GsApp           *app,
+ 			as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_CONTROL);
+ 			as_relation_set_value_control_kind (relation, as_control_kind_from_string (xb_node_get_text (child)));
+ 		} else if (g_str_equal (item_kind, "display_length")) {
+-			AsDisplayLengthKind display_length_kind;
+ 			const gchar *compare;
++			const gchar *side;
++#if !AS_CHECK_VERSION(1, 0, 0)
++			AsDisplayLengthKind display_length_kind;
++#endif
+ 
+ 			/* https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-relations-display_length */
+ 			as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_DISPLAY_LENGTH);
+@@ -1020,15 +1023,21 @@ gs_appstream_refine_app_relation (GsApp           *app,
+ 			compare = xb_node_get_attr (child, "compare");
+ 			as_relation_set_compare (relation, (compare != NULL) ? as_relation_compare_from_string (compare) : AS_RELATION_COMPARE_GE);
+ 
++#if AS_CHECK_VERSION(1, 0, 0)
++			side = xb_node_get_attr (child, "side");
++			as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
++			as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
++#else
+ 			display_length_kind = as_display_length_kind_from_string (xb_node_get_text (child));
+ 			if (display_length_kind != AS_DISPLAY_LENGTH_KIND_UNKNOWN) {
+ 				/* Ignore the `side` attribute */
+ 				as_relation_set_value_display_length_kind (relation, display_length_kind);
+ 			} else {
+-				const gchar *side = xb_node_get_attr (child, "side");
++				side = xb_node_get_attr (child, "side");
+ 				as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
+ 				as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
+ 			}
++#endif
+ 		} else {
+ 			g_debug ("Relation type ‘%s’ not currently supported for %s; ignoring",
+ 				 item_kind, gs_app_get_id (app));
+@@ -1472,7 +1481,7 @@ gs_appstream_refine_app (GsPlugin *plugin,
+ }
+ 
+ typedef struct {
+-	AsSearchTokenMatch	 match_value;
++	guint16			 match_value;
+ 	XbQuery			*query;
+ } GsAppstreamSearchHelper;
+ 
+@@ -1522,7 +1531,7 @@ gs_appstream_silo_search_component (GPtrArray *array, XbNode *component, const g
+ }
+ 
+ typedef struct {
+-	AsSearchTokenMatch	match_value;
++	guint16			match_value;
+ 	const gchar		*xpath;
+ } Query;
+ 
+@@ -1585,7 +1594,11 @@ gs_appstream_do_search (GsPlugin *plugin,
+ 			 * Drop the ID token from it as it’s the highest
+ 			 * numeric value but isn’t visible to the user in the
+ 			 * UI, which leads to confusing results ordering. */
++#if AS_CHECK_VERSION(1, 0, 0)
++			gs_app_set_match_value (app, match_value & (~as_utils_get_tag_search_weight ("id")));
++#else
+ 			gs_app_set_match_value (app, match_value & (~AS_SEARCH_TOKEN_MATCH_ID));
++#endif
+ 			gs_app_list_add (list, app);
+ 
+ 			if (gs_app_get_kind (app) == AS_COMPONENT_KIND_ADDON) {
+@@ -1624,18 +1637,32 @@ gs_appstream_search (GsPlugin *plugin,
+ 		     GCancellable *cancellable,
+ 		     GError **error)
+ {
++#if AS_CHECK_VERSION(1, 0, 0)
++	guint16 pkgname_weight = as_utils_get_tag_search_weight ("pkgname");
++	guint16 name_weight = as_utils_get_tag_search_weight ("name");
++	guint16 id_weight = as_utils_get_tag_search_weight ("id");
+ 	const Query queries[] = {
+-		#ifdef HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE
+-		{ AS_SEARCH_TOKEN_MATCH_MEDIATYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+-		#else
+-		{ AS_SEARCH_TOKEN_MATCH_MIMETYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+-		#endif
++		{ as_utils_get_tag_search_weight ("mediatype"),	"provides/mediatype[text()~=stem(?)]" },
+ 		/* Search once with a tokenize-and-casefold operator (`~=`) to support casefolded
+ 		 * full-text search, then again using substring matching (`contains()`), to
+ 		 * support prefix matching. Only do the prefix matches on a few fields, and at a
+ 		 * lower priority, otherwise things will get confusing.
+-		 * 
++		 *
+ 		 * See https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2277 */
++		{ pkgname_weight,				"pkgname[text()~=stem(?)]" },
++		{ pkgname_weight / 2,				"pkgname[contains(text(),stem(?))]" },
++		{ as_utils_get_tag_search_weight ("summary"),	"summary[text()~=stem(?)]" },
++		{ name_weight,					"name[text()~=stem(?)]" },
++		{ name_weight / 2,				"name[contains(text(),stem(?))]" },
++		{ as_utils_get_tag_search_weight ("keyword"),	"keywords/keyword[text()~=stem(?)]" },
++		{ id_weight,					"id[text()~=stem(?)]" },
++		{ id_weight,					"launchable[text()~=stem(?)]" },
++		{ as_utils_get_tag_search_weight ("origin"),	"../components[@origin~=stem(?)]" },
++		{ 0,						NULL }
++	};
++#else
++	const Query queries[] = {
++		{ AS_SEARCH_TOKEN_MATCH_MEDIATYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME,	"pkgname[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME / 2,	"pkgname[contains(text(),stem(?))]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_SUMMARY,	"summary[text()~=stem(?)]" },
+@@ -1647,6 +1674,7 @@ gs_appstream_search (GsPlugin *plugin,
+ 		{ AS_SEARCH_TOKEN_MATCH_ORIGIN,		"../components[@origin~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_NONE,		NULL }
+ 	};
++#endif
+ 
+ 	return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
+ }
+@@ -1659,11 +1687,21 @@ gs_appstream_search_developer_apps (GsPlugin *plugin,
+ 				    GCancellable *cancellable,
+ 				    GError **error)
+ {
++#if AS_CHECK_VERSION(1, 0, 0)
++	const Query queries[] = {
++		{ as_utils_get_tag_search_weight ("pkgname"), "developer/name[text()~=stem(?)]" },
++		{ as_utils_get_tag_search_weight ("summary"), "project_group[text()~=stem(?)]" },
++		/* for legacy support */
++		{ as_utils_get_tag_search_weight ("pkgname"), "developer_name[text()~=stem(?)]" },
++		{ 0,					      NULL }
++	};
++#else
+ 	const Query queries[] = {
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME,	"developer_name[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_SUMMARY,	"project_group[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_NONE,		NULL }
+ 	};
++#endif
+ 
+ 	return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
+ }
+diff --git a/lib/gs-utils.c b/lib/gs-utils.c
+index cf9073025f..19e6ebd046 100644
+--- a/lib/gs-utils.c
++++ b/lib/gs-utils.c
+@@ -1694,9 +1694,9 @@ gs_utils_gstring_replace (GString *str,
+ 			  const gchar *find,
+ 			  const gchar *replace)
+ {
+-	#ifdef HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS
++#if AS_CHECK_VERSION(1, 0, 0)
+ 	as_gstring_replace (str, find, replace, 0);
+-	#else
+-	as_gstring_replace (str, find, replace);
+-	#endif
++#else
++	as_gstring_replace2 (str, find, replace, 0);
++#endif
+ }
+diff --git a/meson.build b/meson.build
+index 09c39df180..ad105869e5 100644
+--- a/meson.build
++++ b/meson.build
+@@ -113,7 +113,7 @@ add_project_arguments('-D_GNU_SOURCE', language : 'c')
+ conf.set('HAVE_LINUX_UNISTD_H', cc.has_header('linux/unistd.h'))
+ 
+ appstream = dependency('appstream',
+-  version : '>= 0.14.0',
++  version : '>= 0.16.2',
+   fallback : ['appstream', 'appstream_dep'],
+   default_options : [
+     'docs=false',
+@@ -121,26 +121,6 @@ appstream = dependency('appstream',
+     'install-docs=false'
+   ]
+ )
+-if appstream.type_name() == 'internal'
+-else
+-  if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_SEARCH_TOKEN_MATCH_MEDIATYPE', dependencies: appstream)
+-    conf.set('HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE', '1')
+-  endif
+-  if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_FORMAT_STYLE_CATALOG', dependencies: appstream)
+-    conf.set('HAVE_AS_FORMAT_STYLE_CATALOG', '1')
+-  endif
+-  if meson.get_compiler('c').has_function('as_metadata_components_to_catalog', prefix: '#include <appstream.h>', dependencies: appstream)
+-    conf.set('HAVE_AS_METADATA_COMPONENTS_TO_CATALOG', '1')
+-  endif
+-  if meson.get_compiler('c').links('''#include <appstream.h>
+-      int main (void)
+-      {
+-         as_gstring_replace (NULL, "a", "b", 0);
+-         return 0;
+-      }''', name: 'as_gstring_replace() has four arguments', dependencies: appstream)
+-    conf.set('HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS', '1')
+-  endif
+-endif
+ 
+ gdk_pixbuf = dependency('gdk-pixbuf-2.0', version : '>= 2.32.0')
+ libxmlb = dependency('xmlb', version : '>= 0.1.7', fallback : ['libxmlb', 'libxmlb_dep'])
+diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c
+index cf9f3022b1..ef3226a591 100644
+--- a/plugins/core/gs-plugin-appstream.c
++++ b/plugins/core/gs-plugin-appstream.c
+@@ -414,11 +414,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
+ 	if (bytes == NULL)
+ 		return NULL;
+ 
+-	#ifdef HAVE_AS_FORMAT_STYLE_CATALOG
+ 	as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_CATALOG);
+-	#else
+-	as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_COLLECTION);
+-	#endif
+ 	as_metadata_parse_bytes (mdata,
+ 				 bytes,
+ 				 AS_FORMAT_KIND_YAML,
+@@ -428,11 +424,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
+ 		return NULL;
+ 	}
+ 
+-	#ifdef HAVE_AS_METADATA_COMPONENTS_TO_CATALOG
+ 	xml = as_metadata_components_to_catalog (mdata, AS_FORMAT_KIND_XML, &tmp_error);
+-	#else
+-	xml = as_metadata_components_to_collection (mdata, AS_FORMAT_KIND_XML, &tmp_error);
+-	#endif
+ 	if (xml == NULL) {
+ 		// This API currently returns NULL if there is nothing to serialize, so we
+ 		// have to test if this is an error or not.
+diff --git a/plugins/fwupd/gs-fwupd-app.c b/plugins/fwupd/gs-fwupd-app.c
+index 6dcda6ee92..5d3254da59 100644
+--- a/plugins/fwupd/gs-fwupd-app.c
++++ b/plugins/fwupd/gs-fwupd-app.c
+@@ -164,7 +164,11 @@ gs_fwupd_app_set_from_device (GsApp *app,
+ 		gs_app_set_install_date (app, fwupd_device_get_created (dev));
+ 	if (fwupd_device_get_description (dev) != NULL) {
+ 		g_autofree gchar *tmp = NULL;
++#if AS_CHECK_VERSION(1, 0, 0)
++		tmp = as_markup_convert (fwupd_device_get_description (dev), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 		tmp = as_markup_convert_simple (fwupd_device_get_description (dev), NULL);
++#endif
+ 		if (tmp != NULL)
+ 			gs_app_set_description (app, GS_APP_QUALITY_NORMAL, tmp);
+ 	}
+@@ -402,7 +406,11 @@ gs_fwupd_app_set_from_release (GsApp *app, FwupdRelease *rel)
+ 	}
+ 	if (fwupd_release_get_description (rel) != NULL) {
+ 		g_autofree gchar *tmp = NULL;
++#if AS_CHECK_VERSION(1, 0, 0)
++		tmp = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 		tmp = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
++#endif
+ 		if (tmp != NULL)
+ 			gs_app_set_update_details_text (app, tmp);
+ 	}
+diff --git a/plugins/fwupd/gs-plugin-fwupd.c b/plugins/fwupd/gs-plugin-fwupd.c
+index e931b2b6db..0747d6e250 100644
+--- a/plugins/fwupd/gs-plugin-fwupd.c
++++ b/plugins/fwupd/gs-plugin-fwupd.c
+@@ -726,7 +726,11 @@ gs_plugin_add_updates (GsPlugin *plugin,
+ 				g_autofree gchar *desc = NULL;
+ 				if (fwupd_release_get_description (rel) == NULL)
+ 					continue;
++#if AS_CHECK_VERSION(1, 0, 0)
++				desc = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 				desc = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
++#endif
+ 				if (desc == NULL)
+ 					continue;
+ 				g_string_append_printf (update_desc,
+diff --git a/src/gs-hardware-support-context-dialog.c b/src/gs-hardware-support-context-dialog.c
+index 0e48c8c266..14653401de 100644
+--- a/src/gs-hardware-support-context-dialog.c
++++ b/src/gs-hardware-support-context-dialog.c
+@@ -461,6 +461,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 			AsRelationCompare comparator = as_relation_get_compare (relation);
+ 			Range current_display_comparand, relation_comparand;
+ 
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 			/* From https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-requires-recommends-display_length */
+ 			Range display_lengths[] = {
+ 				[AS_DISPLAY_LENGTH_KIND_XSMALL] = { 0, 360 },
+@@ -469,6 +470,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 				[AS_DISPLAY_LENGTH_KIND_LARGE] = { 1024, 3840 },
+ 				[AS_DISPLAY_LENGTH_KIND_XLARGE] = { 3840, G_MAXUINT },
+ 			};
++#endif
+ 
+ 			any_display_relations_set = TRUE;
+ 
+@@ -485,11 +487,14 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 			case AS_DISPLAY_SIDE_KIND_LAST:
+ 			default:
+ 				current_display_comparand.min = current_display_comparand.max = MAX (current_screen_size.width, current_screen_size.height);
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 				relation_comparand.min = display_lengths[as_relation_get_value_display_length_kind (relation)].min;
+ 				relation_comparand.max = display_lengths[as_relation_get_value_display_length_kind (relation)].max;
++#endif
+ 				break;
+ 			}
+ 
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 			if (evaluate_display_comparison (display_lengths[AS_DISPLAY_LENGTH_KIND_SMALL], comparator, relation_comparand)) {
+ 				*mobile_relation_kind_out = max_relation_kind (*mobile_relation_kind_out, as_relation_get_kind (relation));
+ 				*mobile_match_out = TRUE;
+@@ -499,6 +504,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 				*desktop_relation_kind_out = max_relation_kind (*desktop_relation_kind_out, as_relation_get_kind (relation));
+ 				*desktop_match_out = TRUE;
+ 			}
++#endif
+ 
+ 			if (evaluate_display_comparison (current_display_comparand, comparator, relation_comparand)) {
+ 				*current_relation_kind_out = max_relation_kind (*current_relation_kind_out, as_relation_get_kind (relation));
+diff --git a/src/gs-repos-dialog.c b/src/gs-repos-dialog.c
+index c41c4944a1..7dac0416d9 100644
+--- a/src/gs-repos-dialog.c
++++ b/src/gs-repos-dialog.c
+@@ -154,7 +154,11 @@ enable_repo (GsReposDialog *dialog,
+ 		g_autoptr(GError) error = NULL;
+ 
+ 		/* convert from AppStream markup */
++#if AS_CHECK_VERSION(1, 0, 0)
++		message = as_markup_convert (gs_app_get_agreement (repo), AS_MARKUP_KIND_TEXT, &error);
++#else
+ 		message = as_markup_convert_simple (gs_app_get_agreement (repo), &error);
++#endif
+ 		if (message == NULL) {
+ 			/* failed, so just try and show the original markup */
+ 			message = g_strdup (gs_app_get_agreement (repo));
+diff --git a/src/gs-screenshot-carousel.c b/src/gs-screenshot-carousel.c
+index 04bbf86a1e..d269af6605 100644
+--- a/src/gs-screenshot-carousel.c
++++ b/src/gs-screenshot-carousel.c
+@@ -141,8 +141,8 @@ gs_screenshot_carousel_load_screenshots (GsScreenshotCarousel *self, GsApp *app,
+ 		gtk_widget_set_can_focus (gtk_widget_get_first_child (ssimg), FALSE);
+ 		gs_screenshot_image_set_screenshot (GS_SCREENSHOT_IMAGE (ssimg), ss);
+ 		gs_screenshot_image_set_size (GS_SCREENSHOT_IMAGE (ssimg),
+-					      AS_IMAGE_NORMAL_WIDTH,
+-					      AS_IMAGE_NORMAL_HEIGHT);
++					      GS_IMAGE_NORMAL_WIDTH,
++					      GS_IMAGE_NORMAL_HEIGHT);
+ 		gtk_widget_add_css_class (ssimg, "screenshot-image-main");
+ 		gs_screenshot_image_load_async (GS_SCREENSHOT_IMAGE (ssimg), cancellable);
+ 
+diff --git a/src/gs-screenshot-image.c b/src/gs-screenshot-image.c
+index c313a2589f..b24083b387 100644
+--- a/src/gs-screenshot-image.c
++++ b/src/gs-screenshot-image.c
+@@ -284,13 +284,13 @@ gs_screenshot_image_save_downloaded_img (GsScreenshotImage *ssimg,
+ 	if (images->len > 1)
+ 		return TRUE;
+ 
+-	if (width == AS_IMAGE_THUMBNAIL_WIDTH &&
+-	    height == AS_IMAGE_THUMBNAIL_HEIGHT) {
+-		width = AS_IMAGE_NORMAL_WIDTH;
+-		height = AS_IMAGE_NORMAL_HEIGHT;
++	if (width == GS_IMAGE_THUMBNAIL_WIDTH &&
++	    height == GS_IMAGE_THUMBNAIL_HEIGHT) {
++		width = GS_IMAGE_NORMAL_WIDTH;
++		height = GS_IMAGE_NORMAL_HEIGHT;
+ 	} else {
+-		width = AS_IMAGE_THUMBNAIL_WIDTH;
+-		height = AS_IMAGE_THUMBNAIL_HEIGHT;
++		width = GS_IMAGE_THUMBNAIL_WIDTH;
++		height = GS_IMAGE_THUMBNAIL_HEIGHT;
+ 	}
+ 
+ 	width *= ssimg->scale;
+@@ -582,16 +582,30 @@ gs_screenshot_image_get_url (GsScreenshotImage *ssimg)
+ 	} else if (as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE) {
+ 		AsImage *im;
+ 
++#if AS_CHECK_VERSION(1, 0, 0)
++		im = as_screenshot_get_image (ssimg->screenshot,
++					      ssimg->width,
++					      ssimg->height,
++					      ssimg->scale);
++#else
+ 		im = as_screenshot_get_image (ssimg->screenshot,
+ 					      ssimg->width * ssimg->scale,
+ 					      ssimg->height * ssimg->scale);
++#endif
+ 
+ 		/* if we've failed to load a HiDPI image, fallback to LoDPI */
+ 		if (im == NULL && ssimg->scale > 1) {
+ 			ssimg->scale = 1;
++#if AS_CHECK_VERSION(1, 0, 0)
++			im = as_screenshot_get_image (ssimg->screenshot,
++						      ssimg->width,
++						      ssimg->height,
++						      1);
++#else
+ 			im = as_screenshot_get_image (ssimg->screenshot,
+ 						      ssimg->width,
+ 						      ssimg->height);
++#endif
+ 		}
+ 
+ 		if (im)
+@@ -698,15 +712,22 @@ gs_screenshot_image_load_async (GsScreenshotImage *ssimg,
+ 	 * smaller version of it straight away */
+ 	if (!ssimg->showing_image &&
+ 	    as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE &&
+-	    ssimg->width > AS_IMAGE_THUMBNAIL_WIDTH &&
+-	    ssimg->height > AS_IMAGE_THUMBNAIL_HEIGHT) {
++	    ssimg->width > GS_IMAGE_THUMBNAIL_WIDTH &&
++	    ssimg->height > GS_IMAGE_THUMBNAIL_HEIGHT) {
+ 		const gchar *url_thumb;
+ 		g_autofree gchar *basename_thumb = NULL;
+ 		g_autofree gchar *cache_kind_thumb = NULL;
+ 		AsImage *im;
++#if AS_CHECK_VERSION(1, 0, 0)
+ 		im = as_screenshot_get_image (ssimg->screenshot,
+-					      AS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
+-					      AS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
++					      GS_IMAGE_THUMBNAIL_WIDTH,
++					      GS_IMAGE_THUMBNAIL_HEIGHT,
++					      ssimg->scale);
++#else
++		im = as_screenshot_get_image (ssimg->screenshot,
++					      GS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
++					      GS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
++#endif
+ 		url_thumb = as_image_get_url (im);
+ 		basename_thumb = gs_screenshot_get_cachefn_for_url (url_thumb);
+ 		cache_kind_thumb = g_build_filename ("screenshots", "112x63", NULL);
+diff --git a/src/gs-screenshot-image.h b/src/gs-screenshot-image.h
+index 1f6cf81ce6..6e45f5d20a 100644
+--- a/src/gs-screenshot-image.h
++++ b/src/gs-screenshot-image.h
+@@ -21,6 +21,13 @@ G_BEGIN_DECLS
+ 
+ G_DECLARE_FINAL_TYPE (GsScreenshotImage, gs_screenshot_image, GS, SCREENSHOT_IMAGE, GtkWidget)
+ 
++#define GS_IMAGE_LARGE_HEIGHT		423
++#define GS_IMAGE_LARGE_WIDTH		752
++#define GS_IMAGE_NORMAL_HEIGHT		351
++#define GS_IMAGE_NORMAL_WIDTH		624
++#define GS_IMAGE_THUMBNAIL_HEIGHT	63
++#define GS_IMAGE_THUMBNAIL_WIDTH 	112
++
+ GtkWidget	*gs_screenshot_image_new		(SoupSession		*session);
+ 
+ AsScreenshot	*gs_screenshot_image_get_screenshot	(GsScreenshotImage	*ssimg);
+diff --git a/subprojects/appstream.wrap b/subprojects/appstream.wrap
+index 6f0beb0cbc..5763a32c64 100644
+--- a/subprojects/appstream.wrap
++++ b/subprojects/appstream.wrap
+@@ -1,5 +1,5 @@
+ [wrap-git]
+ directory = appstream
+ url = https://github.com/ximion/appstream.git
+-revision = v0.14.1
++revision = v0.16.3
+ depth = 1
+-- 
+GitLab
diff --git a/srcpkgs/gnome-software/template b/srcpkgs/gnome-software/template
index c5394ce2105091..70a2dfb664394d 100644
--- a/srcpkgs/gnome-software/template
+++ b/srcpkgs/gnome-software/template
@@ -1,6 +1,6 @@
 # Template file for 'gnome-software'
 pkgname=gnome-software
-version=44.2
+version=45.3
 revision=1
 build_style=meson
 configure_args="-Dpackagekit=false -Dfwupd=false
@@ -18,8 +18,8 @@ license="GPL-3.0-or-later"
 homepage="https://gitlab.gnome.org/GNOME/gnome-software"
 changelog="https://gitlab.gnome.org/GNOME/gnome-software/-/raw/main/NEWS"
 distfiles="https://gitlab.gnome.org/GNOME/gnome-software/-/archive/${version}/gnome-software-${version}.tar.gz"
-checksum=bedfe8652d2ceaf17eccc57d6befe6d95f09d15e486a58f0bb7a9a868d0bacc0
-make_check=no # FIXME
+checksum=be2f64e894e653924411981d952fb694559687010985b53ccd325dee0d6a6b83
+make_check=no # Requires system dbus
 
 build_options="gtk_doc"
 

From 30b679232031b3e98d512d4d11036507f7e7102b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 04:41:38 -0800
Subject: [PATCH 5/6] New package: debugedit-5.0

---
 srcpkgs/debugedit/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/debugedit/template

diff --git a/srcpkgs/debugedit/template b/srcpkgs/debugedit/template
new file mode 100644
index 00000000000000..3056f067fda036
--- /dev/null
+++ b/srcpkgs/debugedit/template
@@ -0,0 +1,17 @@
+# Template file for 'debugedit'
+pkgname=debugedit
+version=5.0
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config"
+makedepends="elfutils-devel"
+short_desc="Tools for debuginfo creation"
+maintainer="oreo639 <oreo6391@gmail.com>"
+license="GPL-2.0-or-later"
+homepage="https://sourceware.org/debugedit/"
+distfiles="https://sourceware.org/pub/debugedit/${version%%.*}.0/debugedit-${version}.tar.xz"
+checksum=e9ecd7d350bebae1f178ce6776ca19a648b6fe8fa22f5b3044b38d7899aa553e
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+	makedepends+=" musl-legacy-compat"
+fi

From 17ac2946373f9732af04762b1d676a8705db83b9 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:12:25 -0800
Subject: [PATCH 6/6] flatpak-builder: update to 1.4.2.

---
 srcpkgs/flatpak-builder/template | 27 ++++++++++-----------------
 1 file changed, 10 insertions(+), 17 deletions(-)

diff --git a/srcpkgs/flatpak-builder/template b/srcpkgs/flatpak-builder/template
index fe3485b0d89568..15ee79c9a082b4 100644
--- a/srcpkgs/flatpak-builder/template
+++ b/srcpkgs/flatpak-builder/template
@@ -1,28 +1,21 @@
 # Template file for 'flatpak-builder'
 pkgname=flatpak-builder
-version=1.2.3
+version=1.4.2
 revision=1
-build_style=gnu-configure
-hostmakedepends="pkg-config xmlto"
-makedepends="flatpak-devel json-glib-devel libcap-devel libsoup-devel
- libyaml-devel libcurl-devel"
-depends="elfutils"
+build_style=meson
+hostmakedepends="pkg-config xmlto debugedit AppStream-compose"
+makedepends="flatpak-devel json-glib-devel libcap-devel
+ libyaml-devel libcurl-devel libxml2-devel"
+depends="elfutils debugedit AppStream-compose"
 short_desc="Tool to build flatpaks from source"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://github.com/flatpak/flatpak-builder"
 changelog="https://github.com/flatpak/flatpak-builder/raw/main/NEWS"
-distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}.tar.xz"
-checksum=e257825a47f7a3e71e30fb0f80f2d9ac6e4801f746f552dfaf0e564e3ee351c8
-# Tests expects a Debian derivate hosts to build a flatpak container from.
-make_check=no
-
-if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" flatpak-devel"
-fi
-if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
-	makedepends+=" musl-legacy-compat"
-fi
+#distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}.tar.xz"
+distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}-fixed-libglnx.tar.xz"
+checksum=c041b974e03a2c2d3cda88a0efe1ecf69f9adf42a1758eac341d555e779d0596
+make_check=no # Can't run bubblewrap inside the container
 
 post_patch() {
 	if [ "$XBPS_TARGET_LIBC" = "musl" ]; then

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] flatpak-builder: update to 1.4.2.
  2024-03-05 12:13 [PR PATCH] flatpak-builder: update to 1.4.2 oreo639
                   ` (3 preceding siblings ...)
  2024-03-05 12:59 ` oreo639
@ 2024-03-05 13:32 ` oreo639
  2024-03-05 13:43 ` oreo639
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: oreo639 @ 2024-03-05 13:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1258 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages flatpak-builder
https://github.com/void-linux/void-packages/pull/49126

flatpak-builder: update to 1.4.2.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/49126.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-flatpak-builder-49126.patch --]
[-- Type: text/x-diff, Size: 32203 bytes --]

From 26e61047e7c030bd5d30039083288b3432327a45 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:09:50 -0800
Subject: [PATCH 1/6] AppStream: update to 1.0.2.

---
 common/shlibs              |  3 ++-
 srcpkgs/AppStream-compose  |  1 +
 srcpkgs/AppStream-qt6      |  1 +
 srcpkgs/AppStream/template | 46 +++++++++++++++++++++++++++++---------
 4 files changed, 39 insertions(+), 12 deletions(-)
 create mode 120000 srcpkgs/AppStream-compose
 create mode 120000 srcpkgs/AppStream-qt6

diff --git a/common/shlibs b/common/shlibs
index 8958c92d7fe196..f1e55e437bae2f 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2992,7 +2992,8 @@ libliveMedia.so.81 live555-2020.08.11_2
 libgroupsock.so.8 live555-2020.08.11_2
 libUsageEnvironment.so.3 live555-2020.08.11_2
 libBasicUsageEnvironment.so.1 live555-2020.08.11_2
-libappstream.so.4 AppStream-0.12.2_1
+libappstream.so.5 AppStream-1.0.2_1
+libAppStreamQt.so.3 AppStream-qt6-1.0.2_1
 libappstream-glib.so.8 appstream-glib-0.6.13_1
 libappstream-builder.so.8 appstream-glib-0.6.13_1
 libflatpak.so.0 flatpak-0.9.3_2
diff --git a/srcpkgs/AppStream-compose b/srcpkgs/AppStream-compose
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-compose
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream-qt6 b/srcpkgs/AppStream-qt6
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-qt6
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream/template b/srcpkgs/AppStream/template
index 87fbb76d2c9c66..bad7321d47cec0 100644
--- a/srcpkgs/AppStream/template
+++ b/srcpkgs/AppStream/template
@@ -1,30 +1,48 @@
 # Template file for 'AppStream'
 pkgname=AppStream
-version=0.16.4
+version=1.0.2
 revision=1
 build_style=meson
 build_helper="gir qemu"
 configure_args="$(vopt_bool gir gir) $(vopt_bool vala vapi)
- -Dstemming=false -Dapidocs=false -Dqt=true -Dsystemd=false"
-hostmakedepends="docbook-xsl gettext glib-devel gperf libxslt pkg-config
- qt5-host-tools $(vopt_if vala vala) itstool"
-makedepends="libglib-devel libxml2-devel libyaml-devel qt5-devel libxmlb-devel
- libcurl-devel"
+ -Dstemming=false -Dapidocs=false -Dqt=true -Dsystemd=false
+ -Dcompose=true"
+hostmakedepends="docbook-xsl gettext glib-devel gperf libxslt pkgconf
+ qt6-base $(vopt_if vala vala) itstool"
+makedepends="libglib-devel libxml2-devel libyaml-devel qt6-base-devel libxmlb-devel
+ libcurl-devel librsvg-devel"
+checkdepends="tar"
 short_desc="Tools and libraries to work with AppStream metadata"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://github.com/ximion/appstream"
 changelog="https://raw.githubusercontent.com/ximion/appstream/master/NEWS"
 distfiles="https://github.com/ximion/appstream/archive/v${version}.tar.gz"
-checksum=95d5cf451d1945182a9bc4d597c13e713451a3dba1a5759f45b6b3279ff3774c
-conf_files="/etc/appstream.conf"
+checksum=77e271f47167ae37a68111b951c3c07e4261579e69047747044f7924c8219d14
 triggers="appstream-cache"
 
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" AppStream-devel"
+fi
+
 build_options="gir vala"
 build_options_default="gir vala"
 
+AppStream-compose_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - compose libraries and tools"
+	pkg_install() {
+		vmove usr/libexec/appstreamcli-compose
+		vmove usr/share/man/man1/appstreamcli-compose.1*
+		vmove usr/lib/libappstream-compose.so.*
+		vmove usr/lib/girepository-1.0/AppStreamCompose-1.0.typelib
+		vmove usr/share/metainfo/org.freedesktop.appstream.compose.metainfo.xml
+	}
+}
+
 AppStream-devel_package() {
-	depends="${sourcepkg}>=${version}_${revision} AppStream-qt>=${version}_${revision}"
+	depends="${sourcepkg}>=${version}_${revision} AppStream-qt6>=${version}_${revision}
+	 AppStream-compose>=${version}_${revision}"
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
@@ -40,9 +58,15 @@ AppStream-devel_package() {
 	}
 }
 
-AppStream-qt_package() {
-	short_desc+=" - qt5 interface library"
+AppStream-qt6_package() {
+	short_desc+=" - qt6 interface library"
 	pkg_install() {
 		vmove "usr/lib/libAppStreamQt.so.*"
 	}
 }
+
+AppStream-qt_package() {
+	build_style=meta
+	short_desc+=" - (transitional dummy package)"
+	depends="AppStream-qt6>=${version}_${revision}"
+}

From 5683e3c3dca19f2a039872b5a29989f8c1859d48 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:10:35 -0800
Subject: [PATCH 2/6] flatpak: rebuild for AppStream 1.0

---
 srcpkgs/flatpak/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/flatpak/template b/srcpkgs/flatpak/template
index 819686057ac9bc..066c3021a335fc 100644
--- a/srcpkgs/flatpak/template
+++ b/srcpkgs/flatpak/template
@@ -1,7 +1,7 @@
 # Template file for 'flatpak'
 pkgname=flatpak
 version=1.15.6
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="

From e4d475f3811937cb5e209ede02c2d9f853071bb6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:11:53 -0800
Subject: [PATCH 3/6] libadwaita: rebuild for AppStream 1.0

---
 srcpkgs/libadwaita/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libadwaita/template b/srcpkgs/libadwaita/template
index 63e643d8fdd70d..fca2b2a5d5a25e 100644
--- a/srcpkgs/libadwaita/template
+++ b/srcpkgs/libadwaita/template
@@ -1,7 +1,7 @@
 # Template file for 'libadwaita'
 pkgname=libadwaita
 version=1.4.4
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="-Dexamples=true -Dtests=true $(vopt_bool gtk_doc)

From 16e9f41c24dcc3c17b86070e083c5fb9973f52a5 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:11:59 -0800
Subject: [PATCH 4/6] gnome-software: update to 45.3.

---
 .../patches/0001-port-to-appstream1.patch     | 504 ++++++++++++++++++
 srcpkgs/gnome-software/template               |   6 +-
 2 files changed, 507 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch

diff --git a/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch b/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch
new file mode 100644
index 00000000000000..256a8509231e5f
--- /dev/null
+++ b/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch
@@ -0,0 +1,504 @@
+See: https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2393
+
+From e6f7e28bdd50a63586ba6a82b936d54db19a311b Mon Sep 17 00:00:00 2001
+From: Matthias Klumpp <matthias@tenstral.net>
+Date: Sun, 8 Oct 2023 20:22:44 +0200
+Subject: [PATCH] Adjust to build with AppStream 1.0 as well as 0.16.x
+
+---
+ lib/gs-app.c                             |  4 ++
+ lib/gs-appstream.c                       | 58 ++++++++++++++++++++----
+ lib/gs-utils.c                           |  8 ++--
+ meson.build                              | 22 +--------
+ plugins/core/gs-plugin-appstream.c       |  8 ----
+ plugins/fwupd/gs-fwupd-app.c             |  8 ++++
+ plugins/fwupd/gs-plugin-fwupd.c          |  4 ++
+ src/gs-hardware-support-context-dialog.c |  6 +++
+ src/gs-repos-dialog.c                    |  4 ++
+ src/gs-screenshot-carousel.c             |  4 +-
+ src/gs-screenshot-image.c                | 41 +++++++++++++----
+ src/gs-screenshot-image.h                |  7 +++
+ subprojects/appstream.wrap               |  2 +-
+ 13 files changed, 120 insertions(+), 56 deletions(-)
+
+diff --git a/lib/gs-app.c b/lib/gs-app.c
+index 048a061225..e2694057cd 100644
+--- a/lib/gs-app.c
++++ b/lib/gs-app.c
+@@ -609,7 +609,11 @@ gs_app_to_string_append (GsApp *app, GString *str)
+ 		AsScreenshot *ss = g_ptr_array_index (priv->screenshots, i);
+ 		g_autofree gchar *key = NULL;
+ 		tmp = as_screenshot_get_caption (ss);
++#if AS_CHECK_VERSION(1, 0, 0)
++		im = as_screenshot_get_image (ss, 0, 0, 1);
++#else
+ 		im = as_screenshot_get_image (ss, 0, 0);
++#endif
+ 		if (im == NULL)
+ 			continue;
+ 		key = g_strdup_printf ("screenshot-%02u", i);
+diff --git a/lib/gs-appstream.c b/lib/gs-appstream.c
+index deca176dcf..2cc2427a19 100644
+--- a/lib/gs-appstream.c
++++ b/lib/gs-appstream.c
+@@ -587,8 +587,6 @@ gs_appstream_refine_add_provides (GsApp *app, XbNode *component, GError **error)
+ 					kind = AS_PROVIDED_KIND_FIRMWARE_RUNTIME;
+ 				else if (g_strcmp0 (fw_type, "flashed") == 0)
+ 					kind = AS_PROVIDED_KIND_FIRMWARE_FLASHED;
+-			} else if (g_strcmp0 (element_name, "python2") == 0) {
+-				kind = AS_PROVIDED_KIND_PYTHON_2;
+ 			} else if (g_strcmp0 (element_name, "python3") == 0) {
+ 				kind = AS_PROVIDED_KIND_PYTHON;
+ 			} else if (g_strcmp0 (element_name, "dbus") == 0) {
+@@ -1011,8 +1011,11 @@ gs_appstream_refine_app_relation (GsApp           *app,
+ 			as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_CONTROL);
+ 			as_relation_set_value_control_kind (relation, as_control_kind_from_string (xb_node_get_text (child)));
+ 		} else if (g_str_equal (item_kind, "display_length")) {
+-			AsDisplayLengthKind display_length_kind;
+ 			const gchar *compare;
++			const gchar *side;
++#if !AS_CHECK_VERSION(1, 0, 0)
++			AsDisplayLengthKind display_length_kind;
++#endif
+ 
+ 			/* https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-relations-display_length */
+ 			as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_DISPLAY_LENGTH);
+@@ -1020,15 +1023,21 @@ gs_appstream_refine_app_relation (GsApp           *app,
+ 			compare = xb_node_get_attr (child, "compare");
+ 			as_relation_set_compare (relation, (compare != NULL) ? as_relation_compare_from_string (compare) : AS_RELATION_COMPARE_GE);
+ 
++#if AS_CHECK_VERSION(1, 0, 0)
++			side = xb_node_get_attr (child, "side");
++			as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
++			as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
++#else
+ 			display_length_kind = as_display_length_kind_from_string (xb_node_get_text (child));
+ 			if (display_length_kind != AS_DISPLAY_LENGTH_KIND_UNKNOWN) {
+ 				/* Ignore the `side` attribute */
+ 				as_relation_set_value_display_length_kind (relation, display_length_kind);
+ 			} else {
+-				const gchar *side = xb_node_get_attr (child, "side");
++				side = xb_node_get_attr (child, "side");
+ 				as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
+ 				as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
+ 			}
++#endif
+ 		} else {
+ 			g_debug ("Relation type ‘%s’ not currently supported for %s; ignoring",
+ 				 item_kind, gs_app_get_id (app));
+@@ -1472,7 +1481,7 @@ gs_appstream_refine_app (GsPlugin *plugin,
+ }
+ 
+ typedef struct {
+-	AsSearchTokenMatch	 match_value;
++	guint16			 match_value;
+ 	XbQuery			*query;
+ } GsAppstreamSearchHelper;
+ 
+@@ -1522,7 +1531,7 @@ gs_appstream_silo_search_component (GPtrArray *array, XbNode *component, const g
+ }
+ 
+ typedef struct {
+-	AsSearchTokenMatch	match_value;
++	guint16			match_value;
+ 	const gchar		*xpath;
+ } Query;
+ 
+@@ -1585,7 +1594,11 @@ gs_appstream_do_search (GsPlugin *plugin,
+ 			 * Drop the ID token from it as it’s the highest
+ 			 * numeric value but isn’t visible to the user in the
+ 			 * UI, which leads to confusing results ordering. */
++#if AS_CHECK_VERSION(1, 0, 0)
++			gs_app_set_match_value (app, match_value & (~as_utils_get_tag_search_weight ("id")));
++#else
+ 			gs_app_set_match_value (app, match_value & (~AS_SEARCH_TOKEN_MATCH_ID));
++#endif
+ 			gs_app_list_add (list, app);
+ 
+ 			if (gs_app_get_kind (app) == AS_COMPONENT_KIND_ADDON) {
+@@ -1624,18 +1637,32 @@ gs_appstream_search (GsPlugin *plugin,
+ 		     GCancellable *cancellable,
+ 		     GError **error)
+ {
++#if AS_CHECK_VERSION(1, 0, 0)
++	guint16 pkgname_weight = as_utils_get_tag_search_weight ("pkgname");
++	guint16 name_weight = as_utils_get_tag_search_weight ("name");
++	guint16 id_weight = as_utils_get_tag_search_weight ("id");
+ 	const Query queries[] = {
+-		#ifdef HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE
+-		{ AS_SEARCH_TOKEN_MATCH_MEDIATYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+-		#else
+-		{ AS_SEARCH_TOKEN_MATCH_MIMETYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+-		#endif
++		{ as_utils_get_tag_search_weight ("mediatype"),	"provides/mediatype[text()~=stem(?)]" },
+ 		/* Search once with a tokenize-and-casefold operator (`~=`) to support casefolded
+ 		 * full-text search, then again using substring matching (`contains()`), to
+ 		 * support prefix matching. Only do the prefix matches on a few fields, and at a
+ 		 * lower priority, otherwise things will get confusing.
+-		 * 
++		 *
+ 		 * See https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2277 */
++		{ pkgname_weight,				"pkgname[text()~=stem(?)]" },
++		{ pkgname_weight / 2,				"pkgname[contains(text(),stem(?))]" },
++		{ as_utils_get_tag_search_weight ("summary"),	"summary[text()~=stem(?)]" },
++		{ name_weight,					"name[text()~=stem(?)]" },
++		{ name_weight / 2,				"name[contains(text(),stem(?))]" },
++		{ as_utils_get_tag_search_weight ("keyword"),	"keywords/keyword[text()~=stem(?)]" },
++		{ id_weight,					"id[text()~=stem(?)]" },
++		{ id_weight,					"launchable[text()~=stem(?)]" },
++		{ as_utils_get_tag_search_weight ("origin"),	"../components[@origin~=stem(?)]" },
++		{ 0,						NULL }
++	};
++#else
++	const Query queries[] = {
++		{ AS_SEARCH_TOKEN_MATCH_MEDIATYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME,	"pkgname[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME / 2,	"pkgname[contains(text(),stem(?))]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_SUMMARY,	"summary[text()~=stem(?)]" },
+@@ -1647,6 +1674,7 @@ gs_appstream_search (GsPlugin *plugin,
+ 		{ AS_SEARCH_TOKEN_MATCH_ORIGIN,		"../components[@origin~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_NONE,		NULL }
+ 	};
++#endif
+ 
+ 	return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
+ }
+@@ -1659,11 +1687,21 @@ gs_appstream_search_developer_apps (GsPlugin *plugin,
+ 				    GCancellable *cancellable,
+ 				    GError **error)
+ {
++#if AS_CHECK_VERSION(1, 0, 0)
++	const Query queries[] = {
++		{ as_utils_get_tag_search_weight ("pkgname"), "developer/name[text()~=stem(?)]" },
++		{ as_utils_get_tag_search_weight ("summary"), "project_group[text()~=stem(?)]" },
++		/* for legacy support */
++		{ as_utils_get_tag_search_weight ("pkgname"), "developer_name[text()~=stem(?)]" },
++		{ 0,					      NULL }
++	};
++#else
+ 	const Query queries[] = {
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME,	"developer_name[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_SUMMARY,	"project_group[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_NONE,		NULL }
+ 	};
++#endif
+ 
+ 	return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
+ }
+diff --git a/lib/gs-utils.c b/lib/gs-utils.c
+index cf9073025f..19e6ebd046 100644
+--- a/lib/gs-utils.c
++++ b/lib/gs-utils.c
+@@ -1694,9 +1694,9 @@ gs_utils_gstring_replace (GString *str,
+ 			  const gchar *find,
+ 			  const gchar *replace)
+ {
+-	#ifdef HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS
++#if AS_CHECK_VERSION(1, 0, 0)
+ 	as_gstring_replace (str, find, replace, 0);
+-	#else
+-	as_gstring_replace (str, find, replace);
+-	#endif
++#else
++	as_gstring_replace2 (str, find, replace, 0);
++#endif
+ }
+diff --git a/meson.build b/meson.build
+index 09c39df180..ad105869e5 100644
+--- a/meson.build
++++ b/meson.build
+@@ -113,7 +113,7 @@ add_project_arguments('-D_GNU_SOURCE', language : 'c')
+ conf.set('HAVE_LINUX_UNISTD_H', cc.has_header('linux/unistd.h'))
+ 
+ appstream = dependency('appstream',
+-  version : '>= 0.14.0',
++  version : '>= 0.16.2',
+   fallback : ['appstream', 'appstream_dep'],
+   default_options : [
+     'docs=false',
+@@ -121,26 +121,6 @@ appstream = dependency('appstream',
+     'install-docs=false'
+   ]
+ )
+-if appstream.type_name() == 'internal'
+-else
+-  if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_SEARCH_TOKEN_MATCH_MEDIATYPE', dependencies: appstream)
+-    conf.set('HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE', '1')
+-  endif
+-  if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_FORMAT_STYLE_CATALOG', dependencies: appstream)
+-    conf.set('HAVE_AS_FORMAT_STYLE_CATALOG', '1')
+-  endif
+-  if meson.get_compiler('c').has_function('as_metadata_components_to_catalog', prefix: '#include <appstream.h>', dependencies: appstream)
+-    conf.set('HAVE_AS_METADATA_COMPONENTS_TO_CATALOG', '1')
+-  endif
+-  if meson.get_compiler('c').links('''#include <appstream.h>
+-      int main (void)
+-      {
+-         as_gstring_replace (NULL, "a", "b", 0);
+-         return 0;
+-      }''', name: 'as_gstring_replace() has four arguments', dependencies: appstream)
+-    conf.set('HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS', '1')
+-  endif
+-endif
+ 
+ gdk_pixbuf = dependency('gdk-pixbuf-2.0', version : '>= 2.32.0')
+ libxmlb = dependency('xmlb', version : '>= 0.1.7', fallback : ['libxmlb', 'libxmlb_dep'])
+diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c
+index cf9f3022b1..ef3226a591 100644
+--- a/plugins/core/gs-plugin-appstream.c
++++ b/plugins/core/gs-plugin-appstream.c
+@@ -414,11 +414,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
+ 	if (bytes == NULL)
+ 		return NULL;
+ 
+-	#ifdef HAVE_AS_FORMAT_STYLE_CATALOG
+ 	as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_CATALOG);
+-	#else
+-	as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_COLLECTION);
+-	#endif
+ 	as_metadata_parse_bytes (mdata,
+ 				 bytes,
+ 				 AS_FORMAT_KIND_YAML,
+@@ -428,11 +424,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
+ 		return NULL;
+ 	}
+ 
+-	#ifdef HAVE_AS_METADATA_COMPONENTS_TO_CATALOG
+ 	xml = as_metadata_components_to_catalog (mdata, AS_FORMAT_KIND_XML, &tmp_error);
+-	#else
+-	xml = as_metadata_components_to_collection (mdata, AS_FORMAT_KIND_XML, &tmp_error);
+-	#endif
+ 	if (xml == NULL) {
+ 		// This API currently returns NULL if there is nothing to serialize, so we
+ 		// have to test if this is an error or not.
+diff --git a/plugins/fwupd/gs-fwupd-app.c b/plugins/fwupd/gs-fwupd-app.c
+index 6dcda6ee92..5d3254da59 100644
+--- a/plugins/fwupd/gs-fwupd-app.c
++++ b/plugins/fwupd/gs-fwupd-app.c
+@@ -164,7 +164,11 @@ gs_fwupd_app_set_from_device (GsApp *app,
+ 		gs_app_set_install_date (app, fwupd_device_get_created (dev));
+ 	if (fwupd_device_get_description (dev) != NULL) {
+ 		g_autofree gchar *tmp = NULL;
++#if AS_CHECK_VERSION(1, 0, 0)
++		tmp = as_markup_convert (fwupd_device_get_description (dev), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 		tmp = as_markup_convert_simple (fwupd_device_get_description (dev), NULL);
++#endif
+ 		if (tmp != NULL)
+ 			gs_app_set_description (app, GS_APP_QUALITY_NORMAL, tmp);
+ 	}
+@@ -402,7 +406,11 @@ gs_fwupd_app_set_from_release (GsApp *app, FwupdRelease *rel)
+ 	}
+ 	if (fwupd_release_get_description (rel) != NULL) {
+ 		g_autofree gchar *tmp = NULL;
++#if AS_CHECK_VERSION(1, 0, 0)
++		tmp = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 		tmp = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
++#endif
+ 		if (tmp != NULL)
+ 			gs_app_set_update_details_text (app, tmp);
+ 	}
+diff --git a/plugins/fwupd/gs-plugin-fwupd.c b/plugins/fwupd/gs-plugin-fwupd.c
+index e931b2b6db..0747d6e250 100644
+--- a/plugins/fwupd/gs-plugin-fwupd.c
++++ b/plugins/fwupd/gs-plugin-fwupd.c
+@@ -726,7 +726,11 @@ gs_plugin_add_updates (GsPlugin *plugin,
+ 				g_autofree gchar *desc = NULL;
+ 				if (fwupd_release_get_description (rel) == NULL)
+ 					continue;
++#if AS_CHECK_VERSION(1, 0, 0)
++				desc = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 				desc = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
++#endif
+ 				if (desc == NULL)
+ 					continue;
+ 				g_string_append_printf (update_desc,
+diff --git a/src/gs-hardware-support-context-dialog.c b/src/gs-hardware-support-context-dialog.c
+index 0e48c8c266..14653401de 100644
+--- a/src/gs-hardware-support-context-dialog.c
++++ b/src/gs-hardware-support-context-dialog.c
+@@ -461,6 +461,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 			AsRelationCompare comparator = as_relation_get_compare (relation);
+ 			Range current_display_comparand, relation_comparand;
+ 
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 			/* From https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-requires-recommends-display_length */
+ 			Range display_lengths[] = {
+ 				[AS_DISPLAY_LENGTH_KIND_XSMALL] = { 0, 360 },
+@@ -469,6 +470,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 				[AS_DISPLAY_LENGTH_KIND_LARGE] = { 1024, 3840 },
+ 				[AS_DISPLAY_LENGTH_KIND_XLARGE] = { 3840, G_MAXUINT },
+ 			};
++#endif
+ 
+ 			any_display_relations_set = TRUE;
+ 
+@@ -485,11 +487,14 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 			case AS_DISPLAY_SIDE_KIND_LAST:
+ 			default:
+ 				current_display_comparand.min = current_display_comparand.max = MAX (current_screen_size.width, current_screen_size.height);
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 				relation_comparand.min = display_lengths[as_relation_get_value_display_length_kind (relation)].min;
+ 				relation_comparand.max = display_lengths[as_relation_get_value_display_length_kind (relation)].max;
++#endif
+ 				break;
+ 			}
+ 
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 			if (evaluate_display_comparison (display_lengths[AS_DISPLAY_LENGTH_KIND_SMALL], comparator, relation_comparand)) {
+ 				*mobile_relation_kind_out = max_relation_kind (*mobile_relation_kind_out, as_relation_get_kind (relation));
+ 				*mobile_match_out = TRUE;
+@@ -499,6 +504,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 				*desktop_relation_kind_out = max_relation_kind (*desktop_relation_kind_out, as_relation_get_kind (relation));
+ 				*desktop_match_out = TRUE;
+ 			}
++#endif
+ 
+ 			if (evaluate_display_comparison (current_display_comparand, comparator, relation_comparand)) {
+ 				*current_relation_kind_out = max_relation_kind (*current_relation_kind_out, as_relation_get_kind (relation));
+diff --git a/src/gs-repos-dialog.c b/src/gs-repos-dialog.c
+index c41c4944a1..7dac0416d9 100644
+--- a/src/gs-repos-dialog.c
++++ b/src/gs-repos-dialog.c
+@@ -154,7 +154,11 @@ enable_repo (GsReposDialog *dialog,
+ 		g_autoptr(GError) error = NULL;
+ 
+ 		/* convert from AppStream markup */
++#if AS_CHECK_VERSION(1, 0, 0)
++		message = as_markup_convert (gs_app_get_agreement (repo), AS_MARKUP_KIND_TEXT, &error);
++#else
+ 		message = as_markup_convert_simple (gs_app_get_agreement (repo), &error);
++#endif
+ 		if (message == NULL) {
+ 			/* failed, so just try and show the original markup */
+ 			message = g_strdup (gs_app_get_agreement (repo));
+diff --git a/src/gs-screenshot-carousel.c b/src/gs-screenshot-carousel.c
+index 04bbf86a1e..d269af6605 100644
+--- a/src/gs-screenshot-carousel.c
++++ b/src/gs-screenshot-carousel.c
+@@ -141,8 +141,8 @@ gs_screenshot_carousel_load_screenshots (GsScreenshotCarousel *self, GsApp *app,
+ 		gtk_widget_set_can_focus (gtk_widget_get_first_child (ssimg), FALSE);
+ 		gs_screenshot_image_set_screenshot (GS_SCREENSHOT_IMAGE (ssimg), ss);
+ 		gs_screenshot_image_set_size (GS_SCREENSHOT_IMAGE (ssimg),
+-					      AS_IMAGE_NORMAL_WIDTH,
+-					      AS_IMAGE_NORMAL_HEIGHT);
++					      GS_IMAGE_NORMAL_WIDTH,
++					      GS_IMAGE_NORMAL_HEIGHT);
+ 		gtk_widget_add_css_class (ssimg, "screenshot-image-main");
+ 		gs_screenshot_image_load_async (GS_SCREENSHOT_IMAGE (ssimg), cancellable);
+ 
+diff --git a/src/gs-screenshot-image.c b/src/gs-screenshot-image.c
+index c313a2589f..b24083b387 100644
+--- a/src/gs-screenshot-image.c
++++ b/src/gs-screenshot-image.c
+@@ -284,13 +284,13 @@ gs_screenshot_image_save_downloaded_img (GsScreenshotImage *ssimg,
+ 	if (images->len > 1)
+ 		return TRUE;
+ 
+-	if (width == AS_IMAGE_THUMBNAIL_WIDTH &&
+-	    height == AS_IMAGE_THUMBNAIL_HEIGHT) {
+-		width = AS_IMAGE_NORMAL_WIDTH;
+-		height = AS_IMAGE_NORMAL_HEIGHT;
++	if (width == GS_IMAGE_THUMBNAIL_WIDTH &&
++	    height == GS_IMAGE_THUMBNAIL_HEIGHT) {
++		width = GS_IMAGE_NORMAL_WIDTH;
++		height = GS_IMAGE_NORMAL_HEIGHT;
+ 	} else {
+-		width = AS_IMAGE_THUMBNAIL_WIDTH;
+-		height = AS_IMAGE_THUMBNAIL_HEIGHT;
++		width = GS_IMAGE_THUMBNAIL_WIDTH;
++		height = GS_IMAGE_THUMBNAIL_HEIGHT;
+ 	}
+ 
+ 	width *= ssimg->scale;
+@@ -582,16 +582,30 @@ gs_screenshot_image_get_url (GsScreenshotImage *ssimg)
+ 	} else if (as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE) {
+ 		AsImage *im;
+ 
++#if AS_CHECK_VERSION(1, 0, 0)
++		im = as_screenshot_get_image (ssimg->screenshot,
++					      ssimg->width,
++					      ssimg->height,
++					      ssimg->scale);
++#else
+ 		im = as_screenshot_get_image (ssimg->screenshot,
+ 					      ssimg->width * ssimg->scale,
+ 					      ssimg->height * ssimg->scale);
++#endif
+ 
+ 		/* if we've failed to load a HiDPI image, fallback to LoDPI */
+ 		if (im == NULL && ssimg->scale > 1) {
+ 			ssimg->scale = 1;
++#if AS_CHECK_VERSION(1, 0, 0)
++			im = as_screenshot_get_image (ssimg->screenshot,
++						      ssimg->width,
++						      ssimg->height,
++						      1);
++#else
+ 			im = as_screenshot_get_image (ssimg->screenshot,
+ 						      ssimg->width,
+ 						      ssimg->height);
++#endif
+ 		}
+ 
+ 		if (im)
+@@ -698,15 +712,22 @@ gs_screenshot_image_load_async (GsScreenshotImage *ssimg,
+ 	 * smaller version of it straight away */
+ 	if (!ssimg->showing_image &&
+ 	    as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE &&
+-	    ssimg->width > AS_IMAGE_THUMBNAIL_WIDTH &&
+-	    ssimg->height > AS_IMAGE_THUMBNAIL_HEIGHT) {
++	    ssimg->width > GS_IMAGE_THUMBNAIL_WIDTH &&
++	    ssimg->height > GS_IMAGE_THUMBNAIL_HEIGHT) {
+ 		const gchar *url_thumb;
+ 		g_autofree gchar *basename_thumb = NULL;
+ 		g_autofree gchar *cache_kind_thumb = NULL;
+ 		AsImage *im;
++#if AS_CHECK_VERSION(1, 0, 0)
+ 		im = as_screenshot_get_image (ssimg->screenshot,
+-					      AS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
+-					      AS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
++					      GS_IMAGE_THUMBNAIL_WIDTH,
++					      GS_IMAGE_THUMBNAIL_HEIGHT,
++					      ssimg->scale);
++#else
++		im = as_screenshot_get_image (ssimg->screenshot,
++					      GS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
++					      GS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
++#endif
+ 		url_thumb = as_image_get_url (im);
+ 		basename_thumb = gs_screenshot_get_cachefn_for_url (url_thumb);
+ 		cache_kind_thumb = g_build_filename ("screenshots", "112x63", NULL);
+diff --git a/src/gs-screenshot-image.h b/src/gs-screenshot-image.h
+index 1f6cf81ce6..6e45f5d20a 100644
+--- a/src/gs-screenshot-image.h
++++ b/src/gs-screenshot-image.h
+@@ -21,6 +21,13 @@ G_BEGIN_DECLS
+ 
+ G_DECLARE_FINAL_TYPE (GsScreenshotImage, gs_screenshot_image, GS, SCREENSHOT_IMAGE, GtkWidget)
+ 
++#define GS_IMAGE_LARGE_HEIGHT		423
++#define GS_IMAGE_LARGE_WIDTH		752
++#define GS_IMAGE_NORMAL_HEIGHT		351
++#define GS_IMAGE_NORMAL_WIDTH		624
++#define GS_IMAGE_THUMBNAIL_HEIGHT	63
++#define GS_IMAGE_THUMBNAIL_WIDTH 	112
++
+ GtkWidget	*gs_screenshot_image_new		(SoupSession		*session);
+ 
+ AsScreenshot	*gs_screenshot_image_get_screenshot	(GsScreenshotImage	*ssimg);
+diff --git a/subprojects/appstream.wrap b/subprojects/appstream.wrap
+index 6f0beb0cbc..5763a32c64 100644
+--- a/subprojects/appstream.wrap
++++ b/subprojects/appstream.wrap
+@@ -1,5 +1,5 @@
+ [wrap-git]
+ directory = appstream
+ url = https://github.com/ximion/appstream.git
+-revision = v0.14.1
++revision = v0.16.3
+ depth = 1
+-- 
+GitLab
diff --git a/srcpkgs/gnome-software/template b/srcpkgs/gnome-software/template
index c5394ce2105091..70a2dfb664394d 100644
--- a/srcpkgs/gnome-software/template
+++ b/srcpkgs/gnome-software/template
@@ -1,6 +1,6 @@
 # Template file for 'gnome-software'
 pkgname=gnome-software
-version=44.2
+version=45.3
 revision=1
 build_style=meson
 configure_args="-Dpackagekit=false -Dfwupd=false
@@ -18,8 +18,8 @@ license="GPL-3.0-or-later"
 homepage="https://gitlab.gnome.org/GNOME/gnome-software"
 changelog="https://gitlab.gnome.org/GNOME/gnome-software/-/raw/main/NEWS"
 distfiles="https://gitlab.gnome.org/GNOME/gnome-software/-/archive/${version}/gnome-software-${version}.tar.gz"
-checksum=bedfe8652d2ceaf17eccc57d6befe6d95f09d15e486a58f0bb7a9a868d0bacc0
-make_check=no # FIXME
+checksum=be2f64e894e653924411981d952fb694559687010985b53ccd325dee0d6a6b83
+make_check=no # Requires system dbus
 
 build_options="gtk_doc"
 

From 1494b483e4f93d9b8e2a7cc289d2e506b2954164 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 04:41:38 -0800
Subject: [PATCH 5/6] New package: debugedit-5.0

---
 srcpkgs/debugedit/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/debugedit/template

diff --git a/srcpkgs/debugedit/template b/srcpkgs/debugedit/template
new file mode 100644
index 00000000000000..3056f067fda036
--- /dev/null
+++ b/srcpkgs/debugedit/template
@@ -0,0 +1,17 @@
+# Template file for 'debugedit'
+pkgname=debugedit
+version=5.0
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config"
+makedepends="elfutils-devel"
+short_desc="Tools for debuginfo creation"
+maintainer="oreo639 <oreo6391@gmail.com>"
+license="GPL-2.0-or-later"
+homepage="https://sourceware.org/debugedit/"
+distfiles="https://sourceware.org/pub/debugedit/${version%%.*}.0/debugedit-${version}.tar.xz"
+checksum=e9ecd7d350bebae1f178ce6776ca19a648b6fe8fa22f5b3044b38d7899aa553e
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+	makedepends+=" musl-legacy-compat"
+fi

From 5d431b7b25f5e4a4dcc9633f033cbef4ea3c644a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:12:25 -0800
Subject: [PATCH 6/6] flatpak-builder: update to 1.4.2.

---
 srcpkgs/flatpak-builder/template | 27 ++++++++++-----------------
 1 file changed, 10 insertions(+), 17 deletions(-)

diff --git a/srcpkgs/flatpak-builder/template b/srcpkgs/flatpak-builder/template
index fe3485b0d89568..15ee79c9a082b4 100644
--- a/srcpkgs/flatpak-builder/template
+++ b/srcpkgs/flatpak-builder/template
@@ -1,28 +1,21 @@
 # Template file for 'flatpak-builder'
 pkgname=flatpak-builder
-version=1.2.3
+version=1.4.2
 revision=1
-build_style=gnu-configure
-hostmakedepends="pkg-config xmlto"
-makedepends="flatpak-devel json-glib-devel libcap-devel libsoup-devel
- libyaml-devel libcurl-devel"
-depends="elfutils"
+build_style=meson
+hostmakedepends="pkg-config xmlto debugedit AppStream-compose"
+makedepends="flatpak-devel json-glib-devel libcap-devel
+ libyaml-devel libcurl-devel libxml2-devel"
+depends="elfutils debugedit AppStream-compose"
 short_desc="Tool to build flatpaks from source"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://github.com/flatpak/flatpak-builder"
 changelog="https://github.com/flatpak/flatpak-builder/raw/main/NEWS"
-distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}.tar.xz"
-checksum=e257825a47f7a3e71e30fb0f80f2d9ac6e4801f746f552dfaf0e564e3ee351c8
-# Tests expects a Debian derivate hosts to build a flatpak container from.
-make_check=no
-
-if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" flatpak-devel"
-fi
-if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
-	makedepends+=" musl-legacy-compat"
-fi
+#distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}.tar.xz"
+distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}-fixed-libglnx.tar.xz"
+checksum=c041b974e03a2c2d3cda88a0efe1ecf69f9adf42a1758eac341d555e779d0596
+make_check=no # Can't run bubblewrap inside the container
 
 post_patch() {
 	if [ "$XBPS_TARGET_LIBC" = "musl" ]; then

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] flatpak-builder: update to 1.4.2.
  2024-03-05 12:13 [PR PATCH] flatpak-builder: update to 1.4.2 oreo639
                   ` (4 preceding siblings ...)
  2024-03-05 13:32 ` oreo639
@ 2024-03-05 13:43 ` oreo639
  2024-03-05 21:40 ` oreo639
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: oreo639 @ 2024-03-05 13:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1258 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages flatpak-builder
https://github.com/void-linux/void-packages/pull/49126

flatpak-builder: update to 1.4.2.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/49126.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-flatpak-builder-49126.patch --]
[-- Type: text/x-diff, Size: 32318 bytes --]

From 058ccfab2da356716b04940f1e14d1d68dbd4d0c Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:09:50 -0800
Subject: [PATCH 1/6] AppStream: update to 1.0.2.

---
 common/shlibs              |  3 ++-
 srcpkgs/AppStream-compose  |  1 +
 srcpkgs/AppStream-qt6      |  1 +
 srcpkgs/AppStream/template | 50 ++++++++++++++++++++++++++++++--------
 4 files changed, 44 insertions(+), 11 deletions(-)
 create mode 120000 srcpkgs/AppStream-compose
 create mode 120000 srcpkgs/AppStream-qt6

diff --git a/common/shlibs b/common/shlibs
index 8958c92d7fe196..f1e55e437bae2f 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2992,7 +2992,8 @@ libliveMedia.so.81 live555-2020.08.11_2
 libgroupsock.so.8 live555-2020.08.11_2
 libUsageEnvironment.so.3 live555-2020.08.11_2
 libBasicUsageEnvironment.so.1 live555-2020.08.11_2
-libappstream.so.4 AppStream-0.12.2_1
+libappstream.so.5 AppStream-1.0.2_1
+libAppStreamQt.so.3 AppStream-qt6-1.0.2_1
 libappstream-glib.so.8 appstream-glib-0.6.13_1
 libappstream-builder.so.8 appstream-glib-0.6.13_1
 libflatpak.so.0 flatpak-0.9.3_2
diff --git a/srcpkgs/AppStream-compose b/srcpkgs/AppStream-compose
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-compose
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream-qt6 b/srcpkgs/AppStream-qt6
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-qt6
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream/template b/srcpkgs/AppStream/template
index 87fbb76d2c9c66..5732ab003d7955 100644
--- a/srcpkgs/AppStream/template
+++ b/srcpkgs/AppStream/template
@@ -1,30 +1,54 @@
 # Template file for 'AppStream'
 pkgname=AppStream
-version=0.16.4
+version=1.0.2
 revision=1
 build_style=meson
 build_helper="gir qemu"
 configure_args="$(vopt_bool gir gir) $(vopt_bool vala vapi)
- -Dstemming=false -Dapidocs=false -Dqt=true -Dsystemd=false"
+ -Dstemming=false -Dapidocs=false -Dqt=true -Dsystemd=false
+ -Dcompose=true"
 hostmakedepends="docbook-xsl gettext glib-devel gperf libxslt pkg-config
- qt5-host-tools $(vopt_if vala vala) itstool"
-makedepends="libglib-devel libxml2-devel libyaml-devel qt5-devel libxmlb-devel
- libcurl-devel"
+ qt6-base $(vopt_if vala vala) itstool"
+makedepends="libglib-devel libxml2-devel libyaml-devel qt6-base-devel libxmlb-devel
+ libcurl-devel librsvg-devel"
+checkdepends="tar"
 short_desc="Tools and libraries to work with AppStream metadata"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://github.com/ximion/appstream"
 changelog="https://raw.githubusercontent.com/ximion/appstream/master/NEWS"
 distfiles="https://github.com/ximion/appstream/archive/v${version}.tar.gz"
-checksum=95d5cf451d1945182a9bc4d597c13e713451a3dba1a5759f45b6b3279ff3774c
-conf_files="/etc/appstream.conf"
+checksum=77e271f47167ae37a68111b951c3c07e4261579e69047747044f7924c8219d14
 triggers="appstream-cache"
 
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" AppStream-devel"
+fi
+
 build_options="gir vala"
 build_options_default="gir vala"
 
+pre_configure() {
+	# Meson uses paths from pkg-config which is /usr/lib32/qt6 when cross compiling 32-bit
+	# Work around this for now
+	export PATH="/usr/lib/qt6/libexec/:$PATH"
+}
+
+AppStream-compose_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - compose libraries and tools"
+	pkg_install() {
+		vmove usr/libexec/appstreamcli-compose
+		vmove usr/share/man/man1/appstreamcli-compose.1*
+		vmove usr/lib/libappstream-compose.so.*
+		vmove usr/lib/girepository-1.0/AppStreamCompose-1.0.typelib
+		vmove usr/share/metainfo/org.freedesktop.appstream.compose.metainfo.xml
+	}
+}
+
 AppStream-devel_package() {
-	depends="${sourcepkg}>=${version}_${revision} AppStream-qt>=${version}_${revision}"
+	depends="${sourcepkg}>=${version}_${revision} AppStream-qt6>=${version}_${revision}
+	 AppStream-compose>=${version}_${revision}"
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
@@ -40,9 +64,15 @@ AppStream-devel_package() {
 	}
 }
 
-AppStream-qt_package() {
-	short_desc+=" - qt5 interface library"
+AppStream-qt6_package() {
+	short_desc+=" - qt6 interface library"
 	pkg_install() {
 		vmove "usr/lib/libAppStreamQt.so.*"
 	}
 }
+
+AppStream-qt_package() {
+	build_style=meta
+	short_desc+=" - (transitional dummy package)"
+	depends="AppStream-qt6>=${version}_${revision}"
+}

From 7a7b03b011d9e126dd61b71f3c92c45b709b2b18 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:10:35 -0800
Subject: [PATCH 2/6] flatpak: rebuild for AppStream 1.0

---
 srcpkgs/flatpak/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/flatpak/template b/srcpkgs/flatpak/template
index 819686057ac9bc..066c3021a335fc 100644
--- a/srcpkgs/flatpak/template
+++ b/srcpkgs/flatpak/template
@@ -1,7 +1,7 @@
 # Template file for 'flatpak'
 pkgname=flatpak
 version=1.15.6
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="

From 6deac631d0d34e2ebcbded9620ea09f5922c3db8 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:11:53 -0800
Subject: [PATCH 3/6] libadwaita: rebuild for AppStream 1.0

---
 srcpkgs/libadwaita/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libadwaita/template b/srcpkgs/libadwaita/template
index 63e643d8fdd70d..fca2b2a5d5a25e 100644
--- a/srcpkgs/libadwaita/template
+++ b/srcpkgs/libadwaita/template
@@ -1,7 +1,7 @@
 # Template file for 'libadwaita'
 pkgname=libadwaita
 version=1.4.4
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="-Dexamples=true -Dtests=true $(vopt_bool gtk_doc)

From 4663473bf5d195ae417a0f6278b7111325206caf Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:11:59 -0800
Subject: [PATCH 4/6] gnome-software: update to 45.3.

---
 .../patches/0001-port-to-appstream1.patch     | 504 ++++++++++++++++++
 srcpkgs/gnome-software/template               |   6 +-
 2 files changed, 507 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch

diff --git a/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch b/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch
new file mode 100644
index 00000000000000..256a8509231e5f
--- /dev/null
+++ b/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch
@@ -0,0 +1,504 @@
+See: https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2393
+
+From e6f7e28bdd50a63586ba6a82b936d54db19a311b Mon Sep 17 00:00:00 2001
+From: Matthias Klumpp <matthias@tenstral.net>
+Date: Sun, 8 Oct 2023 20:22:44 +0200
+Subject: [PATCH] Adjust to build with AppStream 1.0 as well as 0.16.x
+
+---
+ lib/gs-app.c                             |  4 ++
+ lib/gs-appstream.c                       | 58 ++++++++++++++++++++----
+ lib/gs-utils.c                           |  8 ++--
+ meson.build                              | 22 +--------
+ plugins/core/gs-plugin-appstream.c       |  8 ----
+ plugins/fwupd/gs-fwupd-app.c             |  8 ++++
+ plugins/fwupd/gs-plugin-fwupd.c          |  4 ++
+ src/gs-hardware-support-context-dialog.c |  6 +++
+ src/gs-repos-dialog.c                    |  4 ++
+ src/gs-screenshot-carousel.c             |  4 +-
+ src/gs-screenshot-image.c                | 41 +++++++++++++----
+ src/gs-screenshot-image.h                |  7 +++
+ subprojects/appstream.wrap               |  2 +-
+ 13 files changed, 120 insertions(+), 56 deletions(-)
+
+diff --git a/lib/gs-app.c b/lib/gs-app.c
+index 048a061225..e2694057cd 100644
+--- a/lib/gs-app.c
++++ b/lib/gs-app.c
+@@ -609,7 +609,11 @@ gs_app_to_string_append (GsApp *app, GString *str)
+ 		AsScreenshot *ss = g_ptr_array_index (priv->screenshots, i);
+ 		g_autofree gchar *key = NULL;
+ 		tmp = as_screenshot_get_caption (ss);
++#if AS_CHECK_VERSION(1, 0, 0)
++		im = as_screenshot_get_image (ss, 0, 0, 1);
++#else
+ 		im = as_screenshot_get_image (ss, 0, 0);
++#endif
+ 		if (im == NULL)
+ 			continue;
+ 		key = g_strdup_printf ("screenshot-%02u", i);
+diff --git a/lib/gs-appstream.c b/lib/gs-appstream.c
+index deca176dcf..2cc2427a19 100644
+--- a/lib/gs-appstream.c
++++ b/lib/gs-appstream.c
+@@ -587,8 +587,6 @@ gs_appstream_refine_add_provides (GsApp *app, XbNode *component, GError **error)
+ 					kind = AS_PROVIDED_KIND_FIRMWARE_RUNTIME;
+ 				else if (g_strcmp0 (fw_type, "flashed") == 0)
+ 					kind = AS_PROVIDED_KIND_FIRMWARE_FLASHED;
+-			} else if (g_strcmp0 (element_name, "python2") == 0) {
+-				kind = AS_PROVIDED_KIND_PYTHON_2;
+ 			} else if (g_strcmp0 (element_name, "python3") == 0) {
+ 				kind = AS_PROVIDED_KIND_PYTHON;
+ 			} else if (g_strcmp0 (element_name, "dbus") == 0) {
+@@ -1011,8 +1011,11 @@ gs_appstream_refine_app_relation (GsApp           *app,
+ 			as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_CONTROL);
+ 			as_relation_set_value_control_kind (relation, as_control_kind_from_string (xb_node_get_text (child)));
+ 		} else if (g_str_equal (item_kind, "display_length")) {
+-			AsDisplayLengthKind display_length_kind;
+ 			const gchar *compare;
++			const gchar *side;
++#if !AS_CHECK_VERSION(1, 0, 0)
++			AsDisplayLengthKind display_length_kind;
++#endif
+ 
+ 			/* https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-relations-display_length */
+ 			as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_DISPLAY_LENGTH);
+@@ -1020,15 +1023,21 @@ gs_appstream_refine_app_relation (GsApp           *app,
+ 			compare = xb_node_get_attr (child, "compare");
+ 			as_relation_set_compare (relation, (compare != NULL) ? as_relation_compare_from_string (compare) : AS_RELATION_COMPARE_GE);
+ 
++#if AS_CHECK_VERSION(1, 0, 0)
++			side = xb_node_get_attr (child, "side");
++			as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
++			as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
++#else
+ 			display_length_kind = as_display_length_kind_from_string (xb_node_get_text (child));
+ 			if (display_length_kind != AS_DISPLAY_LENGTH_KIND_UNKNOWN) {
+ 				/* Ignore the `side` attribute */
+ 				as_relation_set_value_display_length_kind (relation, display_length_kind);
+ 			} else {
+-				const gchar *side = xb_node_get_attr (child, "side");
++				side = xb_node_get_attr (child, "side");
+ 				as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
+ 				as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
+ 			}
++#endif
+ 		} else {
+ 			g_debug ("Relation type ‘%s’ not currently supported for %s; ignoring",
+ 				 item_kind, gs_app_get_id (app));
+@@ -1472,7 +1481,7 @@ gs_appstream_refine_app (GsPlugin *plugin,
+ }
+ 
+ typedef struct {
+-	AsSearchTokenMatch	 match_value;
++	guint16			 match_value;
+ 	XbQuery			*query;
+ } GsAppstreamSearchHelper;
+ 
+@@ -1522,7 +1531,7 @@ gs_appstream_silo_search_component (GPtrArray *array, XbNode *component, const g
+ }
+ 
+ typedef struct {
+-	AsSearchTokenMatch	match_value;
++	guint16			match_value;
+ 	const gchar		*xpath;
+ } Query;
+ 
+@@ -1585,7 +1594,11 @@ gs_appstream_do_search (GsPlugin *plugin,
+ 			 * Drop the ID token from it as it’s the highest
+ 			 * numeric value but isn’t visible to the user in the
+ 			 * UI, which leads to confusing results ordering. */
++#if AS_CHECK_VERSION(1, 0, 0)
++			gs_app_set_match_value (app, match_value & (~as_utils_get_tag_search_weight ("id")));
++#else
+ 			gs_app_set_match_value (app, match_value & (~AS_SEARCH_TOKEN_MATCH_ID));
++#endif
+ 			gs_app_list_add (list, app);
+ 
+ 			if (gs_app_get_kind (app) == AS_COMPONENT_KIND_ADDON) {
+@@ -1624,18 +1637,32 @@ gs_appstream_search (GsPlugin *plugin,
+ 		     GCancellable *cancellable,
+ 		     GError **error)
+ {
++#if AS_CHECK_VERSION(1, 0, 0)
++	guint16 pkgname_weight = as_utils_get_tag_search_weight ("pkgname");
++	guint16 name_weight = as_utils_get_tag_search_weight ("name");
++	guint16 id_weight = as_utils_get_tag_search_weight ("id");
+ 	const Query queries[] = {
+-		#ifdef HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE
+-		{ AS_SEARCH_TOKEN_MATCH_MEDIATYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+-		#else
+-		{ AS_SEARCH_TOKEN_MATCH_MIMETYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+-		#endif
++		{ as_utils_get_tag_search_weight ("mediatype"),	"provides/mediatype[text()~=stem(?)]" },
+ 		/* Search once with a tokenize-and-casefold operator (`~=`) to support casefolded
+ 		 * full-text search, then again using substring matching (`contains()`), to
+ 		 * support prefix matching. Only do the prefix matches on a few fields, and at a
+ 		 * lower priority, otherwise things will get confusing.
+-		 * 
++		 *
+ 		 * See https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2277 */
++		{ pkgname_weight,				"pkgname[text()~=stem(?)]" },
++		{ pkgname_weight / 2,				"pkgname[contains(text(),stem(?))]" },
++		{ as_utils_get_tag_search_weight ("summary"),	"summary[text()~=stem(?)]" },
++		{ name_weight,					"name[text()~=stem(?)]" },
++		{ name_weight / 2,				"name[contains(text(),stem(?))]" },
++		{ as_utils_get_tag_search_weight ("keyword"),	"keywords/keyword[text()~=stem(?)]" },
++		{ id_weight,					"id[text()~=stem(?)]" },
++		{ id_weight,					"launchable[text()~=stem(?)]" },
++		{ as_utils_get_tag_search_weight ("origin"),	"../components[@origin~=stem(?)]" },
++		{ 0,						NULL }
++	};
++#else
++	const Query queries[] = {
++		{ AS_SEARCH_TOKEN_MATCH_MEDIATYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME,	"pkgname[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME / 2,	"pkgname[contains(text(),stem(?))]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_SUMMARY,	"summary[text()~=stem(?)]" },
+@@ -1647,6 +1674,7 @@ gs_appstream_search (GsPlugin *plugin,
+ 		{ AS_SEARCH_TOKEN_MATCH_ORIGIN,		"../components[@origin~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_NONE,		NULL }
+ 	};
++#endif
+ 
+ 	return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
+ }
+@@ -1659,11 +1687,21 @@ gs_appstream_search_developer_apps (GsPlugin *plugin,
+ 				    GCancellable *cancellable,
+ 				    GError **error)
+ {
++#if AS_CHECK_VERSION(1, 0, 0)
++	const Query queries[] = {
++		{ as_utils_get_tag_search_weight ("pkgname"), "developer/name[text()~=stem(?)]" },
++		{ as_utils_get_tag_search_weight ("summary"), "project_group[text()~=stem(?)]" },
++		/* for legacy support */
++		{ as_utils_get_tag_search_weight ("pkgname"), "developer_name[text()~=stem(?)]" },
++		{ 0,					      NULL }
++	};
++#else
+ 	const Query queries[] = {
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME,	"developer_name[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_SUMMARY,	"project_group[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_NONE,		NULL }
+ 	};
++#endif
+ 
+ 	return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
+ }
+diff --git a/lib/gs-utils.c b/lib/gs-utils.c
+index cf9073025f..19e6ebd046 100644
+--- a/lib/gs-utils.c
++++ b/lib/gs-utils.c
+@@ -1694,9 +1694,9 @@ gs_utils_gstring_replace (GString *str,
+ 			  const gchar *find,
+ 			  const gchar *replace)
+ {
+-	#ifdef HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS
++#if AS_CHECK_VERSION(1, 0, 0)
+ 	as_gstring_replace (str, find, replace, 0);
+-	#else
+-	as_gstring_replace (str, find, replace);
+-	#endif
++#else
++	as_gstring_replace2 (str, find, replace, 0);
++#endif
+ }
+diff --git a/meson.build b/meson.build
+index 09c39df180..ad105869e5 100644
+--- a/meson.build
++++ b/meson.build
+@@ -113,7 +113,7 @@ add_project_arguments('-D_GNU_SOURCE', language : 'c')
+ conf.set('HAVE_LINUX_UNISTD_H', cc.has_header('linux/unistd.h'))
+ 
+ appstream = dependency('appstream',
+-  version : '>= 0.14.0',
++  version : '>= 0.16.2',
+   fallback : ['appstream', 'appstream_dep'],
+   default_options : [
+     'docs=false',
+@@ -121,26 +121,6 @@ appstream = dependency('appstream',
+     'install-docs=false'
+   ]
+ )
+-if appstream.type_name() == 'internal'
+-else
+-  if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_SEARCH_TOKEN_MATCH_MEDIATYPE', dependencies: appstream)
+-    conf.set('HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE', '1')
+-  endif
+-  if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_FORMAT_STYLE_CATALOG', dependencies: appstream)
+-    conf.set('HAVE_AS_FORMAT_STYLE_CATALOG', '1')
+-  endif
+-  if meson.get_compiler('c').has_function('as_metadata_components_to_catalog', prefix: '#include <appstream.h>', dependencies: appstream)
+-    conf.set('HAVE_AS_METADATA_COMPONENTS_TO_CATALOG', '1')
+-  endif
+-  if meson.get_compiler('c').links('''#include <appstream.h>
+-      int main (void)
+-      {
+-         as_gstring_replace (NULL, "a", "b", 0);
+-         return 0;
+-      }''', name: 'as_gstring_replace() has four arguments', dependencies: appstream)
+-    conf.set('HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS', '1')
+-  endif
+-endif
+ 
+ gdk_pixbuf = dependency('gdk-pixbuf-2.0', version : '>= 2.32.0')
+ libxmlb = dependency('xmlb', version : '>= 0.1.7', fallback : ['libxmlb', 'libxmlb_dep'])
+diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c
+index cf9f3022b1..ef3226a591 100644
+--- a/plugins/core/gs-plugin-appstream.c
++++ b/plugins/core/gs-plugin-appstream.c
+@@ -414,11 +414,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
+ 	if (bytes == NULL)
+ 		return NULL;
+ 
+-	#ifdef HAVE_AS_FORMAT_STYLE_CATALOG
+ 	as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_CATALOG);
+-	#else
+-	as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_COLLECTION);
+-	#endif
+ 	as_metadata_parse_bytes (mdata,
+ 				 bytes,
+ 				 AS_FORMAT_KIND_YAML,
+@@ -428,11 +424,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
+ 		return NULL;
+ 	}
+ 
+-	#ifdef HAVE_AS_METADATA_COMPONENTS_TO_CATALOG
+ 	xml = as_metadata_components_to_catalog (mdata, AS_FORMAT_KIND_XML, &tmp_error);
+-	#else
+-	xml = as_metadata_components_to_collection (mdata, AS_FORMAT_KIND_XML, &tmp_error);
+-	#endif
+ 	if (xml == NULL) {
+ 		// This API currently returns NULL if there is nothing to serialize, so we
+ 		// have to test if this is an error or not.
+diff --git a/plugins/fwupd/gs-fwupd-app.c b/plugins/fwupd/gs-fwupd-app.c
+index 6dcda6ee92..5d3254da59 100644
+--- a/plugins/fwupd/gs-fwupd-app.c
++++ b/plugins/fwupd/gs-fwupd-app.c
+@@ -164,7 +164,11 @@ gs_fwupd_app_set_from_device (GsApp *app,
+ 		gs_app_set_install_date (app, fwupd_device_get_created (dev));
+ 	if (fwupd_device_get_description (dev) != NULL) {
+ 		g_autofree gchar *tmp = NULL;
++#if AS_CHECK_VERSION(1, 0, 0)
++		tmp = as_markup_convert (fwupd_device_get_description (dev), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 		tmp = as_markup_convert_simple (fwupd_device_get_description (dev), NULL);
++#endif
+ 		if (tmp != NULL)
+ 			gs_app_set_description (app, GS_APP_QUALITY_NORMAL, tmp);
+ 	}
+@@ -402,7 +406,11 @@ gs_fwupd_app_set_from_release (GsApp *app, FwupdRelease *rel)
+ 	}
+ 	if (fwupd_release_get_description (rel) != NULL) {
+ 		g_autofree gchar *tmp = NULL;
++#if AS_CHECK_VERSION(1, 0, 0)
++		tmp = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 		tmp = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
++#endif
+ 		if (tmp != NULL)
+ 			gs_app_set_update_details_text (app, tmp);
+ 	}
+diff --git a/plugins/fwupd/gs-plugin-fwupd.c b/plugins/fwupd/gs-plugin-fwupd.c
+index e931b2b6db..0747d6e250 100644
+--- a/plugins/fwupd/gs-plugin-fwupd.c
++++ b/plugins/fwupd/gs-plugin-fwupd.c
+@@ -726,7 +726,11 @@ gs_plugin_add_updates (GsPlugin *plugin,
+ 				g_autofree gchar *desc = NULL;
+ 				if (fwupd_release_get_description (rel) == NULL)
+ 					continue;
++#if AS_CHECK_VERSION(1, 0, 0)
++				desc = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 				desc = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
++#endif
+ 				if (desc == NULL)
+ 					continue;
+ 				g_string_append_printf (update_desc,
+diff --git a/src/gs-hardware-support-context-dialog.c b/src/gs-hardware-support-context-dialog.c
+index 0e48c8c266..14653401de 100644
+--- a/src/gs-hardware-support-context-dialog.c
++++ b/src/gs-hardware-support-context-dialog.c
+@@ -461,6 +461,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 			AsRelationCompare comparator = as_relation_get_compare (relation);
+ 			Range current_display_comparand, relation_comparand;
+ 
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 			/* From https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-requires-recommends-display_length */
+ 			Range display_lengths[] = {
+ 				[AS_DISPLAY_LENGTH_KIND_XSMALL] = { 0, 360 },
+@@ -469,6 +470,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 				[AS_DISPLAY_LENGTH_KIND_LARGE] = { 1024, 3840 },
+ 				[AS_DISPLAY_LENGTH_KIND_XLARGE] = { 3840, G_MAXUINT },
+ 			};
++#endif
+ 
+ 			any_display_relations_set = TRUE;
+ 
+@@ -485,11 +487,14 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 			case AS_DISPLAY_SIDE_KIND_LAST:
+ 			default:
+ 				current_display_comparand.min = current_display_comparand.max = MAX (current_screen_size.width, current_screen_size.height);
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 				relation_comparand.min = display_lengths[as_relation_get_value_display_length_kind (relation)].min;
+ 				relation_comparand.max = display_lengths[as_relation_get_value_display_length_kind (relation)].max;
++#endif
+ 				break;
+ 			}
+ 
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 			if (evaluate_display_comparison (display_lengths[AS_DISPLAY_LENGTH_KIND_SMALL], comparator, relation_comparand)) {
+ 				*mobile_relation_kind_out = max_relation_kind (*mobile_relation_kind_out, as_relation_get_kind (relation));
+ 				*mobile_match_out = TRUE;
+@@ -499,6 +504,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 				*desktop_relation_kind_out = max_relation_kind (*desktop_relation_kind_out, as_relation_get_kind (relation));
+ 				*desktop_match_out = TRUE;
+ 			}
++#endif
+ 
+ 			if (evaluate_display_comparison (current_display_comparand, comparator, relation_comparand)) {
+ 				*current_relation_kind_out = max_relation_kind (*current_relation_kind_out, as_relation_get_kind (relation));
+diff --git a/src/gs-repos-dialog.c b/src/gs-repos-dialog.c
+index c41c4944a1..7dac0416d9 100644
+--- a/src/gs-repos-dialog.c
++++ b/src/gs-repos-dialog.c
+@@ -154,7 +154,11 @@ enable_repo (GsReposDialog *dialog,
+ 		g_autoptr(GError) error = NULL;
+ 
+ 		/* convert from AppStream markup */
++#if AS_CHECK_VERSION(1, 0, 0)
++		message = as_markup_convert (gs_app_get_agreement (repo), AS_MARKUP_KIND_TEXT, &error);
++#else
+ 		message = as_markup_convert_simple (gs_app_get_agreement (repo), &error);
++#endif
+ 		if (message == NULL) {
+ 			/* failed, so just try and show the original markup */
+ 			message = g_strdup (gs_app_get_agreement (repo));
+diff --git a/src/gs-screenshot-carousel.c b/src/gs-screenshot-carousel.c
+index 04bbf86a1e..d269af6605 100644
+--- a/src/gs-screenshot-carousel.c
++++ b/src/gs-screenshot-carousel.c
+@@ -141,8 +141,8 @@ gs_screenshot_carousel_load_screenshots (GsScreenshotCarousel *self, GsApp *app,
+ 		gtk_widget_set_can_focus (gtk_widget_get_first_child (ssimg), FALSE);
+ 		gs_screenshot_image_set_screenshot (GS_SCREENSHOT_IMAGE (ssimg), ss);
+ 		gs_screenshot_image_set_size (GS_SCREENSHOT_IMAGE (ssimg),
+-					      AS_IMAGE_NORMAL_WIDTH,
+-					      AS_IMAGE_NORMAL_HEIGHT);
++					      GS_IMAGE_NORMAL_WIDTH,
++					      GS_IMAGE_NORMAL_HEIGHT);
+ 		gtk_widget_add_css_class (ssimg, "screenshot-image-main");
+ 		gs_screenshot_image_load_async (GS_SCREENSHOT_IMAGE (ssimg), cancellable);
+ 
+diff --git a/src/gs-screenshot-image.c b/src/gs-screenshot-image.c
+index c313a2589f..b24083b387 100644
+--- a/src/gs-screenshot-image.c
++++ b/src/gs-screenshot-image.c
+@@ -284,13 +284,13 @@ gs_screenshot_image_save_downloaded_img (GsScreenshotImage *ssimg,
+ 	if (images->len > 1)
+ 		return TRUE;
+ 
+-	if (width == AS_IMAGE_THUMBNAIL_WIDTH &&
+-	    height == AS_IMAGE_THUMBNAIL_HEIGHT) {
+-		width = AS_IMAGE_NORMAL_WIDTH;
+-		height = AS_IMAGE_NORMAL_HEIGHT;
++	if (width == GS_IMAGE_THUMBNAIL_WIDTH &&
++	    height == GS_IMAGE_THUMBNAIL_HEIGHT) {
++		width = GS_IMAGE_NORMAL_WIDTH;
++		height = GS_IMAGE_NORMAL_HEIGHT;
+ 	} else {
+-		width = AS_IMAGE_THUMBNAIL_WIDTH;
+-		height = AS_IMAGE_THUMBNAIL_HEIGHT;
++		width = GS_IMAGE_THUMBNAIL_WIDTH;
++		height = GS_IMAGE_THUMBNAIL_HEIGHT;
+ 	}
+ 
+ 	width *= ssimg->scale;
+@@ -582,16 +582,30 @@ gs_screenshot_image_get_url (GsScreenshotImage *ssimg)
+ 	} else if (as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE) {
+ 		AsImage *im;
+ 
++#if AS_CHECK_VERSION(1, 0, 0)
++		im = as_screenshot_get_image (ssimg->screenshot,
++					      ssimg->width,
++					      ssimg->height,
++					      ssimg->scale);
++#else
+ 		im = as_screenshot_get_image (ssimg->screenshot,
+ 					      ssimg->width * ssimg->scale,
+ 					      ssimg->height * ssimg->scale);
++#endif
+ 
+ 		/* if we've failed to load a HiDPI image, fallback to LoDPI */
+ 		if (im == NULL && ssimg->scale > 1) {
+ 			ssimg->scale = 1;
++#if AS_CHECK_VERSION(1, 0, 0)
++			im = as_screenshot_get_image (ssimg->screenshot,
++						      ssimg->width,
++						      ssimg->height,
++						      1);
++#else
+ 			im = as_screenshot_get_image (ssimg->screenshot,
+ 						      ssimg->width,
+ 						      ssimg->height);
++#endif
+ 		}
+ 
+ 		if (im)
+@@ -698,15 +712,22 @@ gs_screenshot_image_load_async (GsScreenshotImage *ssimg,
+ 	 * smaller version of it straight away */
+ 	if (!ssimg->showing_image &&
+ 	    as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE &&
+-	    ssimg->width > AS_IMAGE_THUMBNAIL_WIDTH &&
+-	    ssimg->height > AS_IMAGE_THUMBNAIL_HEIGHT) {
++	    ssimg->width > GS_IMAGE_THUMBNAIL_WIDTH &&
++	    ssimg->height > GS_IMAGE_THUMBNAIL_HEIGHT) {
+ 		const gchar *url_thumb;
+ 		g_autofree gchar *basename_thumb = NULL;
+ 		g_autofree gchar *cache_kind_thumb = NULL;
+ 		AsImage *im;
++#if AS_CHECK_VERSION(1, 0, 0)
+ 		im = as_screenshot_get_image (ssimg->screenshot,
+-					      AS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
+-					      AS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
++					      GS_IMAGE_THUMBNAIL_WIDTH,
++					      GS_IMAGE_THUMBNAIL_HEIGHT,
++					      ssimg->scale);
++#else
++		im = as_screenshot_get_image (ssimg->screenshot,
++					      GS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
++					      GS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
++#endif
+ 		url_thumb = as_image_get_url (im);
+ 		basename_thumb = gs_screenshot_get_cachefn_for_url (url_thumb);
+ 		cache_kind_thumb = g_build_filename ("screenshots", "112x63", NULL);
+diff --git a/src/gs-screenshot-image.h b/src/gs-screenshot-image.h
+index 1f6cf81ce6..6e45f5d20a 100644
+--- a/src/gs-screenshot-image.h
++++ b/src/gs-screenshot-image.h
+@@ -21,6 +21,13 @@ G_BEGIN_DECLS
+ 
+ G_DECLARE_FINAL_TYPE (GsScreenshotImage, gs_screenshot_image, GS, SCREENSHOT_IMAGE, GtkWidget)
+ 
++#define GS_IMAGE_LARGE_HEIGHT		423
++#define GS_IMAGE_LARGE_WIDTH		752
++#define GS_IMAGE_NORMAL_HEIGHT		351
++#define GS_IMAGE_NORMAL_WIDTH		624
++#define GS_IMAGE_THUMBNAIL_HEIGHT	63
++#define GS_IMAGE_THUMBNAIL_WIDTH 	112
++
+ GtkWidget	*gs_screenshot_image_new		(SoupSession		*session);
+ 
+ AsScreenshot	*gs_screenshot_image_get_screenshot	(GsScreenshotImage	*ssimg);
+diff --git a/subprojects/appstream.wrap b/subprojects/appstream.wrap
+index 6f0beb0cbc..5763a32c64 100644
+--- a/subprojects/appstream.wrap
++++ b/subprojects/appstream.wrap
+@@ -1,5 +1,5 @@
+ [wrap-git]
+ directory = appstream
+ url = https://github.com/ximion/appstream.git
+-revision = v0.14.1
++revision = v0.16.3
+ depth = 1
+-- 
+GitLab
diff --git a/srcpkgs/gnome-software/template b/srcpkgs/gnome-software/template
index c5394ce2105091..70a2dfb664394d 100644
--- a/srcpkgs/gnome-software/template
+++ b/srcpkgs/gnome-software/template
@@ -1,6 +1,6 @@
 # Template file for 'gnome-software'
 pkgname=gnome-software
-version=44.2
+version=45.3
 revision=1
 build_style=meson
 configure_args="-Dpackagekit=false -Dfwupd=false
@@ -18,8 +18,8 @@ license="GPL-3.0-or-later"
 homepage="https://gitlab.gnome.org/GNOME/gnome-software"
 changelog="https://gitlab.gnome.org/GNOME/gnome-software/-/raw/main/NEWS"
 distfiles="https://gitlab.gnome.org/GNOME/gnome-software/-/archive/${version}/gnome-software-${version}.tar.gz"
-checksum=bedfe8652d2ceaf17eccc57d6befe6d95f09d15e486a58f0bb7a9a868d0bacc0
-make_check=no # FIXME
+checksum=be2f64e894e653924411981d952fb694559687010985b53ccd325dee0d6a6b83
+make_check=no # Requires system dbus
 
 build_options="gtk_doc"
 

From 8f0d1aad10a89ab5f591318805214afe110e528c Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 04:41:38 -0800
Subject: [PATCH 5/6] New package: debugedit-5.0

---
 srcpkgs/debugedit/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/debugedit/template

diff --git a/srcpkgs/debugedit/template b/srcpkgs/debugedit/template
new file mode 100644
index 00000000000000..3056f067fda036
--- /dev/null
+++ b/srcpkgs/debugedit/template
@@ -0,0 +1,17 @@
+# Template file for 'debugedit'
+pkgname=debugedit
+version=5.0
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config"
+makedepends="elfutils-devel"
+short_desc="Tools for debuginfo creation"
+maintainer="oreo639 <oreo6391@gmail.com>"
+license="GPL-2.0-or-later"
+homepage="https://sourceware.org/debugedit/"
+distfiles="https://sourceware.org/pub/debugedit/${version%%.*}.0/debugedit-${version}.tar.xz"
+checksum=e9ecd7d350bebae1f178ce6776ca19a648b6fe8fa22f5b3044b38d7899aa553e
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+	makedepends+=" musl-legacy-compat"
+fi

From 809fd711c9c8db00362ac20d7d98c6c42ac07c3e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:12:25 -0800
Subject: [PATCH 6/6] flatpak-builder: update to 1.4.2.

---
 srcpkgs/flatpak-builder/template | 27 ++++++++++-----------------
 1 file changed, 10 insertions(+), 17 deletions(-)

diff --git a/srcpkgs/flatpak-builder/template b/srcpkgs/flatpak-builder/template
index fe3485b0d89568..15ee79c9a082b4 100644
--- a/srcpkgs/flatpak-builder/template
+++ b/srcpkgs/flatpak-builder/template
@@ -1,28 +1,21 @@
 # Template file for 'flatpak-builder'
 pkgname=flatpak-builder
-version=1.2.3
+version=1.4.2
 revision=1
-build_style=gnu-configure
-hostmakedepends="pkg-config xmlto"
-makedepends="flatpak-devel json-glib-devel libcap-devel libsoup-devel
- libyaml-devel libcurl-devel"
-depends="elfutils"
+build_style=meson
+hostmakedepends="pkg-config xmlto debugedit AppStream-compose"
+makedepends="flatpak-devel json-glib-devel libcap-devel
+ libyaml-devel libcurl-devel libxml2-devel"
+depends="elfutils debugedit AppStream-compose"
 short_desc="Tool to build flatpaks from source"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://github.com/flatpak/flatpak-builder"
 changelog="https://github.com/flatpak/flatpak-builder/raw/main/NEWS"
-distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}.tar.xz"
-checksum=e257825a47f7a3e71e30fb0f80f2d9ac6e4801f746f552dfaf0e564e3ee351c8
-# Tests expects a Debian derivate hosts to build a flatpak container from.
-make_check=no
-
-if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" flatpak-devel"
-fi
-if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
-	makedepends+=" musl-legacy-compat"
-fi
+#distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}.tar.xz"
+distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}-fixed-libglnx.tar.xz"
+checksum=c041b974e03a2c2d3cda88a0efe1ecf69f9adf42a1758eac341d555e779d0596
+make_check=no # Can't run bubblewrap inside the container
 
 post_patch() {
 	if [ "$XBPS_TARGET_LIBC" = "musl" ]; then

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] flatpak-builder: update to 1.4.2.
  2024-03-05 12:13 [PR PATCH] flatpak-builder: update to 1.4.2 oreo639
                   ` (5 preceding siblings ...)
  2024-03-05 13:43 ` oreo639
@ 2024-03-05 21:40 ` oreo639
  2024-03-05 22:02 ` oreo639
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: oreo639 @ 2024-03-05 21:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1258 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages flatpak-builder
https://github.com/void-linux/void-packages/pull/49126

flatpak-builder: update to 1.4.2.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/49126.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-flatpak-builder-49126.patch --]
[-- Type: text/x-diff, Size: 33513 bytes --]

From efa332f6e076a5bdc7852864f7e0040f8f989b18 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:09:50 -0800
Subject: [PATCH 1/6] AppStream: update to 1.0.2.

---
 common/shlibs                   |  3 +-
 srcpkgs/AppStream-compose       |  1 +
 srcpkgs/AppStream-compose-devel |  1 +
 srcpkgs/AppStream-qt-devel      |  1 +
 srcpkgs/AppStream/template      | 76 ++++++++++++++++++++++++++-------
 5 files changed, 66 insertions(+), 16 deletions(-)
 create mode 120000 srcpkgs/AppStream-compose
 create mode 120000 srcpkgs/AppStream-compose-devel
 create mode 120000 srcpkgs/AppStream-qt-devel

diff --git a/common/shlibs b/common/shlibs
index 8958c92d7fe196..39333c694f6291 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2992,7 +2992,8 @@ libliveMedia.so.81 live555-2020.08.11_2
 libgroupsock.so.8 live555-2020.08.11_2
 libUsageEnvironment.so.3 live555-2020.08.11_2
 libBasicUsageEnvironment.so.1 live555-2020.08.11_2
-libappstream.so.4 AppStream-0.12.2_1
+libappstream.so.5 AppStream-1.0.2_1
+libAppStreamQt.so.3 AppStream-qt-1.0.2_1
 libappstream-glib.so.8 appstream-glib-0.6.13_1
 libappstream-builder.so.8 appstream-glib-0.6.13_1
 libflatpak.so.0 flatpak-0.9.3_2
diff --git a/srcpkgs/AppStream-compose b/srcpkgs/AppStream-compose
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-compose
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream-compose-devel b/srcpkgs/AppStream-compose-devel
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-compose-devel
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream-qt-devel b/srcpkgs/AppStream-qt-devel
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-qt-devel
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream/template b/srcpkgs/AppStream/template
index 87fbb76d2c9c66..fb17196035c5d7 100644
--- a/srcpkgs/AppStream/template
+++ b/srcpkgs/AppStream/template
@@ -1,48 +1,94 @@
 # Template file for 'AppStream'
 pkgname=AppStream
-version=0.16.4
+version=1.0.2
 revision=1
 build_style=meson
 build_helper="gir qemu"
 configure_args="$(vopt_bool gir gir) $(vopt_bool vala vapi)
- -Dstemming=false -Dapidocs=false -Dqt=true -Dsystemd=false"
+ -Dstemming=false -Dapidocs=false -Dqt=true -Dsystemd=false
+ -Dcompose=true"
 hostmakedepends="docbook-xsl gettext glib-devel gperf libxslt pkg-config
- qt5-host-tools $(vopt_if vala vala) itstool"
-makedepends="libglib-devel libxml2-devel libyaml-devel qt5-devel libxmlb-devel
- libcurl-devel"
+ qt6-base $(vopt_if vala vala) itstool"
+makedepends="libglib-devel libxml2-devel libyaml-devel qt6-base-devel libxmlb-devel
+ libcurl-devel librsvg-devel"
+checkdepends="tar"
 short_desc="Tools and libraries to work with AppStream metadata"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://github.com/ximion/appstream"
 changelog="https://raw.githubusercontent.com/ximion/appstream/master/NEWS"
 distfiles="https://github.com/ximion/appstream/archive/v${version}.tar.gz"
-checksum=95d5cf451d1945182a9bc4d597c13e713451a3dba1a5759f45b6b3279ff3774c
-conf_files="/etc/appstream.conf"
+checksum=77e271f47167ae37a68111b951c3c07e4261579e69047747044f7924c8219d14
 triggers="appstream-cache"
 
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" AppStream-devel"
+fi
+
 build_options="gir vala"
 build_options_default="gir vala"
 
+pre_configure() {
+	# Meson uses paths from pkg-config which is /usr/lib32/qt6 when cross compiling 32-bit
+	# Work around this for now
+	export PATH="/usr/lib/qt6/libexec/:$PATH"
+}
+
 AppStream-devel_package() {
-	depends="${sourcepkg}>=${version}_${revision} AppStream-qt>=${version}_${revision}"
+	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - development files"
 	pkg_install() {
-		vmove usr/include
-		vmove usr/lib/cmake
-		vmove usr/lib/pkgconfig
-		vmove "usr/lib/*.so"
+		vmove usr/include/appstream
+		vmove usr/lib/pkgconfig/appstream.pc
+		vmove /usr/lib/libappstream.so
 		if [ "$build_option_gir" ]; then
-			vmove usr/share/gir-1.0
+			vmove usr/share/gir-1.0/AppStream-1.0.gir
 		fi
 		if [ "$build_option_vala" ]; then
-			vmove usr/share/vala
+			vmove usr/share/vala/vapi/appstream.*
+		fi
+	}
+}
+
+AppStream-compose_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - compose libraries and tools"
+	pkg_install() {
+		vmove usr/libexec/appstreamcli-compose
+		vmove usr/share/man/man1/appstreamcli-compose.1*
+		vmove usr/lib/libappstream-compose.so.*
+		vmove usr/lib/girepository-1.0/AppStreamCompose-1.0.typelib
+		vmove usr/share/metainfo/org.freedesktop.appstream.compose.metainfo.xml
+	}
+}
+
+AppStream-compose-devel_package() {
+	depends="AppStream-compose>=${version}_${revision} AppStream-devel>=${version}_${revision}"
+	short_desc+=" - compose development files"
+	pkg_install() {
+		vmove usr/include/appstream-compose
+		vmove usr/lib/pkgconfig/appstream-compose.pc
+		vmove /usr/lib/libappstream-compose.so
+		if [ "$build_option_gir" ]; then
+			vmove usr/share/gir-1.0/AppStreamCompose-1.0.gir
 		fi
 	}
 }
 
 AppStream-qt_package() {
-	short_desc+=" - qt5 interface library"
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - qt6 interface library"
+	pkg_install() {
+		vmove usr/lib/libAppStreamQt.so
+	}
+}
+
+AppStream-qt-devel_package() {
+	depends="AppStream-qt>=${version}_${revision}"
+	short_desc+=" - qt6 development files"
 	pkg_install() {
+		vmove usr/include/AppStreamQt
+		vmove usr/lib/cmake/AppStreamQt
 		vmove "usr/lib/libAppStreamQt.so.*"
 	}
 }

From a0fb0c2fc4e45f1646dcd3b5023e8f585c9267bd Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:10:35 -0800
Subject: [PATCH 2/6] flatpak: rebuild for AppStream 1.0

---
 srcpkgs/flatpak/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/flatpak/template b/srcpkgs/flatpak/template
index 819686057ac9bc..066c3021a335fc 100644
--- a/srcpkgs/flatpak/template
+++ b/srcpkgs/flatpak/template
@@ -1,7 +1,7 @@
 # Template file for 'flatpak'
 pkgname=flatpak
 version=1.15.6
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="

From d4e5766ef1771fbe6c6843d7abdd9df4e8b0432b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:11:53 -0800
Subject: [PATCH 3/6] libadwaita: rebuild for AppStream 1.0

---
 srcpkgs/libadwaita/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libadwaita/template b/srcpkgs/libadwaita/template
index 63e643d8fdd70d..fca2b2a5d5a25e 100644
--- a/srcpkgs/libadwaita/template
+++ b/srcpkgs/libadwaita/template
@@ -1,7 +1,7 @@
 # Template file for 'libadwaita'
 pkgname=libadwaita
 version=1.4.4
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="-Dexamples=true -Dtests=true $(vopt_bool gtk_doc)

From aa2d3ab7ddefb88ae7a1cdf765b880bda18a1bd4 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:11:59 -0800
Subject: [PATCH 4/6] gnome-software: update to 45.3.

---
 .../patches/0001-port-to-appstream1.patch     | 504 ++++++++++++++++++
 srcpkgs/gnome-software/template               |   6 +-
 2 files changed, 507 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch

diff --git a/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch b/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch
new file mode 100644
index 00000000000000..256a8509231e5f
--- /dev/null
+++ b/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch
@@ -0,0 +1,504 @@
+See: https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2393
+
+From e6f7e28bdd50a63586ba6a82b936d54db19a311b Mon Sep 17 00:00:00 2001
+From: Matthias Klumpp <matthias@tenstral.net>
+Date: Sun, 8 Oct 2023 20:22:44 +0200
+Subject: [PATCH] Adjust to build with AppStream 1.0 as well as 0.16.x
+
+---
+ lib/gs-app.c                             |  4 ++
+ lib/gs-appstream.c                       | 58 ++++++++++++++++++++----
+ lib/gs-utils.c                           |  8 ++--
+ meson.build                              | 22 +--------
+ plugins/core/gs-plugin-appstream.c       |  8 ----
+ plugins/fwupd/gs-fwupd-app.c             |  8 ++++
+ plugins/fwupd/gs-plugin-fwupd.c          |  4 ++
+ src/gs-hardware-support-context-dialog.c |  6 +++
+ src/gs-repos-dialog.c                    |  4 ++
+ src/gs-screenshot-carousel.c             |  4 +-
+ src/gs-screenshot-image.c                | 41 +++++++++++++----
+ src/gs-screenshot-image.h                |  7 +++
+ subprojects/appstream.wrap               |  2 +-
+ 13 files changed, 120 insertions(+), 56 deletions(-)
+
+diff --git a/lib/gs-app.c b/lib/gs-app.c
+index 048a061225..e2694057cd 100644
+--- a/lib/gs-app.c
++++ b/lib/gs-app.c
+@@ -609,7 +609,11 @@ gs_app_to_string_append (GsApp *app, GString *str)
+ 		AsScreenshot *ss = g_ptr_array_index (priv->screenshots, i);
+ 		g_autofree gchar *key = NULL;
+ 		tmp = as_screenshot_get_caption (ss);
++#if AS_CHECK_VERSION(1, 0, 0)
++		im = as_screenshot_get_image (ss, 0, 0, 1);
++#else
+ 		im = as_screenshot_get_image (ss, 0, 0);
++#endif
+ 		if (im == NULL)
+ 			continue;
+ 		key = g_strdup_printf ("screenshot-%02u", i);
+diff --git a/lib/gs-appstream.c b/lib/gs-appstream.c
+index deca176dcf..2cc2427a19 100644
+--- a/lib/gs-appstream.c
++++ b/lib/gs-appstream.c
+@@ -587,8 +587,6 @@ gs_appstream_refine_add_provides (GsApp *app, XbNode *component, GError **error)
+ 					kind = AS_PROVIDED_KIND_FIRMWARE_RUNTIME;
+ 				else if (g_strcmp0 (fw_type, "flashed") == 0)
+ 					kind = AS_PROVIDED_KIND_FIRMWARE_FLASHED;
+-			} else if (g_strcmp0 (element_name, "python2") == 0) {
+-				kind = AS_PROVIDED_KIND_PYTHON_2;
+ 			} else if (g_strcmp0 (element_name, "python3") == 0) {
+ 				kind = AS_PROVIDED_KIND_PYTHON;
+ 			} else if (g_strcmp0 (element_name, "dbus") == 0) {
+@@ -1011,8 +1011,11 @@ gs_appstream_refine_app_relation (GsApp           *app,
+ 			as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_CONTROL);
+ 			as_relation_set_value_control_kind (relation, as_control_kind_from_string (xb_node_get_text (child)));
+ 		} else if (g_str_equal (item_kind, "display_length")) {
+-			AsDisplayLengthKind display_length_kind;
+ 			const gchar *compare;
++			const gchar *side;
++#if !AS_CHECK_VERSION(1, 0, 0)
++			AsDisplayLengthKind display_length_kind;
++#endif
+ 
+ 			/* https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-relations-display_length */
+ 			as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_DISPLAY_LENGTH);
+@@ -1020,15 +1023,21 @@ gs_appstream_refine_app_relation (GsApp           *app,
+ 			compare = xb_node_get_attr (child, "compare");
+ 			as_relation_set_compare (relation, (compare != NULL) ? as_relation_compare_from_string (compare) : AS_RELATION_COMPARE_GE);
+ 
++#if AS_CHECK_VERSION(1, 0, 0)
++			side = xb_node_get_attr (child, "side");
++			as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
++			as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
++#else
+ 			display_length_kind = as_display_length_kind_from_string (xb_node_get_text (child));
+ 			if (display_length_kind != AS_DISPLAY_LENGTH_KIND_UNKNOWN) {
+ 				/* Ignore the `side` attribute */
+ 				as_relation_set_value_display_length_kind (relation, display_length_kind);
+ 			} else {
+-				const gchar *side = xb_node_get_attr (child, "side");
++				side = xb_node_get_attr (child, "side");
+ 				as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
+ 				as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
+ 			}
++#endif
+ 		} else {
+ 			g_debug ("Relation type ‘%s’ not currently supported for %s; ignoring",
+ 				 item_kind, gs_app_get_id (app));
+@@ -1472,7 +1481,7 @@ gs_appstream_refine_app (GsPlugin *plugin,
+ }
+ 
+ typedef struct {
+-	AsSearchTokenMatch	 match_value;
++	guint16			 match_value;
+ 	XbQuery			*query;
+ } GsAppstreamSearchHelper;
+ 
+@@ -1522,7 +1531,7 @@ gs_appstream_silo_search_component (GPtrArray *array, XbNode *component, const g
+ }
+ 
+ typedef struct {
+-	AsSearchTokenMatch	match_value;
++	guint16			match_value;
+ 	const gchar		*xpath;
+ } Query;
+ 
+@@ -1585,7 +1594,11 @@ gs_appstream_do_search (GsPlugin *plugin,
+ 			 * Drop the ID token from it as it’s the highest
+ 			 * numeric value but isn’t visible to the user in the
+ 			 * UI, which leads to confusing results ordering. */
++#if AS_CHECK_VERSION(1, 0, 0)
++			gs_app_set_match_value (app, match_value & (~as_utils_get_tag_search_weight ("id")));
++#else
+ 			gs_app_set_match_value (app, match_value & (~AS_SEARCH_TOKEN_MATCH_ID));
++#endif
+ 			gs_app_list_add (list, app);
+ 
+ 			if (gs_app_get_kind (app) == AS_COMPONENT_KIND_ADDON) {
+@@ -1624,18 +1637,32 @@ gs_appstream_search (GsPlugin *plugin,
+ 		     GCancellable *cancellable,
+ 		     GError **error)
+ {
++#if AS_CHECK_VERSION(1, 0, 0)
++	guint16 pkgname_weight = as_utils_get_tag_search_weight ("pkgname");
++	guint16 name_weight = as_utils_get_tag_search_weight ("name");
++	guint16 id_weight = as_utils_get_tag_search_weight ("id");
+ 	const Query queries[] = {
+-		#ifdef HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE
+-		{ AS_SEARCH_TOKEN_MATCH_MEDIATYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+-		#else
+-		{ AS_SEARCH_TOKEN_MATCH_MIMETYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+-		#endif
++		{ as_utils_get_tag_search_weight ("mediatype"),	"provides/mediatype[text()~=stem(?)]" },
+ 		/* Search once with a tokenize-and-casefold operator (`~=`) to support casefolded
+ 		 * full-text search, then again using substring matching (`contains()`), to
+ 		 * support prefix matching. Only do the prefix matches on a few fields, and at a
+ 		 * lower priority, otherwise things will get confusing.
+-		 * 
++		 *
+ 		 * See https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2277 */
++		{ pkgname_weight,				"pkgname[text()~=stem(?)]" },
++		{ pkgname_weight / 2,				"pkgname[contains(text(),stem(?))]" },
++		{ as_utils_get_tag_search_weight ("summary"),	"summary[text()~=stem(?)]" },
++		{ name_weight,					"name[text()~=stem(?)]" },
++		{ name_weight / 2,				"name[contains(text(),stem(?))]" },
++		{ as_utils_get_tag_search_weight ("keyword"),	"keywords/keyword[text()~=stem(?)]" },
++		{ id_weight,					"id[text()~=stem(?)]" },
++		{ id_weight,					"launchable[text()~=stem(?)]" },
++		{ as_utils_get_tag_search_weight ("origin"),	"../components[@origin~=stem(?)]" },
++		{ 0,						NULL }
++	};
++#else
++	const Query queries[] = {
++		{ AS_SEARCH_TOKEN_MATCH_MEDIATYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME,	"pkgname[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME / 2,	"pkgname[contains(text(),stem(?))]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_SUMMARY,	"summary[text()~=stem(?)]" },
+@@ -1647,6 +1674,7 @@ gs_appstream_search (GsPlugin *plugin,
+ 		{ AS_SEARCH_TOKEN_MATCH_ORIGIN,		"../components[@origin~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_NONE,		NULL }
+ 	};
++#endif
+ 
+ 	return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
+ }
+@@ -1659,11 +1687,21 @@ gs_appstream_search_developer_apps (GsPlugin *plugin,
+ 				    GCancellable *cancellable,
+ 				    GError **error)
+ {
++#if AS_CHECK_VERSION(1, 0, 0)
++	const Query queries[] = {
++		{ as_utils_get_tag_search_weight ("pkgname"), "developer/name[text()~=stem(?)]" },
++		{ as_utils_get_tag_search_weight ("summary"), "project_group[text()~=stem(?)]" },
++		/* for legacy support */
++		{ as_utils_get_tag_search_weight ("pkgname"), "developer_name[text()~=stem(?)]" },
++		{ 0,					      NULL }
++	};
++#else
+ 	const Query queries[] = {
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME,	"developer_name[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_SUMMARY,	"project_group[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_NONE,		NULL }
+ 	};
++#endif
+ 
+ 	return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
+ }
+diff --git a/lib/gs-utils.c b/lib/gs-utils.c
+index cf9073025f..19e6ebd046 100644
+--- a/lib/gs-utils.c
++++ b/lib/gs-utils.c
+@@ -1694,9 +1694,9 @@ gs_utils_gstring_replace (GString *str,
+ 			  const gchar *find,
+ 			  const gchar *replace)
+ {
+-	#ifdef HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS
++#if AS_CHECK_VERSION(1, 0, 0)
+ 	as_gstring_replace (str, find, replace, 0);
+-	#else
+-	as_gstring_replace (str, find, replace);
+-	#endif
++#else
++	as_gstring_replace2 (str, find, replace, 0);
++#endif
+ }
+diff --git a/meson.build b/meson.build
+index 09c39df180..ad105869e5 100644
+--- a/meson.build
++++ b/meson.build
+@@ -113,7 +113,7 @@ add_project_arguments('-D_GNU_SOURCE', language : 'c')
+ conf.set('HAVE_LINUX_UNISTD_H', cc.has_header('linux/unistd.h'))
+ 
+ appstream = dependency('appstream',
+-  version : '>= 0.14.0',
++  version : '>= 0.16.2',
+   fallback : ['appstream', 'appstream_dep'],
+   default_options : [
+     'docs=false',
+@@ -121,26 +121,6 @@ appstream = dependency('appstream',
+     'install-docs=false'
+   ]
+ )
+-if appstream.type_name() == 'internal'
+-else
+-  if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_SEARCH_TOKEN_MATCH_MEDIATYPE', dependencies: appstream)
+-    conf.set('HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE', '1')
+-  endif
+-  if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_FORMAT_STYLE_CATALOG', dependencies: appstream)
+-    conf.set('HAVE_AS_FORMAT_STYLE_CATALOG', '1')
+-  endif
+-  if meson.get_compiler('c').has_function('as_metadata_components_to_catalog', prefix: '#include <appstream.h>', dependencies: appstream)
+-    conf.set('HAVE_AS_METADATA_COMPONENTS_TO_CATALOG', '1')
+-  endif
+-  if meson.get_compiler('c').links('''#include <appstream.h>
+-      int main (void)
+-      {
+-         as_gstring_replace (NULL, "a", "b", 0);
+-         return 0;
+-      }''', name: 'as_gstring_replace() has four arguments', dependencies: appstream)
+-    conf.set('HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS', '1')
+-  endif
+-endif
+ 
+ gdk_pixbuf = dependency('gdk-pixbuf-2.0', version : '>= 2.32.0')
+ libxmlb = dependency('xmlb', version : '>= 0.1.7', fallback : ['libxmlb', 'libxmlb_dep'])
+diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c
+index cf9f3022b1..ef3226a591 100644
+--- a/plugins/core/gs-plugin-appstream.c
++++ b/plugins/core/gs-plugin-appstream.c
+@@ -414,11 +414,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
+ 	if (bytes == NULL)
+ 		return NULL;
+ 
+-	#ifdef HAVE_AS_FORMAT_STYLE_CATALOG
+ 	as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_CATALOG);
+-	#else
+-	as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_COLLECTION);
+-	#endif
+ 	as_metadata_parse_bytes (mdata,
+ 				 bytes,
+ 				 AS_FORMAT_KIND_YAML,
+@@ -428,11 +424,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
+ 		return NULL;
+ 	}
+ 
+-	#ifdef HAVE_AS_METADATA_COMPONENTS_TO_CATALOG
+ 	xml = as_metadata_components_to_catalog (mdata, AS_FORMAT_KIND_XML, &tmp_error);
+-	#else
+-	xml = as_metadata_components_to_collection (mdata, AS_FORMAT_KIND_XML, &tmp_error);
+-	#endif
+ 	if (xml == NULL) {
+ 		// This API currently returns NULL if there is nothing to serialize, so we
+ 		// have to test if this is an error or not.
+diff --git a/plugins/fwupd/gs-fwupd-app.c b/plugins/fwupd/gs-fwupd-app.c
+index 6dcda6ee92..5d3254da59 100644
+--- a/plugins/fwupd/gs-fwupd-app.c
++++ b/plugins/fwupd/gs-fwupd-app.c
+@@ -164,7 +164,11 @@ gs_fwupd_app_set_from_device (GsApp *app,
+ 		gs_app_set_install_date (app, fwupd_device_get_created (dev));
+ 	if (fwupd_device_get_description (dev) != NULL) {
+ 		g_autofree gchar *tmp = NULL;
++#if AS_CHECK_VERSION(1, 0, 0)
++		tmp = as_markup_convert (fwupd_device_get_description (dev), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 		tmp = as_markup_convert_simple (fwupd_device_get_description (dev), NULL);
++#endif
+ 		if (tmp != NULL)
+ 			gs_app_set_description (app, GS_APP_QUALITY_NORMAL, tmp);
+ 	}
+@@ -402,7 +406,11 @@ gs_fwupd_app_set_from_release (GsApp *app, FwupdRelease *rel)
+ 	}
+ 	if (fwupd_release_get_description (rel) != NULL) {
+ 		g_autofree gchar *tmp = NULL;
++#if AS_CHECK_VERSION(1, 0, 0)
++		tmp = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 		tmp = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
++#endif
+ 		if (tmp != NULL)
+ 			gs_app_set_update_details_text (app, tmp);
+ 	}
+diff --git a/plugins/fwupd/gs-plugin-fwupd.c b/plugins/fwupd/gs-plugin-fwupd.c
+index e931b2b6db..0747d6e250 100644
+--- a/plugins/fwupd/gs-plugin-fwupd.c
++++ b/plugins/fwupd/gs-plugin-fwupd.c
+@@ -726,7 +726,11 @@ gs_plugin_add_updates (GsPlugin *plugin,
+ 				g_autofree gchar *desc = NULL;
+ 				if (fwupd_release_get_description (rel) == NULL)
+ 					continue;
++#if AS_CHECK_VERSION(1, 0, 0)
++				desc = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 				desc = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
++#endif
+ 				if (desc == NULL)
+ 					continue;
+ 				g_string_append_printf (update_desc,
+diff --git a/src/gs-hardware-support-context-dialog.c b/src/gs-hardware-support-context-dialog.c
+index 0e48c8c266..14653401de 100644
+--- a/src/gs-hardware-support-context-dialog.c
++++ b/src/gs-hardware-support-context-dialog.c
+@@ -461,6 +461,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 			AsRelationCompare comparator = as_relation_get_compare (relation);
+ 			Range current_display_comparand, relation_comparand;
+ 
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 			/* From https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-requires-recommends-display_length */
+ 			Range display_lengths[] = {
+ 				[AS_DISPLAY_LENGTH_KIND_XSMALL] = { 0, 360 },
+@@ -469,6 +470,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 				[AS_DISPLAY_LENGTH_KIND_LARGE] = { 1024, 3840 },
+ 				[AS_DISPLAY_LENGTH_KIND_XLARGE] = { 3840, G_MAXUINT },
+ 			};
++#endif
+ 
+ 			any_display_relations_set = TRUE;
+ 
+@@ -485,11 +487,14 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 			case AS_DISPLAY_SIDE_KIND_LAST:
+ 			default:
+ 				current_display_comparand.min = current_display_comparand.max = MAX (current_screen_size.width, current_screen_size.height);
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 				relation_comparand.min = display_lengths[as_relation_get_value_display_length_kind (relation)].min;
+ 				relation_comparand.max = display_lengths[as_relation_get_value_display_length_kind (relation)].max;
++#endif
+ 				break;
+ 			}
+ 
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 			if (evaluate_display_comparison (display_lengths[AS_DISPLAY_LENGTH_KIND_SMALL], comparator, relation_comparand)) {
+ 				*mobile_relation_kind_out = max_relation_kind (*mobile_relation_kind_out, as_relation_get_kind (relation));
+ 				*mobile_match_out = TRUE;
+@@ -499,6 +504,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 				*desktop_relation_kind_out = max_relation_kind (*desktop_relation_kind_out, as_relation_get_kind (relation));
+ 				*desktop_match_out = TRUE;
+ 			}
++#endif
+ 
+ 			if (evaluate_display_comparison (current_display_comparand, comparator, relation_comparand)) {
+ 				*current_relation_kind_out = max_relation_kind (*current_relation_kind_out, as_relation_get_kind (relation));
+diff --git a/src/gs-repos-dialog.c b/src/gs-repos-dialog.c
+index c41c4944a1..7dac0416d9 100644
+--- a/src/gs-repos-dialog.c
++++ b/src/gs-repos-dialog.c
+@@ -154,7 +154,11 @@ enable_repo (GsReposDialog *dialog,
+ 		g_autoptr(GError) error = NULL;
+ 
+ 		/* convert from AppStream markup */
++#if AS_CHECK_VERSION(1, 0, 0)
++		message = as_markup_convert (gs_app_get_agreement (repo), AS_MARKUP_KIND_TEXT, &error);
++#else
+ 		message = as_markup_convert_simple (gs_app_get_agreement (repo), &error);
++#endif
+ 		if (message == NULL) {
+ 			/* failed, so just try and show the original markup */
+ 			message = g_strdup (gs_app_get_agreement (repo));
+diff --git a/src/gs-screenshot-carousel.c b/src/gs-screenshot-carousel.c
+index 04bbf86a1e..d269af6605 100644
+--- a/src/gs-screenshot-carousel.c
++++ b/src/gs-screenshot-carousel.c
+@@ -141,8 +141,8 @@ gs_screenshot_carousel_load_screenshots (GsScreenshotCarousel *self, GsApp *app,
+ 		gtk_widget_set_can_focus (gtk_widget_get_first_child (ssimg), FALSE);
+ 		gs_screenshot_image_set_screenshot (GS_SCREENSHOT_IMAGE (ssimg), ss);
+ 		gs_screenshot_image_set_size (GS_SCREENSHOT_IMAGE (ssimg),
+-					      AS_IMAGE_NORMAL_WIDTH,
+-					      AS_IMAGE_NORMAL_HEIGHT);
++					      GS_IMAGE_NORMAL_WIDTH,
++					      GS_IMAGE_NORMAL_HEIGHT);
+ 		gtk_widget_add_css_class (ssimg, "screenshot-image-main");
+ 		gs_screenshot_image_load_async (GS_SCREENSHOT_IMAGE (ssimg), cancellable);
+ 
+diff --git a/src/gs-screenshot-image.c b/src/gs-screenshot-image.c
+index c313a2589f..b24083b387 100644
+--- a/src/gs-screenshot-image.c
++++ b/src/gs-screenshot-image.c
+@@ -284,13 +284,13 @@ gs_screenshot_image_save_downloaded_img (GsScreenshotImage *ssimg,
+ 	if (images->len > 1)
+ 		return TRUE;
+ 
+-	if (width == AS_IMAGE_THUMBNAIL_WIDTH &&
+-	    height == AS_IMAGE_THUMBNAIL_HEIGHT) {
+-		width = AS_IMAGE_NORMAL_WIDTH;
+-		height = AS_IMAGE_NORMAL_HEIGHT;
++	if (width == GS_IMAGE_THUMBNAIL_WIDTH &&
++	    height == GS_IMAGE_THUMBNAIL_HEIGHT) {
++		width = GS_IMAGE_NORMAL_WIDTH;
++		height = GS_IMAGE_NORMAL_HEIGHT;
+ 	} else {
+-		width = AS_IMAGE_THUMBNAIL_WIDTH;
+-		height = AS_IMAGE_THUMBNAIL_HEIGHT;
++		width = GS_IMAGE_THUMBNAIL_WIDTH;
++		height = GS_IMAGE_THUMBNAIL_HEIGHT;
+ 	}
+ 
+ 	width *= ssimg->scale;
+@@ -582,16 +582,30 @@ gs_screenshot_image_get_url (GsScreenshotImage *ssimg)
+ 	} else if (as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE) {
+ 		AsImage *im;
+ 
++#if AS_CHECK_VERSION(1, 0, 0)
++		im = as_screenshot_get_image (ssimg->screenshot,
++					      ssimg->width,
++					      ssimg->height,
++					      ssimg->scale);
++#else
+ 		im = as_screenshot_get_image (ssimg->screenshot,
+ 					      ssimg->width * ssimg->scale,
+ 					      ssimg->height * ssimg->scale);
++#endif
+ 
+ 		/* if we've failed to load a HiDPI image, fallback to LoDPI */
+ 		if (im == NULL && ssimg->scale > 1) {
+ 			ssimg->scale = 1;
++#if AS_CHECK_VERSION(1, 0, 0)
++			im = as_screenshot_get_image (ssimg->screenshot,
++						      ssimg->width,
++						      ssimg->height,
++						      1);
++#else
+ 			im = as_screenshot_get_image (ssimg->screenshot,
+ 						      ssimg->width,
+ 						      ssimg->height);
++#endif
+ 		}
+ 
+ 		if (im)
+@@ -698,15 +712,22 @@ gs_screenshot_image_load_async (GsScreenshotImage *ssimg,
+ 	 * smaller version of it straight away */
+ 	if (!ssimg->showing_image &&
+ 	    as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE &&
+-	    ssimg->width > AS_IMAGE_THUMBNAIL_WIDTH &&
+-	    ssimg->height > AS_IMAGE_THUMBNAIL_HEIGHT) {
++	    ssimg->width > GS_IMAGE_THUMBNAIL_WIDTH &&
++	    ssimg->height > GS_IMAGE_THUMBNAIL_HEIGHT) {
+ 		const gchar *url_thumb;
+ 		g_autofree gchar *basename_thumb = NULL;
+ 		g_autofree gchar *cache_kind_thumb = NULL;
+ 		AsImage *im;
++#if AS_CHECK_VERSION(1, 0, 0)
+ 		im = as_screenshot_get_image (ssimg->screenshot,
+-					      AS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
+-					      AS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
++					      GS_IMAGE_THUMBNAIL_WIDTH,
++					      GS_IMAGE_THUMBNAIL_HEIGHT,
++					      ssimg->scale);
++#else
++		im = as_screenshot_get_image (ssimg->screenshot,
++					      GS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
++					      GS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
++#endif
+ 		url_thumb = as_image_get_url (im);
+ 		basename_thumb = gs_screenshot_get_cachefn_for_url (url_thumb);
+ 		cache_kind_thumb = g_build_filename ("screenshots", "112x63", NULL);
+diff --git a/src/gs-screenshot-image.h b/src/gs-screenshot-image.h
+index 1f6cf81ce6..6e45f5d20a 100644
+--- a/src/gs-screenshot-image.h
++++ b/src/gs-screenshot-image.h
+@@ -21,6 +21,13 @@ G_BEGIN_DECLS
+ 
+ G_DECLARE_FINAL_TYPE (GsScreenshotImage, gs_screenshot_image, GS, SCREENSHOT_IMAGE, GtkWidget)
+ 
++#define GS_IMAGE_LARGE_HEIGHT		423
++#define GS_IMAGE_LARGE_WIDTH		752
++#define GS_IMAGE_NORMAL_HEIGHT		351
++#define GS_IMAGE_NORMAL_WIDTH		624
++#define GS_IMAGE_THUMBNAIL_HEIGHT	63
++#define GS_IMAGE_THUMBNAIL_WIDTH 	112
++
+ GtkWidget	*gs_screenshot_image_new		(SoupSession		*session);
+ 
+ AsScreenshot	*gs_screenshot_image_get_screenshot	(GsScreenshotImage	*ssimg);
+diff --git a/subprojects/appstream.wrap b/subprojects/appstream.wrap
+index 6f0beb0cbc..5763a32c64 100644
+--- a/subprojects/appstream.wrap
++++ b/subprojects/appstream.wrap
+@@ -1,5 +1,5 @@
+ [wrap-git]
+ directory = appstream
+ url = https://github.com/ximion/appstream.git
+-revision = v0.14.1
++revision = v0.16.3
+ depth = 1
+-- 
+GitLab
diff --git a/srcpkgs/gnome-software/template b/srcpkgs/gnome-software/template
index c5394ce2105091..70a2dfb664394d 100644
--- a/srcpkgs/gnome-software/template
+++ b/srcpkgs/gnome-software/template
@@ -1,6 +1,6 @@
 # Template file for 'gnome-software'
 pkgname=gnome-software
-version=44.2
+version=45.3
 revision=1
 build_style=meson
 configure_args="-Dpackagekit=false -Dfwupd=false
@@ -18,8 +18,8 @@ license="GPL-3.0-or-later"
 homepage="https://gitlab.gnome.org/GNOME/gnome-software"
 changelog="https://gitlab.gnome.org/GNOME/gnome-software/-/raw/main/NEWS"
 distfiles="https://gitlab.gnome.org/GNOME/gnome-software/-/archive/${version}/gnome-software-${version}.tar.gz"
-checksum=bedfe8652d2ceaf17eccc57d6befe6d95f09d15e486a58f0bb7a9a868d0bacc0
-make_check=no # FIXME
+checksum=be2f64e894e653924411981d952fb694559687010985b53ccd325dee0d6a6b83
+make_check=no # Requires system dbus
 
 build_options="gtk_doc"
 

From 8488a26387d16110aded2cd5e59267ed78ab795f Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 04:41:38 -0800
Subject: [PATCH 5/6] New package: debugedit-5.0

---
 srcpkgs/debugedit/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/debugedit/template

diff --git a/srcpkgs/debugedit/template b/srcpkgs/debugedit/template
new file mode 100644
index 00000000000000..3056f067fda036
--- /dev/null
+++ b/srcpkgs/debugedit/template
@@ -0,0 +1,17 @@
+# Template file for 'debugedit'
+pkgname=debugedit
+version=5.0
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config"
+makedepends="elfutils-devel"
+short_desc="Tools for debuginfo creation"
+maintainer="oreo639 <oreo6391@gmail.com>"
+license="GPL-2.0-or-later"
+homepage="https://sourceware.org/debugedit/"
+distfiles="https://sourceware.org/pub/debugedit/${version%%.*}.0/debugedit-${version}.tar.xz"
+checksum=e9ecd7d350bebae1f178ce6776ca19a648b6fe8fa22f5b3044b38d7899aa553e
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+	makedepends+=" musl-legacy-compat"
+fi

From 67af81979b2c7e037f756abfaaf67c2338024d81 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:12:25 -0800
Subject: [PATCH 6/6] flatpak-builder: update to 1.4.2.

---
 srcpkgs/flatpak-builder/template | 27 ++++++++++-----------------
 1 file changed, 10 insertions(+), 17 deletions(-)

diff --git a/srcpkgs/flatpak-builder/template b/srcpkgs/flatpak-builder/template
index fe3485b0d89568..15ee79c9a082b4 100644
--- a/srcpkgs/flatpak-builder/template
+++ b/srcpkgs/flatpak-builder/template
@@ -1,28 +1,21 @@
 # Template file for 'flatpak-builder'
 pkgname=flatpak-builder
-version=1.2.3
+version=1.4.2
 revision=1
-build_style=gnu-configure
-hostmakedepends="pkg-config xmlto"
-makedepends="flatpak-devel json-glib-devel libcap-devel libsoup-devel
- libyaml-devel libcurl-devel"
-depends="elfutils"
+build_style=meson
+hostmakedepends="pkg-config xmlto debugedit AppStream-compose"
+makedepends="flatpak-devel json-glib-devel libcap-devel
+ libyaml-devel libcurl-devel libxml2-devel"
+depends="elfutils debugedit AppStream-compose"
 short_desc="Tool to build flatpaks from source"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://github.com/flatpak/flatpak-builder"
 changelog="https://github.com/flatpak/flatpak-builder/raw/main/NEWS"
-distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}.tar.xz"
-checksum=e257825a47f7a3e71e30fb0f80f2d9ac6e4801f746f552dfaf0e564e3ee351c8
-# Tests expects a Debian derivate hosts to build a flatpak container from.
-make_check=no
-
-if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" flatpak-devel"
-fi
-if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
-	makedepends+=" musl-legacy-compat"
-fi
+#distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}.tar.xz"
+distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}-fixed-libglnx.tar.xz"
+checksum=c041b974e03a2c2d3cda88a0efe1ecf69f9adf42a1758eac341d555e779d0596
+make_check=no # Can't run bubblewrap inside the container
 
 post_patch() {
 	if [ "$XBPS_TARGET_LIBC" = "musl" ]; then

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] flatpak-builder: update to 1.4.2.
  2024-03-05 12:13 [PR PATCH] flatpak-builder: update to 1.4.2 oreo639
                   ` (6 preceding siblings ...)
  2024-03-05 21:40 ` oreo639
@ 2024-03-05 22:02 ` oreo639
  2024-03-09 10:56 ` [PR REVIEW] " Johnnynator
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: oreo639 @ 2024-03-05 22:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1258 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages flatpak-builder
https://github.com/void-linux/void-packages/pull/49126

flatpak-builder: update to 1.4.2.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/49126.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-flatpak-builder-49126.patch --]
[-- Type: text/x-diff, Size: 33566 bytes --]

From 0906886dcdd1e379e4271fd1873fa1db0664e150 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:09:50 -0800
Subject: [PATCH 1/6] AppStream: update to 1.0.2.

---
 common/shlibs                   |  4 +-
 srcpkgs/AppStream-compose       |  1 +
 srcpkgs/AppStream-compose-devel |  1 +
 srcpkgs/AppStream-qt-devel      |  1 +
 srcpkgs/AppStream/template      | 76 ++++++++++++++++++++++++++-------
 5 files changed, 67 insertions(+), 16 deletions(-)
 create mode 120000 srcpkgs/AppStream-compose
 create mode 120000 srcpkgs/AppStream-compose-devel
 create mode 120000 srcpkgs/AppStream-qt-devel

diff --git a/common/shlibs b/common/shlibs
index 8958c92d7fe196..116ec2cfdd8f71 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2992,7 +2992,9 @@ libliveMedia.so.81 live555-2020.08.11_2
 libgroupsock.so.8 live555-2020.08.11_2
 libUsageEnvironment.so.3 live555-2020.08.11_2
 libBasicUsageEnvironment.so.1 live555-2020.08.11_2
-libappstream.so.4 AppStream-0.12.2_1
+libappstream.so.5 AppStream-1.0.2_1
+libAppStreamQt.so.3 AppStream-qt-1.0.2_1
+libappstream-compose.so.0 AppStream-compose-1.0.2_1
 libappstream-glib.so.8 appstream-glib-0.6.13_1
 libappstream-builder.so.8 appstream-glib-0.6.13_1
 libflatpak.so.0 flatpak-0.9.3_2
diff --git a/srcpkgs/AppStream-compose b/srcpkgs/AppStream-compose
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-compose
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream-compose-devel b/srcpkgs/AppStream-compose-devel
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-compose-devel
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream-qt-devel b/srcpkgs/AppStream-qt-devel
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-qt-devel
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream/template b/srcpkgs/AppStream/template
index 87fbb76d2c9c66..fb17196035c5d7 100644
--- a/srcpkgs/AppStream/template
+++ b/srcpkgs/AppStream/template
@@ -1,48 +1,94 @@
 # Template file for 'AppStream'
 pkgname=AppStream
-version=0.16.4
+version=1.0.2
 revision=1
 build_style=meson
 build_helper="gir qemu"
 configure_args="$(vopt_bool gir gir) $(vopt_bool vala vapi)
- -Dstemming=false -Dapidocs=false -Dqt=true -Dsystemd=false"
+ -Dstemming=false -Dapidocs=false -Dqt=true -Dsystemd=false
+ -Dcompose=true"
 hostmakedepends="docbook-xsl gettext glib-devel gperf libxslt pkg-config
- qt5-host-tools $(vopt_if vala vala) itstool"
-makedepends="libglib-devel libxml2-devel libyaml-devel qt5-devel libxmlb-devel
- libcurl-devel"
+ qt6-base $(vopt_if vala vala) itstool"
+makedepends="libglib-devel libxml2-devel libyaml-devel qt6-base-devel libxmlb-devel
+ libcurl-devel librsvg-devel"
+checkdepends="tar"
 short_desc="Tools and libraries to work with AppStream metadata"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://github.com/ximion/appstream"
 changelog="https://raw.githubusercontent.com/ximion/appstream/master/NEWS"
 distfiles="https://github.com/ximion/appstream/archive/v${version}.tar.gz"
-checksum=95d5cf451d1945182a9bc4d597c13e713451a3dba1a5759f45b6b3279ff3774c
-conf_files="/etc/appstream.conf"
+checksum=77e271f47167ae37a68111b951c3c07e4261579e69047747044f7924c8219d14
 triggers="appstream-cache"
 
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" AppStream-devel"
+fi
+
 build_options="gir vala"
 build_options_default="gir vala"
 
+pre_configure() {
+	# Meson uses paths from pkg-config which is /usr/lib32/qt6 when cross compiling 32-bit
+	# Work around this for now
+	export PATH="/usr/lib/qt6/libexec/:$PATH"
+}
+
 AppStream-devel_package() {
-	depends="${sourcepkg}>=${version}_${revision} AppStream-qt>=${version}_${revision}"
+	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - development files"
 	pkg_install() {
-		vmove usr/include
-		vmove usr/lib/cmake
-		vmove usr/lib/pkgconfig
-		vmove "usr/lib/*.so"
+		vmove usr/include/appstream
+		vmove usr/lib/pkgconfig/appstream.pc
+		vmove /usr/lib/libappstream.so
 		if [ "$build_option_gir" ]; then
-			vmove usr/share/gir-1.0
+			vmove usr/share/gir-1.0/AppStream-1.0.gir
 		fi
 		if [ "$build_option_vala" ]; then
-			vmove usr/share/vala
+			vmove usr/share/vala/vapi/appstream.*
+		fi
+	}
+}
+
+AppStream-compose_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - compose libraries and tools"
+	pkg_install() {
+		vmove usr/libexec/appstreamcli-compose
+		vmove usr/share/man/man1/appstreamcli-compose.1*
+		vmove usr/lib/libappstream-compose.so.*
+		vmove usr/lib/girepository-1.0/AppStreamCompose-1.0.typelib
+		vmove usr/share/metainfo/org.freedesktop.appstream.compose.metainfo.xml
+	}
+}
+
+AppStream-compose-devel_package() {
+	depends="AppStream-compose>=${version}_${revision} AppStream-devel>=${version}_${revision}"
+	short_desc+=" - compose development files"
+	pkg_install() {
+		vmove usr/include/appstream-compose
+		vmove usr/lib/pkgconfig/appstream-compose.pc
+		vmove /usr/lib/libappstream-compose.so
+		if [ "$build_option_gir" ]; then
+			vmove usr/share/gir-1.0/AppStreamCompose-1.0.gir
 		fi
 	}
 }
 
 AppStream-qt_package() {
-	short_desc+=" - qt5 interface library"
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - qt6 interface library"
+	pkg_install() {
+		vmove usr/lib/libAppStreamQt.so
+	}
+}
+
+AppStream-qt-devel_package() {
+	depends="AppStream-qt>=${version}_${revision}"
+	short_desc+=" - qt6 development files"
 	pkg_install() {
+		vmove usr/include/AppStreamQt
+		vmove usr/lib/cmake/AppStreamQt
 		vmove "usr/lib/libAppStreamQt.so.*"
 	}
 }

From 3bef3a637513c22981bb38826168f81758eef1fb Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:10:35 -0800
Subject: [PATCH 2/6] flatpak: rebuild for AppStream 1.0

---
 srcpkgs/flatpak/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/flatpak/template b/srcpkgs/flatpak/template
index 819686057ac9bc..066c3021a335fc 100644
--- a/srcpkgs/flatpak/template
+++ b/srcpkgs/flatpak/template
@@ -1,7 +1,7 @@
 # Template file for 'flatpak'
 pkgname=flatpak
 version=1.15.6
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="

From f0f9232d7cfa2be391632a2abce9fe30695df8ba Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:11:53 -0800
Subject: [PATCH 3/6] libadwaita: rebuild for AppStream 1.0

---
 srcpkgs/libadwaita/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libadwaita/template b/srcpkgs/libadwaita/template
index 63e643d8fdd70d..fca2b2a5d5a25e 100644
--- a/srcpkgs/libadwaita/template
+++ b/srcpkgs/libadwaita/template
@@ -1,7 +1,7 @@
 # Template file for 'libadwaita'
 pkgname=libadwaita
 version=1.4.4
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="-Dexamples=true -Dtests=true $(vopt_bool gtk_doc)

From 64da90aadfe1a1688a659db14aed902b9a32c906 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:11:59 -0800
Subject: [PATCH 4/6] gnome-software: update to 45.3.

---
 .../patches/0001-port-to-appstream1.patch     | 504 ++++++++++++++++++
 srcpkgs/gnome-software/template               |   6 +-
 2 files changed, 507 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch

diff --git a/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch b/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch
new file mode 100644
index 00000000000000..256a8509231e5f
--- /dev/null
+++ b/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch
@@ -0,0 +1,504 @@
+See: https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2393
+
+From e6f7e28bdd50a63586ba6a82b936d54db19a311b Mon Sep 17 00:00:00 2001
+From: Matthias Klumpp <matthias@tenstral.net>
+Date: Sun, 8 Oct 2023 20:22:44 +0200
+Subject: [PATCH] Adjust to build with AppStream 1.0 as well as 0.16.x
+
+---
+ lib/gs-app.c                             |  4 ++
+ lib/gs-appstream.c                       | 58 ++++++++++++++++++++----
+ lib/gs-utils.c                           |  8 ++--
+ meson.build                              | 22 +--------
+ plugins/core/gs-plugin-appstream.c       |  8 ----
+ plugins/fwupd/gs-fwupd-app.c             |  8 ++++
+ plugins/fwupd/gs-plugin-fwupd.c          |  4 ++
+ src/gs-hardware-support-context-dialog.c |  6 +++
+ src/gs-repos-dialog.c                    |  4 ++
+ src/gs-screenshot-carousel.c             |  4 +-
+ src/gs-screenshot-image.c                | 41 +++++++++++++----
+ src/gs-screenshot-image.h                |  7 +++
+ subprojects/appstream.wrap               |  2 +-
+ 13 files changed, 120 insertions(+), 56 deletions(-)
+
+diff --git a/lib/gs-app.c b/lib/gs-app.c
+index 048a061225..e2694057cd 100644
+--- a/lib/gs-app.c
++++ b/lib/gs-app.c
+@@ -609,7 +609,11 @@ gs_app_to_string_append (GsApp *app, GString *str)
+ 		AsScreenshot *ss = g_ptr_array_index (priv->screenshots, i);
+ 		g_autofree gchar *key = NULL;
+ 		tmp = as_screenshot_get_caption (ss);
++#if AS_CHECK_VERSION(1, 0, 0)
++		im = as_screenshot_get_image (ss, 0, 0, 1);
++#else
+ 		im = as_screenshot_get_image (ss, 0, 0);
++#endif
+ 		if (im == NULL)
+ 			continue;
+ 		key = g_strdup_printf ("screenshot-%02u", i);
+diff --git a/lib/gs-appstream.c b/lib/gs-appstream.c
+index deca176dcf..2cc2427a19 100644
+--- a/lib/gs-appstream.c
++++ b/lib/gs-appstream.c
+@@ -587,8 +587,6 @@ gs_appstream_refine_add_provides (GsApp *app, XbNode *component, GError **error)
+ 					kind = AS_PROVIDED_KIND_FIRMWARE_RUNTIME;
+ 				else if (g_strcmp0 (fw_type, "flashed") == 0)
+ 					kind = AS_PROVIDED_KIND_FIRMWARE_FLASHED;
+-			} else if (g_strcmp0 (element_name, "python2") == 0) {
+-				kind = AS_PROVIDED_KIND_PYTHON_2;
+ 			} else if (g_strcmp0 (element_name, "python3") == 0) {
+ 				kind = AS_PROVIDED_KIND_PYTHON;
+ 			} else if (g_strcmp0 (element_name, "dbus") == 0) {
+@@ -1011,8 +1011,11 @@ gs_appstream_refine_app_relation (GsApp           *app,
+ 			as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_CONTROL);
+ 			as_relation_set_value_control_kind (relation, as_control_kind_from_string (xb_node_get_text (child)));
+ 		} else if (g_str_equal (item_kind, "display_length")) {
+-			AsDisplayLengthKind display_length_kind;
+ 			const gchar *compare;
++			const gchar *side;
++#if !AS_CHECK_VERSION(1, 0, 0)
++			AsDisplayLengthKind display_length_kind;
++#endif
+ 
+ 			/* https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-relations-display_length */
+ 			as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_DISPLAY_LENGTH);
+@@ -1020,15 +1023,21 @@ gs_appstream_refine_app_relation (GsApp           *app,
+ 			compare = xb_node_get_attr (child, "compare");
+ 			as_relation_set_compare (relation, (compare != NULL) ? as_relation_compare_from_string (compare) : AS_RELATION_COMPARE_GE);
+ 
++#if AS_CHECK_VERSION(1, 0, 0)
++			side = xb_node_get_attr (child, "side");
++			as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
++			as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
++#else
+ 			display_length_kind = as_display_length_kind_from_string (xb_node_get_text (child));
+ 			if (display_length_kind != AS_DISPLAY_LENGTH_KIND_UNKNOWN) {
+ 				/* Ignore the `side` attribute */
+ 				as_relation_set_value_display_length_kind (relation, display_length_kind);
+ 			} else {
+-				const gchar *side = xb_node_get_attr (child, "side");
++				side = xb_node_get_attr (child, "side");
+ 				as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
+ 				as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
+ 			}
++#endif
+ 		} else {
+ 			g_debug ("Relation type ‘%s’ not currently supported for %s; ignoring",
+ 				 item_kind, gs_app_get_id (app));
+@@ -1472,7 +1481,7 @@ gs_appstream_refine_app (GsPlugin *plugin,
+ }
+ 
+ typedef struct {
+-	AsSearchTokenMatch	 match_value;
++	guint16			 match_value;
+ 	XbQuery			*query;
+ } GsAppstreamSearchHelper;
+ 
+@@ -1522,7 +1531,7 @@ gs_appstream_silo_search_component (GPtrArray *array, XbNode *component, const g
+ }
+ 
+ typedef struct {
+-	AsSearchTokenMatch	match_value;
++	guint16			match_value;
+ 	const gchar		*xpath;
+ } Query;
+ 
+@@ -1585,7 +1594,11 @@ gs_appstream_do_search (GsPlugin *plugin,
+ 			 * Drop the ID token from it as it’s the highest
+ 			 * numeric value but isn’t visible to the user in the
+ 			 * UI, which leads to confusing results ordering. */
++#if AS_CHECK_VERSION(1, 0, 0)
++			gs_app_set_match_value (app, match_value & (~as_utils_get_tag_search_weight ("id")));
++#else
+ 			gs_app_set_match_value (app, match_value & (~AS_SEARCH_TOKEN_MATCH_ID));
++#endif
+ 			gs_app_list_add (list, app);
+ 
+ 			if (gs_app_get_kind (app) == AS_COMPONENT_KIND_ADDON) {
+@@ -1624,18 +1637,32 @@ gs_appstream_search (GsPlugin *plugin,
+ 		     GCancellable *cancellable,
+ 		     GError **error)
+ {
++#if AS_CHECK_VERSION(1, 0, 0)
++	guint16 pkgname_weight = as_utils_get_tag_search_weight ("pkgname");
++	guint16 name_weight = as_utils_get_tag_search_weight ("name");
++	guint16 id_weight = as_utils_get_tag_search_weight ("id");
+ 	const Query queries[] = {
+-		#ifdef HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE
+-		{ AS_SEARCH_TOKEN_MATCH_MEDIATYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+-		#else
+-		{ AS_SEARCH_TOKEN_MATCH_MIMETYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+-		#endif
++		{ as_utils_get_tag_search_weight ("mediatype"),	"provides/mediatype[text()~=stem(?)]" },
+ 		/* Search once with a tokenize-and-casefold operator (`~=`) to support casefolded
+ 		 * full-text search, then again using substring matching (`contains()`), to
+ 		 * support prefix matching. Only do the prefix matches on a few fields, and at a
+ 		 * lower priority, otherwise things will get confusing.
+-		 * 
++		 *
+ 		 * See https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2277 */
++		{ pkgname_weight,				"pkgname[text()~=stem(?)]" },
++		{ pkgname_weight / 2,				"pkgname[contains(text(),stem(?))]" },
++		{ as_utils_get_tag_search_weight ("summary"),	"summary[text()~=stem(?)]" },
++		{ name_weight,					"name[text()~=stem(?)]" },
++		{ name_weight / 2,				"name[contains(text(),stem(?))]" },
++		{ as_utils_get_tag_search_weight ("keyword"),	"keywords/keyword[text()~=stem(?)]" },
++		{ id_weight,					"id[text()~=stem(?)]" },
++		{ id_weight,					"launchable[text()~=stem(?)]" },
++		{ as_utils_get_tag_search_weight ("origin"),	"../components[@origin~=stem(?)]" },
++		{ 0,						NULL }
++	};
++#else
++	const Query queries[] = {
++		{ AS_SEARCH_TOKEN_MATCH_MEDIATYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME,	"pkgname[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME / 2,	"pkgname[contains(text(),stem(?))]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_SUMMARY,	"summary[text()~=stem(?)]" },
+@@ -1647,6 +1674,7 @@ gs_appstream_search (GsPlugin *plugin,
+ 		{ AS_SEARCH_TOKEN_MATCH_ORIGIN,		"../components[@origin~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_NONE,		NULL }
+ 	};
++#endif
+ 
+ 	return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
+ }
+@@ -1659,11 +1687,21 @@ gs_appstream_search_developer_apps (GsPlugin *plugin,
+ 				    GCancellable *cancellable,
+ 				    GError **error)
+ {
++#if AS_CHECK_VERSION(1, 0, 0)
++	const Query queries[] = {
++		{ as_utils_get_tag_search_weight ("pkgname"), "developer/name[text()~=stem(?)]" },
++		{ as_utils_get_tag_search_weight ("summary"), "project_group[text()~=stem(?)]" },
++		/* for legacy support */
++		{ as_utils_get_tag_search_weight ("pkgname"), "developer_name[text()~=stem(?)]" },
++		{ 0,					      NULL }
++	};
++#else
+ 	const Query queries[] = {
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME,	"developer_name[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_SUMMARY,	"project_group[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_NONE,		NULL }
+ 	};
++#endif
+ 
+ 	return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
+ }
+diff --git a/lib/gs-utils.c b/lib/gs-utils.c
+index cf9073025f..19e6ebd046 100644
+--- a/lib/gs-utils.c
++++ b/lib/gs-utils.c
+@@ -1694,9 +1694,9 @@ gs_utils_gstring_replace (GString *str,
+ 			  const gchar *find,
+ 			  const gchar *replace)
+ {
+-	#ifdef HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS
++#if AS_CHECK_VERSION(1, 0, 0)
+ 	as_gstring_replace (str, find, replace, 0);
+-	#else
+-	as_gstring_replace (str, find, replace);
+-	#endif
++#else
++	as_gstring_replace2 (str, find, replace, 0);
++#endif
+ }
+diff --git a/meson.build b/meson.build
+index 09c39df180..ad105869e5 100644
+--- a/meson.build
++++ b/meson.build
+@@ -113,7 +113,7 @@ add_project_arguments('-D_GNU_SOURCE', language : 'c')
+ conf.set('HAVE_LINUX_UNISTD_H', cc.has_header('linux/unistd.h'))
+ 
+ appstream = dependency('appstream',
+-  version : '>= 0.14.0',
++  version : '>= 0.16.2',
+   fallback : ['appstream', 'appstream_dep'],
+   default_options : [
+     'docs=false',
+@@ -121,26 +121,6 @@ appstream = dependency('appstream',
+     'install-docs=false'
+   ]
+ )
+-if appstream.type_name() == 'internal'
+-else
+-  if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_SEARCH_TOKEN_MATCH_MEDIATYPE', dependencies: appstream)
+-    conf.set('HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE', '1')
+-  endif
+-  if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_FORMAT_STYLE_CATALOG', dependencies: appstream)
+-    conf.set('HAVE_AS_FORMAT_STYLE_CATALOG', '1')
+-  endif
+-  if meson.get_compiler('c').has_function('as_metadata_components_to_catalog', prefix: '#include <appstream.h>', dependencies: appstream)
+-    conf.set('HAVE_AS_METADATA_COMPONENTS_TO_CATALOG', '1')
+-  endif
+-  if meson.get_compiler('c').links('''#include <appstream.h>
+-      int main (void)
+-      {
+-         as_gstring_replace (NULL, "a", "b", 0);
+-         return 0;
+-      }''', name: 'as_gstring_replace() has four arguments', dependencies: appstream)
+-    conf.set('HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS', '1')
+-  endif
+-endif
+ 
+ gdk_pixbuf = dependency('gdk-pixbuf-2.0', version : '>= 2.32.0')
+ libxmlb = dependency('xmlb', version : '>= 0.1.7', fallback : ['libxmlb', 'libxmlb_dep'])
+diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c
+index cf9f3022b1..ef3226a591 100644
+--- a/plugins/core/gs-plugin-appstream.c
++++ b/plugins/core/gs-plugin-appstream.c
+@@ -414,11 +414,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
+ 	if (bytes == NULL)
+ 		return NULL;
+ 
+-	#ifdef HAVE_AS_FORMAT_STYLE_CATALOG
+ 	as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_CATALOG);
+-	#else
+-	as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_COLLECTION);
+-	#endif
+ 	as_metadata_parse_bytes (mdata,
+ 				 bytes,
+ 				 AS_FORMAT_KIND_YAML,
+@@ -428,11 +424,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
+ 		return NULL;
+ 	}
+ 
+-	#ifdef HAVE_AS_METADATA_COMPONENTS_TO_CATALOG
+ 	xml = as_metadata_components_to_catalog (mdata, AS_FORMAT_KIND_XML, &tmp_error);
+-	#else
+-	xml = as_metadata_components_to_collection (mdata, AS_FORMAT_KIND_XML, &tmp_error);
+-	#endif
+ 	if (xml == NULL) {
+ 		// This API currently returns NULL if there is nothing to serialize, so we
+ 		// have to test if this is an error or not.
+diff --git a/plugins/fwupd/gs-fwupd-app.c b/plugins/fwupd/gs-fwupd-app.c
+index 6dcda6ee92..5d3254da59 100644
+--- a/plugins/fwupd/gs-fwupd-app.c
++++ b/plugins/fwupd/gs-fwupd-app.c
+@@ -164,7 +164,11 @@ gs_fwupd_app_set_from_device (GsApp *app,
+ 		gs_app_set_install_date (app, fwupd_device_get_created (dev));
+ 	if (fwupd_device_get_description (dev) != NULL) {
+ 		g_autofree gchar *tmp = NULL;
++#if AS_CHECK_VERSION(1, 0, 0)
++		tmp = as_markup_convert (fwupd_device_get_description (dev), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 		tmp = as_markup_convert_simple (fwupd_device_get_description (dev), NULL);
++#endif
+ 		if (tmp != NULL)
+ 			gs_app_set_description (app, GS_APP_QUALITY_NORMAL, tmp);
+ 	}
+@@ -402,7 +406,11 @@ gs_fwupd_app_set_from_release (GsApp *app, FwupdRelease *rel)
+ 	}
+ 	if (fwupd_release_get_description (rel) != NULL) {
+ 		g_autofree gchar *tmp = NULL;
++#if AS_CHECK_VERSION(1, 0, 0)
++		tmp = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 		tmp = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
++#endif
+ 		if (tmp != NULL)
+ 			gs_app_set_update_details_text (app, tmp);
+ 	}
+diff --git a/plugins/fwupd/gs-plugin-fwupd.c b/plugins/fwupd/gs-plugin-fwupd.c
+index e931b2b6db..0747d6e250 100644
+--- a/plugins/fwupd/gs-plugin-fwupd.c
++++ b/plugins/fwupd/gs-plugin-fwupd.c
+@@ -726,7 +726,11 @@ gs_plugin_add_updates (GsPlugin *plugin,
+ 				g_autofree gchar *desc = NULL;
+ 				if (fwupd_release_get_description (rel) == NULL)
+ 					continue;
++#if AS_CHECK_VERSION(1, 0, 0)
++				desc = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 				desc = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
++#endif
+ 				if (desc == NULL)
+ 					continue;
+ 				g_string_append_printf (update_desc,
+diff --git a/src/gs-hardware-support-context-dialog.c b/src/gs-hardware-support-context-dialog.c
+index 0e48c8c266..14653401de 100644
+--- a/src/gs-hardware-support-context-dialog.c
++++ b/src/gs-hardware-support-context-dialog.c
+@@ -461,6 +461,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 			AsRelationCompare comparator = as_relation_get_compare (relation);
+ 			Range current_display_comparand, relation_comparand;
+ 
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 			/* From https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-requires-recommends-display_length */
+ 			Range display_lengths[] = {
+ 				[AS_DISPLAY_LENGTH_KIND_XSMALL] = { 0, 360 },
+@@ -469,6 +470,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 				[AS_DISPLAY_LENGTH_KIND_LARGE] = { 1024, 3840 },
+ 				[AS_DISPLAY_LENGTH_KIND_XLARGE] = { 3840, G_MAXUINT },
+ 			};
++#endif
+ 
+ 			any_display_relations_set = TRUE;
+ 
+@@ -485,11 +487,14 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 			case AS_DISPLAY_SIDE_KIND_LAST:
+ 			default:
+ 				current_display_comparand.min = current_display_comparand.max = MAX (current_screen_size.width, current_screen_size.height);
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 				relation_comparand.min = display_lengths[as_relation_get_value_display_length_kind (relation)].min;
+ 				relation_comparand.max = display_lengths[as_relation_get_value_display_length_kind (relation)].max;
++#endif
+ 				break;
+ 			}
+ 
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 			if (evaluate_display_comparison (display_lengths[AS_DISPLAY_LENGTH_KIND_SMALL], comparator, relation_comparand)) {
+ 				*mobile_relation_kind_out = max_relation_kind (*mobile_relation_kind_out, as_relation_get_kind (relation));
+ 				*mobile_match_out = TRUE;
+@@ -499,6 +504,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 				*desktop_relation_kind_out = max_relation_kind (*desktop_relation_kind_out, as_relation_get_kind (relation));
+ 				*desktop_match_out = TRUE;
+ 			}
++#endif
+ 
+ 			if (evaluate_display_comparison (current_display_comparand, comparator, relation_comparand)) {
+ 				*current_relation_kind_out = max_relation_kind (*current_relation_kind_out, as_relation_get_kind (relation));
+diff --git a/src/gs-repos-dialog.c b/src/gs-repos-dialog.c
+index c41c4944a1..7dac0416d9 100644
+--- a/src/gs-repos-dialog.c
++++ b/src/gs-repos-dialog.c
+@@ -154,7 +154,11 @@ enable_repo (GsReposDialog *dialog,
+ 		g_autoptr(GError) error = NULL;
+ 
+ 		/* convert from AppStream markup */
++#if AS_CHECK_VERSION(1, 0, 0)
++		message = as_markup_convert (gs_app_get_agreement (repo), AS_MARKUP_KIND_TEXT, &error);
++#else
+ 		message = as_markup_convert_simple (gs_app_get_agreement (repo), &error);
++#endif
+ 		if (message == NULL) {
+ 			/* failed, so just try and show the original markup */
+ 			message = g_strdup (gs_app_get_agreement (repo));
+diff --git a/src/gs-screenshot-carousel.c b/src/gs-screenshot-carousel.c
+index 04bbf86a1e..d269af6605 100644
+--- a/src/gs-screenshot-carousel.c
++++ b/src/gs-screenshot-carousel.c
+@@ -141,8 +141,8 @@ gs_screenshot_carousel_load_screenshots (GsScreenshotCarousel *self, GsApp *app,
+ 		gtk_widget_set_can_focus (gtk_widget_get_first_child (ssimg), FALSE);
+ 		gs_screenshot_image_set_screenshot (GS_SCREENSHOT_IMAGE (ssimg), ss);
+ 		gs_screenshot_image_set_size (GS_SCREENSHOT_IMAGE (ssimg),
+-					      AS_IMAGE_NORMAL_WIDTH,
+-					      AS_IMAGE_NORMAL_HEIGHT);
++					      GS_IMAGE_NORMAL_WIDTH,
++					      GS_IMAGE_NORMAL_HEIGHT);
+ 		gtk_widget_add_css_class (ssimg, "screenshot-image-main");
+ 		gs_screenshot_image_load_async (GS_SCREENSHOT_IMAGE (ssimg), cancellable);
+ 
+diff --git a/src/gs-screenshot-image.c b/src/gs-screenshot-image.c
+index c313a2589f..b24083b387 100644
+--- a/src/gs-screenshot-image.c
++++ b/src/gs-screenshot-image.c
+@@ -284,13 +284,13 @@ gs_screenshot_image_save_downloaded_img (GsScreenshotImage *ssimg,
+ 	if (images->len > 1)
+ 		return TRUE;
+ 
+-	if (width == AS_IMAGE_THUMBNAIL_WIDTH &&
+-	    height == AS_IMAGE_THUMBNAIL_HEIGHT) {
+-		width = AS_IMAGE_NORMAL_WIDTH;
+-		height = AS_IMAGE_NORMAL_HEIGHT;
++	if (width == GS_IMAGE_THUMBNAIL_WIDTH &&
++	    height == GS_IMAGE_THUMBNAIL_HEIGHT) {
++		width = GS_IMAGE_NORMAL_WIDTH;
++		height = GS_IMAGE_NORMAL_HEIGHT;
+ 	} else {
+-		width = AS_IMAGE_THUMBNAIL_WIDTH;
+-		height = AS_IMAGE_THUMBNAIL_HEIGHT;
++		width = GS_IMAGE_THUMBNAIL_WIDTH;
++		height = GS_IMAGE_THUMBNAIL_HEIGHT;
+ 	}
+ 
+ 	width *= ssimg->scale;
+@@ -582,16 +582,30 @@ gs_screenshot_image_get_url (GsScreenshotImage *ssimg)
+ 	} else if (as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE) {
+ 		AsImage *im;
+ 
++#if AS_CHECK_VERSION(1, 0, 0)
++		im = as_screenshot_get_image (ssimg->screenshot,
++					      ssimg->width,
++					      ssimg->height,
++					      ssimg->scale);
++#else
+ 		im = as_screenshot_get_image (ssimg->screenshot,
+ 					      ssimg->width * ssimg->scale,
+ 					      ssimg->height * ssimg->scale);
++#endif
+ 
+ 		/* if we've failed to load a HiDPI image, fallback to LoDPI */
+ 		if (im == NULL && ssimg->scale > 1) {
+ 			ssimg->scale = 1;
++#if AS_CHECK_VERSION(1, 0, 0)
++			im = as_screenshot_get_image (ssimg->screenshot,
++						      ssimg->width,
++						      ssimg->height,
++						      1);
++#else
+ 			im = as_screenshot_get_image (ssimg->screenshot,
+ 						      ssimg->width,
+ 						      ssimg->height);
++#endif
+ 		}
+ 
+ 		if (im)
+@@ -698,15 +712,22 @@ gs_screenshot_image_load_async (GsScreenshotImage *ssimg,
+ 	 * smaller version of it straight away */
+ 	if (!ssimg->showing_image &&
+ 	    as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE &&
+-	    ssimg->width > AS_IMAGE_THUMBNAIL_WIDTH &&
+-	    ssimg->height > AS_IMAGE_THUMBNAIL_HEIGHT) {
++	    ssimg->width > GS_IMAGE_THUMBNAIL_WIDTH &&
++	    ssimg->height > GS_IMAGE_THUMBNAIL_HEIGHT) {
+ 		const gchar *url_thumb;
+ 		g_autofree gchar *basename_thumb = NULL;
+ 		g_autofree gchar *cache_kind_thumb = NULL;
+ 		AsImage *im;
++#if AS_CHECK_VERSION(1, 0, 0)
+ 		im = as_screenshot_get_image (ssimg->screenshot,
+-					      AS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
+-					      AS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
++					      GS_IMAGE_THUMBNAIL_WIDTH,
++					      GS_IMAGE_THUMBNAIL_HEIGHT,
++					      ssimg->scale);
++#else
++		im = as_screenshot_get_image (ssimg->screenshot,
++					      GS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
++					      GS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
++#endif
+ 		url_thumb = as_image_get_url (im);
+ 		basename_thumb = gs_screenshot_get_cachefn_for_url (url_thumb);
+ 		cache_kind_thumb = g_build_filename ("screenshots", "112x63", NULL);
+diff --git a/src/gs-screenshot-image.h b/src/gs-screenshot-image.h
+index 1f6cf81ce6..6e45f5d20a 100644
+--- a/src/gs-screenshot-image.h
++++ b/src/gs-screenshot-image.h
+@@ -21,6 +21,13 @@ G_BEGIN_DECLS
+ 
+ G_DECLARE_FINAL_TYPE (GsScreenshotImage, gs_screenshot_image, GS, SCREENSHOT_IMAGE, GtkWidget)
+ 
++#define GS_IMAGE_LARGE_HEIGHT		423
++#define GS_IMAGE_LARGE_WIDTH		752
++#define GS_IMAGE_NORMAL_HEIGHT		351
++#define GS_IMAGE_NORMAL_WIDTH		624
++#define GS_IMAGE_THUMBNAIL_HEIGHT	63
++#define GS_IMAGE_THUMBNAIL_WIDTH 	112
++
+ GtkWidget	*gs_screenshot_image_new		(SoupSession		*session);
+ 
+ AsScreenshot	*gs_screenshot_image_get_screenshot	(GsScreenshotImage	*ssimg);
+diff --git a/subprojects/appstream.wrap b/subprojects/appstream.wrap
+index 6f0beb0cbc..5763a32c64 100644
+--- a/subprojects/appstream.wrap
++++ b/subprojects/appstream.wrap
+@@ -1,5 +1,5 @@
+ [wrap-git]
+ directory = appstream
+ url = https://github.com/ximion/appstream.git
+-revision = v0.14.1
++revision = v0.16.3
+ depth = 1
+-- 
+GitLab
diff --git a/srcpkgs/gnome-software/template b/srcpkgs/gnome-software/template
index c5394ce2105091..70a2dfb664394d 100644
--- a/srcpkgs/gnome-software/template
+++ b/srcpkgs/gnome-software/template
@@ -1,6 +1,6 @@
 # Template file for 'gnome-software'
 pkgname=gnome-software
-version=44.2
+version=45.3
 revision=1
 build_style=meson
 configure_args="-Dpackagekit=false -Dfwupd=false
@@ -18,8 +18,8 @@ license="GPL-3.0-or-later"
 homepage="https://gitlab.gnome.org/GNOME/gnome-software"
 changelog="https://gitlab.gnome.org/GNOME/gnome-software/-/raw/main/NEWS"
 distfiles="https://gitlab.gnome.org/GNOME/gnome-software/-/archive/${version}/gnome-software-${version}.tar.gz"
-checksum=bedfe8652d2ceaf17eccc57d6befe6d95f09d15e486a58f0bb7a9a868d0bacc0
-make_check=no # FIXME
+checksum=be2f64e894e653924411981d952fb694559687010985b53ccd325dee0d6a6b83
+make_check=no # Requires system dbus
 
 build_options="gtk_doc"
 

From 68f6187c3cf195ccedbdc4b9cd4103522682eeea Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 04:41:38 -0800
Subject: [PATCH 5/6] New package: debugedit-5.0

---
 srcpkgs/debugedit/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/debugedit/template

diff --git a/srcpkgs/debugedit/template b/srcpkgs/debugedit/template
new file mode 100644
index 00000000000000..3056f067fda036
--- /dev/null
+++ b/srcpkgs/debugedit/template
@@ -0,0 +1,17 @@
+# Template file for 'debugedit'
+pkgname=debugedit
+version=5.0
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config"
+makedepends="elfutils-devel"
+short_desc="Tools for debuginfo creation"
+maintainer="oreo639 <oreo6391@gmail.com>"
+license="GPL-2.0-or-later"
+homepage="https://sourceware.org/debugedit/"
+distfiles="https://sourceware.org/pub/debugedit/${version%%.*}.0/debugedit-${version}.tar.xz"
+checksum=e9ecd7d350bebae1f178ce6776ca19a648b6fe8fa22f5b3044b38d7899aa553e
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+	makedepends+=" musl-legacy-compat"
+fi

From 5be9157f5b6a4fd077a36433c10abcebe418b57a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:12:25 -0800
Subject: [PATCH 6/6] flatpak-builder: update to 1.4.2.

---
 srcpkgs/flatpak-builder/template | 27 ++++++++++-----------------
 1 file changed, 10 insertions(+), 17 deletions(-)

diff --git a/srcpkgs/flatpak-builder/template b/srcpkgs/flatpak-builder/template
index fe3485b0d89568..15ee79c9a082b4 100644
--- a/srcpkgs/flatpak-builder/template
+++ b/srcpkgs/flatpak-builder/template
@@ -1,28 +1,21 @@
 # Template file for 'flatpak-builder'
 pkgname=flatpak-builder
-version=1.2.3
+version=1.4.2
 revision=1
-build_style=gnu-configure
-hostmakedepends="pkg-config xmlto"
-makedepends="flatpak-devel json-glib-devel libcap-devel libsoup-devel
- libyaml-devel libcurl-devel"
-depends="elfutils"
+build_style=meson
+hostmakedepends="pkg-config xmlto debugedit AppStream-compose"
+makedepends="flatpak-devel json-glib-devel libcap-devel
+ libyaml-devel libcurl-devel libxml2-devel"
+depends="elfutils debugedit AppStream-compose"
 short_desc="Tool to build flatpaks from source"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://github.com/flatpak/flatpak-builder"
 changelog="https://github.com/flatpak/flatpak-builder/raw/main/NEWS"
-distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}.tar.xz"
-checksum=e257825a47f7a3e71e30fb0f80f2d9ac6e4801f746f552dfaf0e564e3ee351c8
-# Tests expects a Debian derivate hosts to build a flatpak container from.
-make_check=no
-
-if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" flatpak-devel"
-fi
-if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
-	makedepends+=" musl-legacy-compat"
-fi
+#distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}.tar.xz"
+distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}-fixed-libglnx.tar.xz"
+checksum=c041b974e03a2c2d3cda88a0efe1ecf69f9adf42a1758eac341d555e779d0596
+make_check=no # Can't run bubblewrap inside the container
 
 post_patch() {
 	if [ "$XBPS_TARGET_LIBC" = "musl" ]; then

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR REVIEW] flatpak-builder: update to 1.4.2.
  2024-03-05 12:13 [PR PATCH] flatpak-builder: update to 1.4.2 oreo639
                   ` (7 preceding siblings ...)
  2024-03-05 22:02 ` oreo639
@ 2024-03-09 10:56 ` Johnnynator
  2024-03-09 10:59 ` Johnnynator
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Johnnynator @ 2024-03-09 10:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 241 bytes --]

New review comment by Johnnynator on void-packages repository

https://github.com/void-linux/void-packages/pull/49126#discussion_r1518554274

Comment:
Ideally all wildcards should be quoted, otherwise expansion is even more nondeterministic

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: flatpak-builder: update to 1.4.2.
  2024-03-05 12:13 [PR PATCH] flatpak-builder: update to 1.4.2 oreo639
                   ` (8 preceding siblings ...)
  2024-03-09 10:56 ` [PR REVIEW] " Johnnynator
@ 2024-03-09 10:59 ` Johnnynator
  2024-03-09 22:41 ` [PR REVIEW] " oreo639
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Johnnynator @ 2024-03-09 10:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 527 bytes --]

New comment by Johnnynator on void-packages repository

https://github.com/void-linux/void-packages/pull/49126#issuecomment-1986824954

Comment:
```
Package polkit-agent-1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `polkit-agent-1.pc'
to the PKG_CONFIG_PATH environment variable
Package 'polkit-agent-1', required by 'flatpak', not found
```

Can you add `polkit-devel` to dependency list of `flatpak-devel`, it is listed in the pkg config file as a private dependency 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR REVIEW] flatpak-builder: update to 1.4.2.
  2024-03-05 12:13 [PR PATCH] flatpak-builder: update to 1.4.2 oreo639
                   ` (9 preceding siblings ...)
  2024-03-09 10:59 ` Johnnynator
@ 2024-03-09 22:41 ` oreo639
  2024-03-09 22:41 ` oreo639
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: oreo639 @ 2024-03-09 22:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 172 bytes --]

New review comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/49126#discussion_r1518675824

Comment:
Thanks for the reminder.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR REVIEW] flatpak-builder: update to 1.4.2.
  2024-03-05 12:13 [PR PATCH] flatpak-builder: update to 1.4.2 oreo639
                   ` (10 preceding siblings ...)
  2024-03-09 22:41 ` [PR REVIEW] " oreo639
@ 2024-03-09 22:41 ` oreo639
  2024-03-09 23:09 ` [PR PATCH] [Updated] " oreo639
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: oreo639 @ 2024-03-09 22:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 177 bytes --]

New review comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/49126#discussion_r1518675824

Comment:
Thanks for pointing that out.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] flatpak-builder: update to 1.4.2.
  2024-03-05 12:13 [PR PATCH] flatpak-builder: update to 1.4.2 oreo639
                   ` (11 preceding siblings ...)
  2024-03-09 22:41 ` oreo639
@ 2024-03-09 23:09 ` oreo639
  2024-03-09 23:10 ` oreo639
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: oreo639 @ 2024-03-09 23:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1258 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages flatpak-builder
https://github.com/void-linux/void-packages/pull/49126

flatpak-builder: update to 1.4.2.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/49126.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-flatpak-builder-49126.patch --]
[-- Type: text/x-diff, Size: 33924 bytes --]

From 31b9d72437847c3a5b8ff4992a4eeb7251e72e60 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:09:50 -0800
Subject: [PATCH 1/6] AppStream: update to 1.0.2.

---
 common/shlibs                   |  4 +-
 srcpkgs/AppStream-compose       |  1 +
 srcpkgs/AppStream-compose-devel |  1 +
 srcpkgs/AppStream-qt-devel      |  1 +
 srcpkgs/AppStream/template      | 76 ++++++++++++++++++++++++++-------
 5 files changed, 67 insertions(+), 16 deletions(-)
 create mode 120000 srcpkgs/AppStream-compose
 create mode 120000 srcpkgs/AppStream-compose-devel
 create mode 120000 srcpkgs/AppStream-qt-devel

diff --git a/common/shlibs b/common/shlibs
index 8958c92d7fe196..116ec2cfdd8f71 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2992,7 +2992,9 @@ libliveMedia.so.81 live555-2020.08.11_2
 libgroupsock.so.8 live555-2020.08.11_2
 libUsageEnvironment.so.3 live555-2020.08.11_2
 libBasicUsageEnvironment.so.1 live555-2020.08.11_2
-libappstream.so.4 AppStream-0.12.2_1
+libappstream.so.5 AppStream-1.0.2_1
+libAppStreamQt.so.3 AppStream-qt-1.0.2_1
+libappstream-compose.so.0 AppStream-compose-1.0.2_1
 libappstream-glib.so.8 appstream-glib-0.6.13_1
 libappstream-builder.so.8 appstream-glib-0.6.13_1
 libflatpak.so.0 flatpak-0.9.3_2
diff --git a/srcpkgs/AppStream-compose b/srcpkgs/AppStream-compose
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-compose
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream-compose-devel b/srcpkgs/AppStream-compose-devel
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-compose-devel
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream-qt-devel b/srcpkgs/AppStream-qt-devel
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-qt-devel
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream/template b/srcpkgs/AppStream/template
index 87fbb76d2c9c66..d205c96a8c55bc 100644
--- a/srcpkgs/AppStream/template
+++ b/srcpkgs/AppStream/template
@@ -1,48 +1,94 @@
 # Template file for 'AppStream'
 pkgname=AppStream
-version=0.16.4
+version=1.0.2
 revision=1
 build_style=meson
 build_helper="gir qemu"
 configure_args="$(vopt_bool gir gir) $(vopt_bool vala vapi)
- -Dstemming=false -Dapidocs=false -Dqt=true -Dsystemd=false"
+ -Dstemming=false -Dapidocs=false -Dqt=true -Dsystemd=false
+ -Dcompose=true"
 hostmakedepends="docbook-xsl gettext glib-devel gperf libxslt pkg-config
- qt5-host-tools $(vopt_if vala vala) itstool"
-makedepends="libglib-devel libxml2-devel libyaml-devel qt5-devel libxmlb-devel
- libcurl-devel"
+ qt6-base $(vopt_if vala vala) itstool"
+makedepends="libglib-devel libxml2-devel libyaml-devel qt6-base-devel libxmlb-devel
+ libcurl-devel librsvg-devel"
+checkdepends="tar"
 short_desc="Tools and libraries to work with AppStream metadata"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://github.com/ximion/appstream"
 changelog="https://raw.githubusercontent.com/ximion/appstream/master/NEWS"
 distfiles="https://github.com/ximion/appstream/archive/v${version}.tar.gz"
-checksum=95d5cf451d1945182a9bc4d597c13e713451a3dba1a5759f45b6b3279ff3774c
-conf_files="/etc/appstream.conf"
+checksum=77e271f47167ae37a68111b951c3c07e4261579e69047747044f7924c8219d14
 triggers="appstream-cache"
 
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" AppStream-devel"
+fi
+
 build_options="gir vala"
 build_options_default="gir vala"
 
+pre_configure() {
+	# Meson uses paths from pkg-config which is /usr/lib32/qt6 when cross compiling 32-bit
+	# Work around this for now
+	export PATH="/usr/lib/qt6/libexec/:$PATH"
+}
+
 AppStream-devel_package() {
-	depends="${sourcepkg}>=${version}_${revision} AppStream-qt>=${version}_${revision}"
+	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - development files"
 	pkg_install() {
-		vmove usr/include
-		vmove usr/lib/cmake
-		vmove usr/lib/pkgconfig
-		vmove "usr/lib/*.so"
+		vmove usr/include/appstream
+		vmove usr/lib/pkgconfig/appstream.pc
+		vmove /usr/lib/libappstream.so
 		if [ "$build_option_gir" ]; then
-			vmove usr/share/gir-1.0
+			vmove usr/share/gir-1.0/AppStream-1.0.gir
 		fi
 		if [ "$build_option_vala" ]; then
-			vmove usr/share/vala
+			"vmove usr/share/vala/vapi/appstream.*"
+		fi
+	}
+}
+
+AppStream-compose_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - compose libraries and tools"
+	pkg_install() {
+		vmove usr/libexec/appstreamcli-compose
+		vmove "usr/share/man/man1/appstreamcli-compose.*"
+		vmove "usr/lib/libappstream-compose.so.*"
+		vmove usr/lib/girepository-1.0/AppStreamCompose-1.0.typelib
+		vmove usr/share/metainfo/org.freedesktop.appstream.compose.metainfo.xml
+	}
+}
+
+AppStream-compose-devel_package() {
+	depends="AppStream-compose>=${version}_${revision} AppStream-devel>=${version}_${revision}"
+	short_desc+=" - compose development files"
+	pkg_install() {
+		vmove usr/include/appstream-compose
+		vmove usr/lib/pkgconfig/appstream-compose.pc
+		vmove /usr/lib/libappstream-compose.so
+		if [ "$build_option_gir" ]; then
+			vmove usr/share/gir-1.0/AppStreamCompose-1.0.gir
 		fi
 	}
 }
 
 AppStream-qt_package() {
-	short_desc+=" - qt5 interface library"
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - qt6 interface library"
+	pkg_install() {
+		vmove usr/lib/libAppStreamQt.so
+	}
+}
+
+AppStream-qt-devel_package() {
+	depends="AppStream-qt>=${version}_${revision}"
+	short_desc+=" - qt6 development files"
 	pkg_install() {
+		vmove usr/include/AppStreamQt
+		vmove usr/lib/cmake/AppStreamQt
 		vmove "usr/lib/libAppStreamQt.so.*"
 	}
 }

From fb81ab13ca361a6acab801c6bc923e342531d0cc Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:10:35 -0800
Subject: [PATCH 2/6] flatpak: rebuild for AppStream 1.0

---
 srcpkgs/flatpak/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/flatpak/template b/srcpkgs/flatpak/template
index 819686057ac9bc..4d03282413c98c 100644
--- a/srcpkgs/flatpak/template
+++ b/srcpkgs/flatpak/template
@@ -1,7 +1,7 @@
 # Template file for 'flatpak'
 pkgname=flatpak
 version=1.15.6
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="
@@ -48,7 +48,7 @@ flatpak-devel_package() {
 	short_desc+=" - development files"
 	depends="${sourcepkg}>=${version}_${revision} libglib-devel libostree-devel
 	 libcurl-devel libarchive-devel json-glib-devel dconf-devel libseccomp-devel
-	 gpgme-devel"
+	 gpgme-devel polkit-devel"
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/pkgconfig

From afde133503a0225564791bd57522673005162856 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:11:53 -0800
Subject: [PATCH 3/6] libadwaita: rebuild for AppStream 1.0

---
 srcpkgs/libadwaita/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libadwaita/template b/srcpkgs/libadwaita/template
index 63e643d8fdd70d..fca2b2a5d5a25e 100644
--- a/srcpkgs/libadwaita/template
+++ b/srcpkgs/libadwaita/template
@@ -1,7 +1,7 @@
 # Template file for 'libadwaita'
 pkgname=libadwaita
 version=1.4.4
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="-Dexamples=true -Dtests=true $(vopt_bool gtk_doc)

From 3ed6cfef2d4c0792db990fc86ab558bd6614affe Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:11:59 -0800
Subject: [PATCH 4/6] gnome-software: update to 45.3.

---
 .../patches/0001-port-to-appstream1.patch     | 504 ++++++++++++++++++
 srcpkgs/gnome-software/template               |   6 +-
 2 files changed, 507 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch

diff --git a/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch b/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch
new file mode 100644
index 00000000000000..256a8509231e5f
--- /dev/null
+++ b/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch
@@ -0,0 +1,504 @@
+See: https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2393
+
+From e6f7e28bdd50a63586ba6a82b936d54db19a311b Mon Sep 17 00:00:00 2001
+From: Matthias Klumpp <matthias@tenstral.net>
+Date: Sun, 8 Oct 2023 20:22:44 +0200
+Subject: [PATCH] Adjust to build with AppStream 1.0 as well as 0.16.x
+
+---
+ lib/gs-app.c                             |  4 ++
+ lib/gs-appstream.c                       | 58 ++++++++++++++++++++----
+ lib/gs-utils.c                           |  8 ++--
+ meson.build                              | 22 +--------
+ plugins/core/gs-plugin-appstream.c       |  8 ----
+ plugins/fwupd/gs-fwupd-app.c             |  8 ++++
+ plugins/fwupd/gs-plugin-fwupd.c          |  4 ++
+ src/gs-hardware-support-context-dialog.c |  6 +++
+ src/gs-repos-dialog.c                    |  4 ++
+ src/gs-screenshot-carousel.c             |  4 +-
+ src/gs-screenshot-image.c                | 41 +++++++++++++----
+ src/gs-screenshot-image.h                |  7 +++
+ subprojects/appstream.wrap               |  2 +-
+ 13 files changed, 120 insertions(+), 56 deletions(-)
+
+diff --git a/lib/gs-app.c b/lib/gs-app.c
+index 048a061225..e2694057cd 100644
+--- a/lib/gs-app.c
++++ b/lib/gs-app.c
+@@ -609,7 +609,11 @@ gs_app_to_string_append (GsApp *app, GString *str)
+ 		AsScreenshot *ss = g_ptr_array_index (priv->screenshots, i);
+ 		g_autofree gchar *key = NULL;
+ 		tmp = as_screenshot_get_caption (ss);
++#if AS_CHECK_VERSION(1, 0, 0)
++		im = as_screenshot_get_image (ss, 0, 0, 1);
++#else
+ 		im = as_screenshot_get_image (ss, 0, 0);
++#endif
+ 		if (im == NULL)
+ 			continue;
+ 		key = g_strdup_printf ("screenshot-%02u", i);
+diff --git a/lib/gs-appstream.c b/lib/gs-appstream.c
+index deca176dcf..2cc2427a19 100644
+--- a/lib/gs-appstream.c
++++ b/lib/gs-appstream.c
+@@ -587,8 +587,6 @@ gs_appstream_refine_add_provides (GsApp *app, XbNode *component, GError **error)
+ 					kind = AS_PROVIDED_KIND_FIRMWARE_RUNTIME;
+ 				else if (g_strcmp0 (fw_type, "flashed") == 0)
+ 					kind = AS_PROVIDED_KIND_FIRMWARE_FLASHED;
+-			} else if (g_strcmp0 (element_name, "python2") == 0) {
+-				kind = AS_PROVIDED_KIND_PYTHON_2;
+ 			} else if (g_strcmp0 (element_name, "python3") == 0) {
+ 				kind = AS_PROVIDED_KIND_PYTHON;
+ 			} else if (g_strcmp0 (element_name, "dbus") == 0) {
+@@ -1011,8 +1011,11 @@ gs_appstream_refine_app_relation (GsApp           *app,
+ 			as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_CONTROL);
+ 			as_relation_set_value_control_kind (relation, as_control_kind_from_string (xb_node_get_text (child)));
+ 		} else if (g_str_equal (item_kind, "display_length")) {
+-			AsDisplayLengthKind display_length_kind;
+ 			const gchar *compare;
++			const gchar *side;
++#if !AS_CHECK_VERSION(1, 0, 0)
++			AsDisplayLengthKind display_length_kind;
++#endif
+ 
+ 			/* https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-relations-display_length */
+ 			as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_DISPLAY_LENGTH);
+@@ -1020,15 +1023,21 @@ gs_appstream_refine_app_relation (GsApp           *app,
+ 			compare = xb_node_get_attr (child, "compare");
+ 			as_relation_set_compare (relation, (compare != NULL) ? as_relation_compare_from_string (compare) : AS_RELATION_COMPARE_GE);
+ 
++#if AS_CHECK_VERSION(1, 0, 0)
++			side = xb_node_get_attr (child, "side");
++			as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
++			as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
++#else
+ 			display_length_kind = as_display_length_kind_from_string (xb_node_get_text (child));
+ 			if (display_length_kind != AS_DISPLAY_LENGTH_KIND_UNKNOWN) {
+ 				/* Ignore the `side` attribute */
+ 				as_relation_set_value_display_length_kind (relation, display_length_kind);
+ 			} else {
+-				const gchar *side = xb_node_get_attr (child, "side");
++				side = xb_node_get_attr (child, "side");
+ 				as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
+ 				as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
+ 			}
++#endif
+ 		} else {
+ 			g_debug ("Relation type ‘%s’ not currently supported for %s; ignoring",
+ 				 item_kind, gs_app_get_id (app));
+@@ -1472,7 +1481,7 @@ gs_appstream_refine_app (GsPlugin *plugin,
+ }
+ 
+ typedef struct {
+-	AsSearchTokenMatch	 match_value;
++	guint16			 match_value;
+ 	XbQuery			*query;
+ } GsAppstreamSearchHelper;
+ 
+@@ -1522,7 +1531,7 @@ gs_appstream_silo_search_component (GPtrArray *array, XbNode *component, const g
+ }
+ 
+ typedef struct {
+-	AsSearchTokenMatch	match_value;
++	guint16			match_value;
+ 	const gchar		*xpath;
+ } Query;
+ 
+@@ -1585,7 +1594,11 @@ gs_appstream_do_search (GsPlugin *plugin,
+ 			 * Drop the ID token from it as it’s the highest
+ 			 * numeric value but isn’t visible to the user in the
+ 			 * UI, which leads to confusing results ordering. */
++#if AS_CHECK_VERSION(1, 0, 0)
++			gs_app_set_match_value (app, match_value & (~as_utils_get_tag_search_weight ("id")));
++#else
+ 			gs_app_set_match_value (app, match_value & (~AS_SEARCH_TOKEN_MATCH_ID));
++#endif
+ 			gs_app_list_add (list, app);
+ 
+ 			if (gs_app_get_kind (app) == AS_COMPONENT_KIND_ADDON) {
+@@ -1624,18 +1637,32 @@ gs_appstream_search (GsPlugin *plugin,
+ 		     GCancellable *cancellable,
+ 		     GError **error)
+ {
++#if AS_CHECK_VERSION(1, 0, 0)
++	guint16 pkgname_weight = as_utils_get_tag_search_weight ("pkgname");
++	guint16 name_weight = as_utils_get_tag_search_weight ("name");
++	guint16 id_weight = as_utils_get_tag_search_weight ("id");
+ 	const Query queries[] = {
+-		#ifdef HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE
+-		{ AS_SEARCH_TOKEN_MATCH_MEDIATYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+-		#else
+-		{ AS_SEARCH_TOKEN_MATCH_MIMETYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+-		#endif
++		{ as_utils_get_tag_search_weight ("mediatype"),	"provides/mediatype[text()~=stem(?)]" },
+ 		/* Search once with a tokenize-and-casefold operator (`~=`) to support casefolded
+ 		 * full-text search, then again using substring matching (`contains()`), to
+ 		 * support prefix matching. Only do the prefix matches on a few fields, and at a
+ 		 * lower priority, otherwise things will get confusing.
+-		 * 
++		 *
+ 		 * See https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2277 */
++		{ pkgname_weight,				"pkgname[text()~=stem(?)]" },
++		{ pkgname_weight / 2,				"pkgname[contains(text(),stem(?))]" },
++		{ as_utils_get_tag_search_weight ("summary"),	"summary[text()~=stem(?)]" },
++		{ name_weight,					"name[text()~=stem(?)]" },
++		{ name_weight / 2,				"name[contains(text(),stem(?))]" },
++		{ as_utils_get_tag_search_weight ("keyword"),	"keywords/keyword[text()~=stem(?)]" },
++		{ id_weight,					"id[text()~=stem(?)]" },
++		{ id_weight,					"launchable[text()~=stem(?)]" },
++		{ as_utils_get_tag_search_weight ("origin"),	"../components[@origin~=stem(?)]" },
++		{ 0,						NULL }
++	};
++#else
++	const Query queries[] = {
++		{ AS_SEARCH_TOKEN_MATCH_MEDIATYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME,	"pkgname[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME / 2,	"pkgname[contains(text(),stem(?))]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_SUMMARY,	"summary[text()~=stem(?)]" },
+@@ -1647,6 +1674,7 @@ gs_appstream_search (GsPlugin *plugin,
+ 		{ AS_SEARCH_TOKEN_MATCH_ORIGIN,		"../components[@origin~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_NONE,		NULL }
+ 	};
++#endif
+ 
+ 	return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
+ }
+@@ -1659,11 +1687,21 @@ gs_appstream_search_developer_apps (GsPlugin *plugin,
+ 				    GCancellable *cancellable,
+ 				    GError **error)
+ {
++#if AS_CHECK_VERSION(1, 0, 0)
++	const Query queries[] = {
++		{ as_utils_get_tag_search_weight ("pkgname"), "developer/name[text()~=stem(?)]" },
++		{ as_utils_get_tag_search_weight ("summary"), "project_group[text()~=stem(?)]" },
++		/* for legacy support */
++		{ as_utils_get_tag_search_weight ("pkgname"), "developer_name[text()~=stem(?)]" },
++		{ 0,					      NULL }
++	};
++#else
+ 	const Query queries[] = {
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME,	"developer_name[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_SUMMARY,	"project_group[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_NONE,		NULL }
+ 	};
++#endif
+ 
+ 	return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
+ }
+diff --git a/lib/gs-utils.c b/lib/gs-utils.c
+index cf9073025f..19e6ebd046 100644
+--- a/lib/gs-utils.c
++++ b/lib/gs-utils.c
+@@ -1694,9 +1694,9 @@ gs_utils_gstring_replace (GString *str,
+ 			  const gchar *find,
+ 			  const gchar *replace)
+ {
+-	#ifdef HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS
++#if AS_CHECK_VERSION(1, 0, 0)
+ 	as_gstring_replace (str, find, replace, 0);
+-	#else
+-	as_gstring_replace (str, find, replace);
+-	#endif
++#else
++	as_gstring_replace2 (str, find, replace, 0);
++#endif
+ }
+diff --git a/meson.build b/meson.build
+index 09c39df180..ad105869e5 100644
+--- a/meson.build
++++ b/meson.build
+@@ -113,7 +113,7 @@ add_project_arguments('-D_GNU_SOURCE', language : 'c')
+ conf.set('HAVE_LINUX_UNISTD_H', cc.has_header('linux/unistd.h'))
+ 
+ appstream = dependency('appstream',
+-  version : '>= 0.14.0',
++  version : '>= 0.16.2',
+   fallback : ['appstream', 'appstream_dep'],
+   default_options : [
+     'docs=false',
+@@ -121,26 +121,6 @@ appstream = dependency('appstream',
+     'install-docs=false'
+   ]
+ )
+-if appstream.type_name() == 'internal'
+-else
+-  if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_SEARCH_TOKEN_MATCH_MEDIATYPE', dependencies: appstream)
+-    conf.set('HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE', '1')
+-  endif
+-  if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_FORMAT_STYLE_CATALOG', dependencies: appstream)
+-    conf.set('HAVE_AS_FORMAT_STYLE_CATALOG', '1')
+-  endif
+-  if meson.get_compiler('c').has_function('as_metadata_components_to_catalog', prefix: '#include <appstream.h>', dependencies: appstream)
+-    conf.set('HAVE_AS_METADATA_COMPONENTS_TO_CATALOG', '1')
+-  endif
+-  if meson.get_compiler('c').links('''#include <appstream.h>
+-      int main (void)
+-      {
+-         as_gstring_replace (NULL, "a", "b", 0);
+-         return 0;
+-      }''', name: 'as_gstring_replace() has four arguments', dependencies: appstream)
+-    conf.set('HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS', '1')
+-  endif
+-endif
+ 
+ gdk_pixbuf = dependency('gdk-pixbuf-2.0', version : '>= 2.32.0')
+ libxmlb = dependency('xmlb', version : '>= 0.1.7', fallback : ['libxmlb', 'libxmlb_dep'])
+diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c
+index cf9f3022b1..ef3226a591 100644
+--- a/plugins/core/gs-plugin-appstream.c
++++ b/plugins/core/gs-plugin-appstream.c
+@@ -414,11 +414,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
+ 	if (bytes == NULL)
+ 		return NULL;
+ 
+-	#ifdef HAVE_AS_FORMAT_STYLE_CATALOG
+ 	as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_CATALOG);
+-	#else
+-	as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_COLLECTION);
+-	#endif
+ 	as_metadata_parse_bytes (mdata,
+ 				 bytes,
+ 				 AS_FORMAT_KIND_YAML,
+@@ -428,11 +424,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
+ 		return NULL;
+ 	}
+ 
+-	#ifdef HAVE_AS_METADATA_COMPONENTS_TO_CATALOG
+ 	xml = as_metadata_components_to_catalog (mdata, AS_FORMAT_KIND_XML, &tmp_error);
+-	#else
+-	xml = as_metadata_components_to_collection (mdata, AS_FORMAT_KIND_XML, &tmp_error);
+-	#endif
+ 	if (xml == NULL) {
+ 		// This API currently returns NULL if there is nothing to serialize, so we
+ 		// have to test if this is an error or not.
+diff --git a/plugins/fwupd/gs-fwupd-app.c b/plugins/fwupd/gs-fwupd-app.c
+index 6dcda6ee92..5d3254da59 100644
+--- a/plugins/fwupd/gs-fwupd-app.c
++++ b/plugins/fwupd/gs-fwupd-app.c
+@@ -164,7 +164,11 @@ gs_fwupd_app_set_from_device (GsApp *app,
+ 		gs_app_set_install_date (app, fwupd_device_get_created (dev));
+ 	if (fwupd_device_get_description (dev) != NULL) {
+ 		g_autofree gchar *tmp = NULL;
++#if AS_CHECK_VERSION(1, 0, 0)
++		tmp = as_markup_convert (fwupd_device_get_description (dev), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 		tmp = as_markup_convert_simple (fwupd_device_get_description (dev), NULL);
++#endif
+ 		if (tmp != NULL)
+ 			gs_app_set_description (app, GS_APP_QUALITY_NORMAL, tmp);
+ 	}
+@@ -402,7 +406,11 @@ gs_fwupd_app_set_from_release (GsApp *app, FwupdRelease *rel)
+ 	}
+ 	if (fwupd_release_get_description (rel) != NULL) {
+ 		g_autofree gchar *tmp = NULL;
++#if AS_CHECK_VERSION(1, 0, 0)
++		tmp = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 		tmp = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
++#endif
+ 		if (tmp != NULL)
+ 			gs_app_set_update_details_text (app, tmp);
+ 	}
+diff --git a/plugins/fwupd/gs-plugin-fwupd.c b/plugins/fwupd/gs-plugin-fwupd.c
+index e931b2b6db..0747d6e250 100644
+--- a/plugins/fwupd/gs-plugin-fwupd.c
++++ b/plugins/fwupd/gs-plugin-fwupd.c
+@@ -726,7 +726,11 @@ gs_plugin_add_updates (GsPlugin *plugin,
+ 				g_autofree gchar *desc = NULL;
+ 				if (fwupd_release_get_description (rel) == NULL)
+ 					continue;
++#if AS_CHECK_VERSION(1, 0, 0)
++				desc = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 				desc = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
++#endif
+ 				if (desc == NULL)
+ 					continue;
+ 				g_string_append_printf (update_desc,
+diff --git a/src/gs-hardware-support-context-dialog.c b/src/gs-hardware-support-context-dialog.c
+index 0e48c8c266..14653401de 100644
+--- a/src/gs-hardware-support-context-dialog.c
++++ b/src/gs-hardware-support-context-dialog.c
+@@ -461,6 +461,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 			AsRelationCompare comparator = as_relation_get_compare (relation);
+ 			Range current_display_comparand, relation_comparand;
+ 
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 			/* From https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-requires-recommends-display_length */
+ 			Range display_lengths[] = {
+ 				[AS_DISPLAY_LENGTH_KIND_XSMALL] = { 0, 360 },
+@@ -469,6 +470,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 				[AS_DISPLAY_LENGTH_KIND_LARGE] = { 1024, 3840 },
+ 				[AS_DISPLAY_LENGTH_KIND_XLARGE] = { 3840, G_MAXUINT },
+ 			};
++#endif
+ 
+ 			any_display_relations_set = TRUE;
+ 
+@@ -485,11 +487,14 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 			case AS_DISPLAY_SIDE_KIND_LAST:
+ 			default:
+ 				current_display_comparand.min = current_display_comparand.max = MAX (current_screen_size.width, current_screen_size.height);
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 				relation_comparand.min = display_lengths[as_relation_get_value_display_length_kind (relation)].min;
+ 				relation_comparand.max = display_lengths[as_relation_get_value_display_length_kind (relation)].max;
++#endif
+ 				break;
+ 			}
+ 
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 			if (evaluate_display_comparison (display_lengths[AS_DISPLAY_LENGTH_KIND_SMALL], comparator, relation_comparand)) {
+ 				*mobile_relation_kind_out = max_relation_kind (*mobile_relation_kind_out, as_relation_get_kind (relation));
+ 				*mobile_match_out = TRUE;
+@@ -499,6 +504,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 				*desktop_relation_kind_out = max_relation_kind (*desktop_relation_kind_out, as_relation_get_kind (relation));
+ 				*desktop_match_out = TRUE;
+ 			}
++#endif
+ 
+ 			if (evaluate_display_comparison (current_display_comparand, comparator, relation_comparand)) {
+ 				*current_relation_kind_out = max_relation_kind (*current_relation_kind_out, as_relation_get_kind (relation));
+diff --git a/src/gs-repos-dialog.c b/src/gs-repos-dialog.c
+index c41c4944a1..7dac0416d9 100644
+--- a/src/gs-repos-dialog.c
++++ b/src/gs-repos-dialog.c
+@@ -154,7 +154,11 @@ enable_repo (GsReposDialog *dialog,
+ 		g_autoptr(GError) error = NULL;
+ 
+ 		/* convert from AppStream markup */
++#if AS_CHECK_VERSION(1, 0, 0)
++		message = as_markup_convert (gs_app_get_agreement (repo), AS_MARKUP_KIND_TEXT, &error);
++#else
+ 		message = as_markup_convert_simple (gs_app_get_agreement (repo), &error);
++#endif
+ 		if (message == NULL) {
+ 			/* failed, so just try and show the original markup */
+ 			message = g_strdup (gs_app_get_agreement (repo));
+diff --git a/src/gs-screenshot-carousel.c b/src/gs-screenshot-carousel.c
+index 04bbf86a1e..d269af6605 100644
+--- a/src/gs-screenshot-carousel.c
++++ b/src/gs-screenshot-carousel.c
+@@ -141,8 +141,8 @@ gs_screenshot_carousel_load_screenshots (GsScreenshotCarousel *self, GsApp *app,
+ 		gtk_widget_set_can_focus (gtk_widget_get_first_child (ssimg), FALSE);
+ 		gs_screenshot_image_set_screenshot (GS_SCREENSHOT_IMAGE (ssimg), ss);
+ 		gs_screenshot_image_set_size (GS_SCREENSHOT_IMAGE (ssimg),
+-					      AS_IMAGE_NORMAL_WIDTH,
+-					      AS_IMAGE_NORMAL_HEIGHT);
++					      GS_IMAGE_NORMAL_WIDTH,
++					      GS_IMAGE_NORMAL_HEIGHT);
+ 		gtk_widget_add_css_class (ssimg, "screenshot-image-main");
+ 		gs_screenshot_image_load_async (GS_SCREENSHOT_IMAGE (ssimg), cancellable);
+ 
+diff --git a/src/gs-screenshot-image.c b/src/gs-screenshot-image.c
+index c313a2589f..b24083b387 100644
+--- a/src/gs-screenshot-image.c
++++ b/src/gs-screenshot-image.c
+@@ -284,13 +284,13 @@ gs_screenshot_image_save_downloaded_img (GsScreenshotImage *ssimg,
+ 	if (images->len > 1)
+ 		return TRUE;
+ 
+-	if (width == AS_IMAGE_THUMBNAIL_WIDTH &&
+-	    height == AS_IMAGE_THUMBNAIL_HEIGHT) {
+-		width = AS_IMAGE_NORMAL_WIDTH;
+-		height = AS_IMAGE_NORMAL_HEIGHT;
++	if (width == GS_IMAGE_THUMBNAIL_WIDTH &&
++	    height == GS_IMAGE_THUMBNAIL_HEIGHT) {
++		width = GS_IMAGE_NORMAL_WIDTH;
++		height = GS_IMAGE_NORMAL_HEIGHT;
+ 	} else {
+-		width = AS_IMAGE_THUMBNAIL_WIDTH;
+-		height = AS_IMAGE_THUMBNAIL_HEIGHT;
++		width = GS_IMAGE_THUMBNAIL_WIDTH;
++		height = GS_IMAGE_THUMBNAIL_HEIGHT;
+ 	}
+ 
+ 	width *= ssimg->scale;
+@@ -582,16 +582,30 @@ gs_screenshot_image_get_url (GsScreenshotImage *ssimg)
+ 	} else if (as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE) {
+ 		AsImage *im;
+ 
++#if AS_CHECK_VERSION(1, 0, 0)
++		im = as_screenshot_get_image (ssimg->screenshot,
++					      ssimg->width,
++					      ssimg->height,
++					      ssimg->scale);
++#else
+ 		im = as_screenshot_get_image (ssimg->screenshot,
+ 					      ssimg->width * ssimg->scale,
+ 					      ssimg->height * ssimg->scale);
++#endif
+ 
+ 		/* if we've failed to load a HiDPI image, fallback to LoDPI */
+ 		if (im == NULL && ssimg->scale > 1) {
+ 			ssimg->scale = 1;
++#if AS_CHECK_VERSION(1, 0, 0)
++			im = as_screenshot_get_image (ssimg->screenshot,
++						      ssimg->width,
++						      ssimg->height,
++						      1);
++#else
+ 			im = as_screenshot_get_image (ssimg->screenshot,
+ 						      ssimg->width,
+ 						      ssimg->height);
++#endif
+ 		}
+ 
+ 		if (im)
+@@ -698,15 +712,22 @@ gs_screenshot_image_load_async (GsScreenshotImage *ssimg,
+ 	 * smaller version of it straight away */
+ 	if (!ssimg->showing_image &&
+ 	    as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE &&
+-	    ssimg->width > AS_IMAGE_THUMBNAIL_WIDTH &&
+-	    ssimg->height > AS_IMAGE_THUMBNAIL_HEIGHT) {
++	    ssimg->width > GS_IMAGE_THUMBNAIL_WIDTH &&
++	    ssimg->height > GS_IMAGE_THUMBNAIL_HEIGHT) {
+ 		const gchar *url_thumb;
+ 		g_autofree gchar *basename_thumb = NULL;
+ 		g_autofree gchar *cache_kind_thumb = NULL;
+ 		AsImage *im;
++#if AS_CHECK_VERSION(1, 0, 0)
+ 		im = as_screenshot_get_image (ssimg->screenshot,
+-					      AS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
+-					      AS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
++					      GS_IMAGE_THUMBNAIL_WIDTH,
++					      GS_IMAGE_THUMBNAIL_HEIGHT,
++					      ssimg->scale);
++#else
++		im = as_screenshot_get_image (ssimg->screenshot,
++					      GS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
++					      GS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
++#endif
+ 		url_thumb = as_image_get_url (im);
+ 		basename_thumb = gs_screenshot_get_cachefn_for_url (url_thumb);
+ 		cache_kind_thumb = g_build_filename ("screenshots", "112x63", NULL);
+diff --git a/src/gs-screenshot-image.h b/src/gs-screenshot-image.h
+index 1f6cf81ce6..6e45f5d20a 100644
+--- a/src/gs-screenshot-image.h
++++ b/src/gs-screenshot-image.h
+@@ -21,6 +21,13 @@ G_BEGIN_DECLS
+ 
+ G_DECLARE_FINAL_TYPE (GsScreenshotImage, gs_screenshot_image, GS, SCREENSHOT_IMAGE, GtkWidget)
+ 
++#define GS_IMAGE_LARGE_HEIGHT		423
++#define GS_IMAGE_LARGE_WIDTH		752
++#define GS_IMAGE_NORMAL_HEIGHT		351
++#define GS_IMAGE_NORMAL_WIDTH		624
++#define GS_IMAGE_THUMBNAIL_HEIGHT	63
++#define GS_IMAGE_THUMBNAIL_WIDTH 	112
++
+ GtkWidget	*gs_screenshot_image_new		(SoupSession		*session);
+ 
+ AsScreenshot	*gs_screenshot_image_get_screenshot	(GsScreenshotImage	*ssimg);
+diff --git a/subprojects/appstream.wrap b/subprojects/appstream.wrap
+index 6f0beb0cbc..5763a32c64 100644
+--- a/subprojects/appstream.wrap
++++ b/subprojects/appstream.wrap
+@@ -1,5 +1,5 @@
+ [wrap-git]
+ directory = appstream
+ url = https://github.com/ximion/appstream.git
+-revision = v0.14.1
++revision = v0.16.3
+ depth = 1
+-- 
+GitLab
diff --git a/srcpkgs/gnome-software/template b/srcpkgs/gnome-software/template
index c5394ce2105091..70a2dfb664394d 100644
--- a/srcpkgs/gnome-software/template
+++ b/srcpkgs/gnome-software/template
@@ -1,6 +1,6 @@
 # Template file for 'gnome-software'
 pkgname=gnome-software
-version=44.2
+version=45.3
 revision=1
 build_style=meson
 configure_args="-Dpackagekit=false -Dfwupd=false
@@ -18,8 +18,8 @@ license="GPL-3.0-or-later"
 homepage="https://gitlab.gnome.org/GNOME/gnome-software"
 changelog="https://gitlab.gnome.org/GNOME/gnome-software/-/raw/main/NEWS"
 distfiles="https://gitlab.gnome.org/GNOME/gnome-software/-/archive/${version}/gnome-software-${version}.tar.gz"
-checksum=bedfe8652d2ceaf17eccc57d6befe6d95f09d15e486a58f0bb7a9a868d0bacc0
-make_check=no # FIXME
+checksum=be2f64e894e653924411981d952fb694559687010985b53ccd325dee0d6a6b83
+make_check=no # Requires system dbus
 
 build_options="gtk_doc"
 

From b10a3ac71986a6ef6a3fed1c5c6e9cc68eb8db2b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 04:41:38 -0800
Subject: [PATCH 5/6] New package: debugedit-5.0

---
 srcpkgs/debugedit/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/debugedit/template

diff --git a/srcpkgs/debugedit/template b/srcpkgs/debugedit/template
new file mode 100644
index 00000000000000..3056f067fda036
--- /dev/null
+++ b/srcpkgs/debugedit/template
@@ -0,0 +1,17 @@
+# Template file for 'debugedit'
+pkgname=debugedit
+version=5.0
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config"
+makedepends="elfutils-devel"
+short_desc="Tools for debuginfo creation"
+maintainer="oreo639 <oreo6391@gmail.com>"
+license="GPL-2.0-or-later"
+homepage="https://sourceware.org/debugedit/"
+distfiles="https://sourceware.org/pub/debugedit/${version%%.*}.0/debugedit-${version}.tar.xz"
+checksum=e9ecd7d350bebae1f178ce6776ca19a648b6fe8fa22f5b3044b38d7899aa553e
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+	makedepends+=" musl-legacy-compat"
+fi

From 5ee72dd2e6a0a6f8206a9c3206139ef6b0562cff Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:12:25 -0800
Subject: [PATCH 6/6] flatpak-builder: update to 1.4.2.

---
 srcpkgs/flatpak-builder/template | 27 ++++++++++-----------------
 1 file changed, 10 insertions(+), 17 deletions(-)

diff --git a/srcpkgs/flatpak-builder/template b/srcpkgs/flatpak-builder/template
index fe3485b0d89568..15ee79c9a082b4 100644
--- a/srcpkgs/flatpak-builder/template
+++ b/srcpkgs/flatpak-builder/template
@@ -1,28 +1,21 @@
 # Template file for 'flatpak-builder'
 pkgname=flatpak-builder
-version=1.2.3
+version=1.4.2
 revision=1
-build_style=gnu-configure
-hostmakedepends="pkg-config xmlto"
-makedepends="flatpak-devel json-glib-devel libcap-devel libsoup-devel
- libyaml-devel libcurl-devel"
-depends="elfutils"
+build_style=meson
+hostmakedepends="pkg-config xmlto debugedit AppStream-compose"
+makedepends="flatpak-devel json-glib-devel libcap-devel
+ libyaml-devel libcurl-devel libxml2-devel"
+depends="elfutils debugedit AppStream-compose"
 short_desc="Tool to build flatpaks from source"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://github.com/flatpak/flatpak-builder"
 changelog="https://github.com/flatpak/flatpak-builder/raw/main/NEWS"
-distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}.tar.xz"
-checksum=e257825a47f7a3e71e30fb0f80f2d9ac6e4801f746f552dfaf0e564e3ee351c8
-# Tests expects a Debian derivate hosts to build a flatpak container from.
-make_check=no
-
-if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" flatpak-devel"
-fi
-if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
-	makedepends+=" musl-legacy-compat"
-fi
+#distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}.tar.xz"
+distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}-fixed-libglnx.tar.xz"
+checksum=c041b974e03a2c2d3cda88a0efe1ecf69f9adf42a1758eac341d555e779d0596
+make_check=no # Can't run bubblewrap inside the container
 
 post_patch() {
 	if [ "$XBPS_TARGET_LIBC" = "musl" ]; then

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] flatpak-builder: update to 1.4.2.
  2024-03-05 12:13 [PR PATCH] flatpak-builder: update to 1.4.2 oreo639
                   ` (12 preceding siblings ...)
  2024-03-09 23:09 ` [PR PATCH] [Updated] " oreo639
@ 2024-03-09 23:10 ` oreo639
  2024-03-10  0:06 ` oreo639
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: oreo639 @ 2024-03-09 23:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1258 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages flatpak-builder
https://github.com/void-linux/void-packages/pull/49126

flatpak-builder: update to 1.4.2.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/49126.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-flatpak-builder-49126.patch --]
[-- Type: text/x-diff, Size: 33924 bytes --]

From 247ce5eaf6a1d327c468982c5b32960479c9ff8d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:09:50 -0800
Subject: [PATCH 1/6] AppStream: update to 1.0.2.

---
 common/shlibs                   |  4 +-
 srcpkgs/AppStream-compose       |  1 +
 srcpkgs/AppStream-compose-devel |  1 +
 srcpkgs/AppStream-qt-devel      |  1 +
 srcpkgs/AppStream/template      | 76 ++++++++++++++++++++++++++-------
 5 files changed, 67 insertions(+), 16 deletions(-)
 create mode 120000 srcpkgs/AppStream-compose
 create mode 120000 srcpkgs/AppStream-compose-devel
 create mode 120000 srcpkgs/AppStream-qt-devel

diff --git a/common/shlibs b/common/shlibs
index 131fbb19ebc2a7..18ec2822deb252 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3001,7 +3001,9 @@ libliveMedia.so.81 live555-2020.08.11_2
 libgroupsock.so.8 live555-2020.08.11_2
 libUsageEnvironment.so.3 live555-2020.08.11_2
 libBasicUsageEnvironment.so.1 live555-2020.08.11_2
-libappstream.so.4 AppStream-0.12.2_1
+libappstream.so.5 AppStream-1.0.2_1
+libAppStreamQt.so.3 AppStream-qt-1.0.2_1
+libappstream-compose.so.0 AppStream-compose-1.0.2_1
 libappstream-glib.so.8 appstream-glib-0.6.13_1
 libappstream-builder.so.8 appstream-glib-0.6.13_1
 libflatpak.so.0 flatpak-0.9.3_2
diff --git a/srcpkgs/AppStream-compose b/srcpkgs/AppStream-compose
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-compose
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream-compose-devel b/srcpkgs/AppStream-compose-devel
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-compose-devel
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream-qt-devel b/srcpkgs/AppStream-qt-devel
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-qt-devel
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream/template b/srcpkgs/AppStream/template
index 87fbb76d2c9c66..d205c96a8c55bc 100644
--- a/srcpkgs/AppStream/template
+++ b/srcpkgs/AppStream/template
@@ -1,48 +1,94 @@
 # Template file for 'AppStream'
 pkgname=AppStream
-version=0.16.4
+version=1.0.2
 revision=1
 build_style=meson
 build_helper="gir qemu"
 configure_args="$(vopt_bool gir gir) $(vopt_bool vala vapi)
- -Dstemming=false -Dapidocs=false -Dqt=true -Dsystemd=false"
+ -Dstemming=false -Dapidocs=false -Dqt=true -Dsystemd=false
+ -Dcompose=true"
 hostmakedepends="docbook-xsl gettext glib-devel gperf libxslt pkg-config
- qt5-host-tools $(vopt_if vala vala) itstool"
-makedepends="libglib-devel libxml2-devel libyaml-devel qt5-devel libxmlb-devel
- libcurl-devel"
+ qt6-base $(vopt_if vala vala) itstool"
+makedepends="libglib-devel libxml2-devel libyaml-devel qt6-base-devel libxmlb-devel
+ libcurl-devel librsvg-devel"
+checkdepends="tar"
 short_desc="Tools and libraries to work with AppStream metadata"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://github.com/ximion/appstream"
 changelog="https://raw.githubusercontent.com/ximion/appstream/master/NEWS"
 distfiles="https://github.com/ximion/appstream/archive/v${version}.tar.gz"
-checksum=95d5cf451d1945182a9bc4d597c13e713451a3dba1a5759f45b6b3279ff3774c
-conf_files="/etc/appstream.conf"
+checksum=77e271f47167ae37a68111b951c3c07e4261579e69047747044f7924c8219d14
 triggers="appstream-cache"
 
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" AppStream-devel"
+fi
+
 build_options="gir vala"
 build_options_default="gir vala"
 
+pre_configure() {
+	# Meson uses paths from pkg-config which is /usr/lib32/qt6 when cross compiling 32-bit
+	# Work around this for now
+	export PATH="/usr/lib/qt6/libexec/:$PATH"
+}
+
 AppStream-devel_package() {
-	depends="${sourcepkg}>=${version}_${revision} AppStream-qt>=${version}_${revision}"
+	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - development files"
 	pkg_install() {
-		vmove usr/include
-		vmove usr/lib/cmake
-		vmove usr/lib/pkgconfig
-		vmove "usr/lib/*.so"
+		vmove usr/include/appstream
+		vmove usr/lib/pkgconfig/appstream.pc
+		vmove /usr/lib/libappstream.so
 		if [ "$build_option_gir" ]; then
-			vmove usr/share/gir-1.0
+			vmove usr/share/gir-1.0/AppStream-1.0.gir
 		fi
 		if [ "$build_option_vala" ]; then
-			vmove usr/share/vala
+			"vmove usr/share/vala/vapi/appstream.*"
+		fi
+	}
+}
+
+AppStream-compose_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - compose libraries and tools"
+	pkg_install() {
+		vmove usr/libexec/appstreamcli-compose
+		vmove "usr/share/man/man1/appstreamcli-compose.*"
+		vmove "usr/lib/libappstream-compose.so.*"
+		vmove usr/lib/girepository-1.0/AppStreamCompose-1.0.typelib
+		vmove usr/share/metainfo/org.freedesktop.appstream.compose.metainfo.xml
+	}
+}
+
+AppStream-compose-devel_package() {
+	depends="AppStream-compose>=${version}_${revision} AppStream-devel>=${version}_${revision}"
+	short_desc+=" - compose development files"
+	pkg_install() {
+		vmove usr/include/appstream-compose
+		vmove usr/lib/pkgconfig/appstream-compose.pc
+		vmove /usr/lib/libappstream-compose.so
+		if [ "$build_option_gir" ]; then
+			vmove usr/share/gir-1.0/AppStreamCompose-1.0.gir
 		fi
 	}
 }
 
 AppStream-qt_package() {
-	short_desc+=" - qt5 interface library"
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - qt6 interface library"
+	pkg_install() {
+		vmove usr/lib/libAppStreamQt.so
+	}
+}
+
+AppStream-qt-devel_package() {
+	depends="AppStream-qt>=${version}_${revision}"
+	short_desc+=" - qt6 development files"
 	pkg_install() {
+		vmove usr/include/AppStreamQt
+		vmove usr/lib/cmake/AppStreamQt
 		vmove "usr/lib/libAppStreamQt.so.*"
 	}
 }

From 8789634b26eea1c32ab6518a6cc773f191d82533 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:10:35 -0800
Subject: [PATCH 2/6] flatpak: rebuild for AppStream 1.0

---
 srcpkgs/flatpak/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/flatpak/template b/srcpkgs/flatpak/template
index 819686057ac9bc..4d03282413c98c 100644
--- a/srcpkgs/flatpak/template
+++ b/srcpkgs/flatpak/template
@@ -1,7 +1,7 @@
 # Template file for 'flatpak'
 pkgname=flatpak
 version=1.15.6
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="
@@ -48,7 +48,7 @@ flatpak-devel_package() {
 	short_desc+=" - development files"
 	depends="${sourcepkg}>=${version}_${revision} libglib-devel libostree-devel
 	 libcurl-devel libarchive-devel json-glib-devel dconf-devel libseccomp-devel
-	 gpgme-devel"
+	 gpgme-devel polkit-devel"
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/pkgconfig

From a95a3a668a7daad715c68ada19065897b9e5ae27 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:11:53 -0800
Subject: [PATCH 3/6] libadwaita: rebuild for AppStream 1.0

---
 srcpkgs/libadwaita/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libadwaita/template b/srcpkgs/libadwaita/template
index 63e643d8fdd70d..fca2b2a5d5a25e 100644
--- a/srcpkgs/libadwaita/template
+++ b/srcpkgs/libadwaita/template
@@ -1,7 +1,7 @@
 # Template file for 'libadwaita'
 pkgname=libadwaita
 version=1.4.4
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="-Dexamples=true -Dtests=true $(vopt_bool gtk_doc)

From c385e4bdb81cec705849f4fa2158d900efb93f8e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:11:59 -0800
Subject: [PATCH 4/6] gnome-software: update to 45.3.

---
 .../patches/0001-port-to-appstream1.patch     | 504 ++++++++++++++++++
 srcpkgs/gnome-software/template               |   6 +-
 2 files changed, 507 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch

diff --git a/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch b/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch
new file mode 100644
index 00000000000000..256a8509231e5f
--- /dev/null
+++ b/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch
@@ -0,0 +1,504 @@
+See: https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2393
+
+From e6f7e28bdd50a63586ba6a82b936d54db19a311b Mon Sep 17 00:00:00 2001
+From: Matthias Klumpp <matthias@tenstral.net>
+Date: Sun, 8 Oct 2023 20:22:44 +0200
+Subject: [PATCH] Adjust to build with AppStream 1.0 as well as 0.16.x
+
+---
+ lib/gs-app.c                             |  4 ++
+ lib/gs-appstream.c                       | 58 ++++++++++++++++++++----
+ lib/gs-utils.c                           |  8 ++--
+ meson.build                              | 22 +--------
+ plugins/core/gs-plugin-appstream.c       |  8 ----
+ plugins/fwupd/gs-fwupd-app.c             |  8 ++++
+ plugins/fwupd/gs-plugin-fwupd.c          |  4 ++
+ src/gs-hardware-support-context-dialog.c |  6 +++
+ src/gs-repos-dialog.c                    |  4 ++
+ src/gs-screenshot-carousel.c             |  4 +-
+ src/gs-screenshot-image.c                | 41 +++++++++++++----
+ src/gs-screenshot-image.h                |  7 +++
+ subprojects/appstream.wrap               |  2 +-
+ 13 files changed, 120 insertions(+), 56 deletions(-)
+
+diff --git a/lib/gs-app.c b/lib/gs-app.c
+index 048a061225..e2694057cd 100644
+--- a/lib/gs-app.c
++++ b/lib/gs-app.c
+@@ -609,7 +609,11 @@ gs_app_to_string_append (GsApp *app, GString *str)
+ 		AsScreenshot *ss = g_ptr_array_index (priv->screenshots, i);
+ 		g_autofree gchar *key = NULL;
+ 		tmp = as_screenshot_get_caption (ss);
++#if AS_CHECK_VERSION(1, 0, 0)
++		im = as_screenshot_get_image (ss, 0, 0, 1);
++#else
+ 		im = as_screenshot_get_image (ss, 0, 0);
++#endif
+ 		if (im == NULL)
+ 			continue;
+ 		key = g_strdup_printf ("screenshot-%02u", i);
+diff --git a/lib/gs-appstream.c b/lib/gs-appstream.c
+index deca176dcf..2cc2427a19 100644
+--- a/lib/gs-appstream.c
++++ b/lib/gs-appstream.c
+@@ -587,8 +587,6 @@ gs_appstream_refine_add_provides (GsApp *app, XbNode *component, GError **error)
+ 					kind = AS_PROVIDED_KIND_FIRMWARE_RUNTIME;
+ 				else if (g_strcmp0 (fw_type, "flashed") == 0)
+ 					kind = AS_PROVIDED_KIND_FIRMWARE_FLASHED;
+-			} else if (g_strcmp0 (element_name, "python2") == 0) {
+-				kind = AS_PROVIDED_KIND_PYTHON_2;
+ 			} else if (g_strcmp0 (element_name, "python3") == 0) {
+ 				kind = AS_PROVIDED_KIND_PYTHON;
+ 			} else if (g_strcmp0 (element_name, "dbus") == 0) {
+@@ -1011,8 +1011,11 @@ gs_appstream_refine_app_relation (GsApp           *app,
+ 			as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_CONTROL);
+ 			as_relation_set_value_control_kind (relation, as_control_kind_from_string (xb_node_get_text (child)));
+ 		} else if (g_str_equal (item_kind, "display_length")) {
+-			AsDisplayLengthKind display_length_kind;
+ 			const gchar *compare;
++			const gchar *side;
++#if !AS_CHECK_VERSION(1, 0, 0)
++			AsDisplayLengthKind display_length_kind;
++#endif
+ 
+ 			/* https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-relations-display_length */
+ 			as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_DISPLAY_LENGTH);
+@@ -1020,15 +1023,21 @@ gs_appstream_refine_app_relation (GsApp           *app,
+ 			compare = xb_node_get_attr (child, "compare");
+ 			as_relation_set_compare (relation, (compare != NULL) ? as_relation_compare_from_string (compare) : AS_RELATION_COMPARE_GE);
+ 
++#if AS_CHECK_VERSION(1, 0, 0)
++			side = xb_node_get_attr (child, "side");
++			as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
++			as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
++#else
+ 			display_length_kind = as_display_length_kind_from_string (xb_node_get_text (child));
+ 			if (display_length_kind != AS_DISPLAY_LENGTH_KIND_UNKNOWN) {
+ 				/* Ignore the `side` attribute */
+ 				as_relation_set_value_display_length_kind (relation, display_length_kind);
+ 			} else {
+-				const gchar *side = xb_node_get_attr (child, "side");
++				side = xb_node_get_attr (child, "side");
+ 				as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
+ 				as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
+ 			}
++#endif
+ 		} else {
+ 			g_debug ("Relation type ‘%s’ not currently supported for %s; ignoring",
+ 				 item_kind, gs_app_get_id (app));
+@@ -1472,7 +1481,7 @@ gs_appstream_refine_app (GsPlugin *plugin,
+ }
+ 
+ typedef struct {
+-	AsSearchTokenMatch	 match_value;
++	guint16			 match_value;
+ 	XbQuery			*query;
+ } GsAppstreamSearchHelper;
+ 
+@@ -1522,7 +1531,7 @@ gs_appstream_silo_search_component (GPtrArray *array, XbNode *component, const g
+ }
+ 
+ typedef struct {
+-	AsSearchTokenMatch	match_value;
++	guint16			match_value;
+ 	const gchar		*xpath;
+ } Query;
+ 
+@@ -1585,7 +1594,11 @@ gs_appstream_do_search (GsPlugin *plugin,
+ 			 * Drop the ID token from it as it’s the highest
+ 			 * numeric value but isn’t visible to the user in the
+ 			 * UI, which leads to confusing results ordering. */
++#if AS_CHECK_VERSION(1, 0, 0)
++			gs_app_set_match_value (app, match_value & (~as_utils_get_tag_search_weight ("id")));
++#else
+ 			gs_app_set_match_value (app, match_value & (~AS_SEARCH_TOKEN_MATCH_ID));
++#endif
+ 			gs_app_list_add (list, app);
+ 
+ 			if (gs_app_get_kind (app) == AS_COMPONENT_KIND_ADDON) {
+@@ -1624,18 +1637,32 @@ gs_appstream_search (GsPlugin *plugin,
+ 		     GCancellable *cancellable,
+ 		     GError **error)
+ {
++#if AS_CHECK_VERSION(1, 0, 0)
++	guint16 pkgname_weight = as_utils_get_tag_search_weight ("pkgname");
++	guint16 name_weight = as_utils_get_tag_search_weight ("name");
++	guint16 id_weight = as_utils_get_tag_search_weight ("id");
+ 	const Query queries[] = {
+-		#ifdef HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE
+-		{ AS_SEARCH_TOKEN_MATCH_MEDIATYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+-		#else
+-		{ AS_SEARCH_TOKEN_MATCH_MIMETYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+-		#endif
++		{ as_utils_get_tag_search_weight ("mediatype"),	"provides/mediatype[text()~=stem(?)]" },
+ 		/* Search once with a tokenize-and-casefold operator (`~=`) to support casefolded
+ 		 * full-text search, then again using substring matching (`contains()`), to
+ 		 * support prefix matching. Only do the prefix matches on a few fields, and at a
+ 		 * lower priority, otherwise things will get confusing.
+-		 * 
++		 *
+ 		 * See https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2277 */
++		{ pkgname_weight,				"pkgname[text()~=stem(?)]" },
++		{ pkgname_weight / 2,				"pkgname[contains(text(),stem(?))]" },
++		{ as_utils_get_tag_search_weight ("summary"),	"summary[text()~=stem(?)]" },
++		{ name_weight,					"name[text()~=stem(?)]" },
++		{ name_weight / 2,				"name[contains(text(),stem(?))]" },
++		{ as_utils_get_tag_search_weight ("keyword"),	"keywords/keyword[text()~=stem(?)]" },
++		{ id_weight,					"id[text()~=stem(?)]" },
++		{ id_weight,					"launchable[text()~=stem(?)]" },
++		{ as_utils_get_tag_search_weight ("origin"),	"../components[@origin~=stem(?)]" },
++		{ 0,						NULL }
++	};
++#else
++	const Query queries[] = {
++		{ AS_SEARCH_TOKEN_MATCH_MEDIATYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME,	"pkgname[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME / 2,	"pkgname[contains(text(),stem(?))]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_SUMMARY,	"summary[text()~=stem(?)]" },
+@@ -1647,6 +1674,7 @@ gs_appstream_search (GsPlugin *plugin,
+ 		{ AS_SEARCH_TOKEN_MATCH_ORIGIN,		"../components[@origin~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_NONE,		NULL }
+ 	};
++#endif
+ 
+ 	return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
+ }
+@@ -1659,11 +1687,21 @@ gs_appstream_search_developer_apps (GsPlugin *plugin,
+ 				    GCancellable *cancellable,
+ 				    GError **error)
+ {
++#if AS_CHECK_VERSION(1, 0, 0)
++	const Query queries[] = {
++		{ as_utils_get_tag_search_weight ("pkgname"), "developer/name[text()~=stem(?)]" },
++		{ as_utils_get_tag_search_weight ("summary"), "project_group[text()~=stem(?)]" },
++		/* for legacy support */
++		{ as_utils_get_tag_search_weight ("pkgname"), "developer_name[text()~=stem(?)]" },
++		{ 0,					      NULL }
++	};
++#else
+ 	const Query queries[] = {
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME,	"developer_name[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_SUMMARY,	"project_group[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_NONE,		NULL }
+ 	};
++#endif
+ 
+ 	return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
+ }
+diff --git a/lib/gs-utils.c b/lib/gs-utils.c
+index cf9073025f..19e6ebd046 100644
+--- a/lib/gs-utils.c
++++ b/lib/gs-utils.c
+@@ -1694,9 +1694,9 @@ gs_utils_gstring_replace (GString *str,
+ 			  const gchar *find,
+ 			  const gchar *replace)
+ {
+-	#ifdef HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS
++#if AS_CHECK_VERSION(1, 0, 0)
+ 	as_gstring_replace (str, find, replace, 0);
+-	#else
+-	as_gstring_replace (str, find, replace);
+-	#endif
++#else
++	as_gstring_replace2 (str, find, replace, 0);
++#endif
+ }
+diff --git a/meson.build b/meson.build
+index 09c39df180..ad105869e5 100644
+--- a/meson.build
++++ b/meson.build
+@@ -113,7 +113,7 @@ add_project_arguments('-D_GNU_SOURCE', language : 'c')
+ conf.set('HAVE_LINUX_UNISTD_H', cc.has_header('linux/unistd.h'))
+ 
+ appstream = dependency('appstream',
+-  version : '>= 0.14.0',
++  version : '>= 0.16.2',
+   fallback : ['appstream', 'appstream_dep'],
+   default_options : [
+     'docs=false',
+@@ -121,26 +121,6 @@ appstream = dependency('appstream',
+     'install-docs=false'
+   ]
+ )
+-if appstream.type_name() == 'internal'
+-else
+-  if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_SEARCH_TOKEN_MATCH_MEDIATYPE', dependencies: appstream)
+-    conf.set('HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE', '1')
+-  endif
+-  if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_FORMAT_STYLE_CATALOG', dependencies: appstream)
+-    conf.set('HAVE_AS_FORMAT_STYLE_CATALOG', '1')
+-  endif
+-  if meson.get_compiler('c').has_function('as_metadata_components_to_catalog', prefix: '#include <appstream.h>', dependencies: appstream)
+-    conf.set('HAVE_AS_METADATA_COMPONENTS_TO_CATALOG', '1')
+-  endif
+-  if meson.get_compiler('c').links('''#include <appstream.h>
+-      int main (void)
+-      {
+-         as_gstring_replace (NULL, "a", "b", 0);
+-         return 0;
+-      }''', name: 'as_gstring_replace() has four arguments', dependencies: appstream)
+-    conf.set('HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS', '1')
+-  endif
+-endif
+ 
+ gdk_pixbuf = dependency('gdk-pixbuf-2.0', version : '>= 2.32.0')
+ libxmlb = dependency('xmlb', version : '>= 0.1.7', fallback : ['libxmlb', 'libxmlb_dep'])
+diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c
+index cf9f3022b1..ef3226a591 100644
+--- a/plugins/core/gs-plugin-appstream.c
++++ b/plugins/core/gs-plugin-appstream.c
+@@ -414,11 +414,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
+ 	if (bytes == NULL)
+ 		return NULL;
+ 
+-	#ifdef HAVE_AS_FORMAT_STYLE_CATALOG
+ 	as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_CATALOG);
+-	#else
+-	as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_COLLECTION);
+-	#endif
+ 	as_metadata_parse_bytes (mdata,
+ 				 bytes,
+ 				 AS_FORMAT_KIND_YAML,
+@@ -428,11 +424,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
+ 		return NULL;
+ 	}
+ 
+-	#ifdef HAVE_AS_METADATA_COMPONENTS_TO_CATALOG
+ 	xml = as_metadata_components_to_catalog (mdata, AS_FORMAT_KIND_XML, &tmp_error);
+-	#else
+-	xml = as_metadata_components_to_collection (mdata, AS_FORMAT_KIND_XML, &tmp_error);
+-	#endif
+ 	if (xml == NULL) {
+ 		// This API currently returns NULL if there is nothing to serialize, so we
+ 		// have to test if this is an error or not.
+diff --git a/plugins/fwupd/gs-fwupd-app.c b/plugins/fwupd/gs-fwupd-app.c
+index 6dcda6ee92..5d3254da59 100644
+--- a/plugins/fwupd/gs-fwupd-app.c
++++ b/plugins/fwupd/gs-fwupd-app.c
+@@ -164,7 +164,11 @@ gs_fwupd_app_set_from_device (GsApp *app,
+ 		gs_app_set_install_date (app, fwupd_device_get_created (dev));
+ 	if (fwupd_device_get_description (dev) != NULL) {
+ 		g_autofree gchar *tmp = NULL;
++#if AS_CHECK_VERSION(1, 0, 0)
++		tmp = as_markup_convert (fwupd_device_get_description (dev), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 		tmp = as_markup_convert_simple (fwupd_device_get_description (dev), NULL);
++#endif
+ 		if (tmp != NULL)
+ 			gs_app_set_description (app, GS_APP_QUALITY_NORMAL, tmp);
+ 	}
+@@ -402,7 +406,11 @@ gs_fwupd_app_set_from_release (GsApp *app, FwupdRelease *rel)
+ 	}
+ 	if (fwupd_release_get_description (rel) != NULL) {
+ 		g_autofree gchar *tmp = NULL;
++#if AS_CHECK_VERSION(1, 0, 0)
++		tmp = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 		tmp = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
++#endif
+ 		if (tmp != NULL)
+ 			gs_app_set_update_details_text (app, tmp);
+ 	}
+diff --git a/plugins/fwupd/gs-plugin-fwupd.c b/plugins/fwupd/gs-plugin-fwupd.c
+index e931b2b6db..0747d6e250 100644
+--- a/plugins/fwupd/gs-plugin-fwupd.c
++++ b/plugins/fwupd/gs-plugin-fwupd.c
+@@ -726,7 +726,11 @@ gs_plugin_add_updates (GsPlugin *plugin,
+ 				g_autofree gchar *desc = NULL;
+ 				if (fwupd_release_get_description (rel) == NULL)
+ 					continue;
++#if AS_CHECK_VERSION(1, 0, 0)
++				desc = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 				desc = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
++#endif
+ 				if (desc == NULL)
+ 					continue;
+ 				g_string_append_printf (update_desc,
+diff --git a/src/gs-hardware-support-context-dialog.c b/src/gs-hardware-support-context-dialog.c
+index 0e48c8c266..14653401de 100644
+--- a/src/gs-hardware-support-context-dialog.c
++++ b/src/gs-hardware-support-context-dialog.c
+@@ -461,6 +461,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 			AsRelationCompare comparator = as_relation_get_compare (relation);
+ 			Range current_display_comparand, relation_comparand;
+ 
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 			/* From https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-requires-recommends-display_length */
+ 			Range display_lengths[] = {
+ 				[AS_DISPLAY_LENGTH_KIND_XSMALL] = { 0, 360 },
+@@ -469,6 +470,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 				[AS_DISPLAY_LENGTH_KIND_LARGE] = { 1024, 3840 },
+ 				[AS_DISPLAY_LENGTH_KIND_XLARGE] = { 3840, G_MAXUINT },
+ 			};
++#endif
+ 
+ 			any_display_relations_set = TRUE;
+ 
+@@ -485,11 +487,14 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 			case AS_DISPLAY_SIDE_KIND_LAST:
+ 			default:
+ 				current_display_comparand.min = current_display_comparand.max = MAX (current_screen_size.width, current_screen_size.height);
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 				relation_comparand.min = display_lengths[as_relation_get_value_display_length_kind (relation)].min;
+ 				relation_comparand.max = display_lengths[as_relation_get_value_display_length_kind (relation)].max;
++#endif
+ 				break;
+ 			}
+ 
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 			if (evaluate_display_comparison (display_lengths[AS_DISPLAY_LENGTH_KIND_SMALL], comparator, relation_comparand)) {
+ 				*mobile_relation_kind_out = max_relation_kind (*mobile_relation_kind_out, as_relation_get_kind (relation));
+ 				*mobile_match_out = TRUE;
+@@ -499,6 +504,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 				*desktop_relation_kind_out = max_relation_kind (*desktop_relation_kind_out, as_relation_get_kind (relation));
+ 				*desktop_match_out = TRUE;
+ 			}
++#endif
+ 
+ 			if (evaluate_display_comparison (current_display_comparand, comparator, relation_comparand)) {
+ 				*current_relation_kind_out = max_relation_kind (*current_relation_kind_out, as_relation_get_kind (relation));
+diff --git a/src/gs-repos-dialog.c b/src/gs-repos-dialog.c
+index c41c4944a1..7dac0416d9 100644
+--- a/src/gs-repos-dialog.c
++++ b/src/gs-repos-dialog.c
+@@ -154,7 +154,11 @@ enable_repo (GsReposDialog *dialog,
+ 		g_autoptr(GError) error = NULL;
+ 
+ 		/* convert from AppStream markup */
++#if AS_CHECK_VERSION(1, 0, 0)
++		message = as_markup_convert (gs_app_get_agreement (repo), AS_MARKUP_KIND_TEXT, &error);
++#else
+ 		message = as_markup_convert_simple (gs_app_get_agreement (repo), &error);
++#endif
+ 		if (message == NULL) {
+ 			/* failed, so just try and show the original markup */
+ 			message = g_strdup (gs_app_get_agreement (repo));
+diff --git a/src/gs-screenshot-carousel.c b/src/gs-screenshot-carousel.c
+index 04bbf86a1e..d269af6605 100644
+--- a/src/gs-screenshot-carousel.c
++++ b/src/gs-screenshot-carousel.c
+@@ -141,8 +141,8 @@ gs_screenshot_carousel_load_screenshots (GsScreenshotCarousel *self, GsApp *app,
+ 		gtk_widget_set_can_focus (gtk_widget_get_first_child (ssimg), FALSE);
+ 		gs_screenshot_image_set_screenshot (GS_SCREENSHOT_IMAGE (ssimg), ss);
+ 		gs_screenshot_image_set_size (GS_SCREENSHOT_IMAGE (ssimg),
+-					      AS_IMAGE_NORMAL_WIDTH,
+-					      AS_IMAGE_NORMAL_HEIGHT);
++					      GS_IMAGE_NORMAL_WIDTH,
++					      GS_IMAGE_NORMAL_HEIGHT);
+ 		gtk_widget_add_css_class (ssimg, "screenshot-image-main");
+ 		gs_screenshot_image_load_async (GS_SCREENSHOT_IMAGE (ssimg), cancellable);
+ 
+diff --git a/src/gs-screenshot-image.c b/src/gs-screenshot-image.c
+index c313a2589f..b24083b387 100644
+--- a/src/gs-screenshot-image.c
++++ b/src/gs-screenshot-image.c
+@@ -284,13 +284,13 @@ gs_screenshot_image_save_downloaded_img (GsScreenshotImage *ssimg,
+ 	if (images->len > 1)
+ 		return TRUE;
+ 
+-	if (width == AS_IMAGE_THUMBNAIL_WIDTH &&
+-	    height == AS_IMAGE_THUMBNAIL_HEIGHT) {
+-		width = AS_IMAGE_NORMAL_WIDTH;
+-		height = AS_IMAGE_NORMAL_HEIGHT;
++	if (width == GS_IMAGE_THUMBNAIL_WIDTH &&
++	    height == GS_IMAGE_THUMBNAIL_HEIGHT) {
++		width = GS_IMAGE_NORMAL_WIDTH;
++		height = GS_IMAGE_NORMAL_HEIGHT;
+ 	} else {
+-		width = AS_IMAGE_THUMBNAIL_WIDTH;
+-		height = AS_IMAGE_THUMBNAIL_HEIGHT;
++		width = GS_IMAGE_THUMBNAIL_WIDTH;
++		height = GS_IMAGE_THUMBNAIL_HEIGHT;
+ 	}
+ 
+ 	width *= ssimg->scale;
+@@ -582,16 +582,30 @@ gs_screenshot_image_get_url (GsScreenshotImage *ssimg)
+ 	} else if (as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE) {
+ 		AsImage *im;
+ 
++#if AS_CHECK_VERSION(1, 0, 0)
++		im = as_screenshot_get_image (ssimg->screenshot,
++					      ssimg->width,
++					      ssimg->height,
++					      ssimg->scale);
++#else
+ 		im = as_screenshot_get_image (ssimg->screenshot,
+ 					      ssimg->width * ssimg->scale,
+ 					      ssimg->height * ssimg->scale);
++#endif
+ 
+ 		/* if we've failed to load a HiDPI image, fallback to LoDPI */
+ 		if (im == NULL && ssimg->scale > 1) {
+ 			ssimg->scale = 1;
++#if AS_CHECK_VERSION(1, 0, 0)
++			im = as_screenshot_get_image (ssimg->screenshot,
++						      ssimg->width,
++						      ssimg->height,
++						      1);
++#else
+ 			im = as_screenshot_get_image (ssimg->screenshot,
+ 						      ssimg->width,
+ 						      ssimg->height);
++#endif
+ 		}
+ 
+ 		if (im)
+@@ -698,15 +712,22 @@ gs_screenshot_image_load_async (GsScreenshotImage *ssimg,
+ 	 * smaller version of it straight away */
+ 	if (!ssimg->showing_image &&
+ 	    as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE &&
+-	    ssimg->width > AS_IMAGE_THUMBNAIL_WIDTH &&
+-	    ssimg->height > AS_IMAGE_THUMBNAIL_HEIGHT) {
++	    ssimg->width > GS_IMAGE_THUMBNAIL_WIDTH &&
++	    ssimg->height > GS_IMAGE_THUMBNAIL_HEIGHT) {
+ 		const gchar *url_thumb;
+ 		g_autofree gchar *basename_thumb = NULL;
+ 		g_autofree gchar *cache_kind_thumb = NULL;
+ 		AsImage *im;
++#if AS_CHECK_VERSION(1, 0, 0)
+ 		im = as_screenshot_get_image (ssimg->screenshot,
+-					      AS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
+-					      AS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
++					      GS_IMAGE_THUMBNAIL_WIDTH,
++					      GS_IMAGE_THUMBNAIL_HEIGHT,
++					      ssimg->scale);
++#else
++		im = as_screenshot_get_image (ssimg->screenshot,
++					      GS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
++					      GS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
++#endif
+ 		url_thumb = as_image_get_url (im);
+ 		basename_thumb = gs_screenshot_get_cachefn_for_url (url_thumb);
+ 		cache_kind_thumb = g_build_filename ("screenshots", "112x63", NULL);
+diff --git a/src/gs-screenshot-image.h b/src/gs-screenshot-image.h
+index 1f6cf81ce6..6e45f5d20a 100644
+--- a/src/gs-screenshot-image.h
++++ b/src/gs-screenshot-image.h
+@@ -21,6 +21,13 @@ G_BEGIN_DECLS
+ 
+ G_DECLARE_FINAL_TYPE (GsScreenshotImage, gs_screenshot_image, GS, SCREENSHOT_IMAGE, GtkWidget)
+ 
++#define GS_IMAGE_LARGE_HEIGHT		423
++#define GS_IMAGE_LARGE_WIDTH		752
++#define GS_IMAGE_NORMAL_HEIGHT		351
++#define GS_IMAGE_NORMAL_WIDTH		624
++#define GS_IMAGE_THUMBNAIL_HEIGHT	63
++#define GS_IMAGE_THUMBNAIL_WIDTH 	112
++
+ GtkWidget	*gs_screenshot_image_new		(SoupSession		*session);
+ 
+ AsScreenshot	*gs_screenshot_image_get_screenshot	(GsScreenshotImage	*ssimg);
+diff --git a/subprojects/appstream.wrap b/subprojects/appstream.wrap
+index 6f0beb0cbc..5763a32c64 100644
+--- a/subprojects/appstream.wrap
++++ b/subprojects/appstream.wrap
+@@ -1,5 +1,5 @@
+ [wrap-git]
+ directory = appstream
+ url = https://github.com/ximion/appstream.git
+-revision = v0.14.1
++revision = v0.16.3
+ depth = 1
+-- 
+GitLab
diff --git a/srcpkgs/gnome-software/template b/srcpkgs/gnome-software/template
index c5394ce2105091..70a2dfb664394d 100644
--- a/srcpkgs/gnome-software/template
+++ b/srcpkgs/gnome-software/template
@@ -1,6 +1,6 @@
 # Template file for 'gnome-software'
 pkgname=gnome-software
-version=44.2
+version=45.3
 revision=1
 build_style=meson
 configure_args="-Dpackagekit=false -Dfwupd=false
@@ -18,8 +18,8 @@ license="GPL-3.0-or-later"
 homepage="https://gitlab.gnome.org/GNOME/gnome-software"
 changelog="https://gitlab.gnome.org/GNOME/gnome-software/-/raw/main/NEWS"
 distfiles="https://gitlab.gnome.org/GNOME/gnome-software/-/archive/${version}/gnome-software-${version}.tar.gz"
-checksum=bedfe8652d2ceaf17eccc57d6befe6d95f09d15e486a58f0bb7a9a868d0bacc0
-make_check=no # FIXME
+checksum=be2f64e894e653924411981d952fb694559687010985b53ccd325dee0d6a6b83
+make_check=no # Requires system dbus
 
 build_options="gtk_doc"
 

From 46b15338e5fd92b91d2bec10e612d4ab0311425f Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 04:41:38 -0800
Subject: [PATCH 5/6] New package: debugedit-5.0

---
 srcpkgs/debugedit/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/debugedit/template

diff --git a/srcpkgs/debugedit/template b/srcpkgs/debugedit/template
new file mode 100644
index 00000000000000..3056f067fda036
--- /dev/null
+++ b/srcpkgs/debugedit/template
@@ -0,0 +1,17 @@
+# Template file for 'debugedit'
+pkgname=debugedit
+version=5.0
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config"
+makedepends="elfutils-devel"
+short_desc="Tools for debuginfo creation"
+maintainer="oreo639 <oreo6391@gmail.com>"
+license="GPL-2.0-or-later"
+homepage="https://sourceware.org/debugedit/"
+distfiles="https://sourceware.org/pub/debugedit/${version%%.*}.0/debugedit-${version}.tar.xz"
+checksum=e9ecd7d350bebae1f178ce6776ca19a648b6fe8fa22f5b3044b38d7899aa553e
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+	makedepends+=" musl-legacy-compat"
+fi

From 77bb93dbd1c4f9d31b5d67b463da3149440fc2d6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:12:25 -0800
Subject: [PATCH 6/6] flatpak-builder: update to 1.4.2.

---
 srcpkgs/flatpak-builder/template | 27 ++++++++++-----------------
 1 file changed, 10 insertions(+), 17 deletions(-)

diff --git a/srcpkgs/flatpak-builder/template b/srcpkgs/flatpak-builder/template
index fe3485b0d89568..15ee79c9a082b4 100644
--- a/srcpkgs/flatpak-builder/template
+++ b/srcpkgs/flatpak-builder/template
@@ -1,28 +1,21 @@
 # Template file for 'flatpak-builder'
 pkgname=flatpak-builder
-version=1.2.3
+version=1.4.2
 revision=1
-build_style=gnu-configure
-hostmakedepends="pkg-config xmlto"
-makedepends="flatpak-devel json-glib-devel libcap-devel libsoup-devel
- libyaml-devel libcurl-devel"
-depends="elfutils"
+build_style=meson
+hostmakedepends="pkg-config xmlto debugedit AppStream-compose"
+makedepends="flatpak-devel json-glib-devel libcap-devel
+ libyaml-devel libcurl-devel libxml2-devel"
+depends="elfutils debugedit AppStream-compose"
 short_desc="Tool to build flatpaks from source"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://github.com/flatpak/flatpak-builder"
 changelog="https://github.com/flatpak/flatpak-builder/raw/main/NEWS"
-distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}.tar.xz"
-checksum=e257825a47f7a3e71e30fb0f80f2d9ac6e4801f746f552dfaf0e564e3ee351c8
-# Tests expects a Debian derivate hosts to build a flatpak container from.
-make_check=no
-
-if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" flatpak-devel"
-fi
-if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
-	makedepends+=" musl-legacy-compat"
-fi
+#distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}.tar.xz"
+distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}-fixed-libglnx.tar.xz"
+checksum=c041b974e03a2c2d3cda88a0efe1ecf69f9adf42a1758eac341d555e779d0596
+make_check=no # Can't run bubblewrap inside the container
 
 post_patch() {
 	if [ "$XBPS_TARGET_LIBC" = "musl" ]; then

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] flatpak-builder: update to 1.4.2.
  2024-03-05 12:13 [PR PATCH] flatpak-builder: update to 1.4.2 oreo639
                   ` (13 preceding siblings ...)
  2024-03-09 23:10 ` oreo639
@ 2024-03-10  0:06 ` oreo639
  2024-03-11 22:33 ` oreo639
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: oreo639 @ 2024-03-10  0:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1258 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages flatpak-builder
https://github.com/void-linux/void-packages/pull/49126

flatpak-builder: update to 1.4.2.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/49126.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-flatpak-builder-49126.patch --]
[-- Type: text/x-diff, Size: 33924 bytes --]

From 92fb3f6c24c46df02799531f91253b48bb16d48b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:09:50 -0800
Subject: [PATCH 1/6] AppStream: update to 1.0.2.

---
 common/shlibs                   |  4 +-
 srcpkgs/AppStream-compose       |  1 +
 srcpkgs/AppStream-compose-devel |  1 +
 srcpkgs/AppStream-qt-devel      |  1 +
 srcpkgs/AppStream/template      | 76 ++++++++++++++++++++++++++-------
 5 files changed, 67 insertions(+), 16 deletions(-)
 create mode 120000 srcpkgs/AppStream-compose
 create mode 120000 srcpkgs/AppStream-compose-devel
 create mode 120000 srcpkgs/AppStream-qt-devel

diff --git a/common/shlibs b/common/shlibs
index 131fbb19ebc2a7..18ec2822deb252 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3001,7 +3001,9 @@ libliveMedia.so.81 live555-2020.08.11_2
 libgroupsock.so.8 live555-2020.08.11_2
 libUsageEnvironment.so.3 live555-2020.08.11_2
 libBasicUsageEnvironment.so.1 live555-2020.08.11_2
-libappstream.so.4 AppStream-0.12.2_1
+libappstream.so.5 AppStream-1.0.2_1
+libAppStreamQt.so.3 AppStream-qt-1.0.2_1
+libappstream-compose.so.0 AppStream-compose-1.0.2_1
 libappstream-glib.so.8 appstream-glib-0.6.13_1
 libappstream-builder.so.8 appstream-glib-0.6.13_1
 libflatpak.so.0 flatpak-0.9.3_2
diff --git a/srcpkgs/AppStream-compose b/srcpkgs/AppStream-compose
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-compose
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream-compose-devel b/srcpkgs/AppStream-compose-devel
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-compose-devel
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream-qt-devel b/srcpkgs/AppStream-qt-devel
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-qt-devel
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream/template b/srcpkgs/AppStream/template
index 87fbb76d2c9c66..1dc79c7ee640c2 100644
--- a/srcpkgs/AppStream/template
+++ b/srcpkgs/AppStream/template
@@ -1,48 +1,94 @@
 # Template file for 'AppStream'
 pkgname=AppStream
-version=0.16.4
+version=1.0.2
 revision=1
 build_style=meson
 build_helper="gir qemu"
 configure_args="$(vopt_bool gir gir) $(vopt_bool vala vapi)
- -Dstemming=false -Dapidocs=false -Dqt=true -Dsystemd=false"
+ -Dstemming=false -Dapidocs=false -Dqt=true -Dsystemd=false
+ -Dcompose=true"
 hostmakedepends="docbook-xsl gettext glib-devel gperf libxslt pkg-config
- qt5-host-tools $(vopt_if vala vala) itstool"
-makedepends="libglib-devel libxml2-devel libyaml-devel qt5-devel libxmlb-devel
- libcurl-devel"
+ qt6-base $(vopt_if vala vala) itstool"
+makedepends="libglib-devel libxml2-devel libyaml-devel qt6-base-devel libxmlb-devel
+ libcurl-devel librsvg-devel"
+checkdepends="tar"
 short_desc="Tools and libraries to work with AppStream metadata"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://github.com/ximion/appstream"
 changelog="https://raw.githubusercontent.com/ximion/appstream/master/NEWS"
 distfiles="https://github.com/ximion/appstream/archive/v${version}.tar.gz"
-checksum=95d5cf451d1945182a9bc4d597c13e713451a3dba1a5759f45b6b3279ff3774c
-conf_files="/etc/appstream.conf"
+checksum=77e271f47167ae37a68111b951c3c07e4261579e69047747044f7924c8219d14
 triggers="appstream-cache"
 
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" AppStream-devel"
+fi
+
 build_options="gir vala"
 build_options_default="gir vala"
 
+pre_configure() {
+	# Meson uses paths from pkg-config which is /usr/lib32/qt6 when cross compiling 32-bit
+	# Work around this for now
+	export PATH="/usr/lib/qt6/libexec/:$PATH"
+}
+
 AppStream-devel_package() {
-	depends="${sourcepkg}>=${version}_${revision} AppStream-qt>=${version}_${revision}"
+	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - development files"
 	pkg_install() {
-		vmove usr/include
-		vmove usr/lib/cmake
-		vmove usr/lib/pkgconfig
-		vmove "usr/lib/*.so"
+		vmove usr/include/appstream
+		vmove usr/lib/pkgconfig/appstream.pc
+		vmove /usr/lib/libappstream.so
 		if [ "$build_option_gir" ]; then
-			vmove usr/share/gir-1.0
+			vmove usr/share/gir-1.0/AppStream-1.0.gir
 		fi
 		if [ "$build_option_vala" ]; then
-			vmove usr/share/vala
+			vmove "usr/share/vala/vapi/appstream.*"
+		fi
+	}
+}
+
+AppStream-compose_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - compose libraries and tools"
+	pkg_install() {
+		vmove usr/libexec/appstreamcli-compose
+		vmove "usr/share/man/man1/appstreamcli-compose.*"
+		vmove "usr/lib/libappstream-compose.so.*"
+		vmove usr/lib/girepository-1.0/AppStreamCompose-1.0.typelib
+		vmove usr/share/metainfo/org.freedesktop.appstream.compose.metainfo.xml
+	}
+}
+
+AppStream-compose-devel_package() {
+	depends="AppStream-compose>=${version}_${revision} AppStream-devel>=${version}_${revision}"
+	short_desc+=" - compose development files"
+	pkg_install() {
+		vmove usr/include/appstream-compose
+		vmove usr/lib/pkgconfig/appstream-compose.pc
+		vmove /usr/lib/libappstream-compose.so
+		if [ "$build_option_gir" ]; then
+			vmove usr/share/gir-1.0/AppStreamCompose-1.0.gir
 		fi
 	}
 }
 
 AppStream-qt_package() {
-	short_desc+=" - qt5 interface library"
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - qt6 interface library"
+	pkg_install() {
+		vmove usr/lib/libAppStreamQt.so
+	}
+}
+
+AppStream-qt-devel_package() {
+	depends="AppStream-qt>=${version}_${revision}"
+	short_desc+=" - qt6 development files"
 	pkg_install() {
+		vmove usr/include/AppStreamQt
+		vmove usr/lib/cmake/AppStreamQt
 		vmove "usr/lib/libAppStreamQt.so.*"
 	}
 }

From 46e48c987075e3e5f15be960e912dc55c91f9792 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:10:35 -0800
Subject: [PATCH 2/6] flatpak: rebuild for AppStream 1.0

---
 srcpkgs/flatpak/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/flatpak/template b/srcpkgs/flatpak/template
index 819686057ac9bc..4d03282413c98c 100644
--- a/srcpkgs/flatpak/template
+++ b/srcpkgs/flatpak/template
@@ -1,7 +1,7 @@
 # Template file for 'flatpak'
 pkgname=flatpak
 version=1.15.6
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="
@@ -48,7 +48,7 @@ flatpak-devel_package() {
 	short_desc+=" - development files"
 	depends="${sourcepkg}>=${version}_${revision} libglib-devel libostree-devel
 	 libcurl-devel libarchive-devel json-glib-devel dconf-devel libseccomp-devel
-	 gpgme-devel"
+	 gpgme-devel polkit-devel"
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/pkgconfig

From 68c9334fba17e2c6785a1356ff89e7766c972ddd Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:11:53 -0800
Subject: [PATCH 3/6] libadwaita: rebuild for AppStream 1.0

---
 srcpkgs/libadwaita/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libadwaita/template b/srcpkgs/libadwaita/template
index 63e643d8fdd70d..fca2b2a5d5a25e 100644
--- a/srcpkgs/libadwaita/template
+++ b/srcpkgs/libadwaita/template
@@ -1,7 +1,7 @@
 # Template file for 'libadwaita'
 pkgname=libadwaita
 version=1.4.4
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="-Dexamples=true -Dtests=true $(vopt_bool gtk_doc)

From 8a1b5e71151c17161095b3871e530e2274557c32 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:11:59 -0800
Subject: [PATCH 4/6] gnome-software: update to 45.3.

---
 .../patches/0001-port-to-appstream1.patch     | 504 ++++++++++++++++++
 srcpkgs/gnome-software/template               |   6 +-
 2 files changed, 507 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch

diff --git a/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch b/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch
new file mode 100644
index 00000000000000..256a8509231e5f
--- /dev/null
+++ b/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch
@@ -0,0 +1,504 @@
+See: https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2393
+
+From e6f7e28bdd50a63586ba6a82b936d54db19a311b Mon Sep 17 00:00:00 2001
+From: Matthias Klumpp <matthias@tenstral.net>
+Date: Sun, 8 Oct 2023 20:22:44 +0200
+Subject: [PATCH] Adjust to build with AppStream 1.0 as well as 0.16.x
+
+---
+ lib/gs-app.c                             |  4 ++
+ lib/gs-appstream.c                       | 58 ++++++++++++++++++++----
+ lib/gs-utils.c                           |  8 ++--
+ meson.build                              | 22 +--------
+ plugins/core/gs-plugin-appstream.c       |  8 ----
+ plugins/fwupd/gs-fwupd-app.c             |  8 ++++
+ plugins/fwupd/gs-plugin-fwupd.c          |  4 ++
+ src/gs-hardware-support-context-dialog.c |  6 +++
+ src/gs-repos-dialog.c                    |  4 ++
+ src/gs-screenshot-carousel.c             |  4 +-
+ src/gs-screenshot-image.c                | 41 +++++++++++++----
+ src/gs-screenshot-image.h                |  7 +++
+ subprojects/appstream.wrap               |  2 +-
+ 13 files changed, 120 insertions(+), 56 deletions(-)
+
+diff --git a/lib/gs-app.c b/lib/gs-app.c
+index 048a061225..e2694057cd 100644
+--- a/lib/gs-app.c
++++ b/lib/gs-app.c
+@@ -609,7 +609,11 @@ gs_app_to_string_append (GsApp *app, GString *str)
+ 		AsScreenshot *ss = g_ptr_array_index (priv->screenshots, i);
+ 		g_autofree gchar *key = NULL;
+ 		tmp = as_screenshot_get_caption (ss);
++#if AS_CHECK_VERSION(1, 0, 0)
++		im = as_screenshot_get_image (ss, 0, 0, 1);
++#else
+ 		im = as_screenshot_get_image (ss, 0, 0);
++#endif
+ 		if (im == NULL)
+ 			continue;
+ 		key = g_strdup_printf ("screenshot-%02u", i);
+diff --git a/lib/gs-appstream.c b/lib/gs-appstream.c
+index deca176dcf..2cc2427a19 100644
+--- a/lib/gs-appstream.c
++++ b/lib/gs-appstream.c
+@@ -587,8 +587,6 @@ gs_appstream_refine_add_provides (GsApp *app, XbNode *component, GError **error)
+ 					kind = AS_PROVIDED_KIND_FIRMWARE_RUNTIME;
+ 				else if (g_strcmp0 (fw_type, "flashed") == 0)
+ 					kind = AS_PROVIDED_KIND_FIRMWARE_FLASHED;
+-			} else if (g_strcmp0 (element_name, "python2") == 0) {
+-				kind = AS_PROVIDED_KIND_PYTHON_2;
+ 			} else if (g_strcmp0 (element_name, "python3") == 0) {
+ 				kind = AS_PROVIDED_KIND_PYTHON;
+ 			} else if (g_strcmp0 (element_name, "dbus") == 0) {
+@@ -1011,8 +1011,11 @@ gs_appstream_refine_app_relation (GsApp           *app,
+ 			as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_CONTROL);
+ 			as_relation_set_value_control_kind (relation, as_control_kind_from_string (xb_node_get_text (child)));
+ 		} else if (g_str_equal (item_kind, "display_length")) {
+-			AsDisplayLengthKind display_length_kind;
+ 			const gchar *compare;
++			const gchar *side;
++#if !AS_CHECK_VERSION(1, 0, 0)
++			AsDisplayLengthKind display_length_kind;
++#endif
+ 
+ 			/* https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-relations-display_length */
+ 			as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_DISPLAY_LENGTH);
+@@ -1020,15 +1023,21 @@ gs_appstream_refine_app_relation (GsApp           *app,
+ 			compare = xb_node_get_attr (child, "compare");
+ 			as_relation_set_compare (relation, (compare != NULL) ? as_relation_compare_from_string (compare) : AS_RELATION_COMPARE_GE);
+ 
++#if AS_CHECK_VERSION(1, 0, 0)
++			side = xb_node_get_attr (child, "side");
++			as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
++			as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
++#else
+ 			display_length_kind = as_display_length_kind_from_string (xb_node_get_text (child));
+ 			if (display_length_kind != AS_DISPLAY_LENGTH_KIND_UNKNOWN) {
+ 				/* Ignore the `side` attribute */
+ 				as_relation_set_value_display_length_kind (relation, display_length_kind);
+ 			} else {
+-				const gchar *side = xb_node_get_attr (child, "side");
++				side = xb_node_get_attr (child, "side");
+ 				as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
+ 				as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
+ 			}
++#endif
+ 		} else {
+ 			g_debug ("Relation type ‘%s’ not currently supported for %s; ignoring",
+ 				 item_kind, gs_app_get_id (app));
+@@ -1472,7 +1481,7 @@ gs_appstream_refine_app (GsPlugin *plugin,
+ }
+ 
+ typedef struct {
+-	AsSearchTokenMatch	 match_value;
++	guint16			 match_value;
+ 	XbQuery			*query;
+ } GsAppstreamSearchHelper;
+ 
+@@ -1522,7 +1531,7 @@ gs_appstream_silo_search_component (GPtrArray *array, XbNode *component, const g
+ }
+ 
+ typedef struct {
+-	AsSearchTokenMatch	match_value;
++	guint16			match_value;
+ 	const gchar		*xpath;
+ } Query;
+ 
+@@ -1585,7 +1594,11 @@ gs_appstream_do_search (GsPlugin *plugin,
+ 			 * Drop the ID token from it as it’s the highest
+ 			 * numeric value but isn’t visible to the user in the
+ 			 * UI, which leads to confusing results ordering. */
++#if AS_CHECK_VERSION(1, 0, 0)
++			gs_app_set_match_value (app, match_value & (~as_utils_get_tag_search_weight ("id")));
++#else
+ 			gs_app_set_match_value (app, match_value & (~AS_SEARCH_TOKEN_MATCH_ID));
++#endif
+ 			gs_app_list_add (list, app);
+ 
+ 			if (gs_app_get_kind (app) == AS_COMPONENT_KIND_ADDON) {
+@@ -1624,18 +1637,32 @@ gs_appstream_search (GsPlugin *plugin,
+ 		     GCancellable *cancellable,
+ 		     GError **error)
+ {
++#if AS_CHECK_VERSION(1, 0, 0)
++	guint16 pkgname_weight = as_utils_get_tag_search_weight ("pkgname");
++	guint16 name_weight = as_utils_get_tag_search_weight ("name");
++	guint16 id_weight = as_utils_get_tag_search_weight ("id");
+ 	const Query queries[] = {
+-		#ifdef HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE
+-		{ AS_SEARCH_TOKEN_MATCH_MEDIATYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+-		#else
+-		{ AS_SEARCH_TOKEN_MATCH_MIMETYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+-		#endif
++		{ as_utils_get_tag_search_weight ("mediatype"),	"provides/mediatype[text()~=stem(?)]" },
+ 		/* Search once with a tokenize-and-casefold operator (`~=`) to support casefolded
+ 		 * full-text search, then again using substring matching (`contains()`), to
+ 		 * support prefix matching. Only do the prefix matches on a few fields, and at a
+ 		 * lower priority, otherwise things will get confusing.
+-		 * 
++		 *
+ 		 * See https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2277 */
++		{ pkgname_weight,				"pkgname[text()~=stem(?)]" },
++		{ pkgname_weight / 2,				"pkgname[contains(text(),stem(?))]" },
++		{ as_utils_get_tag_search_weight ("summary"),	"summary[text()~=stem(?)]" },
++		{ name_weight,					"name[text()~=stem(?)]" },
++		{ name_weight / 2,				"name[contains(text(),stem(?))]" },
++		{ as_utils_get_tag_search_weight ("keyword"),	"keywords/keyword[text()~=stem(?)]" },
++		{ id_weight,					"id[text()~=stem(?)]" },
++		{ id_weight,					"launchable[text()~=stem(?)]" },
++		{ as_utils_get_tag_search_weight ("origin"),	"../components[@origin~=stem(?)]" },
++		{ 0,						NULL }
++	};
++#else
++	const Query queries[] = {
++		{ AS_SEARCH_TOKEN_MATCH_MEDIATYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME,	"pkgname[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME / 2,	"pkgname[contains(text(),stem(?))]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_SUMMARY,	"summary[text()~=stem(?)]" },
+@@ -1647,6 +1674,7 @@ gs_appstream_search (GsPlugin *plugin,
+ 		{ AS_SEARCH_TOKEN_MATCH_ORIGIN,		"../components[@origin~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_NONE,		NULL }
+ 	};
++#endif
+ 
+ 	return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
+ }
+@@ -1659,11 +1687,21 @@ gs_appstream_search_developer_apps (GsPlugin *plugin,
+ 				    GCancellable *cancellable,
+ 				    GError **error)
+ {
++#if AS_CHECK_VERSION(1, 0, 0)
++	const Query queries[] = {
++		{ as_utils_get_tag_search_weight ("pkgname"), "developer/name[text()~=stem(?)]" },
++		{ as_utils_get_tag_search_weight ("summary"), "project_group[text()~=stem(?)]" },
++		/* for legacy support */
++		{ as_utils_get_tag_search_weight ("pkgname"), "developer_name[text()~=stem(?)]" },
++		{ 0,					      NULL }
++	};
++#else
+ 	const Query queries[] = {
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME,	"developer_name[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_SUMMARY,	"project_group[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_NONE,		NULL }
+ 	};
++#endif
+ 
+ 	return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
+ }
+diff --git a/lib/gs-utils.c b/lib/gs-utils.c
+index cf9073025f..19e6ebd046 100644
+--- a/lib/gs-utils.c
++++ b/lib/gs-utils.c
+@@ -1694,9 +1694,9 @@ gs_utils_gstring_replace (GString *str,
+ 			  const gchar *find,
+ 			  const gchar *replace)
+ {
+-	#ifdef HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS
++#if AS_CHECK_VERSION(1, 0, 0)
+ 	as_gstring_replace (str, find, replace, 0);
+-	#else
+-	as_gstring_replace (str, find, replace);
+-	#endif
++#else
++	as_gstring_replace2 (str, find, replace, 0);
++#endif
+ }
+diff --git a/meson.build b/meson.build
+index 09c39df180..ad105869e5 100644
+--- a/meson.build
++++ b/meson.build
+@@ -113,7 +113,7 @@ add_project_arguments('-D_GNU_SOURCE', language : 'c')
+ conf.set('HAVE_LINUX_UNISTD_H', cc.has_header('linux/unistd.h'))
+ 
+ appstream = dependency('appstream',
+-  version : '>= 0.14.0',
++  version : '>= 0.16.2',
+   fallback : ['appstream', 'appstream_dep'],
+   default_options : [
+     'docs=false',
+@@ -121,26 +121,6 @@ appstream = dependency('appstream',
+     'install-docs=false'
+   ]
+ )
+-if appstream.type_name() == 'internal'
+-else
+-  if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_SEARCH_TOKEN_MATCH_MEDIATYPE', dependencies: appstream)
+-    conf.set('HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE', '1')
+-  endif
+-  if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_FORMAT_STYLE_CATALOG', dependencies: appstream)
+-    conf.set('HAVE_AS_FORMAT_STYLE_CATALOG', '1')
+-  endif
+-  if meson.get_compiler('c').has_function('as_metadata_components_to_catalog', prefix: '#include <appstream.h>', dependencies: appstream)
+-    conf.set('HAVE_AS_METADATA_COMPONENTS_TO_CATALOG', '1')
+-  endif
+-  if meson.get_compiler('c').links('''#include <appstream.h>
+-      int main (void)
+-      {
+-         as_gstring_replace (NULL, "a", "b", 0);
+-         return 0;
+-      }''', name: 'as_gstring_replace() has four arguments', dependencies: appstream)
+-    conf.set('HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS', '1')
+-  endif
+-endif
+ 
+ gdk_pixbuf = dependency('gdk-pixbuf-2.0', version : '>= 2.32.0')
+ libxmlb = dependency('xmlb', version : '>= 0.1.7', fallback : ['libxmlb', 'libxmlb_dep'])
+diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c
+index cf9f3022b1..ef3226a591 100644
+--- a/plugins/core/gs-plugin-appstream.c
++++ b/plugins/core/gs-plugin-appstream.c
+@@ -414,11 +414,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
+ 	if (bytes == NULL)
+ 		return NULL;
+ 
+-	#ifdef HAVE_AS_FORMAT_STYLE_CATALOG
+ 	as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_CATALOG);
+-	#else
+-	as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_COLLECTION);
+-	#endif
+ 	as_metadata_parse_bytes (mdata,
+ 				 bytes,
+ 				 AS_FORMAT_KIND_YAML,
+@@ -428,11 +424,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
+ 		return NULL;
+ 	}
+ 
+-	#ifdef HAVE_AS_METADATA_COMPONENTS_TO_CATALOG
+ 	xml = as_metadata_components_to_catalog (mdata, AS_FORMAT_KIND_XML, &tmp_error);
+-	#else
+-	xml = as_metadata_components_to_collection (mdata, AS_FORMAT_KIND_XML, &tmp_error);
+-	#endif
+ 	if (xml == NULL) {
+ 		// This API currently returns NULL if there is nothing to serialize, so we
+ 		// have to test if this is an error or not.
+diff --git a/plugins/fwupd/gs-fwupd-app.c b/plugins/fwupd/gs-fwupd-app.c
+index 6dcda6ee92..5d3254da59 100644
+--- a/plugins/fwupd/gs-fwupd-app.c
++++ b/plugins/fwupd/gs-fwupd-app.c
+@@ -164,7 +164,11 @@ gs_fwupd_app_set_from_device (GsApp *app,
+ 		gs_app_set_install_date (app, fwupd_device_get_created (dev));
+ 	if (fwupd_device_get_description (dev) != NULL) {
+ 		g_autofree gchar *tmp = NULL;
++#if AS_CHECK_VERSION(1, 0, 0)
++		tmp = as_markup_convert (fwupd_device_get_description (dev), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 		tmp = as_markup_convert_simple (fwupd_device_get_description (dev), NULL);
++#endif
+ 		if (tmp != NULL)
+ 			gs_app_set_description (app, GS_APP_QUALITY_NORMAL, tmp);
+ 	}
+@@ -402,7 +406,11 @@ gs_fwupd_app_set_from_release (GsApp *app, FwupdRelease *rel)
+ 	}
+ 	if (fwupd_release_get_description (rel) != NULL) {
+ 		g_autofree gchar *tmp = NULL;
++#if AS_CHECK_VERSION(1, 0, 0)
++		tmp = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 		tmp = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
++#endif
+ 		if (tmp != NULL)
+ 			gs_app_set_update_details_text (app, tmp);
+ 	}
+diff --git a/plugins/fwupd/gs-plugin-fwupd.c b/plugins/fwupd/gs-plugin-fwupd.c
+index e931b2b6db..0747d6e250 100644
+--- a/plugins/fwupd/gs-plugin-fwupd.c
++++ b/plugins/fwupd/gs-plugin-fwupd.c
+@@ -726,7 +726,11 @@ gs_plugin_add_updates (GsPlugin *plugin,
+ 				g_autofree gchar *desc = NULL;
+ 				if (fwupd_release_get_description (rel) == NULL)
+ 					continue;
++#if AS_CHECK_VERSION(1, 0, 0)
++				desc = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 				desc = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
++#endif
+ 				if (desc == NULL)
+ 					continue;
+ 				g_string_append_printf (update_desc,
+diff --git a/src/gs-hardware-support-context-dialog.c b/src/gs-hardware-support-context-dialog.c
+index 0e48c8c266..14653401de 100644
+--- a/src/gs-hardware-support-context-dialog.c
++++ b/src/gs-hardware-support-context-dialog.c
+@@ -461,6 +461,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 			AsRelationCompare comparator = as_relation_get_compare (relation);
+ 			Range current_display_comparand, relation_comparand;
+ 
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 			/* From https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-requires-recommends-display_length */
+ 			Range display_lengths[] = {
+ 				[AS_DISPLAY_LENGTH_KIND_XSMALL] = { 0, 360 },
+@@ -469,6 +470,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 				[AS_DISPLAY_LENGTH_KIND_LARGE] = { 1024, 3840 },
+ 				[AS_DISPLAY_LENGTH_KIND_XLARGE] = { 3840, G_MAXUINT },
+ 			};
++#endif
+ 
+ 			any_display_relations_set = TRUE;
+ 
+@@ -485,11 +487,14 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 			case AS_DISPLAY_SIDE_KIND_LAST:
+ 			default:
+ 				current_display_comparand.min = current_display_comparand.max = MAX (current_screen_size.width, current_screen_size.height);
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 				relation_comparand.min = display_lengths[as_relation_get_value_display_length_kind (relation)].min;
+ 				relation_comparand.max = display_lengths[as_relation_get_value_display_length_kind (relation)].max;
++#endif
+ 				break;
+ 			}
+ 
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 			if (evaluate_display_comparison (display_lengths[AS_DISPLAY_LENGTH_KIND_SMALL], comparator, relation_comparand)) {
+ 				*mobile_relation_kind_out = max_relation_kind (*mobile_relation_kind_out, as_relation_get_kind (relation));
+ 				*mobile_match_out = TRUE;
+@@ -499,6 +504,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 				*desktop_relation_kind_out = max_relation_kind (*desktop_relation_kind_out, as_relation_get_kind (relation));
+ 				*desktop_match_out = TRUE;
+ 			}
++#endif
+ 
+ 			if (evaluate_display_comparison (current_display_comparand, comparator, relation_comparand)) {
+ 				*current_relation_kind_out = max_relation_kind (*current_relation_kind_out, as_relation_get_kind (relation));
+diff --git a/src/gs-repos-dialog.c b/src/gs-repos-dialog.c
+index c41c4944a1..7dac0416d9 100644
+--- a/src/gs-repos-dialog.c
++++ b/src/gs-repos-dialog.c
+@@ -154,7 +154,11 @@ enable_repo (GsReposDialog *dialog,
+ 		g_autoptr(GError) error = NULL;
+ 
+ 		/* convert from AppStream markup */
++#if AS_CHECK_VERSION(1, 0, 0)
++		message = as_markup_convert (gs_app_get_agreement (repo), AS_MARKUP_KIND_TEXT, &error);
++#else
+ 		message = as_markup_convert_simple (gs_app_get_agreement (repo), &error);
++#endif
+ 		if (message == NULL) {
+ 			/* failed, so just try and show the original markup */
+ 			message = g_strdup (gs_app_get_agreement (repo));
+diff --git a/src/gs-screenshot-carousel.c b/src/gs-screenshot-carousel.c
+index 04bbf86a1e..d269af6605 100644
+--- a/src/gs-screenshot-carousel.c
++++ b/src/gs-screenshot-carousel.c
+@@ -141,8 +141,8 @@ gs_screenshot_carousel_load_screenshots (GsScreenshotCarousel *self, GsApp *app,
+ 		gtk_widget_set_can_focus (gtk_widget_get_first_child (ssimg), FALSE);
+ 		gs_screenshot_image_set_screenshot (GS_SCREENSHOT_IMAGE (ssimg), ss);
+ 		gs_screenshot_image_set_size (GS_SCREENSHOT_IMAGE (ssimg),
+-					      AS_IMAGE_NORMAL_WIDTH,
+-					      AS_IMAGE_NORMAL_HEIGHT);
++					      GS_IMAGE_NORMAL_WIDTH,
++					      GS_IMAGE_NORMAL_HEIGHT);
+ 		gtk_widget_add_css_class (ssimg, "screenshot-image-main");
+ 		gs_screenshot_image_load_async (GS_SCREENSHOT_IMAGE (ssimg), cancellable);
+ 
+diff --git a/src/gs-screenshot-image.c b/src/gs-screenshot-image.c
+index c313a2589f..b24083b387 100644
+--- a/src/gs-screenshot-image.c
++++ b/src/gs-screenshot-image.c
+@@ -284,13 +284,13 @@ gs_screenshot_image_save_downloaded_img (GsScreenshotImage *ssimg,
+ 	if (images->len > 1)
+ 		return TRUE;
+ 
+-	if (width == AS_IMAGE_THUMBNAIL_WIDTH &&
+-	    height == AS_IMAGE_THUMBNAIL_HEIGHT) {
+-		width = AS_IMAGE_NORMAL_WIDTH;
+-		height = AS_IMAGE_NORMAL_HEIGHT;
++	if (width == GS_IMAGE_THUMBNAIL_WIDTH &&
++	    height == GS_IMAGE_THUMBNAIL_HEIGHT) {
++		width = GS_IMAGE_NORMAL_WIDTH;
++		height = GS_IMAGE_NORMAL_HEIGHT;
+ 	} else {
+-		width = AS_IMAGE_THUMBNAIL_WIDTH;
+-		height = AS_IMAGE_THUMBNAIL_HEIGHT;
++		width = GS_IMAGE_THUMBNAIL_WIDTH;
++		height = GS_IMAGE_THUMBNAIL_HEIGHT;
+ 	}
+ 
+ 	width *= ssimg->scale;
+@@ -582,16 +582,30 @@ gs_screenshot_image_get_url (GsScreenshotImage *ssimg)
+ 	} else if (as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE) {
+ 		AsImage *im;
+ 
++#if AS_CHECK_VERSION(1, 0, 0)
++		im = as_screenshot_get_image (ssimg->screenshot,
++					      ssimg->width,
++					      ssimg->height,
++					      ssimg->scale);
++#else
+ 		im = as_screenshot_get_image (ssimg->screenshot,
+ 					      ssimg->width * ssimg->scale,
+ 					      ssimg->height * ssimg->scale);
++#endif
+ 
+ 		/* if we've failed to load a HiDPI image, fallback to LoDPI */
+ 		if (im == NULL && ssimg->scale > 1) {
+ 			ssimg->scale = 1;
++#if AS_CHECK_VERSION(1, 0, 0)
++			im = as_screenshot_get_image (ssimg->screenshot,
++						      ssimg->width,
++						      ssimg->height,
++						      1);
++#else
+ 			im = as_screenshot_get_image (ssimg->screenshot,
+ 						      ssimg->width,
+ 						      ssimg->height);
++#endif
+ 		}
+ 
+ 		if (im)
+@@ -698,15 +712,22 @@ gs_screenshot_image_load_async (GsScreenshotImage *ssimg,
+ 	 * smaller version of it straight away */
+ 	if (!ssimg->showing_image &&
+ 	    as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE &&
+-	    ssimg->width > AS_IMAGE_THUMBNAIL_WIDTH &&
+-	    ssimg->height > AS_IMAGE_THUMBNAIL_HEIGHT) {
++	    ssimg->width > GS_IMAGE_THUMBNAIL_WIDTH &&
++	    ssimg->height > GS_IMAGE_THUMBNAIL_HEIGHT) {
+ 		const gchar *url_thumb;
+ 		g_autofree gchar *basename_thumb = NULL;
+ 		g_autofree gchar *cache_kind_thumb = NULL;
+ 		AsImage *im;
++#if AS_CHECK_VERSION(1, 0, 0)
+ 		im = as_screenshot_get_image (ssimg->screenshot,
+-					      AS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
+-					      AS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
++					      GS_IMAGE_THUMBNAIL_WIDTH,
++					      GS_IMAGE_THUMBNAIL_HEIGHT,
++					      ssimg->scale);
++#else
++		im = as_screenshot_get_image (ssimg->screenshot,
++					      GS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
++					      GS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
++#endif
+ 		url_thumb = as_image_get_url (im);
+ 		basename_thumb = gs_screenshot_get_cachefn_for_url (url_thumb);
+ 		cache_kind_thumb = g_build_filename ("screenshots", "112x63", NULL);
+diff --git a/src/gs-screenshot-image.h b/src/gs-screenshot-image.h
+index 1f6cf81ce6..6e45f5d20a 100644
+--- a/src/gs-screenshot-image.h
++++ b/src/gs-screenshot-image.h
+@@ -21,6 +21,13 @@ G_BEGIN_DECLS
+ 
+ G_DECLARE_FINAL_TYPE (GsScreenshotImage, gs_screenshot_image, GS, SCREENSHOT_IMAGE, GtkWidget)
+ 
++#define GS_IMAGE_LARGE_HEIGHT		423
++#define GS_IMAGE_LARGE_WIDTH		752
++#define GS_IMAGE_NORMAL_HEIGHT		351
++#define GS_IMAGE_NORMAL_WIDTH		624
++#define GS_IMAGE_THUMBNAIL_HEIGHT	63
++#define GS_IMAGE_THUMBNAIL_WIDTH 	112
++
+ GtkWidget	*gs_screenshot_image_new		(SoupSession		*session);
+ 
+ AsScreenshot	*gs_screenshot_image_get_screenshot	(GsScreenshotImage	*ssimg);
+diff --git a/subprojects/appstream.wrap b/subprojects/appstream.wrap
+index 6f0beb0cbc..5763a32c64 100644
+--- a/subprojects/appstream.wrap
++++ b/subprojects/appstream.wrap
+@@ -1,5 +1,5 @@
+ [wrap-git]
+ directory = appstream
+ url = https://github.com/ximion/appstream.git
+-revision = v0.14.1
++revision = v0.16.3
+ depth = 1
+-- 
+GitLab
diff --git a/srcpkgs/gnome-software/template b/srcpkgs/gnome-software/template
index c5394ce2105091..70a2dfb664394d 100644
--- a/srcpkgs/gnome-software/template
+++ b/srcpkgs/gnome-software/template
@@ -1,6 +1,6 @@
 # Template file for 'gnome-software'
 pkgname=gnome-software
-version=44.2
+version=45.3
 revision=1
 build_style=meson
 configure_args="-Dpackagekit=false -Dfwupd=false
@@ -18,8 +18,8 @@ license="GPL-3.0-or-later"
 homepage="https://gitlab.gnome.org/GNOME/gnome-software"
 changelog="https://gitlab.gnome.org/GNOME/gnome-software/-/raw/main/NEWS"
 distfiles="https://gitlab.gnome.org/GNOME/gnome-software/-/archive/${version}/gnome-software-${version}.tar.gz"
-checksum=bedfe8652d2ceaf17eccc57d6befe6d95f09d15e486a58f0bb7a9a868d0bacc0
-make_check=no # FIXME
+checksum=be2f64e894e653924411981d952fb694559687010985b53ccd325dee0d6a6b83
+make_check=no # Requires system dbus
 
 build_options="gtk_doc"
 

From 8f75ab7e4d865d4772a4e59ae6b9edd03ae5fde5 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 04:41:38 -0800
Subject: [PATCH 5/6] New package: debugedit-5.0

---
 srcpkgs/debugedit/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/debugedit/template

diff --git a/srcpkgs/debugedit/template b/srcpkgs/debugedit/template
new file mode 100644
index 00000000000000..3056f067fda036
--- /dev/null
+++ b/srcpkgs/debugedit/template
@@ -0,0 +1,17 @@
+# Template file for 'debugedit'
+pkgname=debugedit
+version=5.0
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config"
+makedepends="elfutils-devel"
+short_desc="Tools for debuginfo creation"
+maintainer="oreo639 <oreo6391@gmail.com>"
+license="GPL-2.0-or-later"
+homepage="https://sourceware.org/debugedit/"
+distfiles="https://sourceware.org/pub/debugedit/${version%%.*}.0/debugedit-${version}.tar.xz"
+checksum=e9ecd7d350bebae1f178ce6776ca19a648b6fe8fa22f5b3044b38d7899aa553e
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+	makedepends+=" musl-legacy-compat"
+fi

From 26f3d0747541142e3205fb898dce4235c7c92841 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:12:25 -0800
Subject: [PATCH 6/6] flatpak-builder: update to 1.4.2.

---
 srcpkgs/flatpak-builder/template | 27 ++++++++++-----------------
 1 file changed, 10 insertions(+), 17 deletions(-)

diff --git a/srcpkgs/flatpak-builder/template b/srcpkgs/flatpak-builder/template
index fe3485b0d89568..15ee79c9a082b4 100644
--- a/srcpkgs/flatpak-builder/template
+++ b/srcpkgs/flatpak-builder/template
@@ -1,28 +1,21 @@
 # Template file for 'flatpak-builder'
 pkgname=flatpak-builder
-version=1.2.3
+version=1.4.2
 revision=1
-build_style=gnu-configure
-hostmakedepends="pkg-config xmlto"
-makedepends="flatpak-devel json-glib-devel libcap-devel libsoup-devel
- libyaml-devel libcurl-devel"
-depends="elfutils"
+build_style=meson
+hostmakedepends="pkg-config xmlto debugedit AppStream-compose"
+makedepends="flatpak-devel json-glib-devel libcap-devel
+ libyaml-devel libcurl-devel libxml2-devel"
+depends="elfutils debugedit AppStream-compose"
 short_desc="Tool to build flatpaks from source"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://github.com/flatpak/flatpak-builder"
 changelog="https://github.com/flatpak/flatpak-builder/raw/main/NEWS"
-distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}.tar.xz"
-checksum=e257825a47f7a3e71e30fb0f80f2d9ac6e4801f746f552dfaf0e564e3ee351c8
-# Tests expects a Debian derivate hosts to build a flatpak container from.
-make_check=no
-
-if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" flatpak-devel"
-fi
-if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
-	makedepends+=" musl-legacy-compat"
-fi
+#distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}.tar.xz"
+distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}-fixed-libglnx.tar.xz"
+checksum=c041b974e03a2c2d3cda88a0efe1ecf69f9adf42a1758eac341d555e779d0596
+make_check=no # Can't run bubblewrap inside the container
 
 post_patch() {
 	if [ "$XBPS_TARGET_LIBC" = "musl" ]; then

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] flatpak-builder: update to 1.4.2.
  2024-03-05 12:13 [PR PATCH] flatpak-builder: update to 1.4.2 oreo639
                   ` (14 preceding siblings ...)
  2024-03-10  0:06 ` oreo639
@ 2024-03-11 22:33 ` oreo639
  2024-03-11 22:34 ` oreo639
  2024-03-11 22:56 ` [PR PATCH] [Merged]: " oreo639
  17 siblings, 0 replies; 19+ messages in thread
From: oreo639 @ 2024-03-11 22:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1258 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages flatpak-builder
https://github.com/void-linux/void-packages/pull/49126

flatpak-builder: update to 1.4.2.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/49126.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-flatpak-builder-49126.patch --]
[-- Type: text/x-diff, Size: 33961 bytes --]

From d7f9a3fd83feada990feb60e9318808b2d0dc457 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:09:50 -0800
Subject: [PATCH 1/6] AppStream: update to 1.0.2.

---
 common/shlibs                   |  4 +-
 srcpkgs/AppStream-compose       |  1 +
 srcpkgs/AppStream-compose-devel |  1 +
 srcpkgs/AppStream-qt-devel      |  1 +
 srcpkgs/AppStream/template      | 78 ++++++++++++++++++++++++++-------
 5 files changed, 68 insertions(+), 17 deletions(-)
 create mode 120000 srcpkgs/AppStream-compose
 create mode 120000 srcpkgs/AppStream-compose-devel
 create mode 120000 srcpkgs/AppStream-qt-devel

diff --git a/common/shlibs b/common/shlibs
index 131fbb19ebc2a7..18ec2822deb252 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3001,7 +3001,9 @@ libliveMedia.so.81 live555-2020.08.11_2
 libgroupsock.so.8 live555-2020.08.11_2
 libUsageEnvironment.so.3 live555-2020.08.11_2
 libBasicUsageEnvironment.so.1 live555-2020.08.11_2
-libappstream.so.4 AppStream-0.12.2_1
+libappstream.so.5 AppStream-1.0.2_1
+libAppStreamQt.so.3 AppStream-qt-1.0.2_1
+libappstream-compose.so.0 AppStream-compose-1.0.2_1
 libappstream-glib.so.8 appstream-glib-0.6.13_1
 libappstream-builder.so.8 appstream-glib-0.6.13_1
 libflatpak.so.0 flatpak-0.9.3_2
diff --git a/srcpkgs/AppStream-compose b/srcpkgs/AppStream-compose
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-compose
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream-compose-devel b/srcpkgs/AppStream-compose-devel
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-compose-devel
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream-qt-devel b/srcpkgs/AppStream-qt-devel
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-qt-devel
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream/template b/srcpkgs/AppStream/template
index 87fbb76d2c9c66..01c5dc2e89ec1e 100644
--- a/srcpkgs/AppStream/template
+++ b/srcpkgs/AppStream/template
@@ -1,48 +1,94 @@
 # Template file for 'AppStream'
 pkgname=AppStream
-version=0.16.4
+version=1.0.2
 revision=1
 build_style=meson
 build_helper="gir qemu"
 configure_args="$(vopt_bool gir gir) $(vopt_bool vala vapi)
- -Dstemming=false -Dapidocs=false -Dqt=true -Dsystemd=false"
+ -Dstemming=false -Dapidocs=false -Dqt=true -Dsystemd=false
+ -Dcompose=true"
 hostmakedepends="docbook-xsl gettext glib-devel gperf libxslt pkg-config
- qt5-host-tools $(vopt_if vala vala) itstool"
-makedepends="libglib-devel libxml2-devel libyaml-devel qt5-devel libxmlb-devel
- libcurl-devel"
+ qt6-base $(vopt_if vala vala) itstool"
+makedepends="libglib-devel libxml2-devel libyaml-devel qt6-base-devel libxmlb-devel
+ libcurl-devel librsvg-devel"
+checkdepends="tar"
 short_desc="Tools and libraries to work with AppStream metadata"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://github.com/ximion/appstream"
 changelog="https://raw.githubusercontent.com/ximion/appstream/master/NEWS"
 distfiles="https://github.com/ximion/appstream/archive/v${version}.tar.gz"
-checksum=95d5cf451d1945182a9bc4d597c13e713451a3dba1a5759f45b6b3279ff3774c
-conf_files="/etc/appstream.conf"
+checksum=77e271f47167ae37a68111b951c3c07e4261579e69047747044f7924c8219d14
 triggers="appstream-cache"
 
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" AppStream-devel"
+fi
+
 build_options="gir vala"
 build_options_default="gir vala"
 
+pre_configure() {
+	# Meson uses paths from pkg-config which is /usr/lib32/qt6 when cross compiling 32-bit
+	# Work around this for now
+	export PATH="/usr/lib/qt6/libexec/:$PATH"
+}
+
 AppStream-devel_package() {
-	depends="${sourcepkg}>=${version}_${revision} AppStream-qt>=${version}_${revision}"
+	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - development files"
 	pkg_install() {
-		vmove usr/include
-		vmove usr/lib/cmake
-		vmove usr/lib/pkgconfig
-		vmove "usr/lib/*.so"
+		vmove usr/include/appstream
+		vmove usr/lib/pkgconfig/appstream.pc
+		vmove /usr/lib/libappstream.so
 		if [ "$build_option_gir" ]; then
-			vmove usr/share/gir-1.0
+			vmove usr/share/gir-1.0/AppStream-1.0.gir
 		fi
 		if [ "$build_option_vala" ]; then
-			vmove usr/share/vala
+			vmove "usr/share/vala/vapi/appstream.*"
+		fi
+	}
+}
+
+AppStream-compose_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - compose libraries and tools"
+	pkg_install() {
+		vmove usr/libexec/appstreamcli-compose
+		vmove "usr/share/man/man1/appstreamcli-compose.*"
+		vmove "usr/lib/libappstream-compose.so.*"
+		vmove usr/lib/girepository-1.0/AppStreamCompose-1.0.typelib
+		vmove usr/share/metainfo/org.freedesktop.appstream.compose.metainfo.xml
+	}
+}
+
+AppStream-compose-devel_package() {
+	depends="AppStream-compose>=${version}_${revision} AppStream-devel>=${version}_${revision}"
+	short_desc+=" - compose development files"
+	pkg_install() {
+		vmove usr/include/appstream-compose
+		vmove usr/lib/pkgconfig/appstream-compose.pc
+		vmove /usr/lib/libappstream-compose.so
+		if [ "$build_option_gir" ]; then
+			vmove usr/share/gir-1.0/AppStreamCompose-1.0.gir
 		fi
 	}
 }
 
 AppStream-qt_package() {
-	short_desc+=" - qt5 interface library"
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - qt6 interface library"
+	pkg_install() {
+		vmove usr/lib/libAppStreamQt.so.*
+	}
+}
+
+AppStream-qt-devel_package() {
+	depends="AppStream-qt>=${version}_${revision}"
+	short_desc+=" - qt6 development files"
 	pkg_install() {
-		vmove "usr/lib/libAppStreamQt.so.*"
+		vmove usr/include/AppStreamQt
+		vmove usr/lib/cmake/AppStreamQt
+		vmove usr/lib/libAppStreamQt.so
 	}
 }

From 075ed1c58338ed8c4983193243b26da0515b914d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:10:35 -0800
Subject: [PATCH 2/6] flatpak: rebuild for AppStream 1.0

---
 srcpkgs/flatpak/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/flatpak/template b/srcpkgs/flatpak/template
index 819686057ac9bc..4d03282413c98c 100644
--- a/srcpkgs/flatpak/template
+++ b/srcpkgs/flatpak/template
@@ -1,7 +1,7 @@
 # Template file for 'flatpak'
 pkgname=flatpak
 version=1.15.6
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="
@@ -48,7 +48,7 @@ flatpak-devel_package() {
 	short_desc+=" - development files"
 	depends="${sourcepkg}>=${version}_${revision} libglib-devel libostree-devel
 	 libcurl-devel libarchive-devel json-glib-devel dconf-devel libseccomp-devel
-	 gpgme-devel"
+	 gpgme-devel polkit-devel"
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/pkgconfig

From e4e39f9510706344cebaae7a6fcdc24be5235b5b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:11:53 -0800
Subject: [PATCH 3/6] libadwaita: rebuild for AppStream 1.0

---
 srcpkgs/libadwaita/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libadwaita/template b/srcpkgs/libadwaita/template
index 63e643d8fdd70d..fca2b2a5d5a25e 100644
--- a/srcpkgs/libadwaita/template
+++ b/srcpkgs/libadwaita/template
@@ -1,7 +1,7 @@
 # Template file for 'libadwaita'
 pkgname=libadwaita
 version=1.4.4
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="-Dexamples=true -Dtests=true $(vopt_bool gtk_doc)

From da34297fd3be71567e67b68fd1a3aba71a442edd Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:11:59 -0800
Subject: [PATCH 4/6] gnome-software: update to 45.3.

---
 .../patches/0001-port-to-appstream1.patch     | 504 ++++++++++++++++++
 srcpkgs/gnome-software/template               |   6 +-
 2 files changed, 507 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch

diff --git a/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch b/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch
new file mode 100644
index 00000000000000..256a8509231e5f
--- /dev/null
+++ b/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch
@@ -0,0 +1,504 @@
+See: https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2393
+
+From e6f7e28bdd50a63586ba6a82b936d54db19a311b Mon Sep 17 00:00:00 2001
+From: Matthias Klumpp <matthias@tenstral.net>
+Date: Sun, 8 Oct 2023 20:22:44 +0200
+Subject: [PATCH] Adjust to build with AppStream 1.0 as well as 0.16.x
+
+---
+ lib/gs-app.c                             |  4 ++
+ lib/gs-appstream.c                       | 58 ++++++++++++++++++++----
+ lib/gs-utils.c                           |  8 ++--
+ meson.build                              | 22 +--------
+ plugins/core/gs-plugin-appstream.c       |  8 ----
+ plugins/fwupd/gs-fwupd-app.c             |  8 ++++
+ plugins/fwupd/gs-plugin-fwupd.c          |  4 ++
+ src/gs-hardware-support-context-dialog.c |  6 +++
+ src/gs-repos-dialog.c                    |  4 ++
+ src/gs-screenshot-carousel.c             |  4 +-
+ src/gs-screenshot-image.c                | 41 +++++++++++++----
+ src/gs-screenshot-image.h                |  7 +++
+ subprojects/appstream.wrap               |  2 +-
+ 13 files changed, 120 insertions(+), 56 deletions(-)
+
+diff --git a/lib/gs-app.c b/lib/gs-app.c
+index 048a061225..e2694057cd 100644
+--- a/lib/gs-app.c
++++ b/lib/gs-app.c
+@@ -609,7 +609,11 @@ gs_app_to_string_append (GsApp *app, GString *str)
+ 		AsScreenshot *ss = g_ptr_array_index (priv->screenshots, i);
+ 		g_autofree gchar *key = NULL;
+ 		tmp = as_screenshot_get_caption (ss);
++#if AS_CHECK_VERSION(1, 0, 0)
++		im = as_screenshot_get_image (ss, 0, 0, 1);
++#else
+ 		im = as_screenshot_get_image (ss, 0, 0);
++#endif
+ 		if (im == NULL)
+ 			continue;
+ 		key = g_strdup_printf ("screenshot-%02u", i);
+diff --git a/lib/gs-appstream.c b/lib/gs-appstream.c
+index deca176dcf..2cc2427a19 100644
+--- a/lib/gs-appstream.c
++++ b/lib/gs-appstream.c
+@@ -587,8 +587,6 @@ gs_appstream_refine_add_provides (GsApp *app, XbNode *component, GError **error)
+ 					kind = AS_PROVIDED_KIND_FIRMWARE_RUNTIME;
+ 				else if (g_strcmp0 (fw_type, "flashed") == 0)
+ 					kind = AS_PROVIDED_KIND_FIRMWARE_FLASHED;
+-			} else if (g_strcmp0 (element_name, "python2") == 0) {
+-				kind = AS_PROVIDED_KIND_PYTHON_2;
+ 			} else if (g_strcmp0 (element_name, "python3") == 0) {
+ 				kind = AS_PROVIDED_KIND_PYTHON;
+ 			} else if (g_strcmp0 (element_name, "dbus") == 0) {
+@@ -1011,8 +1011,11 @@ gs_appstream_refine_app_relation (GsApp           *app,
+ 			as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_CONTROL);
+ 			as_relation_set_value_control_kind (relation, as_control_kind_from_string (xb_node_get_text (child)));
+ 		} else if (g_str_equal (item_kind, "display_length")) {
+-			AsDisplayLengthKind display_length_kind;
+ 			const gchar *compare;
++			const gchar *side;
++#if !AS_CHECK_VERSION(1, 0, 0)
++			AsDisplayLengthKind display_length_kind;
++#endif
+ 
+ 			/* https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-relations-display_length */
+ 			as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_DISPLAY_LENGTH);
+@@ -1020,15 +1023,21 @@ gs_appstream_refine_app_relation (GsApp           *app,
+ 			compare = xb_node_get_attr (child, "compare");
+ 			as_relation_set_compare (relation, (compare != NULL) ? as_relation_compare_from_string (compare) : AS_RELATION_COMPARE_GE);
+ 
++#if AS_CHECK_VERSION(1, 0, 0)
++			side = xb_node_get_attr (child, "side");
++			as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
++			as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
++#else
+ 			display_length_kind = as_display_length_kind_from_string (xb_node_get_text (child));
+ 			if (display_length_kind != AS_DISPLAY_LENGTH_KIND_UNKNOWN) {
+ 				/* Ignore the `side` attribute */
+ 				as_relation_set_value_display_length_kind (relation, display_length_kind);
+ 			} else {
+-				const gchar *side = xb_node_get_attr (child, "side");
++				side = xb_node_get_attr (child, "side");
+ 				as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
+ 				as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
+ 			}
++#endif
+ 		} else {
+ 			g_debug ("Relation type ‘%s’ not currently supported for %s; ignoring",
+ 				 item_kind, gs_app_get_id (app));
+@@ -1472,7 +1481,7 @@ gs_appstream_refine_app (GsPlugin *plugin,
+ }
+ 
+ typedef struct {
+-	AsSearchTokenMatch	 match_value;
++	guint16			 match_value;
+ 	XbQuery			*query;
+ } GsAppstreamSearchHelper;
+ 
+@@ -1522,7 +1531,7 @@ gs_appstream_silo_search_component (GPtrArray *array, XbNode *component, const g
+ }
+ 
+ typedef struct {
+-	AsSearchTokenMatch	match_value;
++	guint16			match_value;
+ 	const gchar		*xpath;
+ } Query;
+ 
+@@ -1585,7 +1594,11 @@ gs_appstream_do_search (GsPlugin *plugin,
+ 			 * Drop the ID token from it as it’s the highest
+ 			 * numeric value but isn’t visible to the user in the
+ 			 * UI, which leads to confusing results ordering. */
++#if AS_CHECK_VERSION(1, 0, 0)
++			gs_app_set_match_value (app, match_value & (~as_utils_get_tag_search_weight ("id")));
++#else
+ 			gs_app_set_match_value (app, match_value & (~AS_SEARCH_TOKEN_MATCH_ID));
++#endif
+ 			gs_app_list_add (list, app);
+ 
+ 			if (gs_app_get_kind (app) == AS_COMPONENT_KIND_ADDON) {
+@@ -1624,18 +1637,32 @@ gs_appstream_search (GsPlugin *plugin,
+ 		     GCancellable *cancellable,
+ 		     GError **error)
+ {
++#if AS_CHECK_VERSION(1, 0, 0)
++	guint16 pkgname_weight = as_utils_get_tag_search_weight ("pkgname");
++	guint16 name_weight = as_utils_get_tag_search_weight ("name");
++	guint16 id_weight = as_utils_get_tag_search_weight ("id");
+ 	const Query queries[] = {
+-		#ifdef HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE
+-		{ AS_SEARCH_TOKEN_MATCH_MEDIATYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+-		#else
+-		{ AS_SEARCH_TOKEN_MATCH_MIMETYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+-		#endif
++		{ as_utils_get_tag_search_weight ("mediatype"),	"provides/mediatype[text()~=stem(?)]" },
+ 		/* Search once with a tokenize-and-casefold operator (`~=`) to support casefolded
+ 		 * full-text search, then again using substring matching (`contains()`), to
+ 		 * support prefix matching. Only do the prefix matches on a few fields, and at a
+ 		 * lower priority, otherwise things will get confusing.
+-		 * 
++		 *
+ 		 * See https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2277 */
++		{ pkgname_weight,				"pkgname[text()~=stem(?)]" },
++		{ pkgname_weight / 2,				"pkgname[contains(text(),stem(?))]" },
++		{ as_utils_get_tag_search_weight ("summary"),	"summary[text()~=stem(?)]" },
++		{ name_weight,					"name[text()~=stem(?)]" },
++		{ name_weight / 2,				"name[contains(text(),stem(?))]" },
++		{ as_utils_get_tag_search_weight ("keyword"),	"keywords/keyword[text()~=stem(?)]" },
++		{ id_weight,					"id[text()~=stem(?)]" },
++		{ id_weight,					"launchable[text()~=stem(?)]" },
++		{ as_utils_get_tag_search_weight ("origin"),	"../components[@origin~=stem(?)]" },
++		{ 0,						NULL }
++	};
++#else
++	const Query queries[] = {
++		{ AS_SEARCH_TOKEN_MATCH_MEDIATYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME,	"pkgname[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME / 2,	"pkgname[contains(text(),stem(?))]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_SUMMARY,	"summary[text()~=stem(?)]" },
+@@ -1647,6 +1674,7 @@ gs_appstream_search (GsPlugin *plugin,
+ 		{ AS_SEARCH_TOKEN_MATCH_ORIGIN,		"../components[@origin~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_NONE,		NULL }
+ 	};
++#endif
+ 
+ 	return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
+ }
+@@ -1659,11 +1687,21 @@ gs_appstream_search_developer_apps (GsPlugin *plugin,
+ 				    GCancellable *cancellable,
+ 				    GError **error)
+ {
++#if AS_CHECK_VERSION(1, 0, 0)
++	const Query queries[] = {
++		{ as_utils_get_tag_search_weight ("pkgname"), "developer/name[text()~=stem(?)]" },
++		{ as_utils_get_tag_search_weight ("summary"), "project_group[text()~=stem(?)]" },
++		/* for legacy support */
++		{ as_utils_get_tag_search_weight ("pkgname"), "developer_name[text()~=stem(?)]" },
++		{ 0,					      NULL }
++	};
++#else
+ 	const Query queries[] = {
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME,	"developer_name[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_SUMMARY,	"project_group[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_NONE,		NULL }
+ 	};
++#endif
+ 
+ 	return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
+ }
+diff --git a/lib/gs-utils.c b/lib/gs-utils.c
+index cf9073025f..19e6ebd046 100644
+--- a/lib/gs-utils.c
++++ b/lib/gs-utils.c
+@@ -1694,9 +1694,9 @@ gs_utils_gstring_replace (GString *str,
+ 			  const gchar *find,
+ 			  const gchar *replace)
+ {
+-	#ifdef HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS
++#if AS_CHECK_VERSION(1, 0, 0)
+ 	as_gstring_replace (str, find, replace, 0);
+-	#else
+-	as_gstring_replace (str, find, replace);
+-	#endif
++#else
++	as_gstring_replace2 (str, find, replace, 0);
++#endif
+ }
+diff --git a/meson.build b/meson.build
+index 09c39df180..ad105869e5 100644
+--- a/meson.build
++++ b/meson.build
+@@ -113,7 +113,7 @@ add_project_arguments('-D_GNU_SOURCE', language : 'c')
+ conf.set('HAVE_LINUX_UNISTD_H', cc.has_header('linux/unistd.h'))
+ 
+ appstream = dependency('appstream',
+-  version : '>= 0.14.0',
++  version : '>= 0.16.2',
+   fallback : ['appstream', 'appstream_dep'],
+   default_options : [
+     'docs=false',
+@@ -121,26 +121,6 @@ appstream = dependency('appstream',
+     'install-docs=false'
+   ]
+ )
+-if appstream.type_name() == 'internal'
+-else
+-  if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_SEARCH_TOKEN_MATCH_MEDIATYPE', dependencies: appstream)
+-    conf.set('HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE', '1')
+-  endif
+-  if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_FORMAT_STYLE_CATALOG', dependencies: appstream)
+-    conf.set('HAVE_AS_FORMAT_STYLE_CATALOG', '1')
+-  endif
+-  if meson.get_compiler('c').has_function('as_metadata_components_to_catalog', prefix: '#include <appstream.h>', dependencies: appstream)
+-    conf.set('HAVE_AS_METADATA_COMPONENTS_TO_CATALOG', '1')
+-  endif
+-  if meson.get_compiler('c').links('''#include <appstream.h>
+-      int main (void)
+-      {
+-         as_gstring_replace (NULL, "a", "b", 0);
+-         return 0;
+-      }''', name: 'as_gstring_replace() has four arguments', dependencies: appstream)
+-    conf.set('HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS', '1')
+-  endif
+-endif
+ 
+ gdk_pixbuf = dependency('gdk-pixbuf-2.0', version : '>= 2.32.0')
+ libxmlb = dependency('xmlb', version : '>= 0.1.7', fallback : ['libxmlb', 'libxmlb_dep'])
+diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c
+index cf9f3022b1..ef3226a591 100644
+--- a/plugins/core/gs-plugin-appstream.c
++++ b/plugins/core/gs-plugin-appstream.c
+@@ -414,11 +414,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
+ 	if (bytes == NULL)
+ 		return NULL;
+ 
+-	#ifdef HAVE_AS_FORMAT_STYLE_CATALOG
+ 	as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_CATALOG);
+-	#else
+-	as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_COLLECTION);
+-	#endif
+ 	as_metadata_parse_bytes (mdata,
+ 				 bytes,
+ 				 AS_FORMAT_KIND_YAML,
+@@ -428,11 +424,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
+ 		return NULL;
+ 	}
+ 
+-	#ifdef HAVE_AS_METADATA_COMPONENTS_TO_CATALOG
+ 	xml = as_metadata_components_to_catalog (mdata, AS_FORMAT_KIND_XML, &tmp_error);
+-	#else
+-	xml = as_metadata_components_to_collection (mdata, AS_FORMAT_KIND_XML, &tmp_error);
+-	#endif
+ 	if (xml == NULL) {
+ 		// This API currently returns NULL if there is nothing to serialize, so we
+ 		// have to test if this is an error or not.
+diff --git a/plugins/fwupd/gs-fwupd-app.c b/plugins/fwupd/gs-fwupd-app.c
+index 6dcda6ee92..5d3254da59 100644
+--- a/plugins/fwupd/gs-fwupd-app.c
++++ b/plugins/fwupd/gs-fwupd-app.c
+@@ -164,7 +164,11 @@ gs_fwupd_app_set_from_device (GsApp *app,
+ 		gs_app_set_install_date (app, fwupd_device_get_created (dev));
+ 	if (fwupd_device_get_description (dev) != NULL) {
+ 		g_autofree gchar *tmp = NULL;
++#if AS_CHECK_VERSION(1, 0, 0)
++		tmp = as_markup_convert (fwupd_device_get_description (dev), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 		tmp = as_markup_convert_simple (fwupd_device_get_description (dev), NULL);
++#endif
+ 		if (tmp != NULL)
+ 			gs_app_set_description (app, GS_APP_QUALITY_NORMAL, tmp);
+ 	}
+@@ -402,7 +406,11 @@ gs_fwupd_app_set_from_release (GsApp *app, FwupdRelease *rel)
+ 	}
+ 	if (fwupd_release_get_description (rel) != NULL) {
+ 		g_autofree gchar *tmp = NULL;
++#if AS_CHECK_VERSION(1, 0, 0)
++		tmp = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 		tmp = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
++#endif
+ 		if (tmp != NULL)
+ 			gs_app_set_update_details_text (app, tmp);
+ 	}
+diff --git a/plugins/fwupd/gs-plugin-fwupd.c b/plugins/fwupd/gs-plugin-fwupd.c
+index e931b2b6db..0747d6e250 100644
+--- a/plugins/fwupd/gs-plugin-fwupd.c
++++ b/plugins/fwupd/gs-plugin-fwupd.c
+@@ -726,7 +726,11 @@ gs_plugin_add_updates (GsPlugin *plugin,
+ 				g_autofree gchar *desc = NULL;
+ 				if (fwupd_release_get_description (rel) == NULL)
+ 					continue;
++#if AS_CHECK_VERSION(1, 0, 0)
++				desc = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 				desc = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
++#endif
+ 				if (desc == NULL)
+ 					continue;
+ 				g_string_append_printf (update_desc,
+diff --git a/src/gs-hardware-support-context-dialog.c b/src/gs-hardware-support-context-dialog.c
+index 0e48c8c266..14653401de 100644
+--- a/src/gs-hardware-support-context-dialog.c
++++ b/src/gs-hardware-support-context-dialog.c
+@@ -461,6 +461,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 			AsRelationCompare comparator = as_relation_get_compare (relation);
+ 			Range current_display_comparand, relation_comparand;
+ 
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 			/* From https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-requires-recommends-display_length */
+ 			Range display_lengths[] = {
+ 				[AS_DISPLAY_LENGTH_KIND_XSMALL] = { 0, 360 },
+@@ -469,6 +470,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 				[AS_DISPLAY_LENGTH_KIND_LARGE] = { 1024, 3840 },
+ 				[AS_DISPLAY_LENGTH_KIND_XLARGE] = { 3840, G_MAXUINT },
+ 			};
++#endif
+ 
+ 			any_display_relations_set = TRUE;
+ 
+@@ -485,11 +487,14 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 			case AS_DISPLAY_SIDE_KIND_LAST:
+ 			default:
+ 				current_display_comparand.min = current_display_comparand.max = MAX (current_screen_size.width, current_screen_size.height);
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 				relation_comparand.min = display_lengths[as_relation_get_value_display_length_kind (relation)].min;
+ 				relation_comparand.max = display_lengths[as_relation_get_value_display_length_kind (relation)].max;
++#endif
+ 				break;
+ 			}
+ 
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 			if (evaluate_display_comparison (display_lengths[AS_DISPLAY_LENGTH_KIND_SMALL], comparator, relation_comparand)) {
+ 				*mobile_relation_kind_out = max_relation_kind (*mobile_relation_kind_out, as_relation_get_kind (relation));
+ 				*mobile_match_out = TRUE;
+@@ -499,6 +504,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 				*desktop_relation_kind_out = max_relation_kind (*desktop_relation_kind_out, as_relation_get_kind (relation));
+ 				*desktop_match_out = TRUE;
+ 			}
++#endif
+ 
+ 			if (evaluate_display_comparison (current_display_comparand, comparator, relation_comparand)) {
+ 				*current_relation_kind_out = max_relation_kind (*current_relation_kind_out, as_relation_get_kind (relation));
+diff --git a/src/gs-repos-dialog.c b/src/gs-repos-dialog.c
+index c41c4944a1..7dac0416d9 100644
+--- a/src/gs-repos-dialog.c
++++ b/src/gs-repos-dialog.c
+@@ -154,7 +154,11 @@ enable_repo (GsReposDialog *dialog,
+ 		g_autoptr(GError) error = NULL;
+ 
+ 		/* convert from AppStream markup */
++#if AS_CHECK_VERSION(1, 0, 0)
++		message = as_markup_convert (gs_app_get_agreement (repo), AS_MARKUP_KIND_TEXT, &error);
++#else
+ 		message = as_markup_convert_simple (gs_app_get_agreement (repo), &error);
++#endif
+ 		if (message == NULL) {
+ 			/* failed, so just try and show the original markup */
+ 			message = g_strdup (gs_app_get_agreement (repo));
+diff --git a/src/gs-screenshot-carousel.c b/src/gs-screenshot-carousel.c
+index 04bbf86a1e..d269af6605 100644
+--- a/src/gs-screenshot-carousel.c
++++ b/src/gs-screenshot-carousel.c
+@@ -141,8 +141,8 @@ gs_screenshot_carousel_load_screenshots (GsScreenshotCarousel *self, GsApp *app,
+ 		gtk_widget_set_can_focus (gtk_widget_get_first_child (ssimg), FALSE);
+ 		gs_screenshot_image_set_screenshot (GS_SCREENSHOT_IMAGE (ssimg), ss);
+ 		gs_screenshot_image_set_size (GS_SCREENSHOT_IMAGE (ssimg),
+-					      AS_IMAGE_NORMAL_WIDTH,
+-					      AS_IMAGE_NORMAL_HEIGHT);
++					      GS_IMAGE_NORMAL_WIDTH,
++					      GS_IMAGE_NORMAL_HEIGHT);
+ 		gtk_widget_add_css_class (ssimg, "screenshot-image-main");
+ 		gs_screenshot_image_load_async (GS_SCREENSHOT_IMAGE (ssimg), cancellable);
+ 
+diff --git a/src/gs-screenshot-image.c b/src/gs-screenshot-image.c
+index c313a2589f..b24083b387 100644
+--- a/src/gs-screenshot-image.c
++++ b/src/gs-screenshot-image.c
+@@ -284,13 +284,13 @@ gs_screenshot_image_save_downloaded_img (GsScreenshotImage *ssimg,
+ 	if (images->len > 1)
+ 		return TRUE;
+ 
+-	if (width == AS_IMAGE_THUMBNAIL_WIDTH &&
+-	    height == AS_IMAGE_THUMBNAIL_HEIGHT) {
+-		width = AS_IMAGE_NORMAL_WIDTH;
+-		height = AS_IMAGE_NORMAL_HEIGHT;
++	if (width == GS_IMAGE_THUMBNAIL_WIDTH &&
++	    height == GS_IMAGE_THUMBNAIL_HEIGHT) {
++		width = GS_IMAGE_NORMAL_WIDTH;
++		height = GS_IMAGE_NORMAL_HEIGHT;
+ 	} else {
+-		width = AS_IMAGE_THUMBNAIL_WIDTH;
+-		height = AS_IMAGE_THUMBNAIL_HEIGHT;
++		width = GS_IMAGE_THUMBNAIL_WIDTH;
++		height = GS_IMAGE_THUMBNAIL_HEIGHT;
+ 	}
+ 
+ 	width *= ssimg->scale;
+@@ -582,16 +582,30 @@ gs_screenshot_image_get_url (GsScreenshotImage *ssimg)
+ 	} else if (as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE) {
+ 		AsImage *im;
+ 
++#if AS_CHECK_VERSION(1, 0, 0)
++		im = as_screenshot_get_image (ssimg->screenshot,
++					      ssimg->width,
++					      ssimg->height,
++					      ssimg->scale);
++#else
+ 		im = as_screenshot_get_image (ssimg->screenshot,
+ 					      ssimg->width * ssimg->scale,
+ 					      ssimg->height * ssimg->scale);
++#endif
+ 
+ 		/* if we've failed to load a HiDPI image, fallback to LoDPI */
+ 		if (im == NULL && ssimg->scale > 1) {
+ 			ssimg->scale = 1;
++#if AS_CHECK_VERSION(1, 0, 0)
++			im = as_screenshot_get_image (ssimg->screenshot,
++						      ssimg->width,
++						      ssimg->height,
++						      1);
++#else
+ 			im = as_screenshot_get_image (ssimg->screenshot,
+ 						      ssimg->width,
+ 						      ssimg->height);
++#endif
+ 		}
+ 
+ 		if (im)
+@@ -698,15 +712,22 @@ gs_screenshot_image_load_async (GsScreenshotImage *ssimg,
+ 	 * smaller version of it straight away */
+ 	if (!ssimg->showing_image &&
+ 	    as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE &&
+-	    ssimg->width > AS_IMAGE_THUMBNAIL_WIDTH &&
+-	    ssimg->height > AS_IMAGE_THUMBNAIL_HEIGHT) {
++	    ssimg->width > GS_IMAGE_THUMBNAIL_WIDTH &&
++	    ssimg->height > GS_IMAGE_THUMBNAIL_HEIGHT) {
+ 		const gchar *url_thumb;
+ 		g_autofree gchar *basename_thumb = NULL;
+ 		g_autofree gchar *cache_kind_thumb = NULL;
+ 		AsImage *im;
++#if AS_CHECK_VERSION(1, 0, 0)
+ 		im = as_screenshot_get_image (ssimg->screenshot,
+-					      AS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
+-					      AS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
++					      GS_IMAGE_THUMBNAIL_WIDTH,
++					      GS_IMAGE_THUMBNAIL_HEIGHT,
++					      ssimg->scale);
++#else
++		im = as_screenshot_get_image (ssimg->screenshot,
++					      GS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
++					      GS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
++#endif
+ 		url_thumb = as_image_get_url (im);
+ 		basename_thumb = gs_screenshot_get_cachefn_for_url (url_thumb);
+ 		cache_kind_thumb = g_build_filename ("screenshots", "112x63", NULL);
+diff --git a/src/gs-screenshot-image.h b/src/gs-screenshot-image.h
+index 1f6cf81ce6..6e45f5d20a 100644
+--- a/src/gs-screenshot-image.h
++++ b/src/gs-screenshot-image.h
+@@ -21,6 +21,13 @@ G_BEGIN_DECLS
+ 
+ G_DECLARE_FINAL_TYPE (GsScreenshotImage, gs_screenshot_image, GS, SCREENSHOT_IMAGE, GtkWidget)
+ 
++#define GS_IMAGE_LARGE_HEIGHT		423
++#define GS_IMAGE_LARGE_WIDTH		752
++#define GS_IMAGE_NORMAL_HEIGHT		351
++#define GS_IMAGE_NORMAL_WIDTH		624
++#define GS_IMAGE_THUMBNAIL_HEIGHT	63
++#define GS_IMAGE_THUMBNAIL_WIDTH 	112
++
+ GtkWidget	*gs_screenshot_image_new		(SoupSession		*session);
+ 
+ AsScreenshot	*gs_screenshot_image_get_screenshot	(GsScreenshotImage	*ssimg);
+diff --git a/subprojects/appstream.wrap b/subprojects/appstream.wrap
+index 6f0beb0cbc..5763a32c64 100644
+--- a/subprojects/appstream.wrap
++++ b/subprojects/appstream.wrap
+@@ -1,5 +1,5 @@
+ [wrap-git]
+ directory = appstream
+ url = https://github.com/ximion/appstream.git
+-revision = v0.14.1
++revision = v0.16.3
+ depth = 1
+-- 
+GitLab
diff --git a/srcpkgs/gnome-software/template b/srcpkgs/gnome-software/template
index c5394ce2105091..70a2dfb664394d 100644
--- a/srcpkgs/gnome-software/template
+++ b/srcpkgs/gnome-software/template
@@ -1,6 +1,6 @@
 # Template file for 'gnome-software'
 pkgname=gnome-software
-version=44.2
+version=45.3
 revision=1
 build_style=meson
 configure_args="-Dpackagekit=false -Dfwupd=false
@@ -18,8 +18,8 @@ license="GPL-3.0-or-later"
 homepage="https://gitlab.gnome.org/GNOME/gnome-software"
 changelog="https://gitlab.gnome.org/GNOME/gnome-software/-/raw/main/NEWS"
 distfiles="https://gitlab.gnome.org/GNOME/gnome-software/-/archive/${version}/gnome-software-${version}.tar.gz"
-checksum=bedfe8652d2ceaf17eccc57d6befe6d95f09d15e486a58f0bb7a9a868d0bacc0
-make_check=no # FIXME
+checksum=be2f64e894e653924411981d952fb694559687010985b53ccd325dee0d6a6b83
+make_check=no # Requires system dbus
 
 build_options="gtk_doc"
 

From 647438e32ecece855dc75a1a218b564250b7b306 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 04:41:38 -0800
Subject: [PATCH 5/6] New package: debugedit-5.0

---
 srcpkgs/debugedit/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/debugedit/template

diff --git a/srcpkgs/debugedit/template b/srcpkgs/debugedit/template
new file mode 100644
index 00000000000000..3056f067fda036
--- /dev/null
+++ b/srcpkgs/debugedit/template
@@ -0,0 +1,17 @@
+# Template file for 'debugedit'
+pkgname=debugedit
+version=5.0
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config"
+makedepends="elfutils-devel"
+short_desc="Tools for debuginfo creation"
+maintainer="oreo639 <oreo6391@gmail.com>"
+license="GPL-2.0-or-later"
+homepage="https://sourceware.org/debugedit/"
+distfiles="https://sourceware.org/pub/debugedit/${version%%.*}.0/debugedit-${version}.tar.xz"
+checksum=e9ecd7d350bebae1f178ce6776ca19a648b6fe8fa22f5b3044b38d7899aa553e
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+	makedepends+=" musl-legacy-compat"
+fi

From e706079babf812a1326e492332299143c81c983a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:12:25 -0800
Subject: [PATCH 6/6] flatpak-builder: update to 1.4.2.

---
 srcpkgs/flatpak-builder/template | 27 ++++++++++-----------------
 1 file changed, 10 insertions(+), 17 deletions(-)

diff --git a/srcpkgs/flatpak-builder/template b/srcpkgs/flatpak-builder/template
index fe3485b0d89568..15ee79c9a082b4 100644
--- a/srcpkgs/flatpak-builder/template
+++ b/srcpkgs/flatpak-builder/template
@@ -1,28 +1,21 @@
 # Template file for 'flatpak-builder'
 pkgname=flatpak-builder
-version=1.2.3
+version=1.4.2
 revision=1
-build_style=gnu-configure
-hostmakedepends="pkg-config xmlto"
-makedepends="flatpak-devel json-glib-devel libcap-devel libsoup-devel
- libyaml-devel libcurl-devel"
-depends="elfutils"
+build_style=meson
+hostmakedepends="pkg-config xmlto debugedit AppStream-compose"
+makedepends="flatpak-devel json-glib-devel libcap-devel
+ libyaml-devel libcurl-devel libxml2-devel"
+depends="elfutils debugedit AppStream-compose"
 short_desc="Tool to build flatpaks from source"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://github.com/flatpak/flatpak-builder"
 changelog="https://github.com/flatpak/flatpak-builder/raw/main/NEWS"
-distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}.tar.xz"
-checksum=e257825a47f7a3e71e30fb0f80f2d9ac6e4801f746f552dfaf0e564e3ee351c8
-# Tests expects a Debian derivate hosts to build a flatpak container from.
-make_check=no
-
-if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" flatpak-devel"
-fi
-if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
-	makedepends+=" musl-legacy-compat"
-fi
+#distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}.tar.xz"
+distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}-fixed-libglnx.tar.xz"
+checksum=c041b974e03a2c2d3cda88a0efe1ecf69f9adf42a1758eac341d555e779d0596
+make_check=no # Can't run bubblewrap inside the container
 
 post_patch() {
 	if [ "$XBPS_TARGET_LIBC" = "musl" ]; then

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] flatpak-builder: update to 1.4.2.
  2024-03-05 12:13 [PR PATCH] flatpak-builder: update to 1.4.2 oreo639
                   ` (15 preceding siblings ...)
  2024-03-11 22:33 ` oreo639
@ 2024-03-11 22:34 ` oreo639
  2024-03-11 22:56 ` [PR PATCH] [Merged]: " oreo639
  17 siblings, 0 replies; 19+ messages in thread
From: oreo639 @ 2024-03-11 22:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1258 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages flatpak-builder
https://github.com/void-linux/void-packages/pull/49126

flatpak-builder: update to 1.4.2.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/49126.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-flatpak-builder-49126.patch --]
[-- Type: text/x-diff, Size: 33924 bytes --]

From 3a638f1ca7a7735c471f657503ae73344350f747 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:09:50 -0800
Subject: [PATCH 1/6] AppStream: update to 1.0.2.

---
 common/shlibs                   |  4 +-
 srcpkgs/AppStream-compose       |  1 +
 srcpkgs/AppStream-compose-devel |  1 +
 srcpkgs/AppStream-qt-devel      |  1 +
 srcpkgs/AppStream/template      | 76 ++++++++++++++++++++++++++-------
 5 files changed, 67 insertions(+), 16 deletions(-)
 create mode 120000 srcpkgs/AppStream-compose
 create mode 120000 srcpkgs/AppStream-compose-devel
 create mode 120000 srcpkgs/AppStream-qt-devel

diff --git a/common/shlibs b/common/shlibs
index 131fbb19ebc2a7..18ec2822deb252 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3001,7 +3001,9 @@ libliveMedia.so.81 live555-2020.08.11_2
 libgroupsock.so.8 live555-2020.08.11_2
 libUsageEnvironment.so.3 live555-2020.08.11_2
 libBasicUsageEnvironment.so.1 live555-2020.08.11_2
-libappstream.so.4 AppStream-0.12.2_1
+libappstream.so.5 AppStream-1.0.2_1
+libAppStreamQt.so.3 AppStream-qt-1.0.2_1
+libappstream-compose.so.0 AppStream-compose-1.0.2_1
 libappstream-glib.so.8 appstream-glib-0.6.13_1
 libappstream-builder.so.8 appstream-glib-0.6.13_1
 libflatpak.so.0 flatpak-0.9.3_2
diff --git a/srcpkgs/AppStream-compose b/srcpkgs/AppStream-compose
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-compose
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream-compose-devel b/srcpkgs/AppStream-compose-devel
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-compose-devel
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream-qt-devel b/srcpkgs/AppStream-qt-devel
new file mode 120000
index 00000000000000..816336d5d773ff
--- /dev/null
+++ b/srcpkgs/AppStream-qt-devel
@@ -0,0 +1 @@
+AppStream
\ No newline at end of file
diff --git a/srcpkgs/AppStream/template b/srcpkgs/AppStream/template
index 87fbb76d2c9c66..004c59df1c6421 100644
--- a/srcpkgs/AppStream/template
+++ b/srcpkgs/AppStream/template
@@ -1,48 +1,94 @@
 # Template file for 'AppStream'
 pkgname=AppStream
-version=0.16.4
+version=1.0.2
 revision=1
 build_style=meson
 build_helper="gir qemu"
 configure_args="$(vopt_bool gir gir) $(vopt_bool vala vapi)
- -Dstemming=false -Dapidocs=false -Dqt=true -Dsystemd=false"
+ -Dstemming=false -Dapidocs=false -Dqt=true -Dsystemd=false
+ -Dcompose=true"
 hostmakedepends="docbook-xsl gettext glib-devel gperf libxslt pkg-config
- qt5-host-tools $(vopt_if vala vala) itstool"
-makedepends="libglib-devel libxml2-devel libyaml-devel qt5-devel libxmlb-devel
- libcurl-devel"
+ qt6-base $(vopt_if vala vala) itstool"
+makedepends="libglib-devel libxml2-devel libyaml-devel qt6-base-devel libxmlb-devel
+ libcurl-devel librsvg-devel"
+checkdepends="tar"
 short_desc="Tools and libraries to work with AppStream metadata"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://github.com/ximion/appstream"
 changelog="https://raw.githubusercontent.com/ximion/appstream/master/NEWS"
 distfiles="https://github.com/ximion/appstream/archive/v${version}.tar.gz"
-checksum=95d5cf451d1945182a9bc4d597c13e713451a3dba1a5759f45b6b3279ff3774c
-conf_files="/etc/appstream.conf"
+checksum=77e271f47167ae37a68111b951c3c07e4261579e69047747044f7924c8219d14
 triggers="appstream-cache"
 
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" AppStream-devel"
+fi
+
 build_options="gir vala"
 build_options_default="gir vala"
 
+pre_configure() {
+	# Meson uses paths from pkg-config which is /usr/lib32/qt6 when cross compiling 32-bit
+	# Work around this for now
+	export PATH="/usr/lib/qt6/libexec/:$PATH"
+}
+
 AppStream-devel_package() {
-	depends="${sourcepkg}>=${version}_${revision} AppStream-qt>=${version}_${revision}"
+	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - development files"
 	pkg_install() {
-		vmove usr/include
-		vmove usr/lib/cmake
-		vmove usr/lib/pkgconfig
-		vmove "usr/lib/*.so"
+		vmove usr/include/appstream
+		vmove usr/lib/pkgconfig/appstream.pc
+		vmove /usr/lib/libappstream.so
 		if [ "$build_option_gir" ]; then
-			vmove usr/share/gir-1.0
+			vmove usr/share/gir-1.0/AppStream-1.0.gir
 		fi
 		if [ "$build_option_vala" ]; then
-			vmove usr/share/vala
+			vmove "usr/share/vala/vapi/appstream.*"
+		fi
+	}
+}
+
+AppStream-compose_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - compose libraries and tools"
+	pkg_install() {
+		vmove usr/libexec/appstreamcli-compose
+		vmove "usr/share/man/man1/appstreamcli-compose.*"
+		vmove "usr/lib/libappstream-compose.so.*"
+		vmove usr/lib/girepository-1.0/AppStreamCompose-1.0.typelib
+		vmove usr/share/metainfo/org.freedesktop.appstream.compose.metainfo.xml
+	}
+}
+
+AppStream-compose-devel_package() {
+	depends="AppStream-compose>=${version}_${revision} AppStream-devel>=${version}_${revision}"
+	short_desc+=" - compose development files"
+	pkg_install() {
+		vmove usr/include/appstream-compose
+		vmove usr/lib/pkgconfig/appstream-compose.pc
+		vmove /usr/lib/libappstream-compose.so
+		if [ "$build_option_gir" ]; then
+			vmove usr/share/gir-1.0/AppStreamCompose-1.0.gir
 		fi
 	}
 }
 
 AppStream-qt_package() {
-	short_desc+=" - qt5 interface library"
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - qt6 interface library"
 	pkg_install() {
 		vmove "usr/lib/libAppStreamQt.so.*"
 	}
 }
+
+AppStream-qt-devel_package() {
+	depends="AppStream-qt>=${version}_${revision}"
+	short_desc+=" - qt6 development files"
+	pkg_install() {
+		vmove usr/include/AppStreamQt
+		vmove usr/lib/cmake/AppStreamQt
+		vmove usr/lib/libAppStreamQt.so
+	}
+}

From 459a371d4d5ec1b0bde7b991332fab37a46f77ae Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:10:35 -0800
Subject: [PATCH 2/6] flatpak: rebuild for AppStream 1.0

---
 srcpkgs/flatpak/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/flatpak/template b/srcpkgs/flatpak/template
index 819686057ac9bc..4d03282413c98c 100644
--- a/srcpkgs/flatpak/template
+++ b/srcpkgs/flatpak/template
@@ -1,7 +1,7 @@
 # Template file for 'flatpak'
 pkgname=flatpak
 version=1.15.6
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="
@@ -48,7 +48,7 @@ flatpak-devel_package() {
 	short_desc+=" - development files"
 	depends="${sourcepkg}>=${version}_${revision} libglib-devel libostree-devel
 	 libcurl-devel libarchive-devel json-glib-devel dconf-devel libseccomp-devel
-	 gpgme-devel"
+	 gpgme-devel polkit-devel"
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/pkgconfig

From c54a9dc183be76bf6d43e65d61367c0f2c42dc74 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:11:53 -0800
Subject: [PATCH 3/6] libadwaita: rebuild for AppStream 1.0

---
 srcpkgs/libadwaita/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libadwaita/template b/srcpkgs/libadwaita/template
index 63e643d8fdd70d..fca2b2a5d5a25e 100644
--- a/srcpkgs/libadwaita/template
+++ b/srcpkgs/libadwaita/template
@@ -1,7 +1,7 @@
 # Template file for 'libadwaita'
 pkgname=libadwaita
 version=1.4.4
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="-Dexamples=true -Dtests=true $(vopt_bool gtk_doc)

From fa65a13568f37db07fceaf9a8648a89688cd9bc0 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:11:59 -0800
Subject: [PATCH 4/6] gnome-software: update to 45.3.

---
 .../patches/0001-port-to-appstream1.patch     | 504 ++++++++++++++++++
 srcpkgs/gnome-software/template               |   6 +-
 2 files changed, 507 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch

diff --git a/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch b/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch
new file mode 100644
index 00000000000000..256a8509231e5f
--- /dev/null
+++ b/srcpkgs/gnome-software/patches/0001-port-to-appstream1.patch
@@ -0,0 +1,504 @@
+See: https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2393
+
+From e6f7e28bdd50a63586ba6a82b936d54db19a311b Mon Sep 17 00:00:00 2001
+From: Matthias Klumpp <matthias@tenstral.net>
+Date: Sun, 8 Oct 2023 20:22:44 +0200
+Subject: [PATCH] Adjust to build with AppStream 1.0 as well as 0.16.x
+
+---
+ lib/gs-app.c                             |  4 ++
+ lib/gs-appstream.c                       | 58 ++++++++++++++++++++----
+ lib/gs-utils.c                           |  8 ++--
+ meson.build                              | 22 +--------
+ plugins/core/gs-plugin-appstream.c       |  8 ----
+ plugins/fwupd/gs-fwupd-app.c             |  8 ++++
+ plugins/fwupd/gs-plugin-fwupd.c          |  4 ++
+ src/gs-hardware-support-context-dialog.c |  6 +++
+ src/gs-repos-dialog.c                    |  4 ++
+ src/gs-screenshot-carousel.c             |  4 +-
+ src/gs-screenshot-image.c                | 41 +++++++++++++----
+ src/gs-screenshot-image.h                |  7 +++
+ subprojects/appstream.wrap               |  2 +-
+ 13 files changed, 120 insertions(+), 56 deletions(-)
+
+diff --git a/lib/gs-app.c b/lib/gs-app.c
+index 048a061225..e2694057cd 100644
+--- a/lib/gs-app.c
++++ b/lib/gs-app.c
+@@ -609,7 +609,11 @@ gs_app_to_string_append (GsApp *app, GString *str)
+ 		AsScreenshot *ss = g_ptr_array_index (priv->screenshots, i);
+ 		g_autofree gchar *key = NULL;
+ 		tmp = as_screenshot_get_caption (ss);
++#if AS_CHECK_VERSION(1, 0, 0)
++		im = as_screenshot_get_image (ss, 0, 0, 1);
++#else
+ 		im = as_screenshot_get_image (ss, 0, 0);
++#endif
+ 		if (im == NULL)
+ 			continue;
+ 		key = g_strdup_printf ("screenshot-%02u", i);
+diff --git a/lib/gs-appstream.c b/lib/gs-appstream.c
+index deca176dcf..2cc2427a19 100644
+--- a/lib/gs-appstream.c
++++ b/lib/gs-appstream.c
+@@ -587,8 +587,6 @@ gs_appstream_refine_add_provides (GsApp *app, XbNode *component, GError **error)
+ 					kind = AS_PROVIDED_KIND_FIRMWARE_RUNTIME;
+ 				else if (g_strcmp0 (fw_type, "flashed") == 0)
+ 					kind = AS_PROVIDED_KIND_FIRMWARE_FLASHED;
+-			} else if (g_strcmp0 (element_name, "python2") == 0) {
+-				kind = AS_PROVIDED_KIND_PYTHON_2;
+ 			} else if (g_strcmp0 (element_name, "python3") == 0) {
+ 				kind = AS_PROVIDED_KIND_PYTHON;
+ 			} else if (g_strcmp0 (element_name, "dbus") == 0) {
+@@ -1011,8 +1011,11 @@ gs_appstream_refine_app_relation (GsApp           *app,
+ 			as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_CONTROL);
+ 			as_relation_set_value_control_kind (relation, as_control_kind_from_string (xb_node_get_text (child)));
+ 		} else if (g_str_equal (item_kind, "display_length")) {
+-			AsDisplayLengthKind display_length_kind;
+ 			const gchar *compare;
++			const gchar *side;
++#if !AS_CHECK_VERSION(1, 0, 0)
++			AsDisplayLengthKind display_length_kind;
++#endif
+ 
+ 			/* https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-relations-display_length */
+ 			as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_DISPLAY_LENGTH);
+@@ -1020,15 +1023,21 @@ gs_appstream_refine_app_relation (GsApp           *app,
+ 			compare = xb_node_get_attr (child, "compare");
+ 			as_relation_set_compare (relation, (compare != NULL) ? as_relation_compare_from_string (compare) : AS_RELATION_COMPARE_GE);
+ 
++#if AS_CHECK_VERSION(1, 0, 0)
++			side = xb_node_get_attr (child, "side");
++			as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
++			as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
++#else
+ 			display_length_kind = as_display_length_kind_from_string (xb_node_get_text (child));
+ 			if (display_length_kind != AS_DISPLAY_LENGTH_KIND_UNKNOWN) {
+ 				/* Ignore the `side` attribute */
+ 				as_relation_set_value_display_length_kind (relation, display_length_kind);
+ 			} else {
+-				const gchar *side = xb_node_get_attr (child, "side");
++				side = xb_node_get_attr (child, "side");
+ 				as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
+ 				as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
+ 			}
++#endif
+ 		} else {
+ 			g_debug ("Relation type ‘%s’ not currently supported for %s; ignoring",
+ 				 item_kind, gs_app_get_id (app));
+@@ -1472,7 +1481,7 @@ gs_appstream_refine_app (GsPlugin *plugin,
+ }
+ 
+ typedef struct {
+-	AsSearchTokenMatch	 match_value;
++	guint16			 match_value;
+ 	XbQuery			*query;
+ } GsAppstreamSearchHelper;
+ 
+@@ -1522,7 +1531,7 @@ gs_appstream_silo_search_component (GPtrArray *array, XbNode *component, const g
+ }
+ 
+ typedef struct {
+-	AsSearchTokenMatch	match_value;
++	guint16			match_value;
+ 	const gchar		*xpath;
+ } Query;
+ 
+@@ -1585,7 +1594,11 @@ gs_appstream_do_search (GsPlugin *plugin,
+ 			 * Drop the ID token from it as it’s the highest
+ 			 * numeric value but isn’t visible to the user in the
+ 			 * UI, which leads to confusing results ordering. */
++#if AS_CHECK_VERSION(1, 0, 0)
++			gs_app_set_match_value (app, match_value & (~as_utils_get_tag_search_weight ("id")));
++#else
+ 			gs_app_set_match_value (app, match_value & (~AS_SEARCH_TOKEN_MATCH_ID));
++#endif
+ 			gs_app_list_add (list, app);
+ 
+ 			if (gs_app_get_kind (app) == AS_COMPONENT_KIND_ADDON) {
+@@ -1624,18 +1637,32 @@ gs_appstream_search (GsPlugin *plugin,
+ 		     GCancellable *cancellable,
+ 		     GError **error)
+ {
++#if AS_CHECK_VERSION(1, 0, 0)
++	guint16 pkgname_weight = as_utils_get_tag_search_weight ("pkgname");
++	guint16 name_weight = as_utils_get_tag_search_weight ("name");
++	guint16 id_weight = as_utils_get_tag_search_weight ("id");
+ 	const Query queries[] = {
+-		#ifdef HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE
+-		{ AS_SEARCH_TOKEN_MATCH_MEDIATYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+-		#else
+-		{ AS_SEARCH_TOKEN_MATCH_MIMETYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+-		#endif
++		{ as_utils_get_tag_search_weight ("mediatype"),	"provides/mediatype[text()~=stem(?)]" },
+ 		/* Search once with a tokenize-and-casefold operator (`~=`) to support casefolded
+ 		 * full-text search, then again using substring matching (`contains()`), to
+ 		 * support prefix matching. Only do the prefix matches on a few fields, and at a
+ 		 * lower priority, otherwise things will get confusing.
+-		 * 
++		 *
+ 		 * See https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2277 */
++		{ pkgname_weight,				"pkgname[text()~=stem(?)]" },
++		{ pkgname_weight / 2,				"pkgname[contains(text(),stem(?))]" },
++		{ as_utils_get_tag_search_weight ("summary"),	"summary[text()~=stem(?)]" },
++		{ name_weight,					"name[text()~=stem(?)]" },
++		{ name_weight / 2,				"name[contains(text(),stem(?))]" },
++		{ as_utils_get_tag_search_weight ("keyword"),	"keywords/keyword[text()~=stem(?)]" },
++		{ id_weight,					"id[text()~=stem(?)]" },
++		{ id_weight,					"launchable[text()~=stem(?)]" },
++		{ as_utils_get_tag_search_weight ("origin"),	"../components[@origin~=stem(?)]" },
++		{ 0,						NULL }
++	};
++#else
++	const Query queries[] = {
++		{ AS_SEARCH_TOKEN_MATCH_MEDIATYPE,	"mimetypes/mimetype[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME,	"pkgname[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME / 2,	"pkgname[contains(text(),stem(?))]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_SUMMARY,	"summary[text()~=stem(?)]" },
+@@ -1647,6 +1674,7 @@ gs_appstream_search (GsPlugin *plugin,
+ 		{ AS_SEARCH_TOKEN_MATCH_ORIGIN,		"../components[@origin~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_NONE,		NULL }
+ 	};
++#endif
+ 
+ 	return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
+ }
+@@ -1659,11 +1687,21 @@ gs_appstream_search_developer_apps (GsPlugin *plugin,
+ 				    GCancellable *cancellable,
+ 				    GError **error)
+ {
++#if AS_CHECK_VERSION(1, 0, 0)
++	const Query queries[] = {
++		{ as_utils_get_tag_search_weight ("pkgname"), "developer/name[text()~=stem(?)]" },
++		{ as_utils_get_tag_search_weight ("summary"), "project_group[text()~=stem(?)]" },
++		/* for legacy support */
++		{ as_utils_get_tag_search_weight ("pkgname"), "developer_name[text()~=stem(?)]" },
++		{ 0,					      NULL }
++	};
++#else
+ 	const Query queries[] = {
+ 		{ AS_SEARCH_TOKEN_MATCH_PKGNAME,	"developer_name[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_SUMMARY,	"project_group[text()~=stem(?)]" },
+ 		{ AS_SEARCH_TOKEN_MATCH_NONE,		NULL }
+ 	};
++#endif
+ 
+ 	return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
+ }
+diff --git a/lib/gs-utils.c b/lib/gs-utils.c
+index cf9073025f..19e6ebd046 100644
+--- a/lib/gs-utils.c
++++ b/lib/gs-utils.c
+@@ -1694,9 +1694,9 @@ gs_utils_gstring_replace (GString *str,
+ 			  const gchar *find,
+ 			  const gchar *replace)
+ {
+-	#ifdef HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS
++#if AS_CHECK_VERSION(1, 0, 0)
+ 	as_gstring_replace (str, find, replace, 0);
+-	#else
+-	as_gstring_replace (str, find, replace);
+-	#endif
++#else
++	as_gstring_replace2 (str, find, replace, 0);
++#endif
+ }
+diff --git a/meson.build b/meson.build
+index 09c39df180..ad105869e5 100644
+--- a/meson.build
++++ b/meson.build
+@@ -113,7 +113,7 @@ add_project_arguments('-D_GNU_SOURCE', language : 'c')
+ conf.set('HAVE_LINUX_UNISTD_H', cc.has_header('linux/unistd.h'))
+ 
+ appstream = dependency('appstream',
+-  version : '>= 0.14.0',
++  version : '>= 0.16.2',
+   fallback : ['appstream', 'appstream_dep'],
+   default_options : [
+     'docs=false',
+@@ -121,26 +121,6 @@ appstream = dependency('appstream',
+     'install-docs=false'
+   ]
+ )
+-if appstream.type_name() == 'internal'
+-else
+-  if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_SEARCH_TOKEN_MATCH_MEDIATYPE', dependencies: appstream)
+-    conf.set('HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE', '1')
+-  endif
+-  if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_FORMAT_STYLE_CATALOG', dependencies: appstream)
+-    conf.set('HAVE_AS_FORMAT_STYLE_CATALOG', '1')
+-  endif
+-  if meson.get_compiler('c').has_function('as_metadata_components_to_catalog', prefix: '#include <appstream.h>', dependencies: appstream)
+-    conf.set('HAVE_AS_METADATA_COMPONENTS_TO_CATALOG', '1')
+-  endif
+-  if meson.get_compiler('c').links('''#include <appstream.h>
+-      int main (void)
+-      {
+-         as_gstring_replace (NULL, "a", "b", 0);
+-         return 0;
+-      }''', name: 'as_gstring_replace() has four arguments', dependencies: appstream)
+-    conf.set('HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS', '1')
+-  endif
+-endif
+ 
+ gdk_pixbuf = dependency('gdk-pixbuf-2.0', version : '>= 2.32.0')
+ libxmlb = dependency('xmlb', version : '>= 0.1.7', fallback : ['libxmlb', 'libxmlb_dep'])
+diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c
+index cf9f3022b1..ef3226a591 100644
+--- a/plugins/core/gs-plugin-appstream.c
++++ b/plugins/core/gs-plugin-appstream.c
+@@ -414,11 +414,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
+ 	if (bytes == NULL)
+ 		return NULL;
+ 
+-	#ifdef HAVE_AS_FORMAT_STYLE_CATALOG
+ 	as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_CATALOG);
+-	#else
+-	as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_COLLECTION);
+-	#endif
+ 	as_metadata_parse_bytes (mdata,
+ 				 bytes,
+ 				 AS_FORMAT_KIND_YAML,
+@@ -428,11 +424,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
+ 		return NULL;
+ 	}
+ 
+-	#ifdef HAVE_AS_METADATA_COMPONENTS_TO_CATALOG
+ 	xml = as_metadata_components_to_catalog (mdata, AS_FORMAT_KIND_XML, &tmp_error);
+-	#else
+-	xml = as_metadata_components_to_collection (mdata, AS_FORMAT_KIND_XML, &tmp_error);
+-	#endif
+ 	if (xml == NULL) {
+ 		// This API currently returns NULL if there is nothing to serialize, so we
+ 		// have to test if this is an error or not.
+diff --git a/plugins/fwupd/gs-fwupd-app.c b/plugins/fwupd/gs-fwupd-app.c
+index 6dcda6ee92..5d3254da59 100644
+--- a/plugins/fwupd/gs-fwupd-app.c
++++ b/plugins/fwupd/gs-fwupd-app.c
+@@ -164,7 +164,11 @@ gs_fwupd_app_set_from_device (GsApp *app,
+ 		gs_app_set_install_date (app, fwupd_device_get_created (dev));
+ 	if (fwupd_device_get_description (dev) != NULL) {
+ 		g_autofree gchar *tmp = NULL;
++#if AS_CHECK_VERSION(1, 0, 0)
++		tmp = as_markup_convert (fwupd_device_get_description (dev), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 		tmp = as_markup_convert_simple (fwupd_device_get_description (dev), NULL);
++#endif
+ 		if (tmp != NULL)
+ 			gs_app_set_description (app, GS_APP_QUALITY_NORMAL, tmp);
+ 	}
+@@ -402,7 +406,11 @@ gs_fwupd_app_set_from_release (GsApp *app, FwupdRelease *rel)
+ 	}
+ 	if (fwupd_release_get_description (rel) != NULL) {
+ 		g_autofree gchar *tmp = NULL;
++#if AS_CHECK_VERSION(1, 0, 0)
++		tmp = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 		tmp = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
++#endif
+ 		if (tmp != NULL)
+ 			gs_app_set_update_details_text (app, tmp);
+ 	}
+diff --git a/plugins/fwupd/gs-plugin-fwupd.c b/plugins/fwupd/gs-plugin-fwupd.c
+index e931b2b6db..0747d6e250 100644
+--- a/plugins/fwupd/gs-plugin-fwupd.c
++++ b/plugins/fwupd/gs-plugin-fwupd.c
+@@ -726,7 +726,11 @@ gs_plugin_add_updates (GsPlugin *plugin,
+ 				g_autofree gchar *desc = NULL;
+ 				if (fwupd_release_get_description (rel) == NULL)
+ 					continue;
++#if AS_CHECK_VERSION(1, 0, 0)
++				desc = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
++#else
+ 				desc = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
++#endif
+ 				if (desc == NULL)
+ 					continue;
+ 				g_string_append_printf (update_desc,
+diff --git a/src/gs-hardware-support-context-dialog.c b/src/gs-hardware-support-context-dialog.c
+index 0e48c8c266..14653401de 100644
+--- a/src/gs-hardware-support-context-dialog.c
++++ b/src/gs-hardware-support-context-dialog.c
+@@ -461,6 +461,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 			AsRelationCompare comparator = as_relation_get_compare (relation);
+ 			Range current_display_comparand, relation_comparand;
+ 
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 			/* From https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-requires-recommends-display_length */
+ 			Range display_lengths[] = {
+ 				[AS_DISPLAY_LENGTH_KIND_XSMALL] = { 0, 360 },
+@@ -469,6 +470,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 				[AS_DISPLAY_LENGTH_KIND_LARGE] = { 1024, 3840 },
+ 				[AS_DISPLAY_LENGTH_KIND_XLARGE] = { 3840, G_MAXUINT },
+ 			};
++#endif
+ 
+ 			any_display_relations_set = TRUE;
+ 
+@@ -485,11 +487,14 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 			case AS_DISPLAY_SIDE_KIND_LAST:
+ 			default:
+ 				current_display_comparand.min = current_display_comparand.max = MAX (current_screen_size.width, current_screen_size.height);
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 				relation_comparand.min = display_lengths[as_relation_get_value_display_length_kind (relation)].min;
+ 				relation_comparand.max = display_lengths[as_relation_get_value_display_length_kind (relation)].max;
++#endif
+ 				break;
+ 			}
+ 
++#if !AS_CHECK_VERSION(1, 0, 0)
+ 			if (evaluate_display_comparison (display_lengths[AS_DISPLAY_LENGTH_KIND_SMALL], comparator, relation_comparand)) {
+ 				*mobile_relation_kind_out = max_relation_kind (*mobile_relation_kind_out, as_relation_get_kind (relation));
+ 				*mobile_match_out = TRUE;
+@@ -499,6 +504,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor     *monitor,
+ 				*desktop_relation_kind_out = max_relation_kind (*desktop_relation_kind_out, as_relation_get_kind (relation));
+ 				*desktop_match_out = TRUE;
+ 			}
++#endif
+ 
+ 			if (evaluate_display_comparison (current_display_comparand, comparator, relation_comparand)) {
+ 				*current_relation_kind_out = max_relation_kind (*current_relation_kind_out, as_relation_get_kind (relation));
+diff --git a/src/gs-repos-dialog.c b/src/gs-repos-dialog.c
+index c41c4944a1..7dac0416d9 100644
+--- a/src/gs-repos-dialog.c
++++ b/src/gs-repos-dialog.c
+@@ -154,7 +154,11 @@ enable_repo (GsReposDialog *dialog,
+ 		g_autoptr(GError) error = NULL;
+ 
+ 		/* convert from AppStream markup */
++#if AS_CHECK_VERSION(1, 0, 0)
++		message = as_markup_convert (gs_app_get_agreement (repo), AS_MARKUP_KIND_TEXT, &error);
++#else
+ 		message = as_markup_convert_simple (gs_app_get_agreement (repo), &error);
++#endif
+ 		if (message == NULL) {
+ 			/* failed, so just try and show the original markup */
+ 			message = g_strdup (gs_app_get_agreement (repo));
+diff --git a/src/gs-screenshot-carousel.c b/src/gs-screenshot-carousel.c
+index 04bbf86a1e..d269af6605 100644
+--- a/src/gs-screenshot-carousel.c
++++ b/src/gs-screenshot-carousel.c
+@@ -141,8 +141,8 @@ gs_screenshot_carousel_load_screenshots (GsScreenshotCarousel *self, GsApp *app,
+ 		gtk_widget_set_can_focus (gtk_widget_get_first_child (ssimg), FALSE);
+ 		gs_screenshot_image_set_screenshot (GS_SCREENSHOT_IMAGE (ssimg), ss);
+ 		gs_screenshot_image_set_size (GS_SCREENSHOT_IMAGE (ssimg),
+-					      AS_IMAGE_NORMAL_WIDTH,
+-					      AS_IMAGE_NORMAL_HEIGHT);
++					      GS_IMAGE_NORMAL_WIDTH,
++					      GS_IMAGE_NORMAL_HEIGHT);
+ 		gtk_widget_add_css_class (ssimg, "screenshot-image-main");
+ 		gs_screenshot_image_load_async (GS_SCREENSHOT_IMAGE (ssimg), cancellable);
+ 
+diff --git a/src/gs-screenshot-image.c b/src/gs-screenshot-image.c
+index c313a2589f..b24083b387 100644
+--- a/src/gs-screenshot-image.c
++++ b/src/gs-screenshot-image.c
+@@ -284,13 +284,13 @@ gs_screenshot_image_save_downloaded_img (GsScreenshotImage *ssimg,
+ 	if (images->len > 1)
+ 		return TRUE;
+ 
+-	if (width == AS_IMAGE_THUMBNAIL_WIDTH &&
+-	    height == AS_IMAGE_THUMBNAIL_HEIGHT) {
+-		width = AS_IMAGE_NORMAL_WIDTH;
+-		height = AS_IMAGE_NORMAL_HEIGHT;
++	if (width == GS_IMAGE_THUMBNAIL_WIDTH &&
++	    height == GS_IMAGE_THUMBNAIL_HEIGHT) {
++		width = GS_IMAGE_NORMAL_WIDTH;
++		height = GS_IMAGE_NORMAL_HEIGHT;
+ 	} else {
+-		width = AS_IMAGE_THUMBNAIL_WIDTH;
+-		height = AS_IMAGE_THUMBNAIL_HEIGHT;
++		width = GS_IMAGE_THUMBNAIL_WIDTH;
++		height = GS_IMAGE_THUMBNAIL_HEIGHT;
+ 	}
+ 
+ 	width *= ssimg->scale;
+@@ -582,16 +582,30 @@ gs_screenshot_image_get_url (GsScreenshotImage *ssimg)
+ 	} else if (as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE) {
+ 		AsImage *im;
+ 
++#if AS_CHECK_VERSION(1, 0, 0)
++		im = as_screenshot_get_image (ssimg->screenshot,
++					      ssimg->width,
++					      ssimg->height,
++					      ssimg->scale);
++#else
+ 		im = as_screenshot_get_image (ssimg->screenshot,
+ 					      ssimg->width * ssimg->scale,
+ 					      ssimg->height * ssimg->scale);
++#endif
+ 
+ 		/* if we've failed to load a HiDPI image, fallback to LoDPI */
+ 		if (im == NULL && ssimg->scale > 1) {
+ 			ssimg->scale = 1;
++#if AS_CHECK_VERSION(1, 0, 0)
++			im = as_screenshot_get_image (ssimg->screenshot,
++						      ssimg->width,
++						      ssimg->height,
++						      1);
++#else
+ 			im = as_screenshot_get_image (ssimg->screenshot,
+ 						      ssimg->width,
+ 						      ssimg->height);
++#endif
+ 		}
+ 
+ 		if (im)
+@@ -698,15 +712,22 @@ gs_screenshot_image_load_async (GsScreenshotImage *ssimg,
+ 	 * smaller version of it straight away */
+ 	if (!ssimg->showing_image &&
+ 	    as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE &&
+-	    ssimg->width > AS_IMAGE_THUMBNAIL_WIDTH &&
+-	    ssimg->height > AS_IMAGE_THUMBNAIL_HEIGHT) {
++	    ssimg->width > GS_IMAGE_THUMBNAIL_WIDTH &&
++	    ssimg->height > GS_IMAGE_THUMBNAIL_HEIGHT) {
+ 		const gchar *url_thumb;
+ 		g_autofree gchar *basename_thumb = NULL;
+ 		g_autofree gchar *cache_kind_thumb = NULL;
+ 		AsImage *im;
++#if AS_CHECK_VERSION(1, 0, 0)
+ 		im = as_screenshot_get_image (ssimg->screenshot,
+-					      AS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
+-					      AS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
++					      GS_IMAGE_THUMBNAIL_WIDTH,
++					      GS_IMAGE_THUMBNAIL_HEIGHT,
++					      ssimg->scale);
++#else
++		im = as_screenshot_get_image (ssimg->screenshot,
++					      GS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
++					      GS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
++#endif
+ 		url_thumb = as_image_get_url (im);
+ 		basename_thumb = gs_screenshot_get_cachefn_for_url (url_thumb);
+ 		cache_kind_thumb = g_build_filename ("screenshots", "112x63", NULL);
+diff --git a/src/gs-screenshot-image.h b/src/gs-screenshot-image.h
+index 1f6cf81ce6..6e45f5d20a 100644
+--- a/src/gs-screenshot-image.h
++++ b/src/gs-screenshot-image.h
+@@ -21,6 +21,13 @@ G_BEGIN_DECLS
+ 
+ G_DECLARE_FINAL_TYPE (GsScreenshotImage, gs_screenshot_image, GS, SCREENSHOT_IMAGE, GtkWidget)
+ 
++#define GS_IMAGE_LARGE_HEIGHT		423
++#define GS_IMAGE_LARGE_WIDTH		752
++#define GS_IMAGE_NORMAL_HEIGHT		351
++#define GS_IMAGE_NORMAL_WIDTH		624
++#define GS_IMAGE_THUMBNAIL_HEIGHT	63
++#define GS_IMAGE_THUMBNAIL_WIDTH 	112
++
+ GtkWidget	*gs_screenshot_image_new		(SoupSession		*session);
+ 
+ AsScreenshot	*gs_screenshot_image_get_screenshot	(GsScreenshotImage	*ssimg);
+diff --git a/subprojects/appstream.wrap b/subprojects/appstream.wrap
+index 6f0beb0cbc..5763a32c64 100644
+--- a/subprojects/appstream.wrap
++++ b/subprojects/appstream.wrap
+@@ -1,5 +1,5 @@
+ [wrap-git]
+ directory = appstream
+ url = https://github.com/ximion/appstream.git
+-revision = v0.14.1
++revision = v0.16.3
+ depth = 1
+-- 
+GitLab
diff --git a/srcpkgs/gnome-software/template b/srcpkgs/gnome-software/template
index c5394ce2105091..70a2dfb664394d 100644
--- a/srcpkgs/gnome-software/template
+++ b/srcpkgs/gnome-software/template
@@ -1,6 +1,6 @@
 # Template file for 'gnome-software'
 pkgname=gnome-software
-version=44.2
+version=45.3
 revision=1
 build_style=meson
 configure_args="-Dpackagekit=false -Dfwupd=false
@@ -18,8 +18,8 @@ license="GPL-3.0-or-later"
 homepage="https://gitlab.gnome.org/GNOME/gnome-software"
 changelog="https://gitlab.gnome.org/GNOME/gnome-software/-/raw/main/NEWS"
 distfiles="https://gitlab.gnome.org/GNOME/gnome-software/-/archive/${version}/gnome-software-${version}.tar.gz"
-checksum=bedfe8652d2ceaf17eccc57d6befe6d95f09d15e486a58f0bb7a9a868d0bacc0
-make_check=no # FIXME
+checksum=be2f64e894e653924411981d952fb694559687010985b53ccd325dee0d6a6b83
+make_check=no # Requires system dbus
 
 build_options="gtk_doc"
 

From 9ec3dc4c6d347dd50e41f05bc73a44de993e4b72 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 04:41:38 -0800
Subject: [PATCH 5/6] New package: debugedit-5.0

---
 srcpkgs/debugedit/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/debugedit/template

diff --git a/srcpkgs/debugedit/template b/srcpkgs/debugedit/template
new file mode 100644
index 00000000000000..3056f067fda036
--- /dev/null
+++ b/srcpkgs/debugedit/template
@@ -0,0 +1,17 @@
+# Template file for 'debugedit'
+pkgname=debugedit
+version=5.0
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config"
+makedepends="elfutils-devel"
+short_desc="Tools for debuginfo creation"
+maintainer="oreo639 <oreo6391@gmail.com>"
+license="GPL-2.0-or-later"
+homepage="https://sourceware.org/debugedit/"
+distfiles="https://sourceware.org/pub/debugedit/${version%%.*}.0/debugedit-${version}.tar.xz"
+checksum=e9ecd7d350bebae1f178ce6776ca19a648b6fe8fa22f5b3044b38d7899aa553e
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+	makedepends+=" musl-legacy-compat"
+fi

From 041982995d080f5f13c35488c9fe0911f35bcc7a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 5 Mar 2024 02:12:25 -0800
Subject: [PATCH 6/6] flatpak-builder: update to 1.4.2.

---
 srcpkgs/flatpak-builder/template | 27 ++++++++++-----------------
 1 file changed, 10 insertions(+), 17 deletions(-)

diff --git a/srcpkgs/flatpak-builder/template b/srcpkgs/flatpak-builder/template
index fe3485b0d89568..15ee79c9a082b4 100644
--- a/srcpkgs/flatpak-builder/template
+++ b/srcpkgs/flatpak-builder/template
@@ -1,28 +1,21 @@
 # Template file for 'flatpak-builder'
 pkgname=flatpak-builder
-version=1.2.3
+version=1.4.2
 revision=1
-build_style=gnu-configure
-hostmakedepends="pkg-config xmlto"
-makedepends="flatpak-devel json-glib-devel libcap-devel libsoup-devel
- libyaml-devel libcurl-devel"
-depends="elfutils"
+build_style=meson
+hostmakedepends="pkg-config xmlto debugedit AppStream-compose"
+makedepends="flatpak-devel json-glib-devel libcap-devel
+ libyaml-devel libcurl-devel libxml2-devel"
+depends="elfutils debugedit AppStream-compose"
 short_desc="Tool to build flatpaks from source"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://github.com/flatpak/flatpak-builder"
 changelog="https://github.com/flatpak/flatpak-builder/raw/main/NEWS"
-distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}.tar.xz"
-checksum=e257825a47f7a3e71e30fb0f80f2d9ac6e4801f746f552dfaf0e564e3ee351c8
-# Tests expects a Debian derivate hosts to build a flatpak container from.
-make_check=no
-
-if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" flatpak-devel"
-fi
-if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
-	makedepends+=" musl-legacy-compat"
-fi
+#distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}.tar.xz"
+distfiles="https://github.com/flatpak/flatpak-builder/releases/download/${version}/flatpak-builder-${version}-fixed-libglnx.tar.xz"
+checksum=c041b974e03a2c2d3cda88a0efe1ecf69f9adf42a1758eac341d555e779d0596
+make_check=no # Can't run bubblewrap inside the container
 
 post_patch() {
 	if [ "$XBPS_TARGET_LIBC" = "musl" ]; then

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Merged]: flatpak-builder: update to 1.4.2.
  2024-03-05 12:13 [PR PATCH] flatpak-builder: update to 1.4.2 oreo639
                   ` (16 preceding siblings ...)
  2024-03-11 22:34 ` oreo639
@ 2024-03-11 22:56 ` oreo639
  17 siblings, 0 replies; 19+ messages in thread
From: oreo639 @ 2024-03-11 22:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1094 bytes --]

There's a merged pull request on the void-packages repository

flatpak-builder: update to 1.4.2.
https://github.com/void-linux/void-packages/pull/49126

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2024-03-11 22:56 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-05 12:13 [PR PATCH] flatpak-builder: update to 1.4.2 oreo639
2024-03-05 12:27 ` [PR PATCH] [Updated] " oreo639
2024-03-05 12:41 ` oreo639
2024-03-05 12:57 ` oreo639
2024-03-05 12:59 ` oreo639
2024-03-05 13:32 ` oreo639
2024-03-05 13:43 ` oreo639
2024-03-05 21:40 ` oreo639
2024-03-05 22:02 ` oreo639
2024-03-09 10:56 ` [PR REVIEW] " Johnnynator
2024-03-09 10:59 ` Johnnynator
2024-03-09 22:41 ` [PR REVIEW] " oreo639
2024-03-09 22:41 ` oreo639
2024-03-09 23:09 ` [PR PATCH] [Updated] " oreo639
2024-03-09 23:10 ` oreo639
2024-03-10  0:06 ` oreo639
2024-03-11 22:33 ` oreo639
2024-03-11 22:34 ` oreo639
2024-03-11 22:56 ` [PR PATCH] [Merged]: " oreo639

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).