diff --git a/bootstrap.d/dev-libs.yml b/bootstrap.d/dev-libs.yml index 3f517b2bf..8d993d4f8 100644 --- a/bootstrap.d/dev-libs.yml +++ b/bootstrap.d/dev-libs.yml @@ -884,6 +884,72 @@ packages: DESTDIR: '@THIS_COLLECT_DIR@' quiet: true + - name: libgudev + architecture: '@OPTION:arch@' + metadata: + summary: GObject bindings for libudev + description: This package contains GObject bindings for libudev. + spdx: 'LGPL-2.1-or-later' + website: 'https://wiki.gnome.org/Projects/libgudev' + maintainer: "Dennis Bonke " + categories: ['dev-libs'] + source: + subdir: 'ports' + git: 'https://gitlab.gnome.org/GNOME/libgudev.git' + tag: '237' # DON'T BUMP, DOES NOT WORK WITH EUDEV + version: '237' + tools_required: + - system-gcc + - virtual: pkgconfig-for-target + triple: "@OPTION:arch-triple@" + - host-mlibc + - host-gobject-introspection + - host-python + - host-glib + pkgs_required: + - mlibc + - glib + - eudev + - gobject-introspection + revision: 1 + configure: + - args: + - 'meson' + - 'setup' + - '--cross-file' + - '@SOURCE_ROOT@/scripts/meson-@OPTION:arch-triple@.cross-file' + - '--prefix=/usr' + - '--buildtype=release' + - '--wrap-mode=nodownload' + - '-Dintrospection=enabled' + - '-Dvapi=disabled' + - '-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' + 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: libiconv labels: [aarch64] architecture: '@OPTION:arch@' diff --git a/bootstrap.d/net-libs.yml b/bootstrap.d/net-libs.yml index 41d6828cf..8af00e45e 100644 --- a/bootstrap.d/net-libs.yml +++ b/bootstrap.d/net-libs.yml @@ -126,10 +126,15 @@ packages: - 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: 4 + - gobject-introspection + revision: 5 configure: - args: - 'meson' @@ -138,12 +143,31 @@ packages: - '@SOURCE_ROOT@/scripts/meson-@OPTION:arch-triple@.cross-file' - '--prefix=/usr' - '--buildtype=debugoptimized' - - '-Dintrospection=false' + - '-Dintrospection=true' - '-Dbash_completion=false' - '-Dman=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@' @@ -197,6 +221,76 @@ packages: environ: DESTDIR: '@THIS_COLLECT_DIR@' + - name: libqmi + architecture: '@OPTION:arch@' + metadata: + summary: Qualcomm MSM (Mobile Station Modem) Interface (QMI) modem protocol library + description: The libqmi package contains a GLib-based library for talking to WWAN modems and devices which speak the Qualcomm MSM Interface (QMI) protocol. + spdx: 'LGPL-2.0-only' + website: 'https://www.freedesktop.org/wiki/Software/libqmi/' + maintainer: "Dennis Bonke " + categories: ['net-libs'] + source: + subdir: 'ports' + git: 'https://gitlab.freedesktop.org/mobile-broadband/libqmi.git' + tag: '1.34.0' + version: '1.34.0' + tools_required: + - system-gcc + - host-pkg-config + - virtual: pkgconfig-for-target + triple: "@OPTION:arch-triple@" + - host-mlibc + - host-gobject-introspection + - host-python + - host-glib + pkgs_required: + - mlibc + - glib + - libgudev + - libmbim + - gobject-introspection + revision: 1 + configure: + - args: + - 'meson' + - 'setup' + - '--cross-file' + - '@SOURCE_ROOT@/scripts/meson-@OPTION:arch-triple@.cross-file' + - '--prefix=/usr' + - '--buildtype=debugoptimized' + - '-Dintrospection=true' + - '-Dbash_completion=false' + - '-Drmnet=true' + - '-Dudev=true' + - '-Dqrtr=false' + - '-Dman=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@' + - name: libsoup architecture: '@OPTION:arch@' metadata: diff --git a/bootstrap.d/net-misc.yml b/bootstrap.d/net-misc.yml index 0a7161528..5665f0e0e 100644 --- a/bootstrap.d/net-misc.yml +++ b/bootstrap.d/net-misc.yml @@ -105,6 +105,115 @@ packages: - args: ['cp', '@THIS_BUILD_DIR@/services', '@THIS_COLLECT_DIR@/etc/'] - args: ['cp', '@THIS_BUILD_DIR@/protocols', '@THIS_COLLECT_DIR@/etc/'] + - name: modemmanager + architecture: '@OPTION:arch@' + metadata: + summary: Modem and mobile broadband management libraries + description: ModemManager provides a unified high level API for communicating with mobile broadband modems, regardless of the protocol used to communicate with the actual device. + spdx: 'GPL-2.0-or-later' + website: 'https://www.freedesktop.org/wiki/Software/ModemManager/' + maintainer: "Dennis Bonke " + categories: ['net-misc'] + source: + subdir: 'ports' + git: 'https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git' + tag: '1.22.0' + version: '1.22.0' + tools_required: + - system-gcc + - host-pkg-config + - virtual: pkgconfig-for-target + triple: "@OPTION:arch-triple@" + - host-mlibc + - host-gobject-introspection + - host-python + - host-glib + - host-vala + pkgs_required: + - mlibc + - glib + - libgudev + - libmbim + - libqmi + - gobject-introspection + revision: 1 + configure: + - args: + - 'meson' + - 'setup' + - '--cross-file' + - '@SOURCE_ROOT@/scripts/meson-@OPTION:arch-triple@.cross-file' + - '--prefix=/usr' + - '--buildtype=debugoptimized' + - '-Dintrospection=true' + - '-Dbash_completion=false' + - '-Dudev=true' + - '-Dqrtr=false' + - '-Dman=false' + - '-Dsystemd_journal=false' + - '-Dpolkit=no' + - '-Dvapi=true' + - '-Dsystemd_suspend_resume=false' + - '-Dsystemdsystemunitdir=no' + - '@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' + # 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@' + # 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: ['touch', '@THIS_COLLECT_DIR@/etc/ModemManager/.keep'] + - args: ['touch', '@THIS_COLLECT_DIR@/etc/ModemManager/connection.d/.keep'] + - args: ['touch', '@THIS_COLLECT_DIR@/etc/ModemManager/fcc-unlock.d/.keep'] + - args: ['touch', '@THIS_COLLECT_DIR@/usr/lib/ModemManager/connection.d/.keep'] + - args: ['touch', '@THIS_COLLECT_DIR@/usr/lib/ModemManager/fcc-unlock.d/.keep'] + - name: rsync architecture: '@OPTION:arch@' source: diff --git a/patches/libqmi/0001-Add-missing-_GNU_SOURCE-define.patch b/patches/libqmi/0001-Add-missing-_GNU_SOURCE-define.patch new file mode 100644 index 000000000..4a69ae2c5 --- /dev/null +++ b/patches/libqmi/0001-Add-missing-_GNU_SOURCE-define.patch @@ -0,0 +1,25 @@ +From 2bb74b9cfea19838b1fb4c175caec5377a5a94fa Mon Sep 17 00:00:00 2001 +From: Dennis Bonke +Date: Tue, 18 Jun 2024 21:07:19 +0200 +Subject: [PATCH] Add missing _GNU_SOURCE define + +Signed-off-by: Dennis Bonke +--- + src/qmi-firmware-update/qfu-at-device.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/qmi-firmware-update/qfu-at-device.c b/src/qmi-firmware-update/qfu-at-device.c +index 89005bd..aeeeed0 100644 +--- a/src/qmi-firmware-update/qfu-at-device.c ++++ b/src/qmi-firmware-update/qfu-at-device.c +@@ -19,6 +19,7 @@ + * Copyright (C) 2016-2017 Aleksander Morgado + */ + ++#define _GNU_SOURCE + #include + #include + #include +-- +2.45.2 + diff --git a/patches/modemmanager/0001-Add-Managarm-support.patch b/patches/modemmanager/0001-Add-Managarm-support.patch new file mode 100644 index 000000000..c88a30167 --- /dev/null +++ b/patches/modemmanager/0001-Add-Managarm-support.patch @@ -0,0 +1,38 @@ +From b11885c2054f62a5db2d6122802deded561fe6e4 Mon Sep 17 00:00:00 2001 +From: Dennis Bonke +Date: Tue, 18 Jun 2024 21:27:13 +0200 +Subject: [PATCH] Add Managarm support + +Signed-off-by: Dennis Bonke +--- + libqcdm/src/com.c | 1 + + src/mm-port-serial-qcdm.c | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/libqcdm/src/com.c b/libqcdm/src/com.c +index d6283e0..3b63c82 100644 +--- a/libqcdm/src/com.c ++++ b/libqcdm/src/com.c +@@ -15,6 +15,7 @@ + * along with this program. If not, see . + */ + ++#define _GNU_SOURCE + #include + #include + #include +diff --git a/src/mm-port-serial-qcdm.c b/src/mm-port-serial-qcdm.c +index 08f2430..91262bf 100644 +--- a/src/mm-port-serial-qcdm.c ++++ b/src/mm-port-serial-qcdm.c +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + + #include + #include +-- +2.45.2 +