From 7f541c457a265ad540342d6cd915a788c02fcc88 Mon Sep 17 00:00:00 2001 From: Dennis Bonke Date: Wed, 24 Jan 2024 23:25:24 +0100 Subject: [PATCH 01/21] gcr3: Add port --- bootstrap.d/app-crypt.yml | 104 +++++++++++++++++++ patches/gcr3/0001-Add-Managarm-support.patch | 33 ++++++ 2 files changed, 137 insertions(+) create mode 100644 patches/gcr3/0001-Add-Managarm-support.patch diff --git a/bootstrap.d/app-crypt.yml b/bootstrap.d/app-crypt.yml index 2a6a8ce93..1b7b6aabe 100644 --- a/bootstrap.d/app-crypt.yml +++ b/bootstrap.d/app-crypt.yml @@ -1,4 +1,108 @@ packages: + - name: gcr3 + architecture: '@OPTION:arch@' + metadata: + summary: Libraries for cryptographic UIs and accessing PKCS#11 modules + description: This package contains libraries used for displaying certificates and accessing key stores. It also provides the viewer for crypto files on the GNOME Desktop. + spdx: 'LGPL-2.0-or-later GPL-2.0-or-later' + website: 'https://gitlab.gnome.org/GNOME/gcr' + maintainer: "Dennis Bonke " + categories: ['app-crypt'] + source: + subdir: 'ports' + git: 'https://gitlab.gnome.org/GNOME/gcr.git' + tag: '3.41.2' + version: '3.41.2' + regenerate: + - args: | + sed -i 's:"/desktop:"/org:' @THIS_SOURCE_DIR@/schema/*.xml + tools_required: + - host-pkg-config + - system-gcc + - virtual: pkgconfig-for-target + triple: '@OPTION:arch-triple@' + - host-mlibc + - host-gobject-introspection + - host-python + - host-glib + - host-vala + pkgs_required: + - mlibc + - glib + - libgcrypt + - gobject-introspection + - p11-kit + - libsecret + - dbus + - gtk+-3 + - libxml + configure: + - args: + - 'meson' + - 'setup' + - '--cross-file' + - '@SOURCE_ROOT@/scripts/meson-@OPTION:arch-triple@.cross-file' + - '--prefix=/usr' + - '--wrap-mode=nofallback' + - '--sysconfdir=/etc' + - '-Dgtk_doc=false' + - '-Dintrospection=true' + - '-Dssh_agent=false' + - '-Dsystemd=disabled' + - '-Dgtk=true' + - '@THIS_SOURCE_DIR@' + environ: + # Same as below + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + VALADIR: '@SYSROOT_DIR@/usr/share/vala/vapi' + # Wrapper to add our valadir + VAPIGEN: 'cross-vapigen' + build: + - args: ['ninja'] + environ: + # Make python load host libraries instead of the ones in the rootfs + LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-glib/lib:@BUILD_ROOT@/tools/host-glib/lib/x86_64-linux-gnu:@BUILD_ROOT@/tools/host-gobject-introspection/lib/x86_64-linux-gnu' + # Library path for our run-wrapper that allows it to load managarm libraries + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + # Similar to above, but using a nasty (but working) hack lets us use a Linux mlibc build to execute an + # executable that was cross-compiled for managarm + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + # This is a custom environment variable which tells g-ir-scanner what to use instead of ldd + # We point it at our native ldd-wrapper that's installed as part of host-gobject-introspection + GI_LDD_WRAPPER: ldd-wrapper + # This tells g-ir-scanner what program should be used for "cross-launching" the executables it builds + GI_CROSS_LAUNCHER: run-wrapper + # Path to the introspection data installed by other packages + GI_GIR_PATH: '@SYSROOT_DIR@/usr/share/gir-1.0' + VALADIR: '@SYSROOT_DIR@/usr/share/vala/vapi' + # Wrapper to add our valadir + VALAC: 'cross-valac' + # Wrapper to add our valadir + VAPIGEN: 'cross-vapigen' + - args: ['ninja', 'install'] + environ: + DESTDIR: '@THIS_COLLECT_DIR@' + # Make python load host libraries instead of the ones in the rootfs + LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-glib/lib:@BUILD_ROOT@/tools/host-glib/lib/x86_64-linux-gnu:@BUILD_ROOT@/tools/host-gobject-introspection/lib/x86_64-linux-gnu' + # Library path for our run-wrapper that allows it to load managarm libraries + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + # Similar to above, but using a nasty (but working) hack lets us use a Linux mlibc build to execute an + # executable that was cross-compiled for managarm + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + # This is a custom environment variable which tells g-ir-scanner what to use instead of ldd + # We point it at our native ldd-wrapper that's installed as part of host-gobject-introspection + GI_LDD_WRAPPER: ldd-wrapper + # This tells g-ir-scanner what program should be used for "cross-launching" the executables it builds + GI_CROSS_LAUNCHER: run-wrapper + # Path to the introspection data installed by other packages + GI_GIR_PATH: '@SYSROOT_DIR@/usr/share/gir-1.0' + VALADIR: '@SYSROOT_DIR@/usr/share/vala/vapi' + # Wrapper to add our valadir + VALAC: 'cross-valac' + # Wrapper to add our valadir + VAPIGEN: 'cross-vapigen' + - name: libsecret architecture: '@OPTION:arch@' metadata: diff --git a/patches/gcr3/0001-Add-Managarm-support.patch b/patches/gcr3/0001-Add-Managarm-support.patch new file mode 100644 index 000000000..0391a0428 --- /dev/null +++ b/patches/gcr3/0001-Add-Managarm-support.patch @@ -0,0 +1,33 @@ +From cee296dd26c0e922b6c0b2325210912512fb28f7 Mon Sep 17 00:00:00 2001 +From: Dennis Bonke +Date: Wed, 24 Jan 2024 23:24:10 +0100 +Subject: [PATCH] Add Managarm support + +Signed-off-by: Dennis Bonke +--- + meson.build | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/meson.build b/meson.build +index dd890a9..d125cee 100644 +--- a/meson.build ++++ b/meson.build +@@ -52,8 +52,13 @@ if p11_system_config_modules == '' + error('Couldn\'t find location for pkcs11 module config') + endif + libsecret_dep = dependency('libsecret-1', version: '>= 0.20', required: get_option('ssh_agent')) +-ssh_add_path = find_program('ssh-add', required: get_option('ssh_agent')).path() +-ssh_agent_path = find_program('ssh-agent', required: get_option('ssh_agent')).path() ++if get_option('ssh_agent') ++ ssh_add_path = find_program('ssh-add', required: get_option('ssh_agent')).path() ++ ssh_agent_path = find_program('ssh-agent', required: get_option('ssh_agent')).path() ++else ++ ssh_add_path = '' ++ ssh_agent_path = '' ++endif + + with_systemd = false + libsystemd_deps = [] +-- +2.43.0 + From 3787b16a5f7cfb886c30a79dc5a7f560b59f6de5 Mon Sep 17 00:00:00 2001 From: Dennis Bonke Date: Wed, 24 Jan 2024 23:31:02 +0100 Subject: [PATCH 02/21] gcr4: Add port --- bootstrap.d/app-crypt.yml | 100 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) diff --git a/bootstrap.d/app-crypt.yml b/bootstrap.d/app-crypt.yml index 1b7b6aabe..75b6fae27 100644 --- a/bootstrap.d/app-crypt.yml +++ b/bootstrap.d/app-crypt.yml @@ -103,6 +103,106 @@ packages: # Wrapper to add our valadir VAPIGEN: 'cross-vapigen' + - name: gcr4 + architecture: '@OPTION:arch@' + metadata: + summary: Libraries for cryptographic UIs and accessing PKCS#11 modules + description: This package contains libraries used for displaying certificates and accessing key stores. It also provides the viewer for crypto files on the GNOME Desktop. + spdx: 'LGPL-2.0-or-later GPL-2.0-or-later' + website: 'https://gitlab.gnome.org/GNOME/gcr' + maintainer: "Dennis Bonke " + categories: ['app-crypt'] + source: + subdir: 'ports' + git: 'https://gitlab.gnome.org/GNOME/gcr.git' + tag: '4.1.0' + version: '4.1.0' + tools_required: + - host-pkg-config + - system-gcc + - virtual: pkgconfig-for-target + triple: '@OPTION:arch-triple@' + - host-mlibc + - host-gobject-introspection + - host-python + - host-glib + - host-vala + pkgs_required: + - mlibc + - glib + - libgcrypt + - gobject-introspection + - p11-kit + - libsecret + - dbus + - gtk4 + - libxml + configure: + - args: + - 'meson' + - 'setup' + - '--cross-file' + - '@SOURCE_ROOT@/scripts/meson-@OPTION:arch-triple@.cross-file' + - '--prefix=/usr' + - '--wrap-mode=nofallback' + - '--sysconfdir=/etc' + - '-Dgtk_doc=false' + - '-Dintrospection=true' + - '-Dssh_agent=false' + - '-Dsystemd=disabled' + - '@THIS_SOURCE_DIR@' + environ: + # Same as below + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + VALADIR: '@SYSROOT_DIR@/usr/share/vala/vapi' + # Wrapper to add our valadir + VAPIGEN: 'cross-vapigen' + build: + - args: ['ninja'] + environ: + # Make python load host libraries instead of the ones in the rootfs + LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-glib/lib:@BUILD_ROOT@/tools/host-glib/lib/x86_64-linux-gnu:@BUILD_ROOT@/tools/host-gobject-introspection/lib/x86_64-linux-gnu' + # Library path for our run-wrapper that allows it to load managarm libraries + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + # Similar to above, but using a nasty (but working) hack lets us use a Linux mlibc build to execute an + # executable that was cross-compiled for managarm + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + # This is a custom environment variable which tells g-ir-scanner what to use instead of ldd + # We point it at our native ldd-wrapper that's installed as part of host-gobject-introspection + GI_LDD_WRAPPER: ldd-wrapper + # This tells g-ir-scanner what program should be used for "cross-launching" the executables it builds + GI_CROSS_LAUNCHER: run-wrapper + # Path to the introspection data installed by other packages + GI_GIR_PATH: '@SYSROOT_DIR@/usr/share/gir-1.0' + VALADIR: '@SYSROOT_DIR@/usr/share/vala/vapi' + # Wrapper to add our valadir + VALAC: 'cross-valac' + # Wrapper to add our valadir + VAPIGEN: 'cross-vapigen' + - args: ['ninja', 'install'] + environ: + DESTDIR: '@THIS_COLLECT_DIR@' + # Make python load host libraries instead of the ones in the rootfs + LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-glib/lib:@BUILD_ROOT@/tools/host-glib/lib/x86_64-linux-gnu:@BUILD_ROOT@/tools/host-gobject-introspection/lib/x86_64-linux-gnu' + # Library path for our run-wrapper that allows it to load managarm libraries + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + # Similar to above, but using a nasty (but working) hack lets us use a Linux mlibc build to execute an + # executable that was cross-compiled for managarm + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + # This is a custom environment variable which tells g-ir-scanner what to use instead of ldd + # We point it at our native ldd-wrapper that's installed as part of host-gobject-introspection + GI_LDD_WRAPPER: ldd-wrapper + # This tells g-ir-scanner what program should be used for "cross-launching" the executables it builds + GI_CROSS_LAUNCHER: run-wrapper + # Path to the introspection data installed by other packages + GI_GIR_PATH: '@SYSROOT_DIR@/usr/share/gir-1.0' + VALADIR: '@SYSROOT_DIR@/usr/share/vala/vapi' + # Wrapper to add our valadir + VALAC: 'cross-valac' + # Wrapper to add our valadir + VAPIGEN: 'cross-vapigen' + - name: libsecret architecture: '@OPTION:arch@' metadata: From abc2db67620630e41f4f1acb91e9496303da2d49 Mon Sep 17 00:00:00 2001 From: Dennis Bonke Date: Wed, 24 Jan 2024 23:33:24 +0100 Subject: [PATCH 03/21] gsettings-desktop-schemas: Update to version 45.0 --- bootstrap.d/gnome-base.yml | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/bootstrap.d/gnome-base.yml b/bootstrap.d/gnome-base.yml index 15d153b59..849fc0ccc 100644 --- a/bootstrap.d/gnome-base.yml +++ b/bootstrap.d/gnome-base.yml @@ -11,19 +11,23 @@ packages: source: subdir: ports git: 'https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas.git' - tag: '42.0' - version: '42.0' + tag: '45.0' + version: '45.0' tools_required: - system-gcc - - host-gobject-introspection - host-libtool - host-pkg-config - virtual: pkgconfig-for-target triple: "@OPTION:arch-triple@" + - host-mlibc + - host-gobject-introspection + - host-python + - host-glib pkgs_required: - mlibc - glib - revision: 7 + - gobject-introspection + revision: 1 configure: - args: | sed -i -r 's:"(/system):"/org/gnome\1:g' @THIS_SOURCE_DIR@/schemas/*.in @@ -32,10 +36,28 @@ packages: - '--cross-file' - '@SOURCE_ROOT@/scripts/meson-@OPTION:arch-triple@.cross-file' - '--prefix=/usr' - - '-Dintrospection=false' - '@THIS_SOURCE_DIR@' + environ: + # Same as below + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' build: - args: ['ninja'] + environ: + # Make python load host libraries instead of the ones in the rootfs + LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-glib/lib:@BUILD_ROOT@/tools/host-glib/lib/x86_64-linux-gnu:@BUILD_ROOT@/tools/host-gobject-introspection/lib/x86_64-linux-gnu' + # Library path for our run-wrapper that allows it to load managarm libraries + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + # Similar to above, but using a nasty (but working) hack lets us use a Linux mlibc build to execute an + # executable that was cross-compiled for managarm + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + # This is a custom environment variable which tells g-ir-scanner what to use instead of ldd + # We point it at our native ldd-wrapper that's installed as part of host-gobject-introspection + GI_LDD_WRAPPER: ldd-wrapper + # This tells g-ir-scanner what program should be used for "cross-launching" the executables it builds + GI_CROSS_LAUNCHER: run-wrapper + # Path to the introspection data installed by other packages + GI_GIR_PATH: '@SYSROOT_DIR@/usr/share/gir-1.0' - args: ['ninja', 'install'] environ: DESTDIR: '@THIS_COLLECT_DIR@' From d409ed8e8e911e02bcb567daeab39adeb3aa5aa5 Mon Sep 17 00:00:00 2001 From: Dennis Bonke Date: Wed, 24 Jan 2024 23:41:23 +0100 Subject: [PATCH 04/21] json-glib: Add port --- bootstrap.d/dev-libs.yml | 61 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/bootstrap.d/dev-libs.yml b/bootstrap.d/dev-libs.yml index f43b737e3..dc0ba6bfc 100644 --- a/bootstrap.d/dev-libs.yml +++ b/bootstrap.d/dev-libs.yml @@ -526,6 +526,67 @@ packages: environ: DESTDIR: '@THIS_COLLECT_DIR@' + - name: json-glib + architecture: '@OPTION:arch@' + metadata: + summary: Library providing GLib serialization and deserialization for the JSON format + description: This package contains a library providing serialization and deserialization support for the JavaScript Object Notation (JSON) format described by RFC 4627. + spdx: 'LGPL-2.1-or-later' + website: 'https://wiki.gnome.org/Projects/JsonGlib' + maintainer: "Dennis Bonke " + categories: ['gui-libs'] + source: + subdir: 'ports' + git: 'https://gitlab.gnome.org/GNOME/json-glib.git' + tag: '1.8.0-actual' + version: '1.8.0' + tools_required: + - system-gcc + - wayland-scanner + - virtual: pkgconfig-for-target + triple: "@OPTION:arch-triple@" + - host-mlibc + - host-gobject-introspection + - host-python + pkgs_required: + - mlibc + - glib + - gobject-introspection + configure: + - args: + - 'meson' + - 'setup' + - '--cross-file' + - '@SOURCE_ROOT@/scripts/meson-@OPTION:arch-triple@.cross-file' + - '--prefix=/usr' + - '--buildtype=release' + - '--wrap-mode=nodownload' + - '@THIS_SOURCE_DIR@' + environ: + # Same as below + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + build: + - args: ['ninja'] + environ: + # Make python load host libraries instead of the ones in the rootfs + LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-glib/lib:@BUILD_ROOT@/tools/host-glib/lib/x86_64-linux-gnu:@BUILD_ROOT@/tools/host-gobject-introspection/lib/x86_64-linux-gnu' + # Library path for our run-wrapper that allows it to load managarm libraries + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + # Similar to above, but using a nasty (but working) hack lets us use a Linux mlibc build to execute an + # executable that was cross-compiled for managarm + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + # This is a custom environment variable which tells g-ir-scanner what to use instead of ldd + # We point it at our native ldd-wrapper that's installed as part of host-gobject-introspection + GI_LDD_WRAPPER: ldd-wrapper + # This tells g-ir-scanner what program should be used for "cross-launching" the executables it builds + GI_CROSS_LAUNCHER: run-wrapper + # Path to the introspection data installed by other packages + GI_GIR_PATH: '@SYSROOT_DIR@/usr/share/gir-1.0' + - args: ['ninja', 'install'] + environ: + DESTDIR: '@THIS_COLLECT_DIR@' + - name: libevdev labels: [aarch64] architecture: '@OPTION:arch@' From 7722bbb044c78d388a7628cb43a53dde4b750c76 Mon Sep 17 00:00:00 2001 From: Dennis Bonke Date: Wed, 24 Jan 2024 23:41:57 +0100 Subject: [PATCH 05/21] rest: Add port --- bootstrap.d/net-libs.yml | 76 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/bootstrap.d/net-libs.yml b/bootstrap.d/net-libs.yml index 266f0ee65..e7f68a56f 100644 --- a/bootstrap.d/net-libs.yml +++ b/bootstrap.d/net-libs.yml @@ -388,6 +388,82 @@ packages: environ: DESTDIR: '@THIS_COLLECT_DIR@' + - name: rest + architecture: '@OPTION:arch@' + metadata: + summary: Helper library for RESTful services + description: This package contains a library that was designed to make it easier to access web services that claim to be "RESTful". It includes convenience wrappers for libsoup and libxml to ease remote use of the RESTful API. + spdx: 'LGPL-2.1' + website: 'https://wiki.gnome.org/Projects/Librest' + maintainer: "Dennis Bonke " + categories: ['gui-libs'] + source: + subdir: 'ports' + git: 'https://gitlab.gnome.org/GNOME/librest.git' + tag: '0.9.1' + version: '0.9.1' + tools_required: + - system-gcc + - wayland-scanner + - virtual: pkgconfig-for-target + triple: "@OPTION:arch-triple@" + - host-vala + - host-mlibc + - host-gobject-introspection + - host-python + pkgs_required: + - mlibc + - glib + - libsoup + - json-glib + - libxml + - gobject-introspection + configure: + - args: + - 'meson' + - 'setup' + - '--cross-file' + - '@SOURCE_ROOT@/scripts/meson-@OPTION:arch-triple@.cross-file' + - '--prefix=/usr' + - '--buildtype=release' + - '--wrap-mode=nodownload' + - '-Dintrospection=true' + - '-Dvapi=true' + - '-Dgtk_doc=false' + - '@THIS_SOURCE_DIR@' + environ: + # Same as below + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + VALADIR: '@SYSROOT_DIR@/usr/share/vala/vapi' + # Wrapper to add our valadir + VAPIGEN: 'cross-vapigen' + build: + - args: ['ninja'] + environ: + # Make python load host libraries instead of the ones in the rootfs + LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-glib/lib:@BUILD_ROOT@/tools/host-glib/lib/x86_64-linux-gnu:@BUILD_ROOT@/tools/host-gobject-introspection/lib/x86_64-linux-gnu' + # Library path for our run-wrapper that allows it to load managarm libraries + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + # Similar to above, but using a nasty (but working) hack lets us use a Linux mlibc build to execute an + # executable that was cross-compiled for managarm + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + # This is a custom environment variable which tells g-ir-scanner what to use instead of ldd + # We point it at our native ldd-wrapper that's installed as part of host-gobject-introspection + GI_LDD_WRAPPER: ldd-wrapper + # This tells g-ir-scanner what program should be used for "cross-launching" the executables it builds + GI_CROSS_LAUNCHER: run-wrapper + # Path to the introspection data installed by other packages + GI_GIR_PATH: '@SYSROOT_DIR@/usr/share/gir-1.0' + VALADIR: '@SYSROOT_DIR@/usr/share/vala/vapi' + # Wrapper to add our valadir + VALAC: 'cross-valac' + # Wrapper to add our valadir + VAPIGEN: 'cross-vapigen' + - args: ['ninja', 'install'] + environ: + DESTDIR: '@THIS_COLLECT_DIR@' + - name: webkitgtk architecture: '@OPTION:arch@' metadata: From 01b489cea119720e9ed666eda4cf3638c7956d1b Mon Sep 17 00:00:00 2001 From: Dennis Bonke Date: Fri, 26 Jan 2024 11:25:34 +0100 Subject: [PATCH 06/21] totem-pl-parser: Add port --- bootstrap.d/dev-libs.yml | 67 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/bootstrap.d/dev-libs.yml b/bootstrap.d/dev-libs.yml index dc0ba6bfc..0707ccfc8 100644 --- a/bootstrap.d/dev-libs.yml +++ b/bootstrap.d/dev-libs.yml @@ -1912,6 +1912,73 @@ packages: environ: DESTDIR: '@THIS_COLLECT_DIR@' + - name: totem-pl-parser + architecture: '@OPTION:arch@' + metadata: + summary: Playlist parsing library + description: This package provides a simple GObject-based library used to parse multiple playlist formats. + spdx: 'LGPL-2.0-or-later' + website: 'https://developer.gnome.org/totem-pl-parser/stable/' + maintainer: "Dennis Bonke " + categories: ['dev-libs'] + source: + subdir: 'ports' + git: 'https://gitlab.gnome.org/GNOME/totem-pl-parser.git' + tag: 'V_3_26_6' + version: '3.26.6' + tools_required: + - system-gcc + - wayland-scanner + - virtual: pkgconfig-for-target + triple: "@OPTION:arch-triple@" + - host-mlibc + - host-gobject-introspection + - host-python + pkgs_required: + - mlibc + - glib + - libarchive + - libgcrypt + - libxml + - gobject-introspection + configure: + - args: + - 'meson' + - 'setup' + - '--cross-file' + - '@SOURCE_ROOT@/scripts/meson-@OPTION:arch-triple@.cross-file' + - '--prefix=/usr' + - '--buildtype=release' + - '--wrap-mode=nodownload' + - '-Dintrospection=true' + - '-Denable-libarchive=yes' + - '-Denable-libgcrypt=yes' + - '@THIS_SOURCE_DIR@' + environ: + # Same as below + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + build: + - args: ['ninja'] + environ: + # Make python load host libraries instead of the ones in the rootfs + LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-glib/lib:@BUILD_ROOT@/tools/host-glib/lib/x86_64-linux-gnu:@BUILD_ROOT@/tools/host-gobject-introspection/lib/x86_64-linux-gnu' + # Library path for our run-wrapper that allows it to load managarm libraries + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + # Similar to above, but using a nasty (but working) hack lets us use a Linux mlibc build to execute an + # executable that was cross-compiled for managarm + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + # This is a custom environment variable which tells g-ir-scanner what to use instead of ldd + # We point it at our native ldd-wrapper that's installed as part of host-gobject-introspection + GI_LDD_WRAPPER: ldd-wrapper + # This tells g-ir-scanner what program should be used for "cross-launching" the executables it builds + GI_CROSS_LAUNCHER: run-wrapper + # Path to the introspection data installed by other packages + GI_GIR_PATH: '@SYSROOT_DIR@/usr/share/gir-1.0' + - args: ['ninja', 'install'] + environ: + DESTDIR: '@THIS_COLLECT_DIR@' + - name: wayland-protocols labels: [aarch64] architecture: '@OPTION:arch@' From ee92ef1e50258bfd4da45c71b6c2c14985a47dbd Mon Sep 17 00:00:00 2001 From: Dennis Bonke Date: Fri, 26 Jan 2024 11:46:33 +0100 Subject: [PATCH 07/21] vte: Add port --- bootstrap.d/x11-libs.yml | 85 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/bootstrap.d/x11-libs.yml b/bootstrap.d/x11-libs.yml index ae1477e92..fedb8b37b 100644 --- a/bootstrap.d/x11-libs.yml +++ b/bootstrap.d/x11-libs.yml @@ -2047,6 +2047,91 @@ packages: DESTDIR: '@THIS_COLLECT_DIR@' quiet: true + - name: vte + architecture: '@OPTION:arch@' + metadata: + summary: Library providing a virtual terminal emulator widget + description: This package contains a termcap file implementation for terminal emulators. + spdx: 'LGPL-3.0-or-later GPL-3.0-or-later' + website: 'https://wiki.gnome.org/Apps/Terminal/VTE' + maintainer: "Dennis Bonke " + categories: ['x11-libs'] + source: + subdir: ports + git: 'https://gitlab.gnome.org/GNOME/vte.git' + tag: '0.74.2' + version: '0.74.2' + tools_required: + - system-gcc + - host-libtool + - host-pkg-config + - virtual: pkgconfig-for-target + triple: "@OPTION:arch-triple@" + - host-vala + - host-mlibc + - host-gobject-introspection + - host-python + pkgs_required: + - mlibc + - fribidi + - glib + - gnutls + - gtk+-3 + - icu + - libxml + - pango + - pcre2 + - zlib + - gtk4 + configure: + - args: + - 'meson' + - 'setup' + - '--cross-file' + - '@SOURCE_ROOT@/scripts/meson-@OPTION:arch-triple@.cross-file' + - '--prefix=/usr' + - '-Dgir=true' + - '-Dgtk3=true' + - '-Dfribidi=true' + - '-Dicu=true' + - '-D_systemd=false' + - '-Dvapi=true' + - '-Dgtk4=true' + - '@THIS_SOURCE_DIR@' + environ: + # Same as below + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + VALADIR: '@SYSROOT_DIR@/usr/share/vala/vapi' + # Wrapper to add our valadir + VAPIGEN: 'cross-vapigen' + build: + - args: ['ninja'] + environ: + # Make python load host libraries instead of the ones in the rootfs + LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-glib/lib:@BUILD_ROOT@/tools/host-glib/lib/x86_64-linux-gnu:@BUILD_ROOT@/tools/host-gobject-introspection/lib/x86_64-linux-gnu' + # Library path for our run-wrapper that allows it to load managarm libraries + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + # Similar to above, but using a nasty (but working) hack lets us use a Linux mlibc build to execute an + # executable that was cross-compiled for managarm + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + # This is a custom environment variable which tells g-ir-scanner what to use instead of ldd + # We point it at our native ldd-wrapper that's installed as part of host-gobject-introspection + GI_LDD_WRAPPER: ldd-wrapper + # This tells g-ir-scanner what program should be used for "cross-launching" the executables it builds + GI_CROSS_LAUNCHER: run-wrapper + # Path to the introspection data installed by other packages + GI_GIR_PATH: '@SYSROOT_DIR@/usr/share/gir-1.0' + VALADIR: '@SYSROOT_DIR@/usr/share/vala/vapi' + # Wrapper to add our valadir + VALAC: 'cross-valac' + # Wrapper to add our valadir + VAPIGEN: 'cross-vapigen' + - args: ['ninja', 'install'] + environ: + DESTDIR: '@THIS_COLLECT_DIR@' + - args: ['rm', '-rv', '@THIS_COLLECT_DIR@/etc'] + - name: xcb-util labels: [aarch64] architecture: '@OPTION:arch@' From f9c1317e47571b1df2d1853bb2db5670b1d024eb Mon Sep 17 00:00:00 2001 From: Dennis Bonke Date: Fri, 26 Jan 2024 12:04:19 +0100 Subject: [PATCH 08/21] geocode-glib: Add port --- bootstrap.d/sci-geosciences.yml | 63 +++++++++++++++++++++++++++++++++ bootstrap.yml | 1 + 2 files changed, 64 insertions(+) create mode 100644 bootstrap.d/sci-geosciences.yml diff --git a/bootstrap.d/sci-geosciences.yml b/bootstrap.d/sci-geosciences.yml new file mode 100644 index 000000000..ef910b90e --- /dev/null +++ b/bootstrap.d/sci-geosciences.yml @@ -0,0 +1,63 @@ +packages: + - name: geocode-glib + architecture: '@OPTION:arch@' + metadata: + summary: GLib helper library for geocoding services + description: This package contains a convenience library for the Yahoo! Place Finder APIs. The Place Finder web service allows to do geocoding (finding longitude and latitude from an address), and reverse geocoding (finding an address from coordinates). + spdx: 'LGPL-2.0-or-later' + website: 'https://gitlab.gnome.org/GNOME/geocode-glib' + maintainer: "Dennis Bonke " + categories: ['sci-geosciences'] + source: + subdir: ports + git: 'https://gitlab.gnome.org/GNOME/geocode-glib.git' + tag: '3.26.4' + version: '3.26.4' + tools_required: + - system-gcc + - host-libtool + - host-pkg-config + - virtual: pkgconfig-for-target + triple: "@OPTION:arch-triple@" + - host-mlibc + - host-gobject-introspection + - host-python + pkgs_required: + - mlibc + - json-glib + - libsoup3 + configure: + - args: + - 'meson' + - 'setup' + - '--cross-file' + - '@SOURCE_ROOT@/scripts/meson-@OPTION:arch-triple@.cross-file' + - '--prefix=/usr' + - '-Denable-gtk-doc=false' + - '-Dsoup2=false' + - '-Denable-introspection=true' + - '@THIS_SOURCE_DIR@' + environ: + # Same as below + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + build: + - args: ['ninja'] + environ: + # Make python load host libraries instead of the ones in the rootfs + LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-glib/lib:@BUILD_ROOT@/tools/host-glib/lib/x86_64-linux-gnu:@BUILD_ROOT@/tools/host-gobject-introspection/lib/x86_64-linux-gnu' + # Library path for our run-wrapper that allows it to load managarm libraries + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + # Similar to above, but using a nasty (but working) hack lets us use a Linux mlibc build to execute an + # executable that was cross-compiled for managarm + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + # This is a custom environment variable which tells g-ir-scanner what to use instead of ldd + # We point it at our native ldd-wrapper that's installed as part of host-gobject-introspection + GI_LDD_WRAPPER: ldd-wrapper + # This tells g-ir-scanner what program should be used for "cross-launching" the executables it builds + GI_CROSS_LAUNCHER: run-wrapper + # Path to the introspection data installed by other packages + GI_GIR_PATH: '@SYSROOT_DIR@/usr/share/gir-1.0' + - args: ['ninja', 'install'] + environ: + DESTDIR: '@THIS_COLLECT_DIR@' diff --git a/bootstrap.yml b/bootstrap.yml index 3368f59d6..0666d4d1b 100644 --- a/bootstrap.yml +++ b/bootstrap.yml @@ -32,6 +32,7 @@ imports: - file: bootstrap.d/net-libs.yml - file: bootstrap.d/net-misc.yml - file: bootstrap.d/net-print.yml + - file: bootstrap.d/sci-geosciences.yml - file: bootstrap.d/sys-apps.yml - file: bootstrap.d/sys-auth.yml - file: bootstrap.d/sys-boot.yml From 9cd45c1399a63206264604268f3a3a5db8b6bae0 Mon Sep 17 00:00:00 2001 From: Dennis Bonke Date: Mon, 29 Jan 2024 20:39:46 +0100 Subject: [PATCH 09/21] yelp-xsl: Add port --- bootstrap.d/gnome-extra.yml | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/bootstrap.d/gnome-extra.yml b/bootstrap.d/gnome-extra.yml index 73d8dbc63..ea1afe1ce 100644 --- a/bootstrap.d/gnome-extra.yml +++ b/bootstrap.d/gnome-extra.yml @@ -60,3 +60,43 @@ packages: post_install: - args: ['glib-compile-schemas', '/usr/share/glib-2.0/schemas'] - args: ['gtk4-update-icon-cache', '-q', '-t', '-f', '/usr/share/icons/hicolor'] + + - name: yelp-xsl + architecture: '@OPTION:arch@' + metadata: + summary: A calculator application for GNOME + description: This package contains XSL stylesheets that are used by the Yelp help browser to format Docbook and Mallard documents. + spdx: 'GPL-2.0-or-later LGPL-2.1-or-later' + website: 'https://gitlab.gnome.org/GNOME/yelp-xsl' + maintainer: "Dennis Bonke " + categories: ['gnome-extra'] + source: + subdir: 'ports' + git: 'https://gitlab.gnome.org/GNOME/yelp-xsl.git' + tag: '42.1' + version: '42.1' + tools_required: + - host-autoconf-v2.69 + - host-automake-v1.15 + - host-libtool + - host-pkg-config + - host-gettext + regenerate: + - args: ['./autogen.sh'] + environ: + NOCONFIGURE: 'yes' + tools_required: + - system-gcc + pkgs_required: + - mlibc + - libxslt + - itstool + configure: + - args: + - '@THIS_SOURCE_DIR@/configure' + - '--host=@OPTION:arch-triple@' + - '--prefix=/usr' + build: + - args: ['make', 'install'] + environ: + DESTDIR: '@THIS_COLLECT_DIR@' From 5351c9703d6c4d5c135f8e461649d4a6ef1767e2 Mon Sep 17 00:00:00 2001 From: Dennis Bonke Date: Mon, 29 Jan 2024 20:55:11 +0100 Subject: [PATCH 10/21] spidermonkey: Add port --- bootstrap.d/dev-lang.yml | 64 +++++++++ .../0001-Add-Managarm-support.patch | 131 ++++++++++++++++++ 2 files changed, 195 insertions(+) create mode 100644 patches/spidermonkey/0001-Add-Managarm-support.patch diff --git a/bootstrap.d/dev-lang.yml b/bootstrap.d/dev-lang.yml index fea858da6..29f0c6682 100644 --- a/bootstrap.d/dev-lang.yml +++ b/bootstrap.d/dev-lang.yml @@ -318,6 +318,70 @@ packages: DESTDIR: '@THIS_COLLECT_DIR@' quiet: true + - name: spidermonkey + architecture: '@OPTION:arch@' + metadata: + summary: SpiderMonkey is Mozilla's JavaScript and WebAssembly Engine, written in C++ and Rust. + description: SpiderMonkey is Mozilla's JavaScript and WebAssembly Engine, written in C++ and Rust. + spdx: 'MPL-2.0' + website: 'https://spidermonkey.dev/' + maintainer: "Dennis Bonke " + categories: ['dev-lang'] + source: + subdir: 'ports' + url: 'https://archive.mozilla.org/pub/firefox/releases/115.7.0esr/source/firefox-115.7.0esr.source.tar.xz' + format: 'tar.xz' + checksum: blake2b:9cacd9cd7e9b9040f37843645bc6823d72b3b736a3c4dcef7706304ebeda718e36e98962d9d9c000b7507fdfda40bd19ca4c8267573dc623a9507a7f77b17b52 + extract_path: 'firefox-115.7.0' + patch-path-strip: 1 + version: '115.7.0esr' + tools_required: + - host-cargo + - system-gcc + - host-llvm-toolchain + - host-rust + - host-automake-v1.15 + sources_required: + - rust-patched-libs + pkgs_required: + - mlibc + - readline + - zlib + - icu + - which + - llvm + - nss + - nspr + configure: + - args: ['cp', + '@BUILD_ROOT@/tools/host-automake-v1.15/share/automake-1.15/config.sub', + '@THIS_SOURCE_DIR@/build/autoconf/'] + - args: + - '@THIS_SOURCE_DIR@/js/src/configure' + - '--target=@OPTION:arch-triple@' + - '--with-toolchain-prefix=@OPTION:arch-triple@' + - '--prefix=/usr' + - '--disable-debug-symbols' + - '--disable-jemalloc' + - '--enable-readline' + - '--enable-rust-simd' + - '--with-intl-api' + - '--with-system-icu' + - '--with-system-zlib' + environ: + CC: '@OPTION:arch-triple@-gcc' + CXX: '@OPTION:arch-triple@-g++' + HOST_CC: 'gcc' + HOST_CXX: 'g++' + build: + - args: ['make', '-j@PARALLELISM@'] + - args: ['make', 'install'] + environ: + DESTDIR: '@THIS_COLLECT_DIR@' + - args: ['rm', '-v', '@THIS_COLLECT_DIR@/usr/lib/libjs_static.ajs'] + - args: | + sed -i '/@NSPR_CFLAGS\@/d' @THIS_COLLECT_DIR@/usr/bin/js115-config + - name: tcl architecture: '@OPTION:arch@' metadata: diff --git a/patches/spidermonkey/0001-Add-Managarm-support.patch b/patches/spidermonkey/0001-Add-Managarm-support.patch new file mode 100644 index 000000000..b1353be39 --- /dev/null +++ b/patches/spidermonkey/0001-Add-Managarm-support.patch @@ -0,0 +1,131 @@ +From e972b50dc759d9a68ebb2b9dfeab1aae7e82bcef Mon Sep 17 00:00:00 2001 +From: Dennis Bonke +Date: Mon, 29 Jan 2024 20:46:26 +0100 +Subject: [PATCH] Add Managarm support + +Signed-off-by: Dennis Bonke +--- + build/moz.configure/init.configure | 2 ++ + build/moz.configure/toolchain.configure | 5 +++-- + js/src/wasm/WasmSignalHandlers.cpp | 4 ++-- + mozglue/misc/PlatformConditionVariable.h | 2 +- + mozglue/misc/TimeStamp_posix.cpp | 7 +++++++ + python/mozbuild/mozbuild/configure/constants.py | 3 +++ + 6 files changed, 18 insertions(+), 5 deletions(-) + +diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure +index 53bbc4203f..716008dbee 100644 +--- a/build/moz.configure/init.configure ++++ b/build/moz.configure/init.configure +@@ -537,6 +537,8 @@ def split_triplet(triplet, allow_wasi=False): + canonical_os = canonical_kernel = "SunOS" + elif os.startswith("wasi") and allow_wasi: + canonical_os = canonical_kernel = "WASI" ++ elif os.startswith("managarm"): ++ canonical_os = canonical_kernel = "Managarm" + else: + raise ValueError("Unknown OS: %s" % os) + +diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure +index 3f91d71537..6079ba7cc6 100644 +--- a/build/moz.configure/toolchain.configure ++++ b/build/moz.configure/toolchain.configure +@@ -2409,8 +2409,9 @@ def security_hardening_cflags( + # Enable only if hardening is not disabled and ASAN is + # not on as ASAN will catch the crashes for us + if compiler_is_gccish and not asan: +- flags.append("-fstack-protector-strong") +- ldflags.append("-fstack-protector-strong") ++ if target.os != "Managarm": ++ flags.append("-fstack-protector-strong") ++ ldflags.append("-fstack-protector-strong") + + if ( + c_compiler.type == "clang" +diff --git a/js/src/wasm/WasmSignalHandlers.cpp b/js/src/wasm/WasmSignalHandlers.cpp +index 86e11df7f0..94b576d9dd 100644 +--- a/js/src/wasm/WasmSignalHandlers.cpp ++++ b/js/src/wasm/WasmSignalHandlers.cpp +@@ -111,8 +111,8 @@ using mozilla::DebugOnly; + # define R01_sig(p) ((p)->sc_frame.fixreg[1]) + # define R32_sig(p) ((p)->sc_frame.srr0) + # endif +-# elif defined(__linux__) || defined(__sun) +-# if defined(__linux__) ++# elif defined(__linux__) || defined(__sun) || defined(__managarm__) ++# if defined(__linux__) || defined(__managarm__) + # define EIP_sig(p) ((p)->uc_mcontext.gregs[REG_EIP]) + # define EBP_sig(p) ((p)->uc_mcontext.gregs[REG_EBP]) + # define ESP_sig(p) ((p)->uc_mcontext.gregs[REG_ESP]) +diff --git a/mozglue/misc/PlatformConditionVariable.h b/mozglue/misc/PlatformConditionVariable.h +index 61fb06ade1..4f7410b5c9 100644 +--- a/mozglue/misc/PlatformConditionVariable.h ++++ b/mozglue/misc/PlatformConditionVariable.h +@@ -54,7 +54,7 @@ class ConditionVariableImpl { + + PlatformData* platformData(); + +-#if !defined(XP_WIN) && !defined(__wasi__) ++#if !defined(XP_WIN) && !defined(__wasi__) && !defined(__managarm__) + void* platformData_[sizeof(pthread_cond_t) / sizeof(void*)]; + static_assert(sizeof(pthread_cond_t) / sizeof(void*) != 0 && + sizeof(pthread_cond_t) % sizeof(void*) == 0, +diff --git a/mozglue/misc/TimeStamp_posix.cpp b/mozglue/misc/TimeStamp_posix.cpp +index 10c046d046..3c37b70fff 100644 +--- a/mozglue/misc/TimeStamp_posix.cpp ++++ b/mozglue/misc/TimeStamp_posix.cpp +@@ -13,7 +13,9 @@ + // obtained with this API; see TimeDuration::Resolution; + // + ++#if !defined(__managarm__) + #include ++#endif + #include + #include + #include +@@ -251,8 +253,13 @@ static void* ComputeProcessUptimeThread(void* aTime) { + } + + char threadStat[40]; ++#if !defined(__managarm__) + SprintfLiteral(threadStat, "/proc/self/task/%d/stat", + (pid_t)syscall(__NR_gettid)); ++#else ++ SprintfLiteral(threadStat, "/proc/self/task/%d/stat", ++ (pid_t)gettid()); ++#endif + + uint64_t threadJiffies = JiffiesSinceBoot(threadStat); + uint64_t selfJiffies = JiffiesSinceBoot("/proc/self/stat"); +diff --git a/python/mozbuild/mozbuild/configure/constants.py b/python/mozbuild/mozbuild/configure/constants.py +index a36152651d..cbb68df191 100644 +--- a/python/mozbuild/mozbuild/configure/constants.py ++++ b/python/mozbuild/mozbuild/configure/constants.py +@@ -24,6 +24,7 @@ OS = EnumString.subclass( + "SunOS", + "WINNT", + "WASI", ++ "Managarm", + ) + + Kernel = EnumString.subclass( +@@ -37,6 +38,7 @@ Kernel = EnumString.subclass( + "SunOS", + "WINNT", + "WASI", ++ "Managarm", + ) + + CPU_bitness = { +@@ -118,6 +120,7 @@ kernel_preprocessor_checks = { + "SunOS": "__sun__", + "WINNT": "_WIN32 || __CYGWIN__", + "WASI": "__wasi__", ++ "Managarm": "__managarm__", + } + + assert sorted(kernel_preprocessor_checks.keys()) == sorted(Kernel.POSSIBLE_VALUES) +-- +2.43.0 + From 9ae4de43f5994b3ba51efde60e4d4394c3e6527c Mon Sep 17 00:00:00 2001 From: Dennis Bonke Date: Mon, 29 Jan 2024 21:10:20 +0100 Subject: [PATCH 11/21] gjs: Add port --- bootstrap.d/dev-libs.yml | 70 +++++++++++++++++++ ...001-Disable-tests-if-we-ask-for-that.patch | 33 +++++++++ 2 files changed, 103 insertions(+) create mode 100644 patches/gjs/0001-Disable-tests-if-we-ask-for-that.patch diff --git a/bootstrap.d/dev-libs.yml b/bootstrap.d/dev-libs.yml index 0707ccfc8..38a7d4f3f 100644 --- a/bootstrap.d/dev-libs.yml +++ b/bootstrap.d/dev-libs.yml @@ -334,6 +334,76 @@ packages: environ: DESTDIR: '@THIS_COLLECT_DIR@' + - name: gjs + architecture: '@OPTION:arch@' + metadata: + summary: Javascript bindings for GNOME + description: This package provides a set of Javascript bindings for GNOME. + spdx: 'MIT' + website: 'https://wiki.gnome.org/Projects/Gjs' + maintainer: "Dennis Bonke " + categories: ['dev-libs'] + source: + subdir: 'ports' + git: 'https://gitlab.gnome.org/GNOME/gjs.git' + tag: '1.78.3' + version: '1.78.3' + tools_required: + - system-gcc + - wayland-scanner + - virtual: pkgconfig-for-target + triple: "@OPTION:arch-triple@" + - host-mlibc + - host-gobject-introspection + - host-python + - host-glib + pkgs_required: + - mlibc + - cairo + - dbus + - spidermonkey + - gtk+-3 + - gtk4 + - gobject-introspection + - readline + configure: + - args: + - 'meson' + - 'setup' + - '--cross-file' + - '@SOURCE_ROOT@/scripts/meson-@OPTION:arch-triple@.cross-file' + - '--prefix=/usr' + - '--buildtype=release' + - '--wrap-mode=nodownload' + - '-Dinstalled_tests=false' + - '-Dskip_dbus_tests=true' + - '-Dskip_gtk_tests=true' + - '@THIS_SOURCE_DIR@' + environ: + # Same as below + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + build: + - args: ['ninja'] + environ: + # Make python load host libraries instead of the ones in the rootfs + LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-glib/lib:@BUILD_ROOT@/tools/host-glib/lib/x86_64-linux-gnu:@BUILD_ROOT@/tools/host-gobject-introspection/lib/x86_64-linux-gnu' + # Library path for our run-wrapper that allows it to load managarm libraries + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + # Similar to above, but using a nasty (but working) hack lets us use a Linux mlibc build to execute an + # executable that was cross-compiled for managarm + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + # This is a custom environment variable which tells g-ir-scanner what to use instead of ldd + # We point it at our native ldd-wrapper that's installed as part of host-gobject-introspection + GI_LDD_WRAPPER: ldd-wrapper + # This tells g-ir-scanner what program should be used for "cross-launching" the executables it builds + GI_CROSS_LAUNCHER: run-wrapper + # Path to the introspection data installed by other packages + GI_GIR_PATH: '@SYSROOT_DIR@/usr/share/gir-1.0' + - args: ['ninja', 'install'] + environ: + DESTDIR: '@THIS_COLLECT_DIR@' + - name: glib labels: [aarch64] architecture: '@OPTION:arch@' diff --git a/patches/gjs/0001-Disable-tests-if-we-ask-for-that.patch b/patches/gjs/0001-Disable-tests-if-we-ask-for-that.patch new file mode 100644 index 000000000..2f42228d8 --- /dev/null +++ b/patches/gjs/0001-Disable-tests-if-we-ask-for-that.patch @@ -0,0 +1,33 @@ +From 81bfc3765c6ef014c8391697a2bb1ceb75641bc9 Mon Sep 17 00:00:00 2001 +From: Dennis Bonke +Date: Mon, 29 Jan 2024 21:09:00 +0100 +Subject: [PATCH] Disable tests if we ask for that + +Signed-off-by: Dennis Bonke +--- + meson.build | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/meson.build b/meson.build +index e6b298f..e3e4d36 100644 +--- a/meson.build ++++ b/meson.build +@@ -679,11 +679,13 @@ endif + + ### Tests and test setups ###################################################### + +-subdir('installed-tests') ++if get_option('installed_tests') ++ subdir('installed-tests') ++endif + + # Note: The test program in test/ needs to be ported + # to Windows before we can build it on Windows. +-if host_machine.system() != 'windows' ++if host_machine.system() != 'windows' and host_machine.system() != 'managarm' + subdir('test') + endif + +-- +2.43.0 + From 6548c42b9c9b601291b96c4920cea54135cdc39f Mon Sep 17 00:00:00 2001 From: Dennis Bonke Date: Mon, 29 Jan 2024 21:32:18 +0100 Subject: [PATCH 12/21] gnome-autoar: Add port --- bootstrap.d/app-arch.yml | 73 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/bootstrap.d/app-arch.yml b/bootstrap.d/app-arch.yml index 8e1fc111e..f2e9bcb14 100644 --- a/bootstrap.d/app-arch.yml +++ b/bootstrap.d/app-arch.yml @@ -107,6 +107,79 @@ packages: environ: DESTDIR: '@THIS_COLLECT_DIR@' + - name: gnome-autoar + architecture: '@OPTION:arch@' + metadata: + summary: Automatic archives creating and extracting library + description: This package provides a framework for automatic archive extraction, compression, and management. + spdx: 'LGPL-2.1-or-later' + website: 'https://gitlab.gnome.org/GNOME/gnome-autoar' + maintainer: "Dennis Bonke " + categories: ['app-arch'] + source: + subdir: 'ports' + git: 'https://gitlab.gnome.org/GNOME/gnome-autoar.git' + tag: '0.4.4' + version: '0.4.4' + tools_required: + - system-gcc + - wayland-scanner + - virtual: pkgconfig-for-target + triple: "@OPTION:arch-triple@" + - host-mlibc + - host-gobject-introspection + - host-python + - host-glib + - host-vala + pkgs_required: + - mlibc + - libarchive + - gtk+-3 + - gobject-introspection + configure: + - args: + - 'meson' + - 'setup' + - '--cross-file' + - '@SOURCE_ROOT@/scripts/meson-@OPTION:arch-triple@.cross-file' + - '--prefix=/usr' + - '--buildtype=release' + - '--wrap-mode=nodownload' + - '-Dvapi=true' + - '@THIS_SOURCE_DIR@' + environ: + # Same as below + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + VALADIR: '@SYSROOT_DIR@/usr/share/vala/vapi' + # Wrapper to add our valadir + VAPIGEN: 'cross-vapigen' + build: + - args: ['ninja'] + environ: + # Make python load host libraries instead of the ones in the rootfs + LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-glib/lib:@BUILD_ROOT@/tools/host-glib/lib/x86_64-linux-gnu:@BUILD_ROOT@/tools/host-gobject-introspection/lib/x86_64-linux-gnu' + # Library path for our run-wrapper that allows it to load managarm libraries + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + # Similar to above, but using a nasty (but working) hack lets us use a Linux mlibc build to execute an + # executable that was cross-compiled for managarm + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + # This is a custom environment variable which tells g-ir-scanner what to use instead of ldd + # We point it at our native ldd-wrapper that's installed as part of host-gobject-introspection + GI_LDD_WRAPPER: ldd-wrapper + # This tells g-ir-scanner what program should be used for "cross-launching" the executables it builds + GI_CROSS_LAUNCHER: run-wrapper + # Path to the introspection data installed by other packages + GI_GIR_PATH: '@SYSROOT_DIR@/usr/share/gir-1.0' + VALADIR: '@SYSROOT_DIR@/usr/share/vala/vapi' + # Wrapper to add our valadir + VALAC: 'cross-valac' + # Wrapper to add our valadir + VAPIGEN: 'cross-vapigen' + - args: ['ninja', 'install'] + environ: + DESTDIR: '@THIS_COLLECT_DIR@' + - name: gzip labels: [aarch64] architecture: '@OPTION:arch@' From 00dec9a706efc111b13396c292ffcda18582abd7 Mon Sep 17 00:00:00 2001 From: Dennis Bonke Date: Mon, 29 Jan 2024 21:46:35 +0100 Subject: [PATCH 13/21] gnome-desktop: Add port --- bootstrap.d/gnome-base.yml | 73 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/bootstrap.d/gnome-base.yml b/bootstrap.d/gnome-base.yml index 849fc0ccc..6382e6e6a 100644 --- a/bootstrap.d/gnome-base.yml +++ b/bootstrap.d/gnome-base.yml @@ -1,4 +1,77 @@ packages: + - name: gnome-desktop + architecture: '@OPTION:arch@' + metadata: + summary: Library with common API for various GNOME modules + description: This package contains a library that provides an API shared by several applications on the GNOME Desktop. + spdx: 'LGPL-2.0-or-later GPL-2.0-or-later' + website: 'https://gitlab.gnome.org/GNOME/gnome-desktop/' + maintainer: "Dennis Bonke " + categories: ['gnome-base'] + source: + subdir: 'ports' + git: 'https://gitlab.gnome.org/GNOME/gnome-desktop.git' + tag: '44.0' + version: '44.0' + tools_required: + - system-gcc + - wayland-scanner + - virtual: pkgconfig-for-target + triple: "@OPTION:arch-triple@" + - host-mlibc + - host-gobject-introspection + - host-python + pkgs_required: + - mlibc + - glib + - gtk+-3 + - gtk4 + - gsettings-desktop-schemas + - xkeyboard-config + - libxkbcommon + - iso-codes + - eudev + - cairo + - fontconfig + - gobject-introspection + configure: + - args: + - 'meson' + - 'setup' + - '--cross-file' + - '@SOURCE_ROOT@/scripts/meson-@OPTION:arch-triple@.cross-file' + - '--prefix=/usr' + - '--buildtype=release' + - '--wrap-mode=nodownload' + - '-Dintrospection=true' + - '-Dsystemd=disabled' + - '-Ddesktop_docs=true' + - '@THIS_SOURCE_DIR@' + environ: + # Same as below + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + build: + - args: ['ninja'] + environ: + # Make python load host libraries instead of the ones in the rootfs + LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-glib/lib:@BUILD_ROOT@/tools/host-glib/lib/x86_64-linux-gnu:@BUILD_ROOT@/tools/host-gobject-introspection/lib/x86_64-linux-gnu' + # Library path for our run-wrapper that allows it to load managarm libraries + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + # Similar to above, but using a nasty (but working) hack lets us use a Linux mlibc build to execute an + # executable that was cross-compiled for managarm + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + # This is a custom environment variable which tells g-ir-scanner what to use instead of ldd + # We point it at our native ldd-wrapper that's installed as part of host-gobject-introspection + GI_LDD_WRAPPER: ldd-wrapper + # This tells g-ir-scanner what program should be used for "cross-launching" the executables it builds + GI_CROSS_LAUNCHER: run-wrapper + # Path to the introspection data installed by other packages + GI_GIR_PATH: '@SYSROOT_DIR@/usr/share/gir-1.0' + - args: ['ninja', 'install'] + environ: + DESTDIR: '@THIS_COLLECT_DIR@' + - name: gsettings-desktop-schemas architecture: '@OPTION:arch@' metadata: From a1d0d0d079364f35cd43e0503face516f8f307ac Mon Sep 17 00:00:00 2001 From: Dennis Bonke Date: Mon, 29 Jan 2024 22:01:35 +0100 Subject: [PATCH 14/21] gnome-video-effects: Add port --- bootstrap.d/media-video.yml | 34 ++++++++++++++++++++++++++++++++++ bootstrap.yml | 1 + 2 files changed, 35 insertions(+) create mode 100644 bootstrap.d/media-video.yml diff --git a/bootstrap.d/media-video.yml b/bootstrap.d/media-video.yml new file mode 100644 index 000000000..4d7e93b6b --- /dev/null +++ b/bootstrap.d/media-video.yml @@ -0,0 +1,34 @@ +packages: + - name: gnome-video-effects + architecture: '@OPTION:arch@' + metadata: + summary: Effects for Cheese, the webcam video and picture application + description: This package contains a collection of GStreamer effects. + spdx: 'GPL-2.0-only' + website: 'https://wiki.gnome.org/Projects/GnomeVideoEffects' + maintainer: "Dennis Bonke " + categories: ['media-video'] + source: + subdir: ports + git: 'https://gitlab.gnome.org/GNOME/gnome-video-effects.git' + tag: '0.6.0' + version: '0.6.0' + tools_required: + - system-gcc + pkgs_required: + - mlibc + configure: + - args: + - 'meson' + - 'setup' + - '--cross-file' + - '@SOURCE_ROOT@/scripts/meson-@OPTION:arch-triple@.cross-file' + - '--prefix=/usr' + - '--libdir=lib' + - '--buildtype=release' + - '@THIS_SOURCE_DIR@' + build: + - args: ['ninja'] + - args: ['ninja', 'install'] + environ: + DESTDIR: '@THIS_COLLECT_DIR@' diff --git a/bootstrap.yml b/bootstrap.yml index 0666d4d1b..4af0d4273 100644 --- a/bootstrap.yml +++ b/bootstrap.yml @@ -26,6 +26,7 @@ imports: - file: bootstrap.d/media-fonts.yml - file: bootstrap.d/media-gfx.yml - file: bootstrap.d/media-libs.yml + - file: bootstrap.d/media-video.yml - file: bootstrap.d/meta-pkgs.yml - file: bootstrap.d/net-dns.yml - file: bootstrap.d/net-irc.yml From 63cfea53ec2222bc641319a155f903fe6f378e16 Mon Sep 17 00:00:00 2001 From: Dennis Bonke Date: Mon, 29 Jan 2024 23:19:50 +0100 Subject: [PATCH 15/21] gnome-online-accounts: Add port --- bootstrap.d/net-libs.yml | 91 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/bootstrap.d/net-libs.yml b/bootstrap.d/net-libs.yml index e7f68a56f..aa23dd1f2 100644 --- a/bootstrap.d/net-libs.yml +++ b/bootstrap.d/net-libs.yml @@ -47,6 +47,97 @@ packages: post_install: - args: ['gio-querymodules', '/usr/lib/gio/modules'] + - name: gnome-online-accounts + architecture: '@OPTION:arch@' + metadata: + summary: GNOME framework for accessing online accounts + description: This package contains an implementation of the draft Desktop Menu Specification from freedesktop.org. It also contains the GNOME menu layout configuration files and .directory files. + spdx: 'LGPL-2.0-or-later' + website: 'https://wiki.gnome.org/Projects/GnomeOnlineAccounts' + maintainer: "Dennis Bonke " + categories: ['net-libs'] + source: + subdir: ports + git: 'https://gitlab.gnome.org/GNOME/gnome-online-accounts.git' + tag: '3.49.0' + version: '3.49.0' + tools_required: + - system-gcc + - wayland-scanner + - virtual: pkgconfig-for-target + triple: "@OPTION:arch-triple@" + - host-vala + - host-mlibc + - host-gobject-introspection + - host-python + pkgs_required: + - mlibc + - glib + - gobject-introspection + - dbus + - gtk+-3 + - json-glib + - libsecret + - libsoup3 + - libxml + - rest + - libxslt + configure: + - args: + - 'meson' + - 'setup' + - '--cross-file' + - '@SOURCE_ROOT@/scripts/meson-@OPTION:arch-triple@.cross-file' + - '--prefix=/usr' + - '--buildtype=release' + - '--wrap-mode=nodownload' + - '-Dkerberos=false' + - '-Dgoogle_client_secret=5ntt6GbbkjnTVXx-MSxbmx5e' + - '-Dgoogle_client_id=595013732528-llk8trb03f0ldpqq6nprjp1s79596646.apps.googleusercontent.com' + - '-Dgoabackend=true' + - '-Dexchange=true' + - '-Dfedora=false' + - '-Dgoogle=true' + - '-Dimap_smtp=true' + - '-Downcloud=true' + - '-Dwindows_live=true' + - '-Dman=true' + - '-Dvapi=true' + - '-Dgtk_doc=false' + - '@THIS_SOURCE_DIR@' + environ: + # Same as below + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + VALADIR: '@SYSROOT_DIR@/usr/share/vala/vapi' + # Wrapper to add our valadir + VAPIGEN: 'cross-vapigen' + build: + - args: ['ninja'] + environ: + # Make python load host libraries instead of the ones in the rootfs + LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-glib/lib:@BUILD_ROOT@/tools/host-glib/lib/x86_64-linux-gnu:@BUILD_ROOT@/tools/host-gobject-introspection/lib/x86_64-linux-gnu' + # Library path for our run-wrapper that allows it to load managarm libraries + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + # Similar to above, but using a nasty (but working) hack lets us use a Linux mlibc build to execute an + # executable that was cross-compiled for managarm + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + # This is a custom environment variable which tells g-ir-scanner what to use instead of ldd + # We point it at our native ldd-wrapper that's installed as part of host-gobject-introspection + GI_LDD_WRAPPER: ldd-wrapper + # This tells g-ir-scanner what program should be used for "cross-launching" the executables it builds + GI_CROSS_LAUNCHER: run-wrapper + # Path to the introspection data installed by other packages + GI_GIR_PATH: '@SYSROOT_DIR@/usr/share/gir-1.0' + VALADIR: '@SYSROOT_DIR@/usr/share/vala/vapi' + # Wrapper to add our valadir + VALAC: 'cross-valac' + # Wrapper to add our valadir + VAPIGEN: 'cross-vapigen' + - args: ['ninja', 'install'] + environ: + DESTDIR: '@THIS_COLLECT_DIR@' + - name: gnutls architecture: '@OPTION:arch@' metadata: From ab977ace4f840a3eb4d8e5f6130ff264a389b1b6 Mon Sep 17 00:00:00 2001 From: Dennis Bonke Date: Mon, 29 Jan 2024 23:44:55 +0100 Subject: [PATCH 16/21] grilo: Add port --- bootstrap.d/media-libs.yml | 80 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/bootstrap.d/media-libs.yml b/bootstrap.d/media-libs.yml index 43417f9e5..4b7d72ae9 100644 --- a/bootstrap.d/media-libs.yml +++ b/bootstrap.d/media-libs.yml @@ -359,6 +359,86 @@ packages: DESTDIR: '@THIS_COLLECT_DIR@' quiet: true + - name: grilo + architecture: '@OPTION:arch@' + metadata: + summary: A framework for easy media discovery and browsing + description: This package contains a framework focused on making media discovery and browsing easy for applications and application developers. + spdx: 'LGPL-2.1-or-later' + website: 'https://wiki.gnome.org/Projects/Grilo' + maintainer: "Dennis Bonke " + categories: ['media-libs'] + source: + subdir: ports + git: 'https://gitlab.gnome.org/GNOME/grilo.git' + tag: 'grilo-0.3.16' + version: '0.3.16' + tools_required: + - system-gcc + - wayland-scanner + - virtual: pkgconfig-for-target + triple: "@OPTION:arch-triple@" + - host-vala + - host-mlibc + - host-gobject-introspection + - host-python + pkgs_required: + - mlibc + - glib + - gobject-introspection + - libxml + - libsoup3 + - totem-pl-parser + configure: + - args: + - 'meson' + - 'setup' + - '--cross-file' + - '@SOURCE_ROOT@/scripts/meson-@OPTION:arch-triple@.cross-file' + - '--prefix=/usr' + - '--buildtype=release' + - '--wrap-mode=nodownload' + - '-Denable-gtk-doc=false' + - '-Denable-vala=true' + - '-Dsoup3=true' + - '-Denable-grl-net=true' + - '-Denable-grl-pls=true' + - '-Denable-introspection=true' + - '-Denable-test-ui=false' + - '@THIS_SOURCE_DIR@' + environ: + # Same as below + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + VALADIR: '@SYSROOT_DIR@/usr/share/vala/vapi' + # Wrapper to add our valadir + VAPIGEN: 'cross-vapigen' + build: + - args: ['ninja'] + environ: + # Make python load host libraries instead of the ones in the rootfs + LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-glib/lib:@BUILD_ROOT@/tools/host-glib/lib/x86_64-linux-gnu:@BUILD_ROOT@/tools/host-gobject-introspection/lib/x86_64-linux-gnu' + # Library path for our run-wrapper that allows it to load managarm libraries + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + # Similar to above, but using a nasty (but working) hack lets us use a Linux mlibc build to execute an + # executable that was cross-compiled for managarm + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + # This is a custom environment variable which tells g-ir-scanner what to use instead of ldd + # We point it at our native ldd-wrapper that's installed as part of host-gobject-introspection + GI_LDD_WRAPPER: ldd-wrapper + # This tells g-ir-scanner what program should be used for "cross-launching" the executables it builds + GI_CROSS_LAUNCHER: run-wrapper + # Path to the introspection data installed by other packages + GI_GIR_PATH: '@SYSROOT_DIR@/usr/share/gir-1.0' + VALADIR: '@SYSROOT_DIR@/usr/share/vala/vapi' + # Wrapper to add our valadir + VALAC: 'cross-valac' + # Wrapper to add our valadir + VAPIGEN: 'cross-vapigen' + - args: ['ninja', 'install'] + environ: + DESTDIR: '@THIS_COLLECT_DIR@' + - name: gst-plugins-bad architecture: '@OPTION:arch@' metadata: From aa4a30217f0b493342f030ddd9bd93c628595915 Mon Sep 17 00:00:00 2001 From: Dennis Bonke Date: Tue, 30 Jan 2024 00:17:41 +0100 Subject: [PATCH 17/21] libsoup: Enable introspection --- bootstrap.d/net-libs.yml | 44 +++++++++++++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 5 deletions(-) diff --git a/bootstrap.d/net-libs.yml b/bootstrap.d/net-libs.yml index aa23dd1f2..aff37d04f 100644 --- a/bootstrap.d/net-libs.yml +++ b/bootstrap.d/net-libs.yml @@ -307,6 +307,10 @@ packages: - host-pkg-config - virtual: pkgconfig-for-target triple: "@OPTION:arch-triple@" + - host-mlibc + - host-gobject-introspection + - host-python + - host-vala pkgs_required: - mlibc - glib @@ -315,28 +319,58 @@ packages: - libxml - sqlite - libpsl - revision: 5 + - brotli + - gobject-introspection + revision: 6 configure: - args: - 'meson' + - 'setup' - '--cross-file' - '@SOURCE_ROOT@/scripts/meson-@OPTION:arch-triple@.cross-file' - '--prefix=/usr' - '--buildtype=debugoptimized' - - '-Dintrospection=disabled' + - '-Dintrospection=enabled' - '-Dinstalled_tests=false' - '-Dsysprof=disabled' - '-Dgtk_doc=false' - - '-Dvapi=disabled' - - '-Dgnome=false' + - '-Dvapi=enabled' + - '-Dgnome=true' - '-Dtls_check=false' - - '-Dbrotli=disabled' + - '-Dbrotli=enabled' - '-Dntlm=disabled' - '-Dgssapi=disabled' - '-Dtests=false' - '@THIS_SOURCE_DIR@' + environ: + # Same as below + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + VALADIR: '@SYSROOT_DIR@/usr/share/vala/vapi' + # Wrapper to add our valadir + VAPIGEN: 'cross-vapigen' build: - args: ['ninja'] + environ: + # Make python load host libraries instead of the ones in the rootfs + LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-glib/lib:@BUILD_ROOT@/tools/host-glib/lib/x86_64-linux-gnu:@BUILD_ROOT@/tools/host-gobject-introspection/lib/x86_64-linux-gnu' + # Library path for our run-wrapper that allows it to load managarm libraries + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + # Similar to above, but using a nasty (but working) hack lets us use a Linux mlibc build to execute an + # executable that was cross-compiled for managarm + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + # This is a custom environment variable which tells g-ir-scanner what to use instead of ldd + # We point it at our native ldd-wrapper that's installed as part of host-gobject-introspection + GI_LDD_WRAPPER: ldd-wrapper + # This tells g-ir-scanner what program should be used for "cross-launching" the executables it builds + GI_CROSS_LAUNCHER: run-wrapper + # Path to the introspection data installed by other packages + GI_GIR_PATH: '@SYSROOT_DIR@/usr/share/gir-1.0' + VALADIR: '@SYSROOT_DIR@/usr/share/vala/vapi' + # Wrapper to add our valadir + VALAC: 'cross-valac' + # Wrapper to add our valadir + VAPIGEN: 'cross-vapigen' - args: ['ninja', 'install'] environ: DESTDIR: '@THIS_COLLECT_DIR@' From 49532185ef9ff21acdf283e265131429e64810b6 Mon Sep 17 00:00:00 2001 From: Dennis Bonke Date: Tue, 30 Jan 2024 00:27:19 +0100 Subject: [PATCH 18/21] libgdata: Add port --- bootstrap.d/dev-libs.yml | 86 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/bootstrap.d/dev-libs.yml b/bootstrap.d/dev-libs.yml index 38a7d4f3f..6863e2566 100644 --- a/bootstrap.d/dev-libs.yml +++ b/bootstrap.d/dev-libs.yml @@ -856,6 +856,92 @@ packages: DESTDIR: '@THIS_COLLECT_DIR@' quiet: true + - name: libgdata + architecture: '@OPTION:arch@' + metadata: + summary: GLib-based library for accessing online service APIs using the GData protocol + description: This package contains a GLib-based library for accessing online service APIs using the GData protocol, most notably, Google's services. It provides APIs to access the common Google services and has full asynchronous support. + spdx: 'LGPL-2.1-or-later' + website: 'https://wiki.gnome.org/Projects/libgdata' + maintainer: "Dennis Bonke " + categories: ['dev-libs'] + source: + subdir: 'ports' + git: 'https://gitlab.gnome.org/GNOME/libgdata.git' + tag: '0.18.1' + version: '0.18.1' + tools_required: + - system-gcc + - wayland-scanner + - virtual: pkgconfig-for-target + triple: "@OPTION:arch-triple@" + - host-vala + - host-mlibc + - host-gobject-introspection + - host-python + pkgs_required: + - mlibc + - glib + - json-glib + - libxml + - libsoup + - gcr3 + - gnome-online-accounts + - gobject-introspection + configure: + - args: + - 'meson' + - 'setup' + - '--cross-file' + - '@SOURCE_ROOT@/scripts/meson-@OPTION:arch-triple@.cross-file' + - '--prefix=/usr' + - '--buildtype=release' + - '--wrap-mode=nodownload' + - '-Dgtk_doc=false' + - '-Dalways_build_tests=false' + - '-Dgtk=disabled' + - '-Dgnome=enabled' + - '-Dgoa=enabled' + - '-Doauth1=disabled' + - '-Dinstalled_tests=false' + - '-Dman=true' + - '-Dvapi=true' + - '@THIS_SOURCE_DIR@' + environ: + # Same as below + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + VALADIR: '@SYSROOT_DIR@/usr/share/vala/vapi' + # Wrapper to add our valadir + VAPIGEN: 'cross-vapigen' + # Wrapper to add our valadir + VALAC: 'cross-valac' + build: + - args: ['ninja'] + environ: + # Make python load host libraries instead of the ones in the rootfs + LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-glib/lib:@BUILD_ROOT@/tools/host-glib/lib/x86_64-linux-gnu:@BUILD_ROOT@/tools/host-gobject-introspection/lib/x86_64-linux-gnu' + # Library path for our run-wrapper that allows it to load managarm libraries + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + # Similar to above, but using a nasty (but working) hack lets us use a Linux mlibc build to execute an + # executable that was cross-compiled for managarm + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + # This is a custom environment variable which tells g-ir-scanner what to use instead of ldd + # We point it at our native ldd-wrapper that's installed as part of host-gobject-introspection + GI_LDD_WRAPPER: ldd-wrapper + # This tells g-ir-scanner what program should be used for "cross-launching" the executables it builds + GI_CROSS_LAUNCHER: run-wrapper + # Path to the introspection data installed by other packages + GI_GIR_PATH: '@SYSROOT_DIR@/usr/share/gir-1.0' + VALADIR: '@SYSROOT_DIR@/usr/share/vala/vapi' + # Wrapper to add our valadir + VALAC: 'cross-valac' + # Wrapper to add our valadir + VAPIGEN: 'cross-vapigen' + - args: ['ninja', 'install'] + environ: + DESTDIR: '@THIS_COLLECT_DIR@' + - name: libgee architecture: '@OPTION:arch@' metadata: From 9c140197335d900079c446bb65b79ef2dbef4bfd Mon Sep 17 00:00:00 2001 From: Dennis Bonke Date: Fri, 2 Feb 2024 22:18:47 +0100 Subject: [PATCH 19/21] exiv2: Add port --- bootstrap.d/media-libs.yml | 42 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/bootstrap.d/media-libs.yml b/bootstrap.d/media-libs.yml index 4b7d72ae9..e54853176 100644 --- a/bootstrap.d/media-libs.yml +++ b/bootstrap.d/media-libs.yml @@ -36,6 +36,48 @@ packages: environ: DESTDIR: '@THIS_COLLECT_DIR@' + - name: exiv2 + architecture: '@OPTION:arch@' + metadata: + summary: EXIF, IPTC and XMP metadata C++ library and command line utility + description: This package provides a C++ library and a command line utility for managing image and video metadata. + spdx: 'GPL-2.0-only' + website: 'https://exiv2.org/' + maintainer: "Dennis Bonke " + categories: ['media-libs'] + source: + subdir: ports + git: 'https://github.com/Exiv2/exiv2.git' + tag: 'v0.28.1' + version: '0.28.1' + tools_required: + - host-cmake + - system-gcc + pkgs_required: + - mlibc + - curl + - brotli + configure: + - args: + - 'cmake' + - '-DCMAKE_TOOLCHAIN_FILE=@SOURCE_ROOT@/scripts/CMakeToolchain-@OPTION:arch-triple@.txt' + - '-DCMAKE_INSTALL_PREFIX=/usr' + - '-DBUILD_SHARED_LIBS=ON' + - '-DEXIV2_ENABLE_VIDEO=yes' + - '-DEXIV2_ENABLE_WEBREADY=yes' + - '-DEXIV2_ENABLE_CURL=yes' + - '-DEXIV2_BUILD_SAMPLES=no' + - '-DEXIV2_ENABLE_INIH=no' + - '@THIS_SOURCE_DIR@' + environ: + CC: '@OPTION:arch-triple@-gcc' + CXX: '@OPTION:arch-triple@-g++' + build: + - args: ['make', '-j@PARALLELISM@'] + - args: ['make', 'install'] + environ: + DESTDIR: '@THIS_COLLECT_DIR@' + - name: flac architecture: '@OPTION:arch@' metadata: From 82a43d9374bd6dc9103b9ffd29f0ff722414b664 Mon Sep 17 00:00:00 2001 From: Dennis Bonke Date: Fri, 2 Feb 2024 23:19:05 +0100 Subject: [PATCH 20/21] gexiv2: Add port --- bootstrap.d/media-libs.yml | 77 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/bootstrap.d/media-libs.yml b/bootstrap.d/media-libs.yml index e54853176..d3547a335 100644 --- a/bootstrap.d/media-libs.yml +++ b/bootstrap.d/media-libs.yml @@ -241,6 +241,83 @@ packages: environ: DESTDIR: '@THIS_COLLECT_DIR@' + - name: gexiv2 + architecture: '@OPTION:arch@' + metadata: + summary: GObject-based wrapper around the Exiv2 library + description: This package provides a GObject-based wrapper around the Exiv2 library. + spdx: 'LGPL-2.0-or-later' + website: 'https://wiki.gnome.org/Projects/gexiv2' + maintainer: "Dennis Bonke " + categories: ['media-libs'] + source: + subdir: 'ports' + git: 'https://gitlab.gnome.org/GNOME/gexiv2.git' + tag: 'gexiv2-0.14.2' + version: '0.14.2' + tools_required: + - system-gcc + - wayland-scanner + - virtual: pkgconfig-for-target + triple: "@OPTION:arch-triple@" + - host-vala + - host-mlibc + - host-gobject-introspection + - host-python + pkgs_required: + - mlibc + - glib + - exiv2 + - gobject-introspection + configure: + - args: + - 'meson' + - 'setup' + - '--cross-file' + - '@SOURCE_ROOT@/scripts/meson-@OPTION:arch-triple@.cross-file' + - '--prefix=/usr' + - '--buildtype=release' + - '--wrap-mode=nodownload' + - '-Dintrospection=true' + - '-Dpython3=false' + - '-Dtools=false' + - '-Dvapi=true' + - '@THIS_SOURCE_DIR@' + environ: + # Same as below + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + VALADIR: '@SYSROOT_DIR@/usr/share/vala/vapi' + # Wrapper to add our valadir + VAPIGEN: 'cross-vapigen' + # Wrapper to add our valadir + VALAC: 'cross-valac' + build: + - args: ['ninja'] + environ: + # Make python load host libraries instead of the ones in the rootfs + LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-glib/lib:@BUILD_ROOT@/tools/host-glib/lib/x86_64-linux-gnu:@BUILD_ROOT@/tools/host-gobject-introspection/lib/x86_64-linux-gnu' + # Library path for our run-wrapper that allows it to load managarm libraries + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + # Similar to above, but using a nasty (but working) hack lets us use a Linux mlibc build to execute an + # executable that was cross-compiled for managarm + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + # This is a custom environment variable which tells g-ir-scanner what to use instead of ldd + # We point it at our native ldd-wrapper that's installed as part of host-gobject-introspection + GI_LDD_WRAPPER: ldd-wrapper + # This tells g-ir-scanner what program should be used for "cross-launching" the executables it builds + GI_CROSS_LAUNCHER: run-wrapper + # Path to the introspection data installed by other packages + GI_GIR_PATH: '@SYSROOT_DIR@/usr/share/gir-1.0' + VALADIR: '@SYSROOT_DIR@/usr/share/vala/vapi' + # Wrapper to add our valadir + VALAC: 'cross-valac' + # Wrapper to add our valadir + VAPIGEN: 'cross-vapigen' + - args: ['ninja', 'install'] + environ: + DESTDIR: '@THIS_COLLECT_DIR@' + - name: giflib architecture: '@OPTION:arch@' metadata: From b229a75f8ed6cb3a4ca0efc7b0a989ad63013d08 Mon Sep 17 00:00:00 2001 From: Dennis Bonke Date: Fri, 2 Feb 2024 23:29:05 +0100 Subject: [PATCH 21/21] libportal: Add port --- bootstrap.d/dev-libs.yml | 78 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/bootstrap.d/dev-libs.yml b/bootstrap.d/dev-libs.yml index 6863e2566..99e72c1d1 100644 --- a/bootstrap.d/dev-libs.yml +++ b/bootstrap.d/dev-libs.yml @@ -1275,6 +1275,84 @@ packages: environ: DESTDIR: '@THIS_COLLECT_DIR@' + - name: libportal + architecture: '@OPTION:arch@' + metadata: + summary: Flatpak portal library + description: This package provides a library that contains GIO-style async APIs for most Flatpak portals. + spdx: 'LGPL-3.0-only' + website: 'https://github.com/flatpak/libportal' + maintainer: "Dennis Bonke " + categories: ['dev-libs'] + source: + subdir: 'ports' + git: 'https://github.com/flatpak/libportal.git' + tag: '0.7.1' + version: '0.7.1' + tools_required: + - system-gcc + - wayland-scanner + - virtual: pkgconfig-for-target + triple: "@OPTION:arch-triple@" + - host-vala + - host-mlibc + - host-gobject-introspection + - host-python + pkgs_required: + - mlibc + - glib + - gtk+-3 + - gtk4 + - gobject-introspection + configure: + - args: + - 'meson' + - 'setup' + - '--cross-file' + - '@SOURCE_ROOT@/scripts/meson-@OPTION:arch-triple@.cross-file' + - '--prefix=/usr' + - '--buildtype=release' + - '--wrap-mode=nodownload' + - '-Dintrospection=true' + - '-Dvapi=true' + - '-Ddocs=false' + - '-Dportal-tests=false' + - '@THIS_SOURCE_DIR@' + environ: + # Same as below + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + VALADIR: '@SYSROOT_DIR@/usr/share/vala/vapi' + # Wrapper to add our valadir + VAPIGEN: 'cross-vapigen' + # Wrapper to add our valadir + VALAC: 'cross-valac' + build: + - args: ['ninja'] + environ: + # Make python load host libraries instead of the ones in the rootfs + LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-glib/lib:@BUILD_ROOT@/tools/host-glib/lib/x86_64-linux-gnu:@BUILD_ROOT@/tools/host-gobject-introspection/lib/x86_64-linux-gnu' + # Library path for our run-wrapper that allows it to load managarm libraries + RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' + # Similar to above, but using a nasty (but working) hack lets us use a Linux mlibc build to execute an + # executable that was cross-compiled for managarm + RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' + # This is a custom environment variable which tells g-ir-scanner what to use instead of ldd + # We point it at our native ldd-wrapper that's installed as part of host-gobject-introspection + GI_LDD_WRAPPER: ldd-wrapper + # This tells g-ir-scanner what program should be used for "cross-launching" the executables it builds + GI_CROSS_LAUNCHER: run-wrapper + # Path to the introspection data installed by other packages + GI_GIR_PATH: '@SYSROOT_DIR@/usr/share/gir-1.0' + VALADIR: '@SYSROOT_DIR@/usr/share/vala/vapi' + # Wrapper to add our valadir + VALAC: 'cross-valac' + # Wrapper to add our valadir + VAPIGEN: 'cross-vapigen' + - args: ['ninja', 'install'] + environ: + DESTDIR: '@THIS_COLLECT_DIR@' + - name: libtasn labels: [aarch64] architecture: '@OPTION:arch@'