From eb57268be62ebfdf37fa5d08de6cae6f222b9ded Mon Sep 17 00:00:00 2001 From: oreo639 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 " 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 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 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 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 +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 ', dependencies: appstream) +- conf.set('HAVE_AS_METADATA_COMPONENTS_TO_CATALOG', '1') +- endif +- if meson.get_compiler('c').links('''#include +- 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 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 " +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 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 " 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