Skip to content

Commit

Permalink
appstream: Update to version 1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennisbonke committed Dec 17, 2024
1 parent a4bd1fb commit c28c856
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 31 deletions.
51 changes: 45 additions & 6 deletions bootstrap.d/dev-libs.y4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -167,21 +210,17 @@ 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.
spdx: 'LGPL-2.1-or-later GPL-2.0-or-later'
website: 'https://www.freedesktop.org/wiki/Distributions/AppStream/'
maintainer: "Dennis Bonke <[email protected]>"
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:
Expand Down
5 changes: 5 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
67 changes: 42 additions & 25 deletions patches/appstream/0001-Add-Managarm-support.patch
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
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 <[email protected]>
---
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

0 comments on commit c28c856

Please sign in to comment.