From 856065fdbb7d4503d4d09a0d6532ad7ac2d30e57 Mon Sep 17 00:00:00 2001 From: Dennis Bonke Date: Fri, 2 Feb 2024 23:29:05 +0100 Subject: [PATCH] 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@'