#### Beyond Linux® From Scratch (System V Edition) - Version 12.3

### Chapter 9. General Libraries

- Prev

  libpaper-2.2.6

- Next

  libptytty-2.0

- Up
- Home

# libportal-0.9.1

## Introduction to libportal

The libportal package provides a library that contains GIO-style async APIs for most Flatpak portals.

This package is known to build and work properly using an LFS 12.3 platform.

### Package Information

- Download (HTTP): https://github.com/flatpak/libportal/releases/download/0.9.1/libportal-0.9.1.tar.xz

- Download MD5 sum: 0c63ee25d2e2986ce4df544fe8149046

- Download size: 108 KB

- Estimated disk space required: 4.0 MB (with tests; add 9 MB for docs)

- Estimated build time: less than 0.1 SBU (add 0.6 SBU for tests)

### libportal Dependencies

#### Required

GLib-2.82.5 (with GObject Introspection)

#### Recommended

GTK-3.24.48 and GTK-4.16.12

#### Recommended (Runtime)

To make this package really useful, install xdg-desktop-portal-1.20.0, xdg-desktop-portal-gtk-1.15.2, xdg-desktop-portal-gnome-47.3 (if running a GNOME desktop environment), and xdg-desktop-portal-lxqt-1.1.0 (if running a LXQt desktop environment). They are not needed if only using this package to satisfy a build dependency.

#### Optional

Gi-DocGen-2025.3 (for documentation), dbusmock-0.34.3 and pytest-8.3.4 (for testing), Qt-6.8.2, and Vala-0.56.17

## Installation of libportal

### Warning

If a previous version of libportal is installed, move the headers out of the way so that later packages do not encounter conflicts (as the `root` user):

    if [ -e /usr/include/libportal ]; then
        rm -rf /usr/include/libportal.old &&
        mv -vf /usr/include/libportal{,.old}
    fi

Install libportal by running the following commands:

    mkdir build &&
    cd    build &&

    meson setup --prefix=/usr --buildtype=release -D docs=false .. &&
    ninja

If you have Gi-DocGen-2025.3 installed and wish to build the API documentation for this package, issue:

    sed -i "/output/s/-1/-0.9.1/" ../doc/meson.build &&
    meson configure -D docs=true                     &&
    ninja

To test the results, issue: ninja test. Note that additional `dbus-daemon` processes may need to be killed after the tests are run.

Now, as the `root` user:

    ninja install

## Command Explanations

`--buildtype=release`: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

`-D docs=false`: Allow building this package without Gi-DocGen-2025.3 installed. If you have Gi-DocGen-2025.3 installed and you wish to rebuild and install the API documentation, a meson configure command will reset this option.

## Contents

Installed Programs: None
Installed Libraries: libportal.so, libportal-gtk3.so, libportal-gtk4.so, and libportal-qt6.so
Installed Directories: /usr/include/libportal and /usr/share/gtk-doc/html/libportal

### Short Descriptions

`libportal.so` | provides GIO-style async APIs for most Flatpak portals
`libportal-gtk3.so` | provides GTK+-3 specific functions for interacting with Flatpak portals
`libportal-gtk4.so` | provides GTK-4 specific functions for interacting with Flatpak portals
`libportal-qt6.so` | provides Qt6-specific functions for interacting with Flatpak portals

- Prev

  libpaper-2.2.6

- Next

  libptytty-2.0

- Up
- Home