Skip to content

Commit e8ee652

Browse files
committed
libqmi: Add port
1 parent 82b57a5 commit e8ee652

File tree

2 files changed

+95
-0
lines changed

2 files changed

+95
-0
lines changed

bootstrap.d/net-libs.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,76 @@ packages:
221221
environ:
222222
DESTDIR: '@THIS_COLLECT_DIR@'
223223

224+
- name: libqmi
225+
architecture: '@OPTION:arch@'
226+
metadata:
227+
summary: Qualcomm MSM (Mobile Station Modem) Interface (QMI) modem protocol library
228+
description: The libqmi package contains a GLib-based library for talking to WWAN modems and devices which speak the Qualcomm MSM Interface (QMI) protocol.
229+
spdx: 'LGPL-2.0-only'
230+
website: 'https://www.freedesktop.org/wiki/Software/libqmi/'
231+
maintainer: "Dennis Bonke <[email protected]>"
232+
categories: ['net-libs']
233+
source:
234+
subdir: 'ports'
235+
git: 'https://gitlab.freedesktop.org/mobile-broadband/libqmi.git'
236+
tag: '1.34.0'
237+
version: '1.34.0'
238+
tools_required:
239+
- system-gcc
240+
- host-pkg-config
241+
- virtual: pkgconfig-for-target
242+
triple: "@OPTION:arch-triple@"
243+
- host-mlibc
244+
- host-gobject-introspection
245+
- host-python
246+
- host-glib
247+
pkgs_required:
248+
- mlibc
249+
- glib
250+
- libgudev
251+
- libmbim
252+
- gobject-introspection
253+
revision: 1
254+
configure:
255+
- args:
256+
- 'meson'
257+
- 'setup'
258+
- '--cross-file'
259+
- '@SOURCE_ROOT@/scripts/meson-@OPTION:[email protected]'
260+
- '--prefix=/usr'
261+
- '--buildtype=debugoptimized'
262+
- '-Dintrospection=true'
263+
- '-Dbash_completion=false'
264+
- '-Drmnet=true'
265+
- '-Dudev=true'
266+
- '-Dqrtr=false'
267+
- '-Dman=false'
268+
- '@THIS_SOURCE_DIR@'
269+
environ:
270+
# Same as below
271+
RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository'
272+
RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so'
273+
build:
274+
- args: ['ninja']
275+
environ:
276+
# Make python load host libraries instead of the ones in the rootfs
277+
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'
278+
# Library path for our run-wrapper that allows it to load managarm libraries
279+
RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository'
280+
# Similar to above, but using a nasty (but working) hack lets us use a Linux mlibc build to execute an
281+
# executable that was cross-compiled for managarm
282+
RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so'
283+
# This is a custom environment variable which tells g-ir-scanner what to use instead of ldd
284+
# We point it at our native ldd-wrapper that's installed as part of host-gobject-introspection
285+
GI_LDD_WRAPPER: ldd-wrapper
286+
# This tells g-ir-scanner what program should be used for "cross-launching" the executables it builds
287+
GI_CROSS_LAUNCHER: run-wrapper
288+
# Path to the introspection data installed by other packages
289+
GI_GIR_PATH: '@SYSROOT_DIR@/usr/share/gir-1.0'
290+
- args: ['ninja', 'install']
291+
environ:
292+
DESTDIR: '@THIS_COLLECT_DIR@'
293+
224294
- name: libsoup
225295
architecture: '@OPTION:arch@'
226296
metadata:
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 2bb74b9cfea19838b1fb4c175caec5377a5a94fa Mon Sep 17 00:00:00 2001
2+
From: Dennis Bonke <[email protected]>
3+
Date: Tue, 18 Jun 2024 21:07:19 +0200
4+
Subject: [PATCH] Add missing _GNU_SOURCE define
5+
6+
Signed-off-by: Dennis Bonke <[email protected]>
7+
---
8+
src/qmi-firmware-update/qfu-at-device.c | 1 +
9+
1 file changed, 1 insertion(+)
10+
11+
diff --git a/src/qmi-firmware-update/qfu-at-device.c b/src/qmi-firmware-update/qfu-at-device.c
12+
index 89005bd..aeeeed0 100644
13+
--- a/src/qmi-firmware-update/qfu-at-device.c
14+
+++ b/src/qmi-firmware-update/qfu-at-device.c
15+
@@ -19,6 +19,7 @@
16+
* Copyright (C) 2016-2017 Aleksander Morgado <[email protected]>
17+
*/
18+
19+
+#define _GNU_SOURCE
20+
#include <errno.h>
21+
#include <fcntl.h>
22+
#include <stdlib.h>
23+
--
24+
2.45.2
25+

0 commit comments

Comments
 (0)