From c28c85609002ad3d978f293ea96debf5d8ec77e1 Mon Sep 17 00:00:00 2001 From: Dennis Bonke Date: Tue, 17 Dec 2024 21:16:01 +0100 Subject: [PATCH] appstream: Update to version 1.0.4 --- bootstrap.d/dev-libs.y4.yml | 51 ++++++++++++-- docker/Dockerfile | 5 ++ .../appstream/0001-Add-Managarm-support.patch | 67 ++++++++++++------- 3 files changed, 92 insertions(+), 31 deletions(-) diff --git a/bootstrap.d/dev-libs.y4.yml b/bootstrap.d/dev-libs.y4.yml index 8dff87493..fe47f4ba8 100644 --- a/bootstrap.d/dev-libs.y4.yml +++ b/bootstrap.d/dev-libs.y4.yml @@ -3,6 +3,12 @@ import: - !managarm --- sources: + - name: appstream + subdir: 'ports' + git: 'https://github.com/ximion/appstream.git' + tag: 'v1.0.4' + version: '1.0.4' + - name: glib subdir: ports git: 'https://gitlab.gnome.org/GNOME/glib.git' @@ -82,6 +88,43 @@ sources: tools: + - name: host-appstream + architecture: noarch + from_source: appstream + exports_aclocal: true + exports_shared_libs: true + tools_required: + - host-pkg-config + - virtual: pkgconfig-for-host + program_name: host-pkg-config + revision: 1 + configure: + - args: + - 'meson' + - 'setup' + - '--native-file' + - '@SOURCE_ROOT@/scripts/meson.native-file' + - '--prefix=@PREFIX@' + - '-Dapidocs=false' + - '-Ddocs=false' + - '-Dcompose=false' + - '-Dmaintainer=false' + - '-Dstatic-analysis=false' + - '-Dstemming=false' + - '-Dvapi=false' + - '-Dapt-support=false' + - '-Dinstall-docs=false' + - '-Dgir=false' + - '-Dqt=false' + - '-Dsystemd=false' + - '-Ddocs=false' + - '@THIS_SOURCE_DIR@' + isolate_network: false + compile: + - args: ['ninja'] + install: + - args: ['ninja', 'install'] + - name: host-glib labels: [aarch64, riscv64] architecture: noarch @@ -167,7 +210,6 @@ tools: packages: - name: appstream architecture: '@OPTION:arch@' - stability_level: 'broken' # networking issues metadata: summary: Cross-distro effort for providing metadata for software in the Linux ecosystem description: This package provides a library and tool that is useful for retrieving software metadata and making it easily accessible to programs which need it. @@ -175,13 +217,10 @@ packages: website: 'https://www.freedesktop.org/wiki/Distributions/AppStream/' maintainer: "Dennis Bonke " categories: ['dev-libs'] - source: - subdir: 'ports' - git: 'https://github.com/ximion/appstream.git' - tag: 'v0.16.4' - version: '0.16.4' + from_source: 'appstream' tools_required: - system-gcc + - host-appstream - virtual: pkgconfig-for-target triple: "@OPTION:arch-triple@" pkgs_required: diff --git a/docker/Dockerfile b/docker/Dockerfile index 9d2114ffb..14aaa2179 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -53,6 +53,8 @@ RUN apt-get update \ libzstd-dev \ # Used by host-knotifications libcanberra-dev \ + # Used by host-appstream + libcurl4-openssl-dev \ # Used by the Linux kernel libelf-dev \ # Used by wayland-scanner @@ -89,6 +91,9 @@ RUN apt-get update \ libxkbcommon-x11-dev \ # Used by host-kwindowsystem libxfixes-dev \ + # Used by host-appstream + libxml2-dev \ + libyaml-dev \ # Used by many gnu build steps m4 \ # Required to build images for Android's fastboot protocol. diff --git a/patches/appstream/0001-Add-Managarm-support.patch b/patches/appstream/0001-Add-Managarm-support.patch index 4cd97af9f..0f6294a32 100644 --- a/patches/appstream/0001-Add-Managarm-support.patch +++ b/patches/appstream/0001-Add-Managarm-support.patch @@ -1,42 +1,59 @@ -From 896f9880f471a051a2ac474c542965a6dc906701 Mon Sep 17 00:00:00 2001 +From 8b19332567d488d6303077035602a7e7326cfd2f Mon Sep 17 00:00:00 2001 From: Dennis Bonke -Date: Sun, 21 Jan 2024 15:45:52 +0100 +Date: Tue, 17 Dec 2024 21:14:37 +0100 Subject: [PATCH] Add Managarm support Signed-off-by: Dennis Bonke --- + data/meson.build | 4 ++-- + meson.build | 4 +++- src/as-system-info.c | 3 +++ - src/meson.build | 3 +-- - 2 files changed, 4 insertions(+), 2 deletions(-) + 3 files changed, 8 insertions(+), 3 deletions(-) +diff --git a/data/meson.build b/data/meson.build +index 7ae7a9b..c724ef3 100644 +--- a/data/meson.build ++++ b/data/meson.build +@@ -9,8 +9,8 @@ install_data('its/metainfo.loc', + + # Do not rely on an exe wrapper for rel-info, use the system one in that case + if meson.is_cross_build() +- dependency('appstream', version: '>=' + as_version, native: true, +- not_found_message: 'Native appstream required for cross-building') ++# dependency('appstream', version: '>=' + as_version, native: true, ++# not_found_message: 'Native appstream required for cross-building') + ascli_exe = find_program('appstreamcli') + endif + +diff --git a/meson.build b/meson.build +index 7e89ab0..862b868 100644 +--- a/meson.build ++++ b/meson.build +@@ -226,7 +226,9 @@ subdir('tools/') + subdir('po/') + subdir('data/') + subdir('contrib/') +-subdir('docs/') ++if get_option('docs') ++ subdir('docs/') ++endif + subdir('tests/') + if get_option('qt') + subdir('qt/') diff --git a/src/as-system-info.c b/src/as-system-info.c -index 73e4746..37002ed 100644 +index 0c7e27c..abea658 100644 --- a/src/as-system-info.c +++ b/src/as-system-info.c -@@ -409,6 +409,9 @@ as_get_physical_memory_total (void) - unsigned long physmem; - sysctl ((int[]){ CTL_HW, HW_PHYSMEM }, 2, &physmem, &(size_t){ sizeof (physmem) }, NULL, 0); - return physmem / MB_IN_BYTES; +@@ -519,6 +519,9 @@ as_get_physical_memory_total (void) + if (physpages > 0 && pagesize > 0) + return (physpages * pagesize) / MB_IN_BYTES; + return 0; +#elif defined(__managarm__) -+ // NOT IMPLEMENTED ++ // HACK! + return 0; #else #error "Implementation of as_get_physical_memory_total() missing for this OS." #endif -diff --git a/src/meson.build b/src/meson.build -index e098fab..a709b5e 100644 ---- a/src/meson.build -+++ b/src/meson.build -@@ -194,8 +194,7 @@ appstream_lib = library ('appstream', - soversion: as_api_level, - version: as_version, - dependencies: [aslib_deps], -- include_directories: [stemmer_inc_dirs, -- root_inc_dir], -+ include_directories: [root_inc_dir], - install: true - ) - -- -2.43.0 +2.45.2